pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/fortune Import fortune-19970829 into pkgsrc as g...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f125f925624b
branches: trunk
changeset: 366237:f125f925624b
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Aug 07 11:10:32 2017 +0000
description:
Import fortune-19970829 into pkgsrc as games/fortune.
This is the Linux "port" of BSD fortune, but has been patched to work with
BSD fortune files so that those available already in pkgsrc will work. The
pkgsrc strfile has been made a full dependency so that those with dat files
in the Linux format can easily regenerate them to be compatible.
diffstat:
games/fortune/DESCR | 24 ++++
games/fortune/Makefile | 22 ++++
games/fortune/PLIST | 109 +++++++++++++++++++++
games/fortune/distinfo | 12 ++
games/fortune/options.mk | 15 ++
games/fortune/patches/patch-Makefile | 109 +++++++++++++++++++++
games/fortune/patches/patch-datfiles_Makefile | 30 +++++
games/fortune/patches/patch-datfiles_html_Makefile | 28 +++++
games/fortune/patches/patch-datfiles_off_Makefile | 35 ++++++
games/fortune/patches/patch-fortune_fortune.c | 48 +++++++++
games/fortune/patches/patch-util_strfile.h | 26 +++++
11 files changed, 458 insertions(+), 0 deletions(-)
diffs (truncated from 502 to 300 lines):
diff -r f5df1d11ed97 -r f125f925624b games/fortune/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/DESCR Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,24 @@
+This version of fortune is a modification of the NetBSD fortune, as
+tweaked by Florian La Roche (see below, and many thanks to Florian for
+starting the update), and then massively hacked on by Amy Lewis.
+
+I (Amy) hacked on this because it was broken; the BSD source itself is
+broken (I looked at it). Specifically, if you are using an old version
+of fortune, then it accesses *only* the two files "fortunes" and
+"fortunes-o", even though 'fortune -[ao]f' will tell you differently.
+That was my original reason to start working with the code.
+
+Bug fixes: fortune now reads the same file list that it reports with -f.
+strfile now really sorts and randomizes, instead of just setting the
+'sorted' and 'randomized' flags. strfile does not lose the pointer to a
+fortune that follows a null fortune.
+
+Enhancements: fortune -f now prints percentages, whether specified on the
+command line or not. fortune -m now prints filenames to stderr; the
+fortunes printed to stdout can be redirected into a file which is valid
+strfile format. fortune -l|s can be modified with -n _number_ to specify
+the number of characters in a short fortune (default 160, as before).
+The means of distinguishing between offensive and inoffensive fortunes is
+changed: offensive fortunes are put in a separate subdirectory. The
+contents of the fortunes databases have been extensively reviewed, and
+broken into smaller, more manageable [hopefully] files.
diff -r f5df1d11ed97 -r f125f925624b games/fortune/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/Makefile Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+
+DISTNAME= fortune-mod-9708
+PKGNAME= fortune-19970829
+CATEGORIES= games
+MASTER_SITES= http://www.ibiblio.org/pub/linux/games/amusements/fortune/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://www.ibiblio.org/pub/linux/games/amusements/fortune/
+COMMENT= Fortune cookie generator
+LICENSE= original-bsd
+
+DEPENDS+= fortune-strfile>=0:../../games/fortune-strfile
+
+.include "options.mk"
+
+BUILD_TARGET= fortune-bin cookies-z
+MAKE_ENV+= STRFILE=${PREFIX}/bin/strfile
+
+PRINT_PLIST_AWK+= /fortune\/off\// { $$0 = "$${PLIST.off}" $$0; }
+
+.include "../../mk/bsd.pkg.mk"
diff -r f5df1d11ed97 -r f125f925624b games/fortune/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/PLIST Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,109 @@
+@comment $NetBSD: PLIST,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+bin/fortune
+share/games/fortune/art
+share/games/fortune/art.dat
+share/games/fortune/ascii-art
+share/games/fortune/ascii-art.dat
+share/games/fortune/computers
+share/games/fortune/computers.dat
+share/games/fortune/cookie
+share/games/fortune/cookie.dat
+share/games/fortune/definitions
+share/games/fortune/definitions.dat
+share/games/fortune/drugs
+share/games/fortune/drugs.dat
+share/games/fortune/education
+share/games/fortune/education.dat
+share/games/fortune/ethnic
+share/games/fortune/ethnic.dat
+share/games/fortune/food
+share/games/fortune/food.dat
+share/games/fortune/fortunes
+share/games/fortune/fortunes.dat
+share/games/fortune/goedel
+share/games/fortune/goedel.dat
+share/games/fortune/humorists
+share/games/fortune/humorists.dat
+share/games/fortune/kids
+share/games/fortune/kids.dat
+share/games/fortune/law
+share/games/fortune/law.dat
+share/games/fortune/linuxcookie
+share/games/fortune/linuxcookie.dat
+share/games/fortune/literature
+share/games/fortune/literature.dat
+share/games/fortune/love
+share/games/fortune/love.dat
+share/games/fortune/magic
+share/games/fortune/magic.dat
+share/games/fortune/medicine
+share/games/fortune/medicine.dat
+share/games/fortune/men-women
+share/games/fortune/men-women.dat
+share/games/fortune/miscellaneous
+share/games/fortune/miscellaneous.dat
+share/games/fortune/news
+share/games/fortune/news.dat
+${PLIST.off}share/games/fortune/off/astrology
+${PLIST.off}share/games/fortune/off/astrology.dat
+${PLIST.off}share/games/fortune/off/black-humor
+${PLIST.off}share/games/fortune/off/black-humor.dat
+${PLIST.off}share/games/fortune/off/definitions
+${PLIST.off}share/games/fortune/off/definitions.dat
+${PLIST.off}share/games/fortune/off/drugs
+${PLIST.off}share/games/fortune/off/drugs.dat
+${PLIST.off}share/games/fortune/off/ethnic
+${PLIST.off}share/games/fortune/off/ethnic.dat
+${PLIST.off}share/games/fortune/off/hphobia
+${PLIST.off}share/games/fortune/off/hphobia.dat
+${PLIST.off}share/games/fortune/off/limerick
+${PLIST.off}share/games/fortune/off/limerick.dat
+${PLIST.off}share/games/fortune/off/misandry
+${PLIST.off}share/games/fortune/off/misandry.dat
+${PLIST.off}share/games/fortune/off/miscellaneous
+${PLIST.off}share/games/fortune/off/miscellaneous.dat
+${PLIST.off}share/games/fortune/off/misogyny
+${PLIST.off}share/games/fortune/off/misogyny.dat
+${PLIST.off}share/games/fortune/off/politics
+${PLIST.off}share/games/fortune/off/politics.dat
+${PLIST.off}share/games/fortune/off/privates
+${PLIST.off}share/games/fortune/off/privates.dat
+${PLIST.off}share/games/fortune/off/racism
+${PLIST.off}share/games/fortune/off/racism.dat
+${PLIST.off}share/games/fortune/off/religion
+${PLIST.off}share/games/fortune/off/religion.dat
+${PLIST.off}share/games/fortune/off/riddles
+${PLIST.off}share/games/fortune/off/riddles.dat
+${PLIST.off}share/games/fortune/off/sex
+${PLIST.off}share/games/fortune/off/sex.dat
+${PLIST.off}share/games/fortune/off/songs-poems
+${PLIST.off}share/games/fortune/off/songs-poems.dat
+${PLIST.off}share/games/fortune/off/vulgarity
+${PLIST.off}share/games/fortune/off/vulgarity.dat
+share/games/fortune/people
+share/games/fortune/people.dat
+share/games/fortune/pets
+share/games/fortune/pets.dat
+share/games/fortune/platitudes
+share/games/fortune/platitudes.dat
+share/games/fortune/politics
+share/games/fortune/politics.dat
+share/games/fortune/riddles
+share/games/fortune/riddles.dat
+share/games/fortune/science
+share/games/fortune/science.dat
+share/games/fortune/songs-poems
+share/games/fortune/songs-poems.dat
+share/games/fortune/sports
+share/games/fortune/sports.dat
+share/games/fortune/startrek
+share/games/fortune/startrek.dat
+share/games/fortune/translate-me
+share/games/fortune/translate-me.dat
+share/games/fortune/wisdom
+share/games/fortune/wisdom.dat
+share/games/fortune/work
+share/games/fortune/work.dat
+share/games/fortune/zippy
+share/games/fortune/zippy.dat
+man/man6/fortune.6
diff -r f5df1d11ed97 -r f125f925624b games/fortune/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/distinfo Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+
+SHA1 (fortune-mod-9708.tar.gz) = 9f96a00dbf5d2c6b0e7324af0eae988ce6adc5ad
+RMD160 (fortune-mod-9708.tar.gz) = bf40efcfde2e854166bccdbccf7cf23bfb443e61
+SHA512 (fortune-mod-9708.tar.gz) = 80c5b71d84eeb3092b2dfe483f0dad8ed42e2efeaa1f8791c26fb2ae80fbd7775777ac5252b1d8270e2e176ad14ce98940bee6d8e71fdbb9ac3323dc7188c4d0
+Size (fortune-mod-9708.tar.gz) = 1408517 bytes
+SHA1 (patch-Makefile) = b2429bba09ffdc7d571c5d98833a4ff5a6e2fb21
+SHA1 (patch-datfiles_Makefile) = fd0d1b87bd2532bada57517970cf7676ee678720
+SHA1 (patch-datfiles_html_Makefile) = aef5d7d6275943e94e4f79f2db64445605d329ce
+SHA1 (patch-datfiles_off_Makefile) = 31aa90703d86df0c1d50e5cadfb0ec92a5800199
+SHA1 (patch-fortune_fortune.c) = 734f7c2bd5ebfc3c8d28148e0674bccacdccfc1f
+SHA1 (patch-util_strfile.h) = dd58d46bf13f5a7eeb245a3b747a26fa1e946113
diff -r f5df1d11ed97 -r f125f925624b games/fortune/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/options.mk Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.fortune
+PKG_SUPPORTED_OPTIONS= offensive
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= off
+
+.if !empty(PKG_OPTIONS:Moffensive)
+MAKE_ENV+= OFFENSIVE=1
+PLIST.off= yes
+.else
+MAKE_ENV+= OFFENSIVE=0
+.endif
diff -r f5df1d11ed97 -r f125f925624b games/fortune/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/fortune/patches/patch-Makefile Mon Aug 07 11:10:32 2017 +0000
@@ -0,0 +1,109 @@
+$NetBSD: patch-Makefile,v 1.1 2017/08/07 11:10:32 jperkin Exp $
+
+Use pkgsrc layout and flags.
+
+--- Makefile.orig 1997-08-28 19:36:15.000000000 +0000
++++ Makefile
+@@ -3,27 +3,27 @@
+ #
+
+ # Where does the fortune program go?
+-FORTDIR=/usr/local/games
++FORTDIR=${PREFIX}/bin
+ # Where do the data files (fortunes, or cookies) go?
+-COOKIEDIR=/usr/local/share/games/fortunes
++COOKIEDIR=${PREFIX}/share/games/fortune
+ # Offensive ones?
+ OCOOKIEDIR=$(COOKIEDIR)/off
+ # The ones with html tags?
+ WCOOKIEDIR=$(COOKIEDIR)/html
+ # Where do strfile and unstr go?
+-BINDIR=/usr/local/bin
++BINDIR=${PREFIX}/bin
+ # What is the proper mode for strfile and unstr? 755= everyone, 700= root only
+ BINMODE=0755
+ #BINMODE=0700
+ # Where do the man pages for strfile and unstr go?
+-BINMANDIR=/usr/local/man/man1
++BINMANDIR=${PREFIX}/${PKGMANDIR}/man1
+ # What is their proper extension?
+ BINMANEXT=1
+ # And the same for the fortune man page
+-FORTMANDIR=/usr/local/man/man6
++FORTMANDIR=${PREFIX}/${PKGMANDIR}/man6
+ FORTMANEXT=6
+ # Do we want to install the offensive files? (0 no, 1 yes)
+-OFFENSIVE=1
++#OFFENSIVE=1
+ # Do we want to install files with html tags? (0 no, 1 yes)
+ # (Note: These files are not yet available)
+ WEB=0
+@@ -46,7 +46,7 @@ WEB=0
+ # NB. Under Linux, the BSD regex functions are _MUCH_ faster
+ # than the POSIX ones, but your mileage may vary.
+ #
+-REGEXDEFS=-DHAVE_REGEX_H -DBSD_REGEX
++REGEXDEFS=-DHAVE_REGEX_H -DPOSIX_REGEX
+
+ #
+ # If your system's regex functions are not in its standard C library,
+@@ -55,8 +55,8 @@ REGEXDEFS=-DHAVE_REGEX_H -DBSD_REGEX
+ REGEXLIBS=
+
+ DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\""
+-CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe
+-LDFLAGS=-s
++CFLAGS += $(DEFINES)
++#LDFLAGS=-s
+
+ # The above flags are used by default; the debug flags are used when make
+ # is called with a debug target, such as 'make debug'
+@@ -71,12 +71,12 @@ DEBUGCFLAGS=-g -DDEBUG $(DEFINES) -Wall
+ DEBUGLDFLAGS=
+
+ # Only ANSI-compatible C compilers are currently supported
+-CC=gcc
++#CC=gcc
+
+ # ----------------------------------------
+ # Nothing below this line should have to be changed
+
+-SUBDIRS=fortune util datfiles
++SUBDIRS=fortune datfiles
+
+ .PHONY: all debug fortune-bin fortune-debug util-bin randstr rot \
+ util-debug cookies cookies-z install install-fortune \
+@@ -118,18 +118,18 @@ cookies:
+ @echo "Sorry, just joking."
+ $(MAKE) cookies-z
+
+-cookies-z: util-bin
++cookies-z:
+ cd datfiles && $(MAKE) COOKIEDIR=$(COOKIEDIR) \
+ OCOOKIEDIR=$(OCOOKIEDIR) WCOOKIEDIR=$(WCOOKIEDIR) \
+ OFFENSIVE=$(OFFENSIVE) WEB=$(WEB)
+
+ # Install everything
+-install: install-fortune install-util install-man install-cookie
++install: install-fortune install-fman install-cookie
+
+ # Install just the fortune program
+ install-fortune: fortune-bin
+- install -m 0755 -d $(FORTDIR)
+- install -m 0755 fortune/fortune $(FORTDIR)
++ install -m 0755 -d $(DESTDIR)$(FORTDIR)
Home |
Main Index |
Thread Index |
Old Index