Skip to content
Permalink
Browse files

Add fortune.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@1002 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Eric Melville
Eric Melville committed Oct 9, 2002
1 parent f091a5e commit bf6acad541c850e0f581dcba91c9825a884896fd
@@ -0,0 +1,74 @@
PortSystem 1.0
name fortune
version 4.6.2-RELEASE
categories games
maintainers eric@opendarwin.org
description Infamous electronic fortune-cookie generator
master_sites http://www.opendarwin.org/~eric/
checksums md5 1589689bc26beaeaacc39d097e331e14
build.type bsd
worksrcdir ${portname}

configure { cd ${worksrcpath}
reinplace "s|/usr|${prefix}|" fortune/pathnames.h
reinplace "s|/usr/share|${prefix}/share|" fortune/fortune.6
reinplace "s|/usr/games/fortune|${prefix}/bin/fortune|" \
fortune/fortune.6 }

patchfiles patch-fortune-Makefile patch-strfile-Makefile \
patch-unstr-Makefile patch-datfiles-Makefile \
patch-fortune.c patch-strfile.c

set datfiles "fortunes fortunes.dat fortunes-o fortunes-o.dat fortunes2 \
fortunes2.dat fortunes2-o fortunes2-o.dat limerick \
limerick.dat murphy murphy.dat murphy-o murphy-o.dat \
startrek startrek.dat zippy zippy.dat"

install { cd ${worksrcpath}
system "install -o root -m 755 -d ${prefix}/bin"
system "install -o root -m 755 -d ${prefix}/man/man6"
system "install -o root -m 755 -d ${prefix}/man/man8"
system "install -o root -m 755 -d \
${prefix}/share/games/fortune"
system "install -o root -m 755 -c fortune/fortune \
${prefix}/bin"
system "install -o root -m 755 -c strfile/strfile \
${prefix}/bin"
system "install -o root -m 755 -c unstr/unstr \
${prefix}/bin"
system "install -o root -m 644 -c fortune/fortune.6 \
${prefix}/man/man6"
system "install -o root -m 644 -c strfile/strfile.8 \
${prefix}/man/man8"
system "ln ${prefix}/man/man8/strfile.8 \
${prefix}/man/man8/unstr.8"

cd datfiles
foreach datfile $datfiles {
system "install -o root -m 644 -c $datfile \
${prefix}/share/games/fortune" } }

contents bin/fortune \
bin/strfile \
bin/unstr \
man/man6/fortune.6 \
man/man8/strfile.8 \
man/man8/unstr.8 \
share/games/fortune/fortunes \
share/games/fortune/fortunes.dat \
share/games/fortune/fortunes-o \
share/games/fortune/fortunes-o.dat \
share/games/fortune/fortunes2 \
share/games/fortune/fortunes2.dat \
share/games/fortune/fortunes2-o \
share/games/fortune/fortunes2-o.dat \
share/games/fortune/limerick \
share/games/fortune/limerick.dat \
share/games/fortune/murphy \
share/games/fortune/murphy.dat \
share/games/fortune/murphy-o \
share/games/fortune/murphy-o.dat \
share/games/fortune/startrek \
share/games/fortune/startrek.dat \
share/games/fortune/zippy \
share/games/fortune/zippy.dat
@@ -0,0 +1,9 @@
--- datfiles/Makefile.orig Tue Oct 8 18:03:42 2002
+++ datfiles/Makefile Tue Oct 8 18:03:54 2002
@@ -39,4 +39,6 @@
fortunes-o: fortunes-o.${TYPE}
tr a-zA-Z n-za-mN-ZA-M < ${.ALLSRC} > ${.TARGET}

+all: $(BLDS)
+
.include <bsd.prog.mk>
@@ -0,0 +1,8 @@
--- fortune/Makefile.orig Tue Oct 8 17:12:51 2002
+++ fortune/Makefile Tue Oct 8 17:12:59 2002
@@ -7,5 +7,4 @@
DPADD= ${LIBCOMPAT}
LDADD= -lcompat

-.include "${.CURDIR}/../../Makefile.inc"
.include <bsd.prog.mk>
@@ -0,0 +1,11 @@
--- fortune/fortune.c.orig Tue Oct 8 17:16:06 2002
+++ fortune/fortune.c Tue Oct 8 17:16:21 2002
@@ -204,7 +204,7 @@
#endif

init_prob();
- srandomdev();
+ srandom(getpid());
do {
get_fort();
} while ((Short_only && fortlen() > SLEN) ||
@@ -0,0 +1,8 @@
--- strfile/Makefile.orig Tue Oct 8 17:13:26 2002
+++ strfile/Makefile Tue Oct 8 17:13:40 2002
@@ -6,5 +6,4 @@
MLINKS= strfile.8 unstr.8
CFLAGS+= -Wall

-.include "${.CURDIR}/../../Makefile.inc"
.include <bsd.prog.mk>
@@ -0,0 +1,11 @@
--- strfile/strfile.c.orig Tue Oct 8 17:16:57 2002
+++ strfile/strfile.c Tue Oct 8 17:17:05 2002
@@ -452,7 +452,7 @@
long tmp;
long *sp;

- srandomdev();
+ srandom(getpid());

Tbl.str_flags |= STR_RANDOM;
cnt = Tbl.str_numstr;
@@ -0,0 +1,8 @@
--- unstr/Makefile.orig Tue Oct 8 17:14:12 2002
+++ unstr/Makefile Tue Oct 8 17:14:16 2002
@@ -4,5 +4,4 @@
NOMAN= noman
CFLAGS+=-Wall -I${.CURDIR}/../strfile

-.include "${.CURDIR}/../../Makefile.inc"
.include <bsd.prog.mk>

0 comments on commit bf6acad

Please sign in to comment.
You can’t perform that action at this time.