diff options
author | danfe <danfe@FreeBSD.org> | 2018-09-06 02:28:46 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2018-09-06 02:28:46 +0800 |
commit | 2cb4d69595a7a8534f5c0fec3ff505045b759dfc (patch) | |
tree | 1f598ce3a9ddf0d1f7b2f0790655b7b3ce69a80b /games | |
parent | 87c3910f6cecbef22078450efbe37c7a5313b6ff (diff) | |
download | freebsd-ports-gnome-2cb4d69595a7a8534f5c0fec3ff505045b759dfc.tar.gz freebsd-ports-gnome-2cb4d69595a7a8534f5c0fec3ff505045b759dfc.tar.zst freebsd-ports-gnome-2cb4d69595a7a8534f5c0fec3ff505045b759dfc.zip |
Improve the port and catch it up with modern reality a bit:
- Fix a runtime crash (segfault) due to `MasterDirectory dirbuf' if-block
local variable being used after it went out of scope by making it local
to the LoadPicture() function instead
- Add the HEXEN option which brings better Hexen support to Yadex (duh).
Unfortunately, it depends on the SEARCH patch and conflicts with the
LAPTOP_KEYS patch (which is the reason why I didn't introduce it years
ago: we did not have IMPLIES/PREVENTS back then, but we do now)
- Building with 3D Render option requires USE_CXXSTD=c++98 due to infamous
"in-class initializer for static data member of type 'const double'
requires 'constexpr' specifier" error in `src/r_render.cc'. Actually,
we could get away with c++03, but GCC 4.2, which is still used on e.g.
powerpc and sparc64, does not support it. Enable it unconditionally so
the port is always built against the same C++ standard regardless of the
selected options
- Reword option descriptions to avoid using verbs, per our conventions
Diffstat (limited to 'games')
-rw-r--r-- | games/yadex/Makefile | 17 | ||||
-rw-r--r-- | games/yadex/distinfo | 3 | ||||
-rw-r--r-- | games/yadex/files/patch-src_pic2img.cc | 18 |
3 files changed, 33 insertions, 5 deletions
diff --git a/games/yadex/Makefile b/games/yadex/Makefile index 399531942ea5..e3e4e6f5e1a8 100644 --- a/games/yadex/Makefile +++ b/games/yadex/Makefile @@ -3,7 +3,7 @@ PORTNAME= yadex PORTVERSION= 1.7.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= http://www.teaser.fr/~amajorel/yadex/ DIST_SUBDIR= ${PORTNAME} @@ -16,22 +16,28 @@ LICENSE= GPLv2 USES= gmake perl5 shebangfix HAS_CONFIGURE= yes CONFIGURE_ENV= CC="${CC}" CXX="${CXX}" PREFIX="${PREFIX}" +USE_CXXSTD= c++98 # required for 3D preview option (see r479036) USE_PERL5= build SHEBANG_FILES= scripts/copyright scripts/youngest USE_XORG= x11 MAKEFILE= GNUmakefile SUB_FILES= pkg-message -OPTIONS_DEFINE= WHITE_BG 3D_RENDER SEARCH EXTRA_TOOLS LAPTOP_KEYS DOCS +OPTIONS_DEFINE= WHITE_BG 3D_RENDER SEARCH EXTRA_TOOLS LAPTOP_KEYS HEXEN DOCS +NO_OPTIONS_SORT= yes # required because HEXEN implies SEARCH WHITE_BG_DESC= Alternative (black-on-white) color scheme -3D_RENDER_DESC= Build with 3D preview function +3D_RENDER_DESC= 3D preview function (activate with 'R') SEARCH_DESC= Thing, linedef, or sector search by type -EXTRA_TOOLS_DESC= Add a few extra tools to Yadex' repertoire +EXTRA_TOOLS_DESC= Extra tools to Yadex' repertoire LAPTOP_KEYS_DESC= Key bindings for easier editing on laptops +HEXEN_DESC= Improved Hexen support + +HEXEN_IMPLIES= SEARCH +HEXEN_PREVENTS= LAPTOP_KEYS PATCH_SITES= http://glbsp.sourceforge.net/yadex/ -PATCH_DIST_STRIP= -p1 +PATCH_DIST_STRIP= -p1 -l # -l is needed for the Hexen patch PATCH_PREFIX= Yadex_${PORTVERSION:S/.//g} PATCH_SUFFIX= .diff PATCHFILES= ${PATCH_PREFIX}_Depend${PATCH_SUFFIX} @@ -41,6 +47,7 @@ PATCHFILES= ${PATCH_PREFIX}_Depend${PATCH_SUFFIX} SEARCH_PATCHFILES= ${PATCH_PREFIX}_Find${PATCH_SUFFIX} EXTRA_TOOLS_PATCHFILES= ${PATCH_PREFIX}_Tools${PATCH_SUFFIX} LAPTOP_KEYS_PATCHFILES= ${PATCH_PREFIX}_Keys${PATCH_SUFFIX} +HEXEN_PATCHFILES= ${PATCH_PREFIX}_Hexen${PATCH_SUFFIX} post-patch-WHITE_BG-on: @${REINPLACE_CMD} -E 's,^#(CXXFLAGS \+= -DWHITE_BACKGROUND)$$,\1,' \ diff --git a/games/yadex/distinfo b/games/yadex/distinfo index 44aca096802f..9f178f521dfa 100644 --- a/games/yadex/distinfo +++ b/games/yadex/distinfo @@ -1,3 +1,4 @@ +TIMESTAMP = 1072661760 SHA256 (yadex/yadex-1.7.0.tar.gz) = 316aca295b647b45d6d0d359fd7bba0448e7e114d295347add7ac0e87aa0f446 SIZE (yadex/yadex-1.7.0.tar.gz) = 551318 SHA256 (yadex/Yadex_170_Depend.diff) = d2cf391fb1aaf1fb6ac60f3fb2bb50c549389ef3a0590b838922f0251240a9f3 @@ -10,3 +11,5 @@ SHA256 (yadex/Yadex_170_Tools.diff) = 2c1573de67aee31a4d734831c95e0421f1816598c4 SIZE (yadex/Yadex_170_Tools.diff) = 17179 SHA256 (yadex/Yadex_170_Keys.diff) = d93e63b1baaaff769442245243027cb6aadde166a3004726e187eb3697decd15 SIZE (yadex/Yadex_170_Keys.diff) = 1496 +SHA256 (yadex/Yadex_170_Hexen.diff) = b7ac148c7bbbc4f122c350bf13eb81ce8daff56230be42101e5d7817b63f5c38 +SIZE (yadex/Yadex_170_Hexen.diff) = 44138 diff --git a/games/yadex/files/patch-src_pic2img.cc b/games/yadex/files/patch-src_pic2img.cc new file mode 100644 index 000000000000..51f66a67c5b6 --- /dev/null +++ b/games/yadex/files/patch-src_pic2img.cc @@ -0,0 +1,18 @@ +--- src/pic2img.cc.orig 2003-03-28 12:37:32 UTC ++++ src/pic2img.cc +@@ -72,6 +72,7 @@ int LoadPicture ( + int *pic_width, // To return the size of the picture + int *pic_height) // (can be NULL) + { ++MasterDirectory dirbuf; + MDirPtr dir; + i16 pic_width_; + i16 pic_height_; +@@ -95,7 +96,6 @@ u8 *buf; /* This variable is set to point to the + // Locate the lump where the picture is + if (picloc.wad != 0) + { +- MasterDirectory dirbuf; + dirbuf.wadfile = picloc.wad; + dirbuf.dir.start = picloc.ofs; + dirbuf.dir.size = picloc.len; |