Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2021 17:46:34 +0000 (UTC)
From:      =?UTF-8?Q?Fernando_Apestegu=c3=ada?= <fernape@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r565431 - in head/games/uhexen2: . files
Message-ID:  <202102161746.11GHkY61093064@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fernape
Date: Tue Feb 16 17:46:33 2021
New Revision: 565431
URL: https://svnweb.freebsd.org/changeset/ports/565431

Log:
  games/uhexen2: add missing patches and set maintainership
  
  Submitter becomes maintainer, already maintainer of other ports.
  
  PR:	253433
  Submitted by:	ip@unixway.org

Added:
  head/games/uhexen2/files/patch-h2patch_Makefile   (contents, props changed)
  head/games/uhexen2/files/patch-h2patch_h2patch3.c   (contents, props changed)
Modified:
  head/games/uhexen2/Makefile
  head/games/uhexen2/files/Makefile
  head/games/uhexen2/files/pkg-message.in
  head/games/uhexen2/pkg-plist

Modified: head/games/uhexen2/Makefile
==============================================================================
--- head/games/uhexen2/Makefile	Tue Feb 16 17:45:19 2021	(r565430)
+++ head/games/uhexen2/Makefile	Tue Feb 16 17:46:33 2021	(r565431)
@@ -3,7 +3,7 @@
 
 PORTNAME=	uhexen2
 PORTVERSION=	1.5.9
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/Hammer%20of%20Thyrion/${PORTVERSION}/Source \
 		SF/${PORTNAME}/Hexen2%20GameData/gamedata-1.29b:data \
@@ -13,7 +13,7 @@ DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
 		gamedata-all-1.29b${EXTRACT_SUFX}:data
 DIST_SUBDIR=	${PORTNAME}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	ip@unixway.org
 COMMENT=	Hexen II source port supporting Linux/FreeBSD/Unix/Windows
 
 LICENSE=	GPLv2+
@@ -25,49 +25,51 @@ USE_SDL=	sdl
 MAKE_ARGS=	X11BASE="${LOCALBASE}"
 MAKE_JOBS_UNSAFE=	yes
 
+PORTSCOUT=	skipb:yes
 SUB_FILES=	pkg-message
 
-PORTSCOUT=	skipb:yes
-
 OPTIONS_DEFINE=		DOCS FLAC MIKMOD OGG OPUS
+OPTIONS_DEFINE_i386=	ASM
+OPTIONS_DEFAULT=	HEXEN2 HW MAD OGG VORBIS
+OPTIONS_DEFAULT_i386=	ASM
 OPTIONS_MULTI=		BIN
-OPTIONS_MULTI_BIN=	HEXEN2 HW
+OPTIONS_MULTI_BIN=	HEXEN2 HW H2PATCH
 OPTIONS_RADIO=		MP3LIB VORBISLIB
 OPTIONS_RADIO_MP3LIB=	MAD MPG123
 OPTIONS_RADIO_VORBISLIB=	TREMOR VORBIS
-OPTIONS_DEFAULT=	HEXEN2 HW MAD OGG VORBIS
-OPTIONS_DEFINE_i386=	ASM
-OPTIONS_DEFAULT_i386=	ASM
 OPTIONS_SUB=		yes
 
+H2PATCH_DESC=		Build game data patching tool
+HEXEN2_DESC=		Build Hexen II clients and servers
+HW_DESC=		Build HexenWorld clients and servers
+MP3LIB_DESC=		MP3 audio codec
+VORBISLIB_DESC=		Vorbis audio codec
+
 ASM_BUILD_DEPENDS=	nasm:devel/nasm
 ASM_MAKE_ARGS_OFF=	USE_X86_ASM=no
 FLAC_LIB_DEPENDS=	libFLAC.so:audio/flac
 FLAC_MAKE_ARGS=		USE_CODEC_FLAC=yes
-HEXEN2_DESC=		Build Hexen II clients and servers
+H2PATCH_MAKE_ARGS=	BUILD_H2PATCH=yes
 HEXEN2_MAKE_ARGS=	BUILD_HEXEN2=yes
