diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2011-03-31 16:21:27 +0000 |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2011-03-31 16:21:27 +0000 |
commit | 3393b04e8c8a1e7db946a25533d54943c1bea360 (patch) | |
tree | cc2840874c24b3c30b8554bc8cb2b96cd047ffb9 /sys-apps | |
parent | Depend on virtual/ffmpeg instead of media-video/ffmpeg. (diff) | |
download | gentoo-2-3393b04e8c8a1e7db946a25533d54943c1bea360.tar.gz gentoo-2-3393b04e8c8a1e7db946a25533d54943c1bea360.tar.bz2 gentoo-2-3393b04e8c8a1e7db946a25533d54943c1bea360.zip |
Take strndup from gnulib too, breaks on Linux (#361417).
Rename libsvar.patch to more generic gnulib.patch.
(Portage version: 2.2.01.18125-prefix/cvs/AIX 00C0078A4C00)
Diffstat (limited to 'sys-apps')
4 files changed, 93 insertions, 29 deletions
diff --git a/sys-apps/baselayout-prefix/ChangeLog b/sys-apps/baselayout-prefix/ChangeLog index 0aebc5f0cc2d..37d3e019b90d 100644 --- a/sys-apps/baselayout-prefix/ChangeLog +++ b/sys-apps/baselayout-prefix/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/baselayout-prefix # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.7 2011/03/30 11:34:45 haubi Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.8 2011/03/31 16:21:27 haubi Exp $ + + 31 Mar 2011; Michael Haubenwallner <haubi@gentoo.org> + baselayout-prefix-1.12.5-r10.ebuild, +files/baselayout-1.12.5-gnulib.patch, + -files/baselayout-1.12.5-libsvar.patch: + Take strndup from gnulib too, breaks on Linux (#361417). + Rename libsvar.patch to more generic gnulib.patch. *baselayout-prefix-1.12.5-r10 (30 Mar 2011) diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild index e9ada9ae648f..3f66465da694 100644 --- a/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild +++ b/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild @@ -1,21 +1,20 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild,v 1.1 2011/03/30 11:34:45 haubi Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r10.ebuild,v 1.2 2011/03/31 16:21:27 haubi Exp $ EAPI=3 inherit eutils toolchain-funcs multilib prefix flag-o-matic autotools # Needed gnulib modules: -# getopt: for AIX -# strsep: for Solaris +# getopt strndup strsep # Avoid depending on dev-libs/gnulib, might be missing during bootstrap. -# The gnulib tarball has been created using these commands (basically): -# $ gnulib-tool --create-testdir --dir=gnulib getopt strsep -# $ eautoreconf -# $ econf +# The gnulib tarball has been created using these commands (basically), +# from dev-libs/gnulib-2009.03.03.14.07.45-r1: +# $ gnulib-tool --create-testdir --dir=gnulib getopt strndup strsep +# $ ./configure # $ make maintainer-clean -GNULIBV=1 +GNULIBV=2 DESCRIPTION="Minimal baselayout for Gentoo Prefix installs" HOMEPAGE="http://www.gentoo.org/" @@ -64,7 +63,7 @@ src_prepare() { epatch "${FILESDIR}"/${P/-prefix/}-aix.patch epatch "${FILESDIR}"/${P/-prefix/}-darwin-kvm.patch epatch "${FILESDIR}"/${P/-prefix/}-solaris.patch - epatch "${FILESDIR}"/${P/-prefix/}-libsvar.patch + epatch "${FILESDIR}"/${P/-prefix/}-gnulib.patch # The consoletype application in this form will only work on Linux [[ ${CHOST} == *-linux-* ]] || epatch "${FILESDIR}"/${P/-prefix/}-prefix-no-consoletype.patch diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch new file mode 100644 index 000000000000..dfb64c633206 --- /dev/null +++ b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch @@ -0,0 +1,78 @@ +Need to add libraries after object files, or solaris +linker might not see library's symbols to be needed +when added to LDFLAGS. + +Take strndup from gnulib too, this decl breaks on Linux (#361417). + +VERSION is defined in gnulib's config.h. + +--- src/Makefile.orig 2011-03-30 13:15:56 +0200 ++++ src/Makefile 2011-03-30 13:16:52 +0200 +@@ -30,10 +30,10 @@ + $(CC) $(CFLAGS) -c -o $@ $^ + + runscript: runscript.o rs-misc.o +- $(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_RS) ++ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_RS) + + start-stop-daemon: start-stop-daemon.c +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_SSD) + + install: $(TARGET) + install -m 0755 -d $(DESTDIR)/bin +--- src/core/misc.c.orig 2011-03-31 17:46:46 +0200 ++++ src/core/misc.c 2011-03-31 17:47:03 +0200 +@@ -86,31 +86,6 @@ + return new_path; + } + +-char *strndup(const char *str, size_t size) { +- char *new_str = NULL; +- size_t len; +- +- if (NULL == str) { +- DBG_MSG("Invalid argument passed!\n"); +- errno = EINVAL; +- return NULL; +- } +- +- /* Check lenght of str without breaching the size limit */ +- for (len = 0;(len < size) && ('\0' != str[len]);len++); +- +- new_str = malloc(len + 1); +- if (NULL == new_str) { +- DBG_MSG("Failed to allocate buffer!\n"); +- return NULL; +- } +- +- /* Make sure our string is NULL terminated */ +- new_str[len] = '\0'; +- +- return (char *)memcpy(new_str, str, len); +-} +- + char *gbasename(const char *path) { + char *new_path = NULL; + +--- src/core/misc.h.orig 2011-03-31 17:46:43 +0200 ++++ src/core/misc.h 2011-03-31 18:06:58 +0200 +@@ -246,8 +246,6 @@ + * with the malloc() call. */ + char *strcatpaths(const char *pathname1, const char *pathname2); + +-/* Compat functions for GNU extensions */ +-char *strndup(const char *str, size_t size); + /* Same as basename(3), but do not modify path */ + char *gbasename(const char *path); + +--- src/start-stop-daemon.c.orig 2011-03-31 18:11:02 +0200 ++++ src/start-stop-daemon.c 2011-03-31 18:11:03 +0200 +@@ -31,6 +31,7 @@ + * + */ + ++#undef VERSION + #define VERSION "1.13.11+gentoo" + + #define NONRETURNPRINTFFORMAT(x, y) \ diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-libsvar.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-libsvar.patch deleted file mode 100644 index 22a3624ae5f6..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-libsvar.patch +++ /dev/null @@ -1,19 +0,0 @@ -Need to add libraries after object files, or solaris -linker might not see library's symbols to be needed -when added to LDFLAGS. - ---- src/Makefile.orig 2011-03-30 13:15:56 +0200 -+++ src/Makefile 2011-03-30 13:16:52 +0200 -@@ -30,10 +30,10 @@ - $(CC) $(CFLAGS) -c -o $@ $^ - - runscript: runscript.o rs-misc.o -- $(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_RS) -+ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_RS) - - start-stop-daemon: start-stop-daemon.c -- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_SSD) - - install: $(TARGET) - install -m 0755 -d $(DESTDIR)/bin |