SUMMARY="The ultimate old-school single player dungeon exploration game" DESCRIPTION="NetHack is a single-player roguelike video game originally \ released in 1987 with ASCII graphics. It is a descendant of an earlier game \ called Hack (1985), which is a descendant of Rogue (1980)." HOMEPAGE="http://www.nethack.org/" COPYRIGHT="1985-2015 Stichting Mathematisch Centrum and M. Stephenson" LICENSE="nethack" REVISION="1" SOURCE_URI="https://www.nethack.org/download/3.6.1/nethack-361-src.tgz" CHECKSUM_SHA256="4b8cbf1cc3ad9f6b9bae892d44a9c63106d44782a210906162a7c3be65040ab6" SOURCE_DIR="nethack-$portVersion" PATCHES="nethack-$portVersion.patchset" #the x86 is left is somebody wanted to edit it to work under gcc4 #(it compiles in gcc4, but what is the point if it compiles under gcc2) ARCHITECTURES="x86_gcc2 ?x86 x86_64" GLOBAL_WRITABLE_FILES=" settings/nethack directory keep-old " PROVIDES=" nethack = $portVersion cmd:nethack cmd:nethack_bin " REQUIRES=" haiku lib:libncurses >= 6 " BUILD_REQUIRES=" haiku_devel devel:libncurses >= 6 " BUILD_PREREQUIRES=" cmd:awk cmd:bison cmd:flex cmd:gcc cmd:groff cmd:install cmd:make cmd:nroff cmd:sed cmd:tbl " defineDebugInfoPackage nethack \ "$binDir"/nethack_bin BUILD() { ./sys/unix/setup.sh ./sys/unix/hints/haiku make PREFIX=$binDir $jobArgs } INSTALL() { mkdir -p $binDir make install PREFIX=$binDir #copy the main binary file to be in main directory cp $binDir/nethack/nethack $binDir/nethack_bin mkdir -p $settingsDir/nethack #move configs to writable directory (license also belongs there) cp -r $binDir/nethack/license \ $binDir/nethack/logfile \ $binDir/nethack/nhdat \ $binDir/nethack/perm \ $binDir/nethack/record \ $binDir/nethack/save \ $binDir/nethack/symbols \ $binDir/nethack/sysconf \ $binDir/nethack/xlogfile \ $settingsDir/nethack/ #remove first nethack dir to not make a name problems rm -rf $binDir/nethack #replace paths from installation to rights paths in system sed "s/HACKDIR=.*/HACKDIR=\/boot\/system\/settings\/nethack/; \ s/HACK=.*/HACK=\/bin\/nethack_bin/" \ $binDir/nethacksh/nethack > $binDir/nethack chmod +x $binDir/nethack rm -rf $binDir/nethacksh }