A short recap for those of you who are subscribed to freebsd-ports@ but not freebsd-stable@: when I opened my inbox this morning I found a typical WTF thread: the (hardly) "offensive" fortune cookies have been kicked out of 10-BETA4. Since I (and many others) find this Just Plain Stupid (tm) I created a port to bring some sanity back into fortune(6). Anyone running FreeBSD 10-BETA4 feel free to test the port and comment on it before I file the PR asking for it to be committed. A shar "patch" can be found here: http://www.skysmurf.nl/comp/FreeBSD/files/ofortune.shar Or alternatively, a tarball can be found in the same place: http://www.skysmurf.nl/comp/FreeBSD/files/ofortune.tar.gz To extract the shar file: # cd /usr/ports/games # sh /path/to/shar-file Or alternatively, to extract the tarball: # cd /usr/ports/games # tar xzvf /path/to/tarball Install via your favourite method, e.g. # cd /usr/ports/games/ofortune # make install or # portmaster games/ofortune PENDING ISSUES: -1- It's tentatively called ofortune. If you can think of a better name, then by all means shoot. -2- The accompanying webpage is crap. This is no priority ;-) -3- I have found the instructions for changing and/or adding to the fortune files but haven't tested them yet. -4- I wanted to mark the port as IGNORE for versions of FreeBSD prior to 10-BETA4. But this breaks stuff (see point 6) and I need to know exactly what the version number (OSVERSION) is for 10-BETA4. -5- Currently the port installs the "offensive" fortunes into /usr/local/share/ofortune, requiring every user to add that directory to their FORTUNE_PATH (hence the pkg-message). I tried adding an OPTION that would install it into the base /usr/share/games/fortune, but that again breaks stuff, see point 6. -6- It appears that for some reason conditionals don't work in the Makefile. For your reference, I have added the Makefile below, with the parts commented out that I think should work but don't. In both cases I get "Malformed conditional" errors. Any thoughts? Regards, AvW (fonz) [begin /usr/ports/games/ofortune/Makefile] # $FreeBSD$ PORTNAME= ofortune PORTVERSION= 0.99.0 CATEGORIES= games MASTER_SITES= http://www.skysmurf.nl/comp/FreeBSD/distfiles/ MAINTAINER= freebsd at skysmurf.nl COMMENT= The offensive fortune cookies that used to be in base. ### # This is supposed to work but doesn't. ### #OPTIONS_DEFINE= BASE #OPTIONS_DEFAULT#BASE_DESC= To install into the base system rather than /usr/local. # #.include <bsd.port.options.mk> # #.if ${PORT_OPTIONS:BASE} #DATADIR= /usr/share/games/fortune #.else PLIST_DIRS= ${DATADIR} #.endif PLIST_FILES= ${DATADIR}/fortunes-o \ ${DATADIR}/fortunes-o.dat \ ${DATADIR}/murphy-o \ ${DATADIR}/murphy-o.dat NO_BUILD= yes NO_INSTALL= yes ### # This is supposed to work but doesn't. # # 702106 has been copied from an example, I need the right number for 10-BETA4. # #.if ${OSVERSION} < 702106 #IGNORE= For versions prior to 10-BETA4 this is still in base. #.endif ### post-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/* ${STAGEDIR}${DATADIR} .include <bsd.port.mk> [end /usr/ports/games/ofortune/Makefile] -- I'm not completely useless, I can be used as a bad example. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 834 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20131205/9cd0fe62/attachment.sig>
On 2013.12.05 15:54, A.J. 'Fonz' van Werven wrote:> A short recap for those of you who are subscribed to freebsd-ports@ but > not freebsd-stable@: when I opened my inbox this morning I found a typical > WTF thread: the (hardly) "offensive" fortune cookies have been kicked out > of 10-BETA4. Since I (and many others) find this Just Plain Stupid (tm) I > created a port to bring some sanity back into fortune(6).Thank you for making this port. I was quite saddened when these fortunes were removed.> Anyone running FreeBSD 10-BETA4 feel free to test the port and comment on > it before I file the PR asking for it to be committed.I will test it this weekend.> PENDING ISSUES: > > -1- > It's tentatively called ofortune. If you can think of a better name, then > by all means shoot.Going by the other fortune file ports, misc/fortune-offensive or something very similar would be more appropriate. It's not really a game in itself and the others are in misc, so misc is probably more appropriate.> -4- > I wanted to mark the port as IGNORE for versions of FreeBSD prior to > 10-BETA4. But this breaks stuff (see point 6) and I need to know exactly > what the version number (OSVERSION) is for 10-BETA4.The fortunes were removed in one of the ALPHA releases if not before then (certainly before 10 was branched to -STABLE), so I'm sure it's fine to simply target 10. Anyone still running a version of 10 from when it was still -CURRENT can expect problems anyway.> COMMENT= The offensive fortune cookies that used to be in base.Perhaps it would be better to specify the version - e.g., "The offensive fortune cookies present the 9.x base system that were removed in 10.x."
Hi, On Thu, 5 Dec 2013 22:54:37 +0100 "A.J. 'Fonz' van Werven" <freebsd at skysmurf.nl> wrote:> A short recap for those of you who are subscribed to freebsd-ports@ > but not freebsd-stable@: when I opened my inbox this morning I found > a typical WTF thread: the (hardly) "offensive" fortune cookies have > been kicked out of 10-BETA4. Since I (and many others) find this Just > Plain Stupid (tm) I created a port to bring some sanity back into > fortune(6). > > Anyone running FreeBSD 10-BETA4 feel free to test the port and > comment on it before I file the PR asking for it to be committed.I just tried. The port does not have any problems for me but fortune seems to ignore FORTUNE_PATH.> > A shar "patch" can be found here: > http://www.skysmurf.nl/comp/FreeBSD/files/ofortune.shar > > Or alternatively, a tarball can be found in the same place: > http://www.skysmurf.nl/comp/FreeBSD/files/ofortune.tar.gzI used this one.> > To extract the shar file: > # cd /usr/ports/games > # sh /path/to/shar-file > > Or alternatively, to extract the tarball: > # cd /usr/ports/games > # tar xzvf /path/to/tarball > > Install via your favourite method, e.g. > > # cd /usr/ports/games/ofortune > # make installI used the make method.> or > # portmaster games/ofortune > > PENDING ISSUES: > > -1- > It's tentatively called ofortune. If you can think of a better name, > then by all means shoot. >As already said, fortune-offensive sounds better.> -2- > The accompanying webpage is crap. This is no priority ;-) >I did not check it.> -3- > I have found the instructions for changing and/or adding to the > fortune files but haven't tested them yet. >One step after another one.> -4- > I wanted to mark the port as IGNORE for versions of FreeBSD prior to > 10-BETA4. But this breaks stuff (see point 6) and I need to know > exactly what the version number (OSVERSION) is for 10-BETA4. > > -5- > Currently the port installs the "offensive" fortunes into > /usr/local/share/ofortune, requiring every user to add that directory > to their FORTUNE_PATH (hence the pkg-message). I tried adding an > OPTION that would install it into the base /usr/share/games/fortune, > but that again breaks stuff, see point 6. > > -6- > It appears that for some reason conditionals don't work in the > Makefile. For your reference, I have added the Makefile below, with > the parts commented out that I think should work but don't. In both > cases I get "Malformed conditional" errors. Any thoughts?I use a very different style in my makefiles and do not see the errors too. Thanks for your work. Erich> > Regards, > > AvW (fonz) > > [begin /usr/ports/games/ofortune/Makefile] > # $FreeBSD$ > > PORTNAME= ofortune > PORTVERSION= 0.99.0 > CATEGORIES= games > MASTER_SITES= http://www.skysmurf.nl/comp/FreeBSD/distfiles/ > > MAINTAINER= freebsd at skysmurf.nl > COMMENT= The offensive fortune cookies that used to be in base. > > ### > # This is supposed to work but doesn't. > ### > #OPTIONS_DEFINE= BASE > #OPTIONS_DEFAULT> #BASE_DESC= To install into the base system rather > than /usr/local. # > #.include <bsd.port.options.mk> > # > #.if ${PORT_OPTIONS:BASE} > #DATADIR= /usr/share/games/fortune > #.else > PLIST_DIRS= ${DATADIR} > #.endif > > PLIST_FILES= ${DATADIR}/fortunes-o \ > ${DATADIR}/fortunes-o.dat \ > ${DATADIR}/murphy-o \ > ${DATADIR}/murphy-o.dat > > NO_BUILD= yes > NO_INSTALL= yes > > ### > # This is supposed to work but doesn't. > # > # 702106 has been copied from an example, I need the right number for > 10-BETA4. # > #.if ${OSVERSION} < 702106 > #IGNORE= For versions prior to 10-BETA4 this is still > in base. #.endif > ### > > post-install: > ${MKDIR} ${STAGEDIR}${DATADIR} > ${INSTALL_DATA} ${WRKSRC}/* ${STAGEDIR}${DATADIR} > > .include <bsd.port.mk> > [end /usr/ports/games/ofortune/Makefile] >
Update: the port is pretty much ready for submission. I decided to go with misc/fortune-mod-offensive, similar to the other ones (one of which is unmaintained so I'll try to stagify and adopt that one while I'm at it). The COMMENT became The offensive fortunes from FreeBSD 9 base, removed in FreeBSD 10 because it has to stay within 70 characters. There's one issue I'd really prefer to sort before submitting, though. Should the Makefile define LICENSE? If so, what should it be (BSD I presume) and should LICENSE_FILE be defined as well? AvW -- I'm not completely useless, I can be used as a bad example. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 834 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20131206/85013a80/attachment.sig>
> -1- > It's tentatively called ofortune. If you can think of a better name, > > then > by all means shoot.How about fortune-offensive? I suggest putting new fortunes in /usr/local/games/fortune. You can install /usr/local/bin/fortune, which is a shell script with roughly this content: #!/bin/sh env FORTUNE_PATH=/usr/local/games/fortune:/usr/games/fortune $@ - Nikolai Lifanov