summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-19 10:23:36 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-20 10:43:59 +0100
commitbd4a02d8d3cfb476a2da0f4616605c92604266c0 (patch)
treeaf31b2eb98a645d00f7b1693e33129ab6edcbdf6 /meta/classes
parent7153a17166d9a94fd0ddc36d597a0140979d58ff (diff)
downloadopenembedded-core-bd4a02d8d3cfb476a2da0f4616605c92604266c0.tar.gz
dos2unix.bbclass: Move to oe-core
- Import from meta-oe layer - This is useful for many packages where CR-LF needs to be adjusted, many recipes depend on it e.g. meta-multimedia libebml and so on. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/dos2unix.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/dos2unix.bbclass b/meta/classes/dos2unix.bbclass
new file mode 100644
index 0000000000..3fc17e2196
--- /dev/null
+++ b/meta/classes/dos2unix.bbclass
@@ -0,0 +1,14 @@
+# Class for use to convert all CRLF line terminators to LF
+# provided that some projects are being developed/maintained
+# on Windows so they have different line terminators(CRLF) vs
+# on Linux(LF), which can cause annoying patching errors during
+# git push/checkout processes.
+
+do_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot"
+
+# Convert CRLF line terminators to LF
+do_convert_crlf_to_lf () {
+ find ${S} -type f -exec dos2unix {} \;
+}
+
+addtask convert_crlf_to_lf after do_unpack before do_patch