summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2018-04-12 15:49:29 -0700
committerJuro Bystricky <juro.bystricky@intel.com>2018-04-12 16:23:31 -0700
commiteee38fa5f2a376c840878fb818cb1dabd9a45491 (patch)
tree478f29e0cc0d0cc7b72ce89d7eb431cd9a532bfd
parent6a7e6a53bb1198d9f99e6b91947ddf31627b7db4 (diff)
downloadmeta-mingw-eee38fa5f2a376c840878fb818cb1dabd9a45491.tar.gz
diffutils_3.6: build for mingw
Build of diffutils was requested/broken for mingw because of the commit "diffutils: allow native & nativesdk builds" This patch implements neccessary steps needed to build diffutils executables: cmp.exe diff.exe diff3.exe sdiff.exe [YOCTO #12662] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-rw-r--r--recipes-extended/diffutils/diffutils/sdiff-no-kill.patch18
-rw-r--r--recipes-extended/diffutils/diffutils_3.6.bbappend18
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch b/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch
new file mode 100644
index 0000000..70e7caf
--- /dev/null
+++ b/recipes-extended/diffutils/diffutils/sdiff-no-kill.patch
@@ -0,0 +1,18 @@
1"kill" is not supported by mingw, so compile conditionally,
2(same condition as another instance of "kill" in the source code).
3
4Upstream-Status: Pending
5Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
6
7--- a/src/sdiff.c
8+++ b/src/sdiff.c
9@@ -805,7 +805,9 @@
10
11 /* Yield an exit status indicating that a signal was received. */
12 untrapsig (s);
13+#if HAVE_WORKING_FORK
14 kill (getpid (), s);
15+#endif
16
17 /* That didn't work, so exit with error status. */
18 exit (EXIT_TROUBLE);
diff --git a/recipes-extended/diffutils/diffutils_3.6.bbappend b/recipes-extended/diffutils/diffutils_3.6.bbappend
new file mode 100644
index 0000000..f301349
--- /dev/null
+++ b/recipes-extended/diffutils/diffutils_3.6.bbappend
@@ -0,0 +1,18 @@
1
2FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
3
4SRC_URI_remove_mingw32 = "file://0001-explicitly-disable-replacing-getopt.patch"
5SRC_URI_append_mingw32 = " file://sdiff-no-kill.patch"
6
7CACHED_CONFIGUREVARS_append_mingw32 = " ac_cv_header_getopt_h=yes "
8
9# Add some definitions for POSIX signals..
10CFLAGS_append_mingw32 = " -DSIGALRM=14 -DSIGHUP=1 -DSIGQUIT=3 -DSIGPIPE=13 -DSIGTSTP=18 -DSIGSTOP=17 "
11
12do_configure_prepend_mingw32 () {
13 # Remove building of "man"
14 sed -i -e 's:^SUBDIRS = lib src tests doc man po gnulib-test:SUBDIRS = lib src tests doc po gnulib-test:g' ${S}/Makefile.am
15}
16
17
18