See the comments of the patches for a description. Signed-off-by: Bernhard Walle <bernh...@bwalle.de> --- ...-Fix-build-if-stpncpy-is-defined-as-macro.patch | 44 ++++++++++++++++++++ ...02-Fix-relocatable-installation-on-Darwin.patch | 44 ++++++++++++++++++++ patches/gettext-0.18.1/series | 5 +++ 3 Dateien geändert, 93 Zeilen hinzugefügt(+) create mode 100644 patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch create mode 100644 patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch create mode 100644 patches/gettext-0.18.1/series
diff --git a/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch new file mode 100644 index 0000000..e5c45a9 --- /dev/null +++ b/patches/gettext-0.18.1/0001-Fix-build-if-stpncpy-is-defined-as-macro.patch @@ -0,0 +1,44 @@ +From 1e2d81ef811df58db004191d21b2d5e15ef4cf0d Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernh...@bwalle.de> +Date: Sat, 5 May 2012 10:16:16 +0200 +Subject: [PATCH] Fix build if stpncpy is defined as macro + +One such operating system where stpncpy is defined as macro is Mac OS X +(Darwin). + +The problem is already fixed with following commit in gnulib: + + commit c5728261c324a75f8d23dd7d10cb42dde9420227 + Author: Bruno Haible <br...@clisp.org> + Date: Mon Aug 16 02:09:11 2010 +0200 + + stpncpy: Allow stpncpy to be defined as a macro. + +However, applying that patch involves re-running autotools. As they rely +on specific versions, this is a mess. This change is not nice but it +avoids that problems. + +Signed-off-by: Bernhard Walle <bernh...@bwalle.de> +--- + gettext-tools/gnulib-lib/stpncpy.c | 4 ++++ + 1 Datei geändert, 4 Zeilen hinzugefügt(+) + +diff --git a/gettext-tools/gnulib-lib/stpncpy.c b/gettext-tools/gnulib-lib/stpncpy.c +index ca53ebb..4ad6db5 100644 +--- a/gettext-tools/gnulib-lib/stpncpy.c ++++ b/gettext-tools/gnulib-lib/stpncpy.c +@@ -24,6 +24,8 @@ + /* Specification. */ + #include <string.h> + ++#ifndef stpncpy ++ + #ifndef weak_alias + # define __stpncpy stpncpy + #endif +@@ -90,3 +92,5 @@ __stpncpy (char *dest, const char *src, size_t n) + #ifdef weak_alias + weak_alias (__stpncpy, stpncpy) + #endif ++ ++#endif /* stpncpy */ diff --git a/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch new file mode 100644 index 0000000..289d030 --- /dev/null +++ b/patches/gettext-0.18.1/0002-Fix-relocatable-installation-on-Darwin.patch @@ -0,0 +1,44 @@ +From 5b6020579a18b0c81ad6a20ae87f9681e856151b Mon Sep 17 00:00:00 2001 +From: Bernhard Walle <bernh...@bwalle.de> +Date: Sun, 6 May 2012 20:32:56 +0200 +Subject: [PATCH] Fix relocatable installation on Darwin + +Without the patch, I get following error when installing host-gettext: + +----------------------------- 8< ------------------------------------ +.../platform-versatilepb/sysroot-host/include -g -O2 + -L..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,..../platform-versatilepb/sysroot-host/lib + -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages + -I../gnulib-lib -I../gnulib-lib -I.. -DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC -DINSTALLPREFIX="" + -DINSTALLDIR="/bin" -DLIBPATHVAR="DYLD_LIBRARY_PATH" -DLIBDIRS="/lib", -DEXEEXT="" ../gnulib-lib/relocwrapper.c + ../gnulib-lib/progname.c ../gnulib-lib/progreloc.c ../gnulib-lib/areadlink.c ../gnulib-lib/readlink.c + ../gnulib-lib/canonicalize-lgpl.c ../gnulib-lib/malloca.c ../gnulib-lib/relocatable.c + ../gnulib-lib/setenv.c ../gnulib-lib/strerror.c ../gnulib-lib/c-ctype.c + -o ..../packages/host-gettext-0.18.1/bin/gettext.wrapper +Undefined symbols for architecture x86_64: + "_rpl_stat", referenced from: + _rpl_readlink in ccx1kquY.o + "_rpl_lstat", referenced from: + _rpl_realpath in ccDavvkQ.o +ld: symbol(s) not found for architecture x86_64 +----------------------------- >8 ------------------------------------ + +Signed-off-by: Bernhard Walle <bernh...@bwalle.de> +--- + build-aux/install-reloc | 2 ++ + 1 Datei geändert, 2 Zeilen hinzugefügt(+) + +diff --git a/build-aux/install-reloc b/build-aux/install-reloc +index b5223a9..dd6fc51 100755 +--- a/build-aux/install-reloc ++++ b/build-aux/install-reloc +@@ -157,6 +157,8 @@ func_verbose $compile_command \ + "$srcdir"/progreloc.c \ + "$srcdir"/areadlink.c \ + "$srcdir"/readlink.c \ ++ "$srcdir"/stat.c \ ++ "$srcdir"/lstat.c \ + "$srcdir"/canonicalize-lgpl.c \ + "$srcdir"/malloca.c \ + "$srcdir"/relocatable.c \ diff --git a/patches/gettext-0.18.1/series b/patches/gettext-0.18.1/series new file mode 100644 index 0000000..206380e --- /dev/null +++ b/patches/gettext-0.18.1/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Fix-build-if-stpncpy-is-defined-as-macro.patch +0002-Fix-relocatable-installation-on-Darwin.patch +# 0dc9ec23506a7d86f04d8566cdf8d62c - git-ptx-patches magic -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de