From 539989d800e390dd381ecaefc9aa96b9715dd6c4 Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Thu, 6 Aug 2009 11:32:16 +0000 Subject: Fix building with GLIBC 2.10+ wrt #277760. (Portage version: 2.2_rc36/cvs/Linux x86_64) --- app-text/bogosort/ChangeLog | 6 +++- app-text/bogosort/bogosort-0.4.2.ebuild | 8 ++--- .../bogosort/files/bogosort-0.4.2-glibc-2.10.patch | 41 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 app-text/bogosort/files/bogosort-0.4.2-glibc-2.10.patch diff --git a/app-text/bogosort/ChangeLog b/app-text/bogosort/ChangeLog index 23096c07d3ed..e42076266a80 100644 --- a/app-text/bogosort/ChangeLog +++ b/app-text/bogosort/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-text/bogosort # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/bogosort/ChangeLog,v 1.13 2009/07/03 01:04:54 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/bogosort/ChangeLog,v 1.14 2009/08/06 11:32:16 ssuominen Exp $ + + 06 Aug 2009; Samuli Suominen bogosort-0.4.2.ebuild, + +files/bogosort-0.4.2-glibc-2.10.patch: + Fix building with GLIBC 2.10+ wrt #277760. 03 Jul 2009; Jeroen Roovers bogosort-0.4.2.ebuild: Quote some variables too. diff --git a/app-text/bogosort/bogosort-0.4.2.ebuild b/app-text/bogosort/bogosort-0.4.2.ebuild index 77664419a4c2..8a88a1b3c28b 100644 --- a/app-text/bogosort/bogosort-0.4.2.ebuild +++ b/app-text/bogosort/bogosort-0.4.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/bogosort/bogosort-0.4.2.ebuild,v 1.10 2009/07/03 01:04:54 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/bogosort/bogosort-0.4.2.ebuild,v 1.11 2009/08/06 11:32:16 ssuominen Exp $ inherit libtool eutils toolchain-funcs @@ -10,7 +10,7 @@ SRC_URI="ftp://ulrik.haugen.se/pub/unix/bogosort/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="hppa mips ppc sparc x86" +KEYWORDS="~amd64 hppa mips ppc sparc x86" IUSE="" DEPEND="" @@ -18,9 +18,9 @@ RDEPEND="" src_unpack() { unpack ${A} - cd "${S}" - epatch "${FILESDIR}/xmalloc.patch" + epatch "${FILESDIR}"/xmalloc.patch + epatch "${FILESDIR}"/${P}-glibc-2.10.patch } src_compile() { diff --git a/app-text/bogosort/files/bogosort-0.4.2-glibc-2.10.patch b/app-text/bogosort/files/bogosort-0.4.2-glibc-2.10.patch new file mode 100644 index 000000000000..ac54c8b61b05 --- /dev/null +++ b/app-text/bogosort/files/bogosort-0.4.2-glibc-2.10.patch @@ -0,0 +1,41 @@ +diff -ur bogosort-0.4.2.orig/getlines.c bogosort-0.4.2/getlines.c +--- bogosort-0.4.2.orig/getlines.c 2002-05-04 23:22:22.000000000 +0300 ++++ bogosort-0.4.2/getlines.c 2009-08-06 14:32:22.000000000 +0300 +@@ -49,7 +49,7 @@ + char **ss = NULL; + + /* read all lines available */ +- while ((s = getline(stream)) != NULL) { ++ while ((s = get_line(stream)) != NULL) { + if (numlines == allocated) /* make more room if needed */ + ss = (char **)xrealloc(ss, + (allocated += LINESTEP) * sizeof (char *)); +@@ -81,7 +81,7 @@ + allocated = numlines + 1; /* this is a lie, but it's close enough */ + + /* read all lines available */ +- while ((s = getline(stream)) != NULL) { ++ while ((s = get_line(stream)) != NULL) { + if (numlines == allocated) /* make more room if needed */ + ss = (char **)xrealloc(ss, + (allocated += LINESTEP) * sizeof (char *)); +@@ -100,7 +100,7 @@ + * line in stream, return NULL on EOF + */ + char * +-getline(FILE *stream) ++get_line(FILE *stream) + { + int c, numchars = 0, allocated = 0; + char *s = NULL; +diff -ur bogosort-0.4.2.orig/getlines.h bogosort-0.4.2/getlines.h +--- bogosort-0.4.2.orig/getlines.h 2002-03-16 00:04:38.000000000 +0200 ++++ bogosort-0.4.2/getlines.h 2009-08-06 14:32:48.000000000 +0300 +@@ -39,6 +39,6 @@ + * getline: return a pointer to a newly allocated string containing the next + * line in stream + */ +-char *getline(FILE *stream); ++char *get_line(FILE *stream); + + #endif /* GETLINES_H */ -- cgit v1.2.3-65-gdbad