description Text-based cavern exploring game
long_description Larn is a text-based fantasy role-playing game similar to Rogue, \
master_sites https://www.mirrorservice.org/sites/distfiles.finkmirrors.net/
distname ${name}-4.6.2-RELEASE
checksums md5 cea96f48caa057793f6bcaf3394ca388
build.args CC=${configure.cc}
build.env-append "CFLAGS=-I${prefix}/include -I${prefix}/include/ncurses -Wno-implicit-function-declaration -Wno-return-type"
depends_lib-append port:ncurses
patchfiles patch-diag.c \
variant singleuser description {Disables system-wide scoreboards and allows local user installation without root privileges} {}
if {![variant_isset singleuser]} {
reinplace "s|MAN|MAN6|" ${worksrcpath}/Makefile
reinplace "s|LDADD= -ltermcap -lcompat|LDADD= -lncurses -L${prefix}/lib|" ${worksrcpath}/Makefile
reinplace "s|/usr/share/games|${prefix}/share|g" ${worksrcpath}/pathnames.h
reinplace "s|/var/games|${prefix}/var/games|g" ${worksrcpath}/pathnames.h
if {![variant_isset singleuser]} {
xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/larn
xinstall -m 775 -d ${destroot}${prefix}/var/games/larn
xinstall -m 755 -d ${destroot}${prefix}/share/larn
if {![variant_isset singleuser]} {
xinstall -m 2755 -g games -c ${worksrcpath}/larn ${destroot}${prefix}/bin