From 3e90b0c862508413578a360226182797a470b08b Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 4 Apr 2021 08:43:28 +0000 Subject: games-misc/fortune-mod: port to EAPI 7, eutils-- Signed-off-by: Sam James --- .../fortune-mod/files/01_all_fortune_all-fix.patch | 4 ++-- .../files/fortune-mod-1.99.1-gentoo.patch | 24 +++++++++++----------- .../fortune-mod/fortune-mod-1.99.1-r3.ebuild | 17 ++++++++++----- 3 files changed, 26 insertions(+), 19 deletions(-) (limited to 'games-misc/fortune-mod') diff --git a/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch b/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch index b4175ac81bfc..48807293bf1a 100644 --- a/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch +++ b/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch @@ -1,5 +1,5 @@ ---- fortune/fortune.c.old 2006-03-11 15:33:14.000000000 +0100 -+++ fortune/fortune.c 2006-03-11 15:43:16.000000000 +0100 +--- a/fortune/fortune.c ++++ b/fortune/fortune.c @@ -974,7 +974,7 @@ if (!ret) ret=add_file(percent, fullpathname, NULL, &File_list, diff --git a/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch b/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch index d9b27fb350e5..97f04259ba92 100644 --- a/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch +++ b/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch @@ -1,5 +1,5 @@ ---- fortune-mod-1.99.1/datfiles/Makefile -+++ fortune-mod-1.99.1/datfiles/Makefile +--- a/datfiles/Makefile ++++ b/datfiles/Makefile @@ -58,7 +58,7 @@ if [ $(WEB) = 1 ] ; then cd html && $(MAKE) install ; fi for i in $(COOKIES) ; do \ @@ -9,8 +9,8 @@ done clean: ---- fortune-mod-1.99.1/datfiles/off/Makefile -+++ fortune-mod-1.99.1/datfiles/off/Makefile +--- a/datfiles/off/Makefile ++++ b/datfiles/off/Makefile @@ -38,7 +38,7 @@ install -m 0755 -d $(OCOOKIEDIR) for i in $(OCOOKIES) ; \ @@ -20,8 +20,8 @@ done clean: ---- fortune-mod-1.99.1/Makefile -+++ fortune-mod-1.99.1/Makefile +--- a/Makefile ++++ b/Makefile @@ -65,8 +65,7 @@ RECODELIBS=-lrecode @@ -32,8 +32,8 @@ # The above flags are used by default; the debug flags are used when make # is called with a debug target, such as 'make debug' ---- fortune-mod-1.99.1/fortune/fortune.c -+++ fortune-mod-1.99.1/fortune/fortune.c +--- a/fortune/fortune.c ++++ b/fortune/fortune.c @@ -97,7 +97,7 @@ #endif /* killing warnings */ @@ -72,8 +72,8 @@ crequest = malloc(strlen(ctype) + 7 + 1); sprintf(crequest, "UTF-8..%s", ctype); recode_scan_request (request, crequest); ---- fortune-mod-1.99.1/util/rot.c -+++ fortune-mod-1.99.1/util/rot.c +--- a/util/rot.c ++++ b/util/rot.c @@ -5,10 +5,11 @@ #include @@ -87,8 +87,8 @@ while ((a = getchar()) != EOF) { ---- fortune-mod-1.99.1/util/unstr.c -+++ fortune-mod-1.99.1/util/unstr.c +--- a/util/unstr.c ++++ b/util/unstr.c @@ -96,6 +96,7 @@ #include #include diff --git a/games-misc/fortune-mod/fortune-mod-1.99.1-r3.ebuild b/games-misc/fortune-mod/fortune-mod-1.99.1-r3.ebuild index d9c0b620388c..e3e2019a48a7 100644 --- a/games-misc/fortune-mod/fortune-mod-1.99.1-r3.ebuild +++ b/games-misc/fortune-mod/fortune-mod-1.99.1-r3.ebuild @@ -1,8 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils toolchain-funcs +EAPI=7 + +inherit toolchain-funcs DESCRIPTION="The notorious fortune program" HOMEPAGE="http://www.redellipse.net/code/fortune" @@ -16,9 +17,13 @@ IUSE="offensive elibc_glibc" DEPEND="app-text/recode:0=" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/01_all_fortune_all-fix.patch +) + src_prepare() { - epatch "${FILESDIR}"/${P}-gentoo.patch \ - "${FILESDIR}"/01_all_fortune_all-fix.patch + default sed -i \ -e 's:/games::' \ @@ -37,9 +42,11 @@ src_prepare() { Makefile \ || die "sed REGEXLIBS failed" fi + if [[ ${CHOST} == *-solaris* ]] ; then sed -i -e 's:u_int:uint:g' util/strfile.h || die "sed strfile.h failed" fi + if [[ ${CHOST} == *-darwin* ]] ; then sed -i -e 's/-DBSD_REGEX/-DPOSIX_REGEX/' Makefile || die "sed Makefile failed" fi @@ -48,7 +55,7 @@ src_prepare() { src_compile() { local myrex= [[ ${CHOST} == *-interix* ]] && myrex="REGEXDEFS=-DNO_REGEX" - emake prefix="${EPREFIX}" CC="$(tc-getCC)" $myrex + emake prefix="${EPREFIX}" CC="$(tc-getCC)" ${myrex} } src_install() { -- cgit v1.2.3-65-gdbad