From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- games-misc/fortune-mod/Manifest | 1 + .../fortune-mod/files/01_all_fortune_all-fix.patch | 21 +++++ .../files/fortune-mod-1.99.1-gentoo.patch | 99 ++++++++++++++++++++++ .../fortune-mod/fortune-mod-1.99.1-r2.ebuild | 58 +++++++++++++ games-misc/fortune-mod/metadata.xml | 5 ++ 5 files changed, 184 insertions(+) create mode 100644 games-misc/fortune-mod/Manifest create mode 100644 games-misc/fortune-mod/files/01_all_fortune_all-fix.patch create mode 100644 games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.patch create mode 100644 games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild create mode 100644 games-misc/fortune-mod/metadata.xml (limited to 'games-misc/fortune-mod') diff --git a/games-misc/fortune-mod/Manifest b/games-misc/fortune-mod/Manifest new file mode 100644 index 000000000000..89665e20b623 --- /dev/null +++ b/games-misc/fortune-mod/Manifest @@ -0,0 +1 @@ +DIST fortune-mod-1.99.1.tar.gz 1812089 SHA256 fc51aee1f73c936c885f4e0f8b6b48f4f68103e3896eaddc6a45d2b71e14eace SHA512 4c06ea37532dd59f0251d7c49538bee703852c60a3247aba7c516f4f0d4b8ab15b9d7495d004a6423acd74c4dd7532e3dbe1679d6904ab373b617a3386205cde WHIRLPOOL 4968663675bdb03db39d31c2ed359b99d5b2416d474d773c59b90cae5193caf213ee41cc70f34c3247af971da34f83e724f3d11c6ac266fd9fad766ed1ec7285 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 +@@ -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 + #include ++#include + + 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 + #include + ++#include + #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..ad6ed77428fb --- /dev/null +++ b/games-misc/fortune-mod/fortune-mod-1.99.1-r2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~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..d3c2cc926f0b --- /dev/null +++ b/games-misc/fortune-mod/metadata.xml @@ -0,0 +1,5 @@ + + + +games + -- cgit v1.2.3-65-gdbad