git: d0fb1df5698e - main - games/arx-libertatis: update 1.1.2 → 1.2

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Tue, 15 Mar 2022 11:50:42 UTC
The branch main has been updated by amdmi3:

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

commit d0fb1df5698e5e27706e117ccf0529a0caee04b1
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-07-16 14:55:02 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-03-15 11:50:06 +0000

    games/arx-libertatis: update 1.1.2 → 1.2
---
 games/arx-libertatis/Makefile                      | 44 +++++++++++++---------
 games/arx-libertatis/distinfo                      |  5 ++-
 games/arx-libertatis/files/patch-CMakeLists.txt    | 16 --------
 .../files/patch-src_platform_Dialog.cpp            | 11 ++++++
 ...src_platform_crashhandler_CrashHandlerPOSIX.cpp | 11 ++++++
 games/arx-libertatis/pkg-descr                     |  2 +-
 games/arx-libertatis/pkg-plist                     | 20 ++++++++--
 7 files changed, 68 insertions(+), 41 deletions(-)

diff --git a/games/arx-libertatis/Makefile b/games/arx-libertatis/Makefile
index ec4ef67ef0b9..db30258bd51f 100644
--- a/games/arx-libertatis/Makefile
+++ b/games/arx-libertatis/Makefile
@@ -1,35 +1,42 @@
 PORTNAME=	arx-libertatis
-PORTVERSION=	1.1.2
-PORTREVISION=	18
+PORTVERSION=	1.2
 CATEGORIES=	games
-MASTER_SITES=	http://downloads.sourceforge.net/arx/ \
-		http://arx-libertatis.org/files/
+MASTER_SITES=	https://arx-libertatis.org/files/ \
+		https://github.com/arx/ArxLibertatis/releases/download/${PORTVERSION}/
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Cross-platform port of Arx Fatalis
 
 LICENSE=	GPLv3+
-LICENSE_FILE=	${WRKSRC}/ARX_PUBLIC_LICENSE.txt
-
-LIB_DEPENDS=	libfreetype.so:print/freetype2
-BUILD_DEPENDS=	${LOCALBASE}/include/boost/foreach.hpp:devel/boost-libs
-
-USES=		cmake compiler:c++11-lang gl openal sdl tar:xz
-USE_SDL=	sdl
-USE_GL=		gl glew
-CMAKE_ARGS=	-DDATA_DIR=arx \
-		-DSTRICT_USE=ON \
-		-DBUILD_CRASHREPORTER=OFF
-LDFLAGS_i386=		-Wl,-znotext
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libfreetype.so:print/freetype2 \
+		libepoxy.so:graphics/libepoxy
+BUILD_DEPENDS=	${LOCALBASE}/include/boost/foreach.hpp:devel/boost-libs \
+		${LOCALBASE}/include/glm/glm.hpp:math/glm
+
+USES=		cmake compiler:c++17-lang openal sdl tar:xz
+USE_SDL=	sdl2
+CMAKE_ON=	STRICT_USE
+CMAKE_OFF=	INSTALL_BLENDER_PLUGIN \
+		SET_OPTIMIZATION_FLAGS
+CMAKE_ARGS=	-DWITH_SDL=2 \
+		-DDATA_DIR:STRING=arx \
+		-DDATA_DIR_PREFIXES:STRING="\$${XDG_DATA_DIRS:-${PREFIX}/share/}" \
+		-DINSTALL_DATADIR:STRING="${DATADIR}" \
+		-DIGNORE_EXE_DIR:STRING="${PREFIX}/bin:${LOCABASE}/bin" \
+		-DCMAKE_INSTALL_MANDIR="${PREFIX}/share/man"
+
+LDFLAGS_i386=	-Wl,-znotext
 
 CONFLICTS_INSTALL=	rnv
 
 SUB_FILES=	pkg-message
 
 PORTDOCS=	AUTHORS CHANGELOG README.md
+PORTDATA=	*
 
 OPTIONS_DEFINE=	DOCS
-OPTIONS_SUB=	yes
 
 .include <bsd.port.pre.mk>
 
