mirror of
https://git.freebsd.org/ports.git
synced 2025-06-05 04:46:28 -04:00
Unbreak unnethack
Submitted by: adridg Differential Revision: D13553
This commit is contained in:
parent
3e58529d19
commit
966126cd08
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=456885
3 changed files with 30 additions and 1 deletions
|
@ -3,13 +3,17 @@
|
||||||
|
|
||||||
PORTNAME= unnethack
|
PORTNAME= unnethack
|
||||||
DISTVERSION= 5.1.0-20131208
|
DISTVERSION= 5.1.0-20131208
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= games
|
CATEGORIES= games
|
||||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R}
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R}
|
||||||
|
|
||||||
MAINTAINER= knu@FreeBSD.org
|
MAINTAINER= knu@FreeBSD.org
|
||||||
COMMENT= New variant of NetHack
|
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
|
GNU_CONFIGURE= yes
|
||||||
USES= gmake groff ncurses
|
USES= gmake groff ncurses
|
||||||
|
|
24
games/unnethack/files/patch-util_lev__comp.l
Normal file
24
games/unnethack/files/patch-util_lev__comp.l
Normal file
|
@ -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).
|
|
@ -6,6 +6,7 @@ bin/unnethack
|
||||||
%%DATADIR%%/nhdat
|
%%DATADIR%%/nhdat
|
||||||
%%DATADIR%%/recover
|
%%DATADIR%%/recover
|
||||||
%%DATADIR%%/unnethack
|
%%DATADIR%%/unnethack
|
||||||
|
%%DATADIR%%/unnethackrc.default
|
||||||
@mode 664
|
@mode 664
|
||||||
%%VARDIR%%/logfile
|
%%VARDIR%%/logfile
|
||||||
%%VARDIR%%/perm
|
%%VARDIR%%/perm
|
||||||
|
|
Loading…
Add table
Reference in a new issue