head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.4 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.2 pkgsrc-2025Q4-base:1.1; locks; strict; comment @# @; 1.1 date 2025.11.30.06.24.16; author scole; state Exp; branches; next ; commitid CnFp79zcnCjPGxkG; desc @@ 1.1 log @Update to version 1.053nb1 - robots: add needed .../devel/p5-Curses dependency - mimedecode: change 'PerlPowerTools::MIME::Parser->new;' to 'MIME::Parser->new;' - PerlPowerTools.pm: add get_dictionary_path() for system dictionary - with hangman & spell & words commands, fallback to system dictionary - fortune: fix offensive => is_offensive, add /usr/share/games/fortune to search path - keep utilties and man pages in separate directory, but move perl modules to perllib dir @ text @$NetBSD$ Try to use system fortune, fix function name --- bin/fortune.orig 2025-11-04 14:05:44.000000000 +0000 +++ bin/fortune @@@@ -252,8 +252,16 @@@@ sub find_path sub fortune_dirs { my @@searchdirs; - push @@searchdirs, @@FORTDIRS unless $opts{o}; - push @@searchdirs, @@OFFDIRS if ( $opts{o} || $opts{a} ); + my $sys_fort = "/usr/share/games/fortune"; + if ( -d "$home/fortunes" ) { + # non-offensive & offensive in separate dirs + push @@searchdirs, @@FORTDIRS unless $opts{o}; + push @@searchdirs, @@OFFDIRS if ( $opts{a} || $opts{o} ); + } elsif ( -d $sys_fort ) { + # non-offensive & offensive in same dir + push @@searchdirs, $sys_fort; + @@OFFDIRS = (); + } return @@searchdirs; } @@@@ -293,7 +301,7 @@@@ sub is_fortune_file warn "$msg FALSE (no \".dat\" file)\n" if $debug; return 0; } - if ( $opts{o} and not offensive( $path ) ) { + if ( $opts{o} and not is_offensive( $path ) ) { warn "$msg FALSE (inoffensive files not allowed)\n" if $debug; return 0; } @@@@ -1098,6 +1106,10 @@@@ readme ./fortunes/startrek ./fortunes/zippy + OR + +/usr/share/games/fortune/ + =head1 BUGS Currently there is no installer and the fortunes listed above are not @