summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-09-24 08:46:23 +0000
committernia <nia@pkgsrc.org>2022-09-24 08:46:23 +0000
commit14cbf8d2b79e952a2ee31da7bfbc6d0eca4e1c0f (patch)
tree8c356196bde062d6e31d40b4a4caa8536971a22e
parentd8d3276dd92ddbd33355444f0ebfa0f1b90a90b3 (diff)
downloadpkgsrc-14cbf8d2b79e952a2ee31da7bfbc6d0eca4e1c0f.tar.gz
devilutionx: Avoid forcing static linkage against libstdc++
Avoid mixing PIE and non-PIE code on aarch64, which results in a build failure
-rw-r--r--games/devilutionx/Makefile8
-rw-r--r--games/devilutionx/distinfo3
-rw-r--r--games/devilutionx/patches/patch-CMakeLists.txt18
3 files changed, 26 insertions, 3 deletions
diff --git a/games/devilutionx/Makefile b/games/devilutionx/Makefile
index cbc300c1d89..da3d6afd9ca 100644
--- a/games/devilutionx/Makefile
+++ b/games/devilutionx/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2022/09/11 12:51:38 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2022/09/24 08:46:23 nia Exp $
DISTNAME= devilutionx-1.2.1
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GITHUB:=diasurgical/}
GITHUB_PROJECT= devilutionX
@@ -12,6 +12,7 @@ COMMENT= Port of the RPG Diablo for modern operating systems
LICENSE= unlicense
WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${PKGVERSION_NOREV}
+TOOL_DEPENDS= dos2unix-[0-9]*:../../converters/dos2unix
USE_CMAKE= yes
USE_TOOLS+= pkg-config
@@ -32,6 +33,9 @@ INSTALLATION_DIRS+= bin
INSTALLATION_DIRS+= share/applications
INSTALLATION_DIRS+= share/icons/hicolor/512x512/apps
+pre-patch:
+ dos2unix ${WRKSRC}/CMakeLists.txt
+
pre-configure:
${MKDIR} -p ${WRKSRC}/build
diff --git a/games/devilutionx/distinfo b/games/devilutionx/distinfo
index b69d7b7008c..0e8afeb361f 100644
--- a/games/devilutionx/distinfo
+++ b/games/devilutionx/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.12 2021/10/26 10:43:53 nia Exp $
+$NetBSD: distinfo,v 1.13 2022/09/24 08:46:23 nia Exp $
BLAKE2s (devilutionx-1.2.1.tar.gz) = 38022f5b5025687f909001c7ea554ee2d6db1489bdd321fa1fac3749064f1168
SHA512 (devilutionx-1.2.1.tar.gz) = 9327b127d0ad22d640b1a13fad9bfa00ba0fc512dd7ed362a9e84a80278d84634cd039cba7c98f15425715b11a35dc6ac07d75c816c3cbc818e6ab8c4437cf18
Size (devilutionx-1.2.1.tar.gz) = 3573200 bytes
SHA1 (patch-3rdParty_asio_include_asio_detail_impl_kqueue__reactor.ipp) = 1fdf31e70f72d4c4cadb76f64d06c3974e6f61d9
+SHA1 (patch-CMakeLists.txt) = 473f486534fc6d286ae04fe0d85502ee7a67d078
diff --git a/games/devilutionx/patches/patch-CMakeLists.txt b/games/devilutionx/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..fa95c33ba80
--- /dev/null
+++ b/games/devilutionx/patches/patch-CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-CMakeLists.txt,v 1.3 2022/09/24 08:46:23 nia Exp $
+
+Do not force libstdc++ to be linked statically, creates problems
+with PIE code.
+
+--- CMakeLists.txt.orig 2022-09-24 08:40:00.299506879 +0000
++++ CMakeLists.txt
+@@ -607,10 +607,6 @@ foreach(target devilution ${BIN_TARGET}
+ target_compile_definitions(${target} PRIVATE ${def_list})
+ endforeach(target)
+
+-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT HAIKU AND NOT VITA)
+- target_link_libraries(${BIN_TARGET} PUBLIC "$<$<NOT:$<CONFIG:Debug>>:-static-libgcc;-static-libstdc++>")
+-endif()
+-
+ if(WIN32)
+ target_link_libraries(${BIN_TARGET} PRIVATE wsock32 ws2_32 wininet)
+