-HW_DESC=		Build HexenWorld clients and servers
 HW_DISTFILES=		hexenworld-pakfiles-0.15${EXTRACT_SUFX}:hw
 HW_MAKE_ARGS=		BUILD_HW=yes
 MAD_LIB_DEPENDS=	libmad.so:audio/libmad
 MAD_MAKE_ARGS=		MP3LIB=mad
 MIKMOD_LIB_DEPENDS=	libmikmod.so:audio/libmikmod
 MIKMOD_MAKE_ARGS=	USE_CODEC_MIKMOD=yes
-MP3LIB_DESC=		MP3 audio codec
 MPG123_LIB_DEPENDS=	libmpg123.so:audio/mpg123
 MPG123_MAKE_ARGS=	MP3LIB=mpg123
 OGG_LIB_DEPENDS=	libogg.so:audio/libogg
 OGG_MAKE_ARGS_OFF=	USE_CODEC_OGG=no
+OPUS_IMPLIES=		OGG
 OPUS_LIB_DEPENDS=	libopusfile.so:audio/opusfile
 OPUS_MAKE_ARGS=		USE_CODEC_OPUS=yes
-OPUS_IMPLIES=		OGG
+TREMOR_IMPLIES=		OGG
 TREMOR_LIB_DEPENDS=	libvorbisidec.so:audio/libtremor
 TREMOR_MAKE_ARGS=	VORBISLIB=tremor
-TREMOR_IMPLIES=		OGG
+VORBIS_IMPLIES=		OGG
 VORBIS_LIB_DEPENDS=	libvorbis.so:audio/libvorbis
 VORBIS_MAKE_ARGS=	VORBISLIB=vorbis
-VORBIS_IMPLIES=		OGG
-VORBISLIB_DESC=		Vorbis audio codec
 
 .include <bsd.port.options.mk>
 
@@ -85,7 +87,7 @@ post-extract:
 post-patch:
 .for f in engine/hexen2/Makefile engine/hexenworld/client/Makefile \
 	engine/hexenworld/server/Makefile hw_utils/hwmaster/Makefile \
-	libs/timidity/Makefile
+	libs/timidity/Makefile h2patch/Makefile
 	@${REINPLACE_CMD} -e \
 		'/^CPU_X86/s|=.*|=| ; \
 		 /^CFLAGS/s| -g | | ; \
@@ -101,27 +103,27 @@ post-patch:
 .endfor
 
 do-install:
-	@${MKDIR} ${STAGEDIR}${DATADIR}/data1
-.for f in default.cfg hexen.rc progs.dat progs2.dat strings.txt
-	${INSTALL_DATA} ${WRKDIR}/data1/${f} ${STAGEDIR}${DATADIR}/data1
-.endfor
-	${INSTALL_DATA} ${WRKDIR}/patchdat/data1/* ${STAGEDIR}${DATADIR}/data1
-	(cd ${WRKDIR} && ${COPYTREE_SHARE} portals ${STAGEDIR}${DATADIR})
+	cd ${WRKDIR} && \
+	${COPYTREE_SHARE} data1 ${STAGEDIR}${DATADIR} && \
+	${COPYTREE_SHARE} portals ${STAGEDIR}${DATADIR}
 
-post-install-HW-on:
-	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/glhwcl ${STAGEDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/hwcl ${STAGEDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/server/hwsv ${STAGEDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/hw_utils/hwmaster/hwmaster ${STAGEDIR}${PREFIX}/bin
-	${MKDIR} ${STAGEDIR}${DATADIR}/hw
-	${INSTALL_DATA} ${WRKDIR}/hw/* ${STAGEDIR}${DATADIR}/hw
+post-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
 
+post-install-H2PATCH-on:
+	${INSTALL_PROGRAM} ${WRKSRC}/h2patch/h2patch ${STAGEDIR}${PREFIX}/bin
+	cd ${WRKDIR} && ${COPYTREE_SHARE} patchdat ${STAGEDIR}${DATADIR}
+
 post-install-HEXEN2-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexen2/glhexen2 ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexen2/hexen2 ${STAGEDIR}${PREFIX}/bin
 
-post-install-DOCS-on:
-	${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
+post-install-HW-on:
+	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/glhwcl ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/hwcl ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/server/hwsv ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/hw_utils/hwmaster/hwmaster ${STAGEDIR}${PREFIX}/bin
+	cd ${WRKDIR} && ${COPYTREE_SHARE} hw ${STAGEDIR}${DATADIR}
 
 .include <bsd.port.mk>

Modified: head/games/uhexen2/files/Makefile
==============================================================================
--- head/games/uhexen2/files/Makefile	Tue Feb 16 17:45:19 2021	(r565430)
+++ head/games/uhexen2/files/Makefile	Tue Feb 16 17:46:33 2021	(r565431)
@@ -15,3 +15,6 @@ ifeq ($(BUILD_HW),yes)
 	$(MAKE) -C engine/hexenworld/client glhw localclean
 	$(MAKE) -C hw_utils/hwmaster hwmaster clean
 endif
+ifeq ($(BUILD_H2PATCH),yes)
+	${MAKE} -C h2patch
+endif

Added: head/games/uhexen2/files/patch-h2patch_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/uhexen2/files/patch-h2patch_Makefile	Tue Feb 16 17:46:33 2021	(r565431)
@@ -0,0 +1,17 @@
+--- h2patch/Makefile.orig	2021-02-11 09:31:42 UTC
++++ h2patch/Makefile
+@@ -10,11 +10,11 @@ LIBS_DIR:=$(UHEXEN2_TOP)/libs
+ OSLIBS:=$(UHEXEN2_TOP)/oslibs
+ 
+ CC ?= gcc
+-ifeq ($(origin CC),default)
++#ifeq ($(origin CC),default)
+ # refuse the stupid 'cc' default of make
+ # which not necessarily exist everywhere
+-CC  = gcc
+-endif
++#CC  = gcc
++#endif
+ LINKER = $(CC)
+ 
+ CPUFLAGS=

Added: head/games/uhexen2/files/patch-h2patch_h2patch3.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/uhexen2/files/patch-h2patch_h2patch3.c	Tue Feb 16 17:46:33 2021	(r565431)
@@ -0,0 +1,40 @@
+--- h2patch/h2patch3.c.orig	2017-09-01 18:03:15 UTC
++++ h2patch/h2patch3.c
+@@ -580,6 +580,7 @@ static void print_help (void)
+ 	fprintf (stdout, "  -h | -help   show help\n");
+ 	fprintf (stdout, "  -version     show version\n");
+ 	fprintf (stdout, "  -verbose     be verbose\n");
++	fprintf (stdout, "  -prefix dir  look for data files in 'dir'\n");
+ }
+ 
+ 
+@@ -663,6 +664,7 @@ int main (int argc, char **argv)
+ 	int	i, num_patched, ret;
+ 	long		len;
+ 	unsigned long	csum;
++	char*	prefix = ".";
+ 
+ 	print_version ();
+ 	for (i = 1; i < argc; ++i)
+@@ -680,6 +682,10 @@ int main (int argc, char **argv)
+ 		{
+ 			h2patch_options.verbose = 1;
+ 		}
++		else if (!strcmp(argv[i], "-prefix"))
++		{
++			prefix = argv[++i];
++		}
+ 		else
+ 		{
+ 			fprintf (stderr, "Unrecognized option \"%s\"\n", argv[i]);
+@@ -710,8 +716,8 @@ int main (int argc, char **argv)
+ 
+ 	for (i = 0; i < NUM_PATCHES; i++)
+ 	{
+-		q_snprintf (dst, sizeof(dst), "%s%c%s", patch_data[i].dir_name,
+-					DIR_SEPARATOR_CHAR, patch_data[i].filename);
++		q_snprintf (dst, sizeof(dst), "%s%c%s%c%s", prefix , DIR_SEPARATOR_CHAR, 
++			patch_data[i].dir_name, DIR_SEPARATOR_CHAR, patch_data[i].filename);
+ 		fprintf (stdout, "File %s :\n", dst);
+ 
+ 		ret = check_access(dst);

Modified: head/games/uhexen2/files/pkg-message.in
==============================================================================
--- head/games/uhexen2/files/pkg-message.in	Tue Feb 16 17:45:19 2021	(r565430)
+++ head/games/uhexen2/files/pkg-message.in	Tue Feb 16 17:46:33 2021	(r565431)
@@ -4,11 +4,19 @@
 Hexen II: Hammer of Thyrion has been installed.
 
 To complete the installation of this port you have to copy the original
-"data1/pak0.pak" and "data1/pak1.pak" files from your original distribution to
-"%%DATADIR%%/data1" in lower-case form.
+"data1/pak0.pak" and "data1/pak1.pak" files from your original distribution
+to "%%DATADIR%%/data1" in lower-case form.
 
-Then see the documentation about patching the data files in
-"%%DOCSDIR%%". The update files are installed.
+To play mission pack "Portal of Praevus" copy "portals/pak3.pak" from your
+original distribution
+to "%%DATADIR%%/portals" in lower-case form.
+
+Pak files should be from latest Raven's 1.11 distribution!
+
+If you have pak files from earlier version of the game, you have to patch them
+to the latest version. You can apply official patch or build the port with 
+H2PATCH option enabled and then run:
+	h2patch -prefix %%DATADIR%%
 EOM
 }
 ]

Modified: head/games/uhexen2/pkg-plist
==============================================================================
--- head/games/uhexen2/pkg-plist	Tue Feb 16 17:45:19 2021	(r565430)
+++ head/games/uhexen2/pkg-plist	Tue Feb 16 17:46:33 2021	(r565431)
@@ -4,6 +4,7 @@
 %%HW%%bin/hwcl
 %%HW%%bin/hwmaster
 %%HW%%bin/hwsv
+%%H2PATCH%%bin/h2patch
 %%PORTDOCS%%%%DOCSDIR%%/ABOUT
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/BUGS
@@ -25,10 +26,22 @@
 %%PORTDOCS%%%%DOCSDIR%%/ReleaseNotes.old
 %%PORTDOCS%%%%DOCSDIR%%/SrcNotes.txt
 %%PORTDOCS%%%%DOCSDIR%%/TODO
-%%DATADIR%%/data1/data1pk0.xd3
-%%DATADIR%%/data1/data1pk1.xd3
+%%DATADIR%%/data1/autoexec.cfg
 %%DATADIR%%/data1/default.cfg
 %%DATADIR%%/data1/hexen.rc
+%%DATADIR%%/data1/maps/README.txt
+%%DATADIR%%/data1/maps/cath.ent
+%%DATADIR%%/data1/maps/cath.txt
+%%DATADIR%%/data1/maps/demo2.ent
+%%DATADIR%%/data1/maps/demo2.txt
+%%DATADIR%%/data1/maps/egypt4.ent
+%%DATADIR%%/data1/maps/egypt4.txt
+%%DATADIR%%/data1/maps/egypt5.ent
+%%DATADIR%%/data1/maps/egypt5.txt
+%%DATADIR%%/data1/maps/romeric5.ent
+%%DATADIR%%/data1/maps/romeric5.txt
+%%DATADIR%%/data1/maps/tower.ent
+%%DATADIR%%/data1/maps/tower.txt
 %%DATADIR%%/data1/progs.dat
 %%DATADIR%%/data1/progs2.dat
 %%DATADIR%%/data1/strings.txt
@@ -51,3 +64,5 @@
 %%DATADIR%%/portals/progs.dat
 %%DATADIR%%/portals/puzzles.txt
 %%DATADIR%%/portals/strings.txt
+%%H2PATCH%%%%DATADIR%%/patchdat/data1/data1pk0.xd3
+%%H2PATCH%%%%DATADIR%%/patchdat/data1/data1pk1.xd3



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102161746.11GHkY61093064>