git: a4ab284f2329 - main - games/alienarena: Update to 7.71.6

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Mon, 13 Nov 2023 04:01:33 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a4ab284f23292633630684b8c809acb58b4ff623

commit a4ab284f23292633630684b8c809acb58b4ff623
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-11-13 03:59:49 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-11-13 04:01:25 +0000

    games/alienarena: Update to 7.71.6
    
    - Use GITHUB
    - Bump PORTEPOCH because it uses a new kind of version
---
 games/alienarena-data/Makefile                    | 32 ++++++++---------------
 games/alienarena-data/distinfo                    |  5 ++--
 games/alienarena/Makefile                         | 30 ++++++++++-----------
 games/alienarena/distinfo                         |  5 ++--
 games/alienarena/files/patch-client_cl_updates.c  | 21 +++++++++++++++
 games/alienarena/files/patch-unix-minizip_ioapi.h | 11 ++++++++
 games/alienarena/pkg-plist                        | 11 +++++---
 7 files changed, 72 insertions(+), 43 deletions(-)

diff --git a/games/alienarena-data/Makefile b/games/alienarena-data/Makefile
index 121efbf55e4c..c3322ee766fb 100644
--- a/games/alienarena-data/Makefile
+++ b/games/alienarena-data/Makefile
@@ -1,22 +1,12 @@
 PORTNAME=	alienarena
-PORTVERSION=	2013.766
-PORTREVISION=	2
+DISTVERSION=    7.71.6
+PORTEPOCH=	1
 CATEGORIES=	games
-MASTER_SITES=	ftp://ftp.linux.kiev.ua/pub/Linux/Gentoo/distfiles/ \
-		http://ftp.jeuxlinux.fr/files/ \
-		http://mirror.ipgn.com.au/games/alienarena/ \
-		http://gd.tuwien.ac.at/opsys/linux/gentoo/distfiles/ \
-		http://offload2.icculus.org:9090/alienarena/Files/ \
-		http://offload1.icculus.org:9090/alienarena/Files/ \
-		http://icculus.org/alienarena/Files/ \
-		http://red.planetarena.org/files/ \
-		GENTOO
 PKGNAMESUFFIX=	-data
-DISTNAME=	${PORTNAME}-7.66-linux20130827
 
 MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Alien Arena (data)
-WWW=		http://red.planetarena.org/
+WWW=		https://alienarena.org/
 
 LICENSE=	AlienArena-Data
 LICENSE_NAME=	Freely redistributable as a whole
@@ -24,32 +14,32 @@ LICENSE_FILE=	${WRKSRC}/docs/license.txt
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 # See also http://red.planetarena.org/forum/showthread.php?tid=716 where fedora asked for clarification
 
+USE_GITHUB=	yes
+
 NO_BUILD=	yes
 PLIST=		${WRKDIR}/pkg-plist
-WRKSRC=		${WRKDIR}/${PORTNAME}-7.66
 
 OPTIONS_DEFINE=	DOCS
 
+post-extract:
+	@${RM} ${WRKSRC}/data1/Makefile* ${WRKSRC}/data1/configure* ${WRKSRC}/data1/aclocal*
+
 pre-install:
 	@${RM} -f ${PLIST}
 
-.	for DIRE in arena botinfo data1
+.	for DIRE in arena data1
 		@cd ${WRKSRC} && \
 			${FIND} ${DIRE} -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
 				${FIND} ${DIRE} -type d | ${SORT} -r | ${SED} -e 's|^|@dir %%DATADIR%%/|' >> ${PLIST}
 .	endfor
 
-	@${ECHO_CMD} share/pixmaps/${PORTNAME}.png >> ${PLIST}
-
 	@cd ${WRKSRC}/docs && \
 		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%PORTDOCS%%%%DOCSDIR%%/|' >> ${PLIST} && \
 		${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|%%PORTDOCS%%@dir %%DOCSDIR%%/|' >> ${PLIST}
 
 do-install:
-	cd ${WRKSRC} && ${COPYTREE_SHARE} "arena botinfo data1" ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png \
-		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "arena data1" ${STAGEDIR}${DATADIR}
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} "*" ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>
diff --git a/games/alienarena-data/distinfo b/games/alienarena-data/distinfo
index 403ec652b4a3..e995e1bc0055 100644
--- a/games/alienarena-data/distinfo
+++ b/games/alienarena-data/distinfo
@@ -1,2 +1,3 @@
-SHA256 (alienarena-7.66-linux20130827.tar.gz) = 29086098eacb18319e6dcc9156355c44db4b1aa8a4f7b0bb63e6856d8128b012
-SIZE (alienarena-7.66-linux20130827.tar.gz) = 617636649
+TIMESTAMP = 1699845348
+SHA256 (alienarena-alienarena-7.71.6_GH0.tar.gz) = c9d6082fa287114ce70851acebdcabee907d93ca637a5b921abb329442501b14
+SIZE (alienarena-alienarena-7.71.6_GH0.tar.gz) = 1201296013
diff --git a/games/alienarena/Makefile b/games/alienarena/Makefile
index 537a1d77ef2c..d928705a8708 100644
--- a/games/alienarena/Makefile
+++ b/games/alienarena/Makefile
@@ -1,23 +1,20 @@
 PORTNAME=	alienarena
