summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Danya Dietrich <kito@gentoo.org>2005-02-01 21:55:21 +0000
committerKito Danya Dietrich <kito@gentoo.org>2005-02-01 21:55:21 +0000
commit4f69c44e4010d303f16fc5131f673bba2ad405ca (patch)
tree21aa1834d622a28d82d8ce07caeb9b2ce790a110 /games-misc
parentBug #76909 redux. (diff)
downloadgentoo-2-4f69c44e4010d303f16fc5131f673bba2ad405ca.tar.gz
gentoo-2-4f69c44e4010d303f16fc5131f673bba2ad405ca.tar.bz2
gentoo-2-4f69c44e4010d303f16fc5131f673bba2ad405ca.zip
added patch from Fink and Dave Vasilevsky. Minor bug fixes. ~ppc-macos keyword
(Portage version: 2.0.51-r15)
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/fortune-mod/ChangeLog11
-rw-r--r--games-misc/fortune-mod/Manifest4
-rw-r--r--games-misc/fortune-mod/files/digest-fortune-mod-1.99.1-r11
-rw-r--r--games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.diff91
-rw-r--r--games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild64
5 files changed, 168 insertions, 3 deletions
diff --git a/games-misc/fortune-mod/ChangeLog b/games-misc/fortune-mod/ChangeLog
index d5b013929587..af901c01af27 100644
--- a/games-misc/fortune-mod/ChangeLog
+++ b/games-misc/fortune-mod/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-misc/fortune-mod
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-misc/fortune-mod/ChangeLog,v 1.13 2004/12/29 00:09:40 ciaranm Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-misc/fortune-mod/ChangeLog,v 1.14 2005/02/01 21:55:21 kito Exp $
+
+*fortune-mod-1.99.1-r1 (01 Feb 2005)
+
+ 01 Feb 2005; Kito <kito@gentoo.org> +files/fortune-mod-1.99.1-gentoo.diff,
+ +fortune-mod-1.99.1-r1.ebuild:
+ added patch from Dave Vasilevsky and the Fink project. Fixes error when no
+ charset in envvars. Other minor bug fixes.
29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
Change encoding to UTF-8 for GLEP 31 compliance
diff --git a/games-misc/fortune-mod/Manifest b/games-misc/fortune-mod/Manifest
index ba783f4f84ee..75b4beda7a02 100644
--- a/games-misc/fortune-mod/Manifest
+++ b/games-misc/fortune-mod/Manifest
@@ -1,4 +1,6 @@
MD5 4360b85d5656b95b8750f77dc2b4608f ChangeLog 3727
+MD5 7ece8b64ac37b929d7ae1363dc3caaac fortune-mod-1.99.1-r1.ebuild 1579
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
-MD5 7c4a95a1c69b7fc922d008fc833b5bc5 fortune-mod-1.99.1.ebuild 1547
MD5 5ff47d4205e2b0ea5e0a538115a58237 files/digest-fortune-mod-1.99.1 71
+MD5 5ff47d4205e2b0ea5e0a538115a58237 files/digest-fortune-mod-1.99.1-r1 71
+MD5 c5844dbbad993f12e1932631e772af64 files/fortune-mod-1.99.1-gentoo.diff 2968
diff --git a/games-misc/fortune-mod/files/digest-fortune-mod-1.99.1-r1 b/games-misc/fortune-mod/files/digest-fortune-mod-1.99.1-r1
new file mode 100644
index 000000000000..3cc07d26a029
--- /dev/null
+++ b/games-misc/fortune-mod/files/digest-fortune-mod-1.99.1-r1
@@ -0,0 +1 @@
+MD5 f208805b3b712e32997d7667e0ec52d8 fortune-mod-1.99.1.tar.gz 1812089
diff --git a/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.diff b/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.diff
new file mode 100644
index 000000000000..2cdca1aeb3bf
--- /dev/null
+++ b/games-misc/fortune-mod/files/fortune-mod-1.99.1-gentoo.diff
@@ -0,0 +1,91 @@
+diff -uNr fortune-mod-1.99.1/datfiles/Makefile fortune-mod-1.99.1-new/datfiles/Makefile
+--- fortune-mod-1.99.1/datfiles/Makefile Fri Mar 5 07:29:56 2004
++++ fortune-mod-1.99.1-new/datfiles/Makefile Tue Feb 1 15:23:49 2005
+@@ -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 -R $$i.u8 $(COOKIEDIR) ; \
+ done
+
+ clean:
+diff -uNr fortune-mod-1.99.1/datfiles/off/Makefile fortune-mod-1.99.1-new/datfiles/off/Makefile
+--- fortune-mod-1.99.1/datfiles/off/Makefile Fri Mar 5 07:29:56 2004
++++ fortune-mod-1.99.1-new/datfiles/off/Makefile Tue Feb 1 15:24:28 2005
+@@ -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 -R $$i.u8 $(OCOOKIEDIR) ; \
+ done
+
+ clean:
+diff -uNr fortune-mod-1.99.1/fortune/fortune.c fortune-mod-1.99.1-new/fortune/fortune.c
+--- fortune-mod-1.99.1/fortune/fortune.c Fri Mar 5 07:29:56 2004
++++ fortune-mod-1.99.1-new/fortune/fortune.c Tue Feb 1 15:28:44 2005
+@@ -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,7 +256,7 @@
+ RECODE_OUTER outer;
+
+ int add_dir(register FILEDESC *);
+-
++const char *program_name;
+ char *program_version(void)
+ {
+ static char buf[BUFSIZ];
+@@ -1675,15 +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);
+Binary files fortune-mod-1.99.1/fortune/fortune.o and fortune-mod-1.99.1-new/fortune/fortune.o differ
+diff -uNr fortune-mod-1.99.1/util/rot.c fortune-mod-1.99.1-new/util/rot.c
+--- fortune-mod-1.99.1/util/rot.c Fri Mar 5 07:29:57 2004
++++ fortune-mod-1.99.1-new/util/rot.c Tue Feb 1 15:29:51 2005
+@@ -5,6 +5,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stdlib.h>
+
+ int main(void)
+ {
+diff -uNr fortune-mod-1.99.1/util/unstr.c fortune-mod-1.99.1-new/util/unstr.c
+--- fortune-mod-1.99.1/util/unstr.c Fri Mar 5 07:29:57 2004
++++ fortune-mod-1.99.1-new/util/unstr.c Tue Feb 1 15:30:41 2005
+@@ -96,7 +96,7 @@
+ #include <ctype.h>
+ #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-r1.ebuild b/games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild
new file mode 100644
index 000000000000..49f9d3ccee78
--- /dev/null
+++ b/games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-misc/fortune-mod/fortune-mod-1.99.1-r1.ebuild,v 1.1 2005/02/01 21:55:21 kito Exp $
+
+inherit eutils
+
+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 ~hppa ~mips ~ppc ~sparc ~x86 ~ppc-macos"
+IUSE="offensive"
+
+DEPEND="virtual/libc
+ app-text/recode"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${P}-gentoo.diff
+
+ sed -i \
+ -e 's:/games::' \
+ -e 's:/fortunes:/fortune:' \
+ -e 's:FORTDIR=$(prefix)/usr:FORTDIR=$(prefix)/usr/bin:' \
+ -e 's:^CFLAGS=.*$:CFLAGS=$(DEFINES) $(E_CFLAGS):' \
+ -e '/^all:/s:$: fortune/fortune.man:' \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i \
+ -e 's:char a, b;:short int a, b;:' util/rot.c \
+ || die "sed util/rot.c failed"
+
+ # fixes the '-m' segfault problem on _my_ computer,
+ # it might screw something else up i don't know about.
+ sed -i \
+ -e '/if (fp->utf8_charset)/{
+ N
+ /free (output);/d
+ }' fortune/fortune.c \
+ || die "sed fortune/fortune.c failed"
+ use offensive && off=1 || off=0
+}
+
+src_compile() {
+ emake \
+ REGEXDEFS='-DHAVE_REGEX_H -DPOSIX_REGEX'
+ E_CFLAGS="${CFLAGS}" \
+ OFFENSIVE="${off}" \
+ || die "emake failed"
+}
+
+src_install() {
+ make \
+ OFFENSIVE="${off}" \
+ prefix="${D}" \
+ install \
+ || die "make install failed"
+
+ dodoc ChangeLog INDEX INSTALL Notes Offensive README TODO cookie-files
+}