diff options
author | knu <knu@FreeBSD.org> | 2017-12-21 13:58:15 +0800 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2017-12-21 13:58:15 +0800 |
commit | 5be621ff8cde1c3f0ab9bc3571f8a764283332f9 (patch) | |
tree | d575fed24aa62139f84a22ef4bf1525181a1efbb | |
parent | 831d48bda8c8216cd51bb6ad52eae18f55593015 (diff) | |
download | freebsd-ports-gnome-5be621ff8cde1c3f0ab9bc3571f8a764283332f9.tar.gz freebsd-ports-gnome-5be621ff8cde1c3f0ab9bc3571f8a764283332f9.tar.zst freebsd-ports-gnome-5be621ff8cde1c3f0ab9bc3571f8a764283332f9.zip |
Unbreak unnethack
Submitted by: adridg
Differential Revision: D13553
-rw-r--r-- | games/unnethack/Makefile | 6 | ||||
-rw-r--r-- | games/unnethack/files/patch-util_lev__comp.l | 24 | ||||
-rw-r--r-- | games/unnethack/pkg-plist | 1 |
3 files changed, 30 insertions, 1 deletions
diff --git a/games/unnethack/Makefile b/games/unnethack/Makefile index 90709f61fbd3..4491be84241c 100644 --- a/games/unnethack/Makefile +++ b/games/unnethack/Makefile @@ -3,13 +3,17 @@ PORTNAME= unnethack DISTVERSION= 5.1.0-20131208 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} MAINTAINER= knu@FreeBSD.org COMMENT= New variant of NetHack -BROKEN= does not build: ./vaults.des: line 110, pos 9 : Core function 'level.depth' has unknown return type 'i'. +LICENSE= nethack +LICENSE_NAME= NETHACK GENERAL PUBLIC LICENSE +LICENSE_FILE= ${WRKSRC}/dat/license +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept GNU_CONFIGURE= yes USES= gmake groff ncurses diff --git a/games/unnethack/files/patch-util_lev__comp.l b/games/unnethack/files/patch-util_lev__comp.l new file mode 100644 index 000000000000..92badc8013d3 --- /dev/null +++ b/games/unnethack/files/patch-util_lev__comp.l @@ -0,0 +1,24 @@ + [clang] Declare core_func_retval() + + This fixes the clang build failure + + ./vaults.des: line 110, pos 9 : Core function 'level.depth' has + unknown return type 'i'. + ./vaults.des: line 110, pos 9 : syntax error at level.depth + + Because core_func_retval() wasn't declared, it was defaulting to + return type **int**. So you could get, for instance, return + value 361 (which is 'i' + 256 .. high bits of the return value + were being kept, instead of discarded as they might for a narrower type). + +--- util/lev_comp.l.orig 2017-12-20 08:11:18 UTC ++++ util/lev_comp.l +@@ -80,6 +80,8 @@ void FDECL(savetoken, (char *)); + void NDECL(newline); + void FDECL(advancepos, (char *)); + ++extern char FDECL(core_func_retval, (int idx)); ++ + /* + * This doesn't always get put in lev_comp.h + * (esp. when using older versions of bison). diff --git a/games/unnethack/pkg-plist b/games/unnethack/pkg-plist index ea8fe75bd0ae..5e6e0d8df027 100644 --- a/games/unnethack/pkg-plist +++ b/games/unnethack/pkg-plist @@ -6,6 +6,7 @@ bin/unnethack %%DATADIR%%/nhdat %%DATADIR%%/recover %%DATADIR%%/unnethack +%%DATADIR%%/unnethackrc.default @mode 664 %%VARDIR%%/logfile %%VARDIR%%/perm |