diff options
author | Sam James <sam@gentoo.org> | 2021-04-19 12:14:58 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-04-19 20:11:32 +0100 |
commit | 198244e0d5959357660222835b596a7939dab66f (patch) | |
tree | a26d6196becb598acbc4fb7f0e8089fad5c9948d /app-text/bogosort | |
parent | dev-libs/libsodium: tidy up patch (diff) | |
download | gentoo-198244e0d5959357660222835b596a7939dab66f.tar.gz gentoo-198244e0d5959357660222835b596a7939dab66f.tar.bz2 gentoo-198244e0d5959357660222835b596a7939dab66f.zip |
app-text/bogosort: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/bogosort')
-rw-r--r-- | app-text/bogosort/bogosort-0.4.2-r1.ebuild | 24 | ||||
-rw-r--r-- | app-text/bogosort/files/bogosort-0.4.2-glibc-2.10.patch | 10 | ||||
-rw-r--r-- | app-text/bogosort/files/bogosort-0.4.2-implicit-decl.patch | 38 | ||||
-rw-r--r-- | app-text/bogosort/files/xmalloc.patch | 4 |
4 files changed, 60 insertions, 16 deletions
diff --git a/app-text/bogosort/bogosort-0.4.2-r1.ebuild b/app-text/bogosort/bogosort-0.4.2-r1.ebuild index 8cee0c78b4ca..a8a12ad1ae77 100644 --- a/app-text/bogosort/bogosort-0.4.2-r1.ebuild +++ b/app-text/bogosort/bogosort-0.4.2-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -inherit epatch toolchain-funcs +inherit autotools toolchain-funcs DESCRIPTION="A file sorting program which uses the bogosort algorithm" HOMEPAGE="http://www.lysator.liu.se/~qha/bogosort/" @@ -12,15 +12,23 @@ SRC_URI="ftp://ulrik.haugen.se/pub/unix/bogosort/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~hppa ~mips ppc sparc x86 ~x86-linux ~ppc-macos" -IUSE="" -DEPEND="" -RDEPEND="" +PATCHES=( + "${FILESDIR}"/xmalloc.patch + "${FILESDIR}"/${P}-glibc-2.10.patch + "${FILESDIR}"/${PN}-0.4.2-implicit-decl.patch +) src_prepare() { - epatch \ - "${FILESDIR}"/xmalloc.patch \ - "${FILESDIR}"/${P}-glibc-2.10.patch + default + + mv configure.{in,ac} || die + + sed -i \ + -e 's:-O0::' \ + -e '/maintainer-targets/d' \ + Makefile.am || die + eautoreconf } src_configure() { 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 index ac54c8b61b05..98a9eceb1377 100644 --- 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 @@ -1,6 +1,5 @@ -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 +--- a/getlines.c ++++ b/getlines.c @@ -49,7 +49,7 @@ char **ss = NULL; @@ -28,9 +27,8 @@ diff -ur bogosort-0.4.2.orig/getlines.c bogosort-0.4.2/getlines.c { 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 +--- a/getlines.h ++++ b/getlines.h @@ -39,6 +39,6 @@ * getline: return a pointer to a newly allocated string containing the next * line in stream diff --git a/app-text/bogosort/files/bogosort-0.4.2-implicit-decl.patch b/app-text/bogosort/files/bogosort-0.4.2-implicit-decl.patch new file mode 100644 index 000000000000..2eefc4099fa4 --- /dev/null +++ b/app-text/bogosort/files/bogosort-0.4.2-implicit-decl.patch @@ -0,0 +1,38 @@ +diff --git a/xmalloc.c b/xmalloc.c +index a2c7689..dd00346 100644 +--- a/xmalloc.c ++++ b/xmalloc.c +@@ -29,6 +29,7 @@ + + #if STDC_HEADERS + # include <stdlib.h> ++# include <string.h> + #else + VOID *calloc (); + VOID *malloc (); +diff --git a/system.h b/system.h +index 993dd36..b9fee80 100644 +--- a/system.h ++++ b/system.h +@@ -159,20 +159,7 @@ struct utimbuf + + /* Don't use bcopy! Use memmove if source and destination may overlap, + memcpy otherwise. */ +- +-#ifdef HAVE_STRING_H +-# if !STDC_HEADERS && HAVE_MEMORY_H +-# include <memory.h> +-# endif +-# include <string.h> +-#else +-# ifndef HAVE_STRCHR +-# define strchr index +-# define strrchr rindex +-# endif /* HAVE_STRCHR */ +-char *strchr(), *strrchr(); +-char *memchr (); +-#endif ++#include <string.h> + + #include <errno.h> + #ifndef errno diff --git a/app-text/bogosort/files/xmalloc.patch b/app-text/bogosort/files/xmalloc.patch index 41545ca34ba8..ed137e83727c 100644 --- a/app-text/bogosort/files/xmalloc.patch +++ b/app-text/bogosort/files/xmalloc.patch @@ -1,5 +1,5 @@ ---- xmalloc.c.orig 2004-12-15 23:44:16.880786468 +0100 -+++ xmalloc.c 2004-12-15 23:44:21.846546805 +0100 +--- a/xmalloc.c ++++ b/xmalloc.c @@ -68,12 +68,6 @@ The caller may set it to some other value. */ int xmalloc_exit_failure = EXIT_FAILURE; |