diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-misc/fortune-mod |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-misc/fortune-mod')
-rw-r--r-- | games-misc/fortune-mod/Manifest | 7 | ||||
-rw-r--r-- | games-misc/fortune-mod/files/01_all_fortune_all-fix.patch | 21 | ||||
-rw-r--r-- | games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch | 99 | ||||
-rw-r--r-- | games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild | 57 | ||||
-rw-r--r-- | games-misc/fortune-mod/metadata.xml | 8 |
5 files changed, 192 insertions, 0 deletions
diff --git a/games-misc/fortune-mod/Manifest b/games-misc/fortune-mod/Manifest new file mode 100644 index 000000000000..8bf3046102a9 --- /dev/null +++ b/games-misc/fortune-mod/Manifest @@ -0,0 +1,7 @@ +AUX 01_all_fortune_all-fix.patch 783 SHA256 2208361d950999f14d59eda8f7b07e1fbef500d1424dd54bee7ad2082dee62c1 SHA512 52211ad8a5f29bc65314fff58e151a7890f0f5d1d6e613b67e693f0bf4ece09219febdb9291ff006901d48b6c50dab0f5507201d412760ddc5d7857c74e11e86 WHIRLPOOL 3e33f7f89d40e37a7bd3890a2f406e2644a513ae76d304b66955127c9b39f939b84f8f2d74772ca1793e2225df3ebfa14504e1ed6d77fdfbb1b34eb50ace4461 +AUX fortune-mod-1.99.1-gentoo.patch 2699 SHA256 840c56ee0128d118a861dd33c3aa04e635d20af5febc626864cdc22943223490 SHA512 83ad811f73216db89eaea52a1a55b63e6f12f8580fd3e360b7adc6e80066c0d6d79191e6c2fbe3e2b78cf446bdb0500562cd9fe8cf00375af76034861b2ab54c WHIRLPOOL c854a8e1758ee64968c901154c190f86c9f83cbf9d348634dbe32be82347893c151777a044f580de6c47eef8ea7eb79efec1e42e0a3eb40162d51750c193ae5c +DIST fortune-mod-1.99.1.tar.gz 1812089 SHA256 fc51aee1f73c936c885f4e0f8b6b48f4f68103e3896eaddc6a45d2b71e14eace SHA512 4c06ea37532dd59f0251d7c49538bee703852c60a3247aba7c516f4f0d4b8ab15b9d7495d004a6423acd74c4dd7532e3dbe1679d6904ab373b617a3386205cde WHIRLPOOL 4968663675bdb03db39d31c2ed359b99d5b2416d474d773c59b90cae5193caf213ee41cc70f34c3247af971da34f83e724f3d11c6ac266fd9fad766ed1ec7285 +EBUILD fortune-mod-1.99.1-r2.ebuild 1726 SHA256 3006227e6a9053660e0291fe5d8042272c502858d069896b15217d5b24a02e34 SHA512 cb16e5e5047c5ae51fa1962cdd72ea0e579689a2ceaacdbaac5c48587336c63b58506cf83fbbd694b1f05e1e0f9ef76a3f1ad81eaddd6eae1ec618508d24a699 WHIRLPOOL b3fda4971e13d3eacda9ea3ae95139e6dbdb91444025d1f8d78cfb817fdfab3c178ff3c4a2c34ab48e4f3f17947591ea7bf64da2716c0d3ef79e2ef7c8235659 +MISC ChangeLog 2528 SHA256 4283b9ca69fc506c9b17014fe9e2dfcdebc9c248c7642aa7ac35c6f7094166e7 SHA512 11a294fe288ebe580964aee7200079414a8a8fa0a80a2811554b67c705b138f784c57294d424d050ba66b60837ec5d05062aea41a17796b2c66bd2254391f7b4 WHIRLPOOL 8df08cf3c07f5318e2cad411f0541f3f1707b835a77d948d35d11841108136934704712d46837d7e0dbde7afafd8654de42752578676ffe906a31d8701e7b7b1 +MISC ChangeLog-2015 6206 SHA256 37b71aa7a884bfc11f062767933ee047dea74b920b8f856c56a9a3bf057e6eda SHA512 13e83bda4c81f4914045f6df7c2eea2bc52555482b3adfcdbc19bf4800ddbd87d979919ab65ea1899660bd29850ad865f39a046e89d3cb939456a54fc780a799 WHIRLPOOL 89240271a503b93b96eba40d870242720f4d0720e21755d8bb87c2d35b8fd5131d39ca61ce910936df8f1f4a2c8f121d89c149b01f3ef3f9cc333248fba544a3 +MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088 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 new file mode 100644 index 000000000000..b4175ac81bfc --- /dev/null +++ b/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch @@ -0,0 +1,21 @@ +--- fortune/fortune.c.old 2006-03-11 15:33:14.000000000 +0100 ++++ fortune/fortune.c 2006-03-11 15:43:16.000000000 +0100 +@@ -974,7 +974,7 @@ + if (!ret) + ret=add_file(percent, fullpathname, NULL, &File_list, + &File_tail, NULL); +- if ( (!ret && fullpathname != locpathname) || strcmp(sp, "all") == 0 ) ++ if (!ret && strncmp(fullpathname, locpathname, sizeof(fullpathname))) + ret=add_file(percent, locpathname, NULL, &File_list, + &File_tail, NULL); + +@@ -985,7 +985,8 @@ + } + if (!ret) + return FALSE; +- ++ if (strncmp(fullpathname, locpathname, sizeof(fullpathname)) && strcmp(sp, "all") == 0) ++ add_file(percent, locpathname, NULL, &File_list, &File_tail, NULL); + } + else + if (!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 new file mode 100644 index 000000000000..d9b27fb350e5 --- /dev/null +++ b/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch @@ -0,0 +1,99 @@ +--- fortune-mod-1.99.1/datfiles/Makefile ++++ fortune-mod-1.99.1/datfiles/Makefile +@@ -58,7 +58,7 @@ + if [ $(WEB) = 1 ] ; then cd html && $(MAKE) install ; fi + for i in $(COOKIES) ; do \ + install -m 0644 $$i $$i.dat $(COOKIEDIR) || exit $? ; \ +- cp -d $$i.u8 $(COOKIEDIR) ; \ ++ cp -P $$i.u8 $(COOKIEDIR) ; \ + done + + clean: +--- fortune-mod-1.99.1/datfiles/off/Makefile ++++ fortune-mod-1.99.1/datfiles/off/Makefile +@@ -38,7 +38,7 @@ + install -m 0755 -d $(OCOOKIEDIR) + for i in $(OCOOKIES) ; \ + do install -m 0644 $$i $$i.dat $(OCOOKIEDIR) || exit $$? ; \ +- cp -d $$i.u8 $(OCOOKIEDIR) ; \ ++ cp -P $$i.u8 $(OCOOKIEDIR) ; \ + done + + clean: +--- fortune-mod-1.99.1/Makefile ++++ fortune-mod-1.99.1/Makefile +@@ -65,8 +65,7 @@ + RECODELIBS=-lrecode + + DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" -DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\"" +-CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char +-LDFLAGS=-s ++CFLAGS += $(DEFINES) -fsigned-char + + # 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 +@@ -97,7 +97,7 @@ + #endif /* killing warnings */ + + #define PROGRAM_NAME "fortune-mod" +-#define PROGRAM_VERSION "9708" ++#define PROGRAM_VERSION "1.99.1" + + #ifdef HAVE_STDBOOL_H + #include <stdbool.h> +@@ -256,6 +256,7 @@ + + int add_dir(register FILEDESC *); + ++const char *program_name; + char *program_version(void) + { + static char buf[BUFSIZ]; +@@ -1675,14 +1675,17 @@ + char *ctype, *crequest; + getargs(ac, av); + ++ program_name = (char *const) av[0]; + outer = recode_new_outer(true); + request = recode_new_request (outer); + + setlocale(LC_ALL,""); + ctype = nl_langinfo(CODESET); +- if(strcmp(ctype,"ANSI_X3.4-1968") == 0) +- ctype="ISO-8859-1"; +- ++ if (!ctype || !*ctype) ++ ctype="C"; /* revert to C if no valid envvars! */ ++ else ++ if(strcmp(ctype,"ANSI_X3.4-1968") == 0) ++ ctype="ISO-8859-1"; + 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 +@@ -5,10 +5,11 @@ + + #include <stdio.h> + #include <ctype.h> ++#include <stdlib.h> + + int main(void) + { +- char a, b; ++ short int a, b; + + while ((a = getchar()) != EOF) + { +--- fortune-mod-1.99.1/util/unstr.c ++++ fortune-mod-1.99.1/util/unstr.c +@@ -96,6 +96,7 @@ + #include <string.h> + #include <unistd.h> + ++#include <stdlib.h> + #ifndef MAXPATHLEN + #define MAXPATHLEN 1024 + #endif /* MAXPATHLEN */ diff --git a/games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild b/games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild new file mode 100644 index 000000000000..de59ad262af6 --- /dev/null +++ b/games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="The notorious fortune program" +HOMEPAGE="http://www.redellipse.net/code/fortune" +SRC_URI="http://www.redellipse.net/code/downloads/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa m68k ~mips ppc64 s390 sh x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris" +IUSE="offensive elibc_glibc" + +DEPEND="app-text/recode" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/01_all_fortune_all-fix.patch + + sed -i \ + -e 's:/games::' \ + -e 's:/fortunes:/fortune:' \ + -e '/^FORTDIR=/s:=.*:=$(prefix)/usr/bin:' \ + -e '/^all:/s:$: fortune/fortune.man:' \ + -e "/^OFFENSIVE=/s:=.*:=`use offensive && echo 1 || echo 0`:" \ + Makefile || die "sed Makefile failed" + + if ! use elibc_glibc ; then + [[ ${CHOST} == *-*bsd* ]] && local reglibs="-lcompat" + [[ ${CHOST} == *-darwin* ]] && local reglibs="-lc" + has_version "app-text/recode[nls]" && reglibs="${reglibs} -lintl" + sed -i \ + -e "/^REGEXLIBS=/s:=.*:= ${reglibs}:" \ + 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 +} + +src_compile() { + local myrex= + [[ ${CHOST} == *-interix* ]] && myrex="REGEXDEFS=-DNO_REGEX" + emake prefix="${EPREFIX}" CC="$(tc-getCC)" $myrex +} + +src_install() { + emake prefix="${ED}" install + dodoc ChangeLog INDEX Notes Offensive README TODO cookie-files +} diff --git a/games-misc/fortune-mod/metadata.xml b/games-misc/fortune-mod/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-misc/fortune-mod/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> +</pkgmetadata> |