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="http://sourceforge.net/projects/nethack/files/nethack/3.6.0/nethack-360-src.tgz" CHECKSUM_SHA256="1ade698d8458b8d87a4721444cb73f178c74ed1b6fde537c12000f8edf2cb18a" 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" 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:install cmd:groff cmd:nroff cmd:make cmd:sed cmd:tbl " GLOBAL_WRITABLE_FILES=" settings/nethack directory keep-old " 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 }