-PORTVERSION=	2013.766
-PORTREVISION=	13
+DISTVERSION=	7.71.6
+PORTEPOCH=	1
 CATEGORIES=	games
-MASTER_SITES=	http://icculus.org/alienarena/Files/ \
-		http://red.planetarena.org/files/ \
-		GENTOO
-DISTNAME=	${PORTNAME}-7.66-linux20130827
 
 MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Alien Arena (native version)
-WWW=		http://red.planetarena.org/
+WWW=		https://alienarena.org/
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/../COPYING
+LICENSE_FILE=	${WRKSRC}/../docs/license.txt
 
-RUN_DEPENDS=	${LOCALBASE}/${DATADIR_REL}/data1/default.cfg:games/alienarena-data
+RUN_DEPENDS=	${LOCALBASE}/${DATADIR_REL}/arena/default.cfg:games/alienarena-data
 
-USES=		compiler:c++11-lib dos2unix gmake localbase
+USES=		compiler:c++11-lib desktop-file-utils dos2unix gmake localbase
 USE_CXXSTD=	c++11
+USE_GITHUB=	yes
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--with-xf86vm \
@@ -33,8 +30,8 @@ CFLAGS+=	-fcommon
 EXTRACT_AFTER_ARGS=	--exclude "data1"
 SUB_FILES=	pkg-message
 
-CONFIGURE_WRKSRC=${WRKDIR}/${PORTNAME}-7.66/
-WRKSRC=		${WRKDIR}/${PORTNAME}-7.66/source
+CONFIGURE_WRKSRC=${WRKDIR}/${PORTNAME}-${DISTVERSION}
+WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}/source
 
 PLIST_SUB+=	LIBDIR=${LIBDIR:S|^${PREFIX}/||}
 
@@ -71,6 +68,7 @@ post-patch:
 	@${REINPLACE_CMD} -e "s|(CCLD)|(CXX)|g" ${WRKSRC}/Makefile.in
 	@${REINPLACE_CMD} -e "s|malloc.h|stdlib.h|g" ${WRKSRC}/client/snd_openal.c
 	@${REINPLACE_CMD} -e "s|.codered|.config/alienarena|g" ${WRKSRC}/qcommon/qcommon.h
+	@${REINPLACE_CMD} -e "s|/usr/games/alien-arena|${PORTNAME}|g" ${WRKSRC}/../unix_dist/alien-arena.desktop
 # Resolve name collision with jpeg-8
 	${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
 		${WRKSRC}/ref_gl/r_image.c
@@ -79,13 +77,15 @@ post-patch:
 
 do-install:
 	${MKDIR} ${STAGEDIR}${LIBDIR}/arena ${STAGEDIR}${LIBDIR}/data1
-	${LN} -s ${DATADIR}/arena/* ${STAGEDIR}${LIBDIR}/arena
-	${LN} -s ${DATADIR}/botinfo ${STAGEDIR}${LIBDIR}
-	${LN} -s ${DATADIR}/data1/* ${STAGEDIR}${LIBDIR}/data1
+	${LN} -sf ${DATADIR}/arena/* ${STAGEDIR}${LIBDIR}/arena
+	${LN} -sf ${DATADIR}/data1/* ${STAGEDIR}${LIBDIR}/data1
 
 do-install-CLIENT-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
 		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/
+	${INSTALL_DATA} ${WRKSRC}/../unix_dist/alien-arena.desktop ${STAGEDIR}${DESKTOPDIR}/${PORTNAME}.desktop
+	${INSTALL_DATA} ${WRKSRC}/../unix_dist/alien-arena.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/
 
 do-install-DEDICATED-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-ded \
diff --git a/games/alienarena/distinfo b/games/alienarena/distinfo
index 403ec652b4a3..19751bac3285 100644
--- a/games/alienarena/distinfo
+++ b/games/alienarena/distinfo
@@ -1,2 +1,3 @@
-SHA256 (alienarena-7.66-linux20130827.tar.gz) = 29086098eacb18319e6dcc9156355c44db4b1aa8a4f7b0bb63e6856d8128b012
-SIZE (alienarena-7.66-linux20130827.tar.gz) = 617636649
+TIMESTAMP = 1699837592
+SHA256 (alienarena-alienarena-7.71.6_GH0.tar.gz) = c9d6082fa287114ce70851acebdcabee907d93ca637a5b921abb329442501b14
+SIZE (alienarena-alienarena-7.71.6_GH0.tar.gz) = 1201296013
diff --git a/games/alienarena/files/patch-client_cl_updates.c b/games/alienarena/files/patch-client_cl_updates.c
new file mode 100644
index 000000000000..e9d4495f78de
--- /dev/null
+++ b/games/alienarena/files/patch-client_cl_updates.c
@@ -0,0 +1,21 @@
+--- client/cl_updates.c	2023-11-12 22:09:46.989672000 -0500
++++ client/cl_updates.c	2023-11-12 22:10:10.652785000 -0500
+@@ -250,14 +250,14 @@
+ 	easyhandle = curl_easy_init();
+ 
+ 	// Set Http version to 1.1, somehow this seems to be needed for the multi-download
+-	if (curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, (long) CURL_HTTP_VERSION_1_1) != CURLE_OK) return false;
++	if (curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, (long) CURL_HTTP_VERSION_1_1) != CURLE_OK) return;
+ 
+ 	// Follow redirects to https - but this doesn't seem to be working
+-	if (curl_easy_setopt(easyhandle, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK) return false;
+-	if (curl_easy_setopt(easyhandle, CURLOPT_MAXREDIRS, 3L) != CURLE_OK) return false;
++	if (curl_easy_setopt(easyhandle, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK) return;
++	if (curl_easy_setopt(easyhandle, CURLOPT_MAXREDIRS, 3L) != CURLE_OK) return;
+ 	
+ 	// Don't verify that the host matches the certificate
+-	if (curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 0L) != CURLE_OK) return false;
++	if (curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 0L) != CURLE_OK) return;
+ 
+ 	Com_sprintf(url, sizeof(url), "%s", cl_latest_game_version_url->string);
+ 
diff --git a/games/alienarena/files/patch-unix-minizip_ioapi.h b/games/alienarena/files/patch-unix-minizip_ioapi.h
new file mode 100644
index 000000000000..74f957423255
--- /dev/null
+++ b/games/alienarena/files/patch-unix-minizip_ioapi.h
@@ -0,0 +1,11 @@
+--- unix/minizip/ioapi.h	2023-11-12 22:11:21.368667000 -0500
++++ unix/minizip/ioapi.h	2023-11-12 22:12:10.762868000 -0500
+@@ -44,7 +44,7 @@
+ #include <stdlib.h>
+ #include "zlib.h"
+ 
+-#if defined(USE_FILE32API)
++#if defined(USE_FILE32API) || defined (__FreeBSD__)
+ #define fopen64 fopen
+ #define ftello64 ftell
+ #define fseeko64 fseek
diff --git a/games/alienarena/pkg-plist b/games/alienarena/pkg-plist
index 555fac98fe33..4a7209da220c 100644
--- a/games/alienarena/pkg-plist
+++ b/games/alienarena/pkg-plist
@@ -1,16 +1,19 @@
 %%CLIENT%%bin/alienarena
 %%DEDICATED%%bin/alienarena-ded
+%%LIBDIR%%/arena/default.cfg
+%%LIBDIR%%/arena/maps
+%%LIBDIR%%/arena/maps.lst
 %%LIBDIR%%/arena/motd.txt
+%%LIBDIR%%/arena/scripts
 %%LIBDIR%%/arena/server.cfg
-%%LIBDIR%%/botinfo
-%%LIBDIR%%/data1/default.cfg
+%%LIBDIR%%/data1/botinfo
+%%LIBDIR%%/data1/build-aux
 %%LIBDIR%%/data1/env
 %%LIBDIR%%/data1/fonts
 %%LIBDIR%%/data1/gfx
 %%LIBDIR%%/data1/graphical_presets
 %%LIBDIR%%/data1/levelshots
 %%LIBDIR%%/data1/maps
-%%LIBDIR%%/data1/maps.lst
 %%LIBDIR%%/data1/models
 %%LIBDIR%%/data1/particles
 %%LIBDIR%%/data1/pics
@@ -19,6 +22,8 @@
 %%LIBDIR%%/data1/sound
 %%LIBDIR%%/data1/textures
 %%LIBDIR%%/data1/vehicles
+share/applications/alienarena.desktop
+share/icons/hicolor/256x256/apps/alien-arena.png
 @dir %%LIBDIR%%/data1
 @dir %%LIBDIR%%/arena
 @dir %%LIBDIR%%