Page MenuHomeFreeBSD

misc/fortune-mod-mormon: New port
ClosedPublic

Authored by ziaee on Sep 2 2025, 9:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 8, 10:42 PM
Unknown Object (File)
Sat, Dec 6, 9:51 PM
Unknown Object (File)
Sat, Nov 29, 6:15 PM
Unknown Object (File)
Sat, Nov 29, 2:23 PM
Unknown Object (File)
Sat, Nov 29, 2:12 PM
Unknown Object (File)
Sat, Nov 29, 1:22 PM
Unknown Object (File)
Sat, Nov 29, 8:52 AM
Unknown Object (File)
Sat, Nov 29, 8:24 AM
Subscribers

Details

Summary
This port provides the scriptures of the Church of Jesus Christ of
Latter Day Saints broken down into 15 fortune(6) modules. It conflicts
with fortune-mod-bible, which provides a slightly different KJV Bible,
and fortune-mod-psalms, which provides the Psalms from the Douai Bible.
Note that these other fortune modules have logic to select a strfile
implementation from the days when there were multiple;
this is no longer the case.

Thanks: cperciva, kevans
Differential Revision:  https://reviews.freebsd.org/D52350

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ziaee requested review of this revision.Sep 2 2025, 9:00 PM
ziaee created this revision.

improve pkg message with index

this port provides the psalms and bible modules,
so add them to conflicts and improve pkg-descr somewhat.

I would be inclined to have a MODS variable in Makefile and then use .for loops. Relying on shell globbing can be fragile; this would also fix for i in ${WRKSRC}/mods/*; do strfile "$$i" "$${i}.dat"; done which should not be a single line.

The strfile command doesn't need the second argument; foo -> foo.dat is the default for strfile.

Oh, also if you use a MODS variable you can construct the pkg-plist in the Makefile and not need it as a separate file.

Also: needs an entry in misc/Makefile to hook it up, please include here as well

Attempt to fix everything except constructing the plist in the Makefile.
The Porters Handbook does say it's better to have a pkg-plist so people
can use grep on it.

However, that's an excuse because I couldn't figure it out. I tried:
PLIST_FILES= $MODS:S,^,share/games/fortune/,}.dat (plus the same w/o
appending .dat) based off what I read in archivers/stuffit/Makefile,
but then pkg inf -l only shows the last .dat file?

Attempt to fix everything except constructing the plist in the Makefile.
The Porters Handbook does say it's better to have a pkg-plist so people
can use grep on it.

However, that's an excuse because I couldn't figure it out. I tried:
PLIST_FILES= $MODS:S,^,share/games/fortune/,}.dat (plus the same w/o
appending .dat) based off what I read in archivers/stuffit/Makefile,
but then pkg inf -l only shows the last .dat file?

You would have wanted something more like ${MODS:S,^,share/,:S,$,.dat,} to append .dat to every word, so it would have had all but one invalid entry since only one gets suffixed properly. make -V PLIST_FILES is perhaps a better way to understand than having to go through packaging it.

For a port like this, I don't think maintaining the list (edit: twice) is going to be a huge maintenance burden, necessarily- I wouldn't see it as adding or removing new files very often at all.

Wow, make -V is amazing! Thank you so much! This port hasn't changed
since 2006, and the material is old enough to be in the public domain.
I can't imagine anything changing, even though the README has todos.

I would, however, hassle you a little bit over a commit message nit. One might look and notice that fortune-mod-bible has a dance to try and be compatible with different locations of strfile, but a little bit of archaeology reveals that @cperciva killed off the need for that back in 2015 (rG11d9aa670723f508821f2bf6980a555360783a80), so there's no remaining version of FreeBSD that will not have strfile in a stock configuration (and we don't really account for special pkgbase configurations today in ports, and maybe we won't tomorrow, either). I would proactively note in the commit message that the strfile dance found in other fortune data ports isn't necessary today to preempt concerns there.

misc/fortune-mod-mormon/Makefile
25

I wouldn't think this is strictly necessary, strfile(8) explicitly truncates the output and I don't see that changing any time soon. However, I don't think I'd hassle you over this.

This port should be hooked into misc/Makefile. Other than that, LGTM.

This revision is now accepted and ready to land.Sep 4 2025, 1:17 PM
This revision was automatically updated to reflect the committed changes.