@@ -38,7 +45,8 @@ CFLAGS+=	-mminimal-toc
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/CMakeLists.txt
+	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+		${WRKSRC}/CMakeLists.txt ${WRKSRC}/cmake/*.cmake
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/games/arx-libertatis/distinfo b/games/arx-libertatis/distinfo
index a5da95812c36..2b55db20905f 100644
--- a/games/arx-libertatis/distinfo
+++ b/games/arx-libertatis/distinfo
@@ -1,2 +1,3 @@
-SHA256 (arx-libertatis-1.1.2.tar.xz) = 82adb440a9c86673e74b84abd480cae968e1296d625b6d40c69ca35b35ed4e42
-SIZE (arx-libertatis-1.1.2.tar.xz) = 970608
+TIMESTAMP = 1626354922
+SHA256 (arx-libertatis-1.2.tar.xz) = bacf7768c4e21c9166c7ea57083d4f20db0deb8f0ee7d96b5f2829e73a75ad0c
+SIZE (arx-libertatis-1.2.tar.xz) = 2478640
diff --git a/games/arx-libertatis/files/patch-CMakeLists.txt b/games/arx-libertatis/files/patch-CMakeLists.txt
deleted file mode 100644
index 93096fe5d4d4..000000000000
--- a/games/arx-libertatis/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
---- CMakeLists.txt.orig	2014-10-08 15:46:26.000000000 +0400
-+++ CMakeLists.txt	2014-10-08 15:48:25.000000000 +0400
-@@ -132,11 +132,11 @@
- 	set(USER_DIR_PREFIXES   "~/Library/Application Support" CACHE STRING "User dir paths")
- else()
- 	set(DATA_DIR
--		"games/arx:arx"
-+		"arx"
- 		CACHE STRING "Data dir names"
- 	)
- 	set(DATA_DIR_PREFIXES
--		"\${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}:/opt"
-+		"\${XDG_DATA_DIRS:-/usr/local/share/}"
- 		CACHE STRING "Data dir paths"
- 	)
- 	set(USER_DIR
diff --git a/games/arx-libertatis/files/patch-src_platform_Dialog.cpp b/games/arx-libertatis/files/patch-src_platform_Dialog.cpp
new file mode 100644
index 000000000000..7492c7063743
--- /dev/null
+++ b/games/arx-libertatis/files/patch-src_platform_Dialog.cpp
@@ -0,0 +1,11 @@
+--- src/platform/Dialog.cpp.orig	2021-07-14 00:04:34 UTC
++++ src/platform/Dialog.cpp
+@@ -175,7 +175,7 @@ static std::string formatAsHtml(const std::string & te
+ 				oss << "http://";
+ 				i += 6;
+ 			} else if(!link && line.compare(i, 8, "https://", 8) == 0) {
+-				oss << "<a href=";
++				oss << "<a href=\"";
+ 				link_start = oss.tellp(), link = true;
+ 				oss << "https://";
+ 				i += 7;
diff --git a/games/arx-libertatis/files/patch-src_platform_crashhandler_CrashHandlerPOSIX.cpp b/games/arx-libertatis/files/patch-src_platform_crashhandler_CrashHandlerPOSIX.cpp
new file mode 100644
index 000000000000..cba9ade4b262
--- /dev/null
+++ b/games/arx-libertatis/files/patch-src_platform_crashhandler_CrashHandlerPOSIX.cpp
@@ -0,0 +1,11 @@
+--- src/platform/crashhandler/CrashHandlerPOSIX.cpp.orig	2021-07-14 00:04:34 UTC
++++ src/platform/crashhandler/CrashHandlerPOSIX.cpp
+@@ -246,7 +246,7 @@ static fs::path getCoreDumpFile() {
+ 	size_t start = 0;
+ 	while(start < pattern.length()) {
+ 		
+-		size_t end = pattern.find('%');
++		size_t end = pattern.find('%', start);
+ 		if(end == std::string::npos) {
+ 			end = pattern.length();
+ 		}
diff --git a/games/arx-libertatis/pkg-descr b/games/arx-libertatis/pkg-descr
index bfb1da1b3403..45a229e1b19c 100644
--- a/games/arx-libertatis/pkg-descr
+++ b/games/arx-libertatis/pkg-descr
@@ -1,4 +1,4 @@
 Arx Libertatis is a cross-platform, open source port of Arx Fatalis,
 a 2002 first-person role-playing game developed by Arkane Studios.
 
-WWW: http://arx-libertatis.org
+WWW: https://arx-libertatis.org/
diff --git a/games/arx-libertatis/pkg-plist b/games/arx-libertatis/pkg-plist
index 606c81a8e5e7..a1b1948f0af6 100644
--- a/games/arx-libertatis/pkg-plist
+++ b/games/arx-libertatis/pkg-plist
@@ -2,8 +2,20 @@ bin/arx
 bin/arx-install-data
 bin/arxsavetool
 bin/arxunpak
-man/man1/arxsavetool.1.gz
-man/man1/arxunpak.1.gz
-man/man6/arx.6.gz
+libexec/arxtool
 share/applications/arx-libertatis.desktop
-share/pixmaps/arx-libertatis.png
+share/icons/hicolor/128x128/apps/arx-libertatis.png
+share/icons/hicolor/16x16/apps/arx-libertatis.png
+share/icons/hicolor/192x192/apps/arx-libertatis.png
+share/icons/hicolor/22x22/apps/arx-libertatis.png
+share/icons/hicolor/24x24/apps/arx-libertatis.png
+share/icons/hicolor/256x256/apps/arx-libertatis.png
+share/icons/hicolor/32x32/apps/arx-libertatis.png
+share/icons/hicolor/48x48/apps/arx-libertatis.png
+share/icons/hicolor/512x512/apps/arx-libertatis.png
+share/icons/hicolor/64x64/apps/arx-libertatis.png
+share/icons/hicolor/96x96/apps/arx-libertatis.png
+share/man/man1/arx-install-data.1.gz
+share/man/man1/arxsavetool.1.gz
+share/man/man1/arxunpak.1.gz
+share/man/man6/arx.6.gz