Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/gzdoom/, games-fps/gzdoom/files/
Date: Wed, 02 Sep 2020 21:41:56
Message-Id: 1599082424.a5d01020198a3aca269e0cc5666db8da0727be0c.chewi@gentoo
1 commit: a5d01020198a3aca269e0cc5666db8da0727be0c
2 Author: William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
3 AuthorDate: Wed Jun 17 18:50:17 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 2 21:33:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5d01020
7
8 games-fps/gzdoom: Version bump to 4.4.2
9
10 Closes: https://bugs.gentoo.org/727448
11 Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/16301
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14
15 games-fps/gzdoom/Manifest | 1 +
16 ...-STATIC-for-internal-GZDoom-SPIRV-library.patch | 30 ++++++++
17 ...-4.4.2-Introduce-the-BUILD_NONFREE-option.patch | 35 ++++++++++
18 games-fps/gzdoom/gzdoom-4.4.2.ebuild | 81 ++++++++++++++++++++++
19 4 files changed, 147 insertions(+)
20
21 diff --git a/games-fps/gzdoom/Manifest b/games-fps/gzdoom/Manifest
22 index c7de0cf9fa7..dbfc90a7a34 100644
23 --- a/games-fps/gzdoom/Manifest
24 +++ b/games-fps/gzdoom/Manifest
25 @@ -1 +1,2 @@
26 DIST gzdoom-4.3.3.tar.gz 13704956 BLAKE2B 4c9338b8958a408bee268eadadd779be8488540e68d5f46d7d0b18a825cd6391368b2c5149eff965685dd97f7ee51f12050e07f558c7f62551c8e239049110ea SHA512 ef8e3a7cfa4d03a98536deddb53ded4b23609b834dd07af4224cd2eb1136bca2a318a99a959a36b2e423038938a2175c015c48d89510f124bd32b7656004e1d1
27 +DIST gzdoom-4.4.2.tar.gz 12613806 BLAKE2B 7c2f6b490abd8bd23068af7df9ebf111bb09cc7af979d7bf285e744f8cb23c69f360b8cb274ebd354f5885aabeb53c744075696ff8fd5710dd15f07f70b4395b SHA512 cf3fb4588555ef98a1c224ca07e3ab0ee00a39ad6abb4fa7e31ce7ce013f146aa2be6c8303badd7a86b21da2a689cbd1d234c46739f84ee5293745a1189226ba
28
29 diff --git a/games-fps/gzdoom/files/gzdoom-4.4.2-Force-STATIC-for-internal-GZDoom-SPIRV-library.patch b/games-fps/gzdoom/files/gzdoom-4.4.2-Force-STATIC-for-internal-GZDoom-SPIRV-library.patch
30 new file mode 100644
31 index 00000000000..779268ca6d7
32 --- /dev/null
33 +++ b/games-fps/gzdoom/files/gzdoom-4.4.2-Force-STATIC-for-internal-GZDoom-SPIRV-library.patch
34 @@ -0,0 +1,30 @@
35 +From c904b7521657e55843bae34f1f958d689538b13b Mon Sep 17 00:00:00 2001
36 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
37 +Date: Wed, 17 Jun 2020 15:17:49 -0400
38 +Subject: [PATCH] Force STATIC for internal GZDoom SPIRV library
39 +
40 +This makes sure the internal version of this library bundled with the
41 +GZDoom source code is used. This prevents the system from building
42 +GZDoom for dynamic linking with an incompatible external library (see
43 +commit 6fafa297bfe0f82696d898d66e39c50f4f5eef16 and
44 +<https://forum.zdoom.org/viewtopic.php?f=2&t=64633>).
45 +---
46 + libraries/glslang/spirv/CMakeLists.txt | 2 +-
47 + 1 file changed, 1 insertion(+), 1 deletion(-)
48 +
49 +diff --git a/libraries/glslang/spirv/CMakeLists.txt b/libraries/glslang/spirv/CMakeLists.txt
50 +index 453ac16b5..d39a6e300 100644
51 +--- a/libraries/glslang/spirv/CMakeLists.txt
52 ++++ b/libraries/glslang/spirv/CMakeLists.txt
53 +@@ -49,7 +49,7 @@ set(SPVREMAP_HEADERS
54 + SPVRemapper.h
55 + doc.h)
56 +
57 +-add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
58 ++add_library(SPIRV STATIC ${LIB_TYPE} ${SOURCES} ${HEADERS})
59 + set_property(TARGET SPIRV PROPERTY FOLDER glslang)
60 + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
61 + target_include_directories(SPIRV PUBLIC
62 +--
63 +2.26.2
64 +
65
66 diff --git a/games-fps/gzdoom/files/gzdoom-4.4.2-Introduce-the-BUILD_NONFREE-option.patch b/games-fps/gzdoom/files/gzdoom-4.4.2-Introduce-the-BUILD_NONFREE-option.patch
67 new file mode 100644
68 index 00000000000..d7ece785e25
69 --- /dev/null
70 +++ b/games-fps/gzdoom/files/gzdoom-4.4.2-Introduce-the-BUILD_NONFREE-option.patch
71 @@ -0,0 +1,35 @@
72 +From decf1df37a22c87da78230941209c110f7763f4b Mon Sep 17 00:00:00 2001
73 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
74 +Date: Sat, 31 Aug 2019 21:23:23 +0900
75 +Subject: [PATCH] Introduce the BUILD_NONFREE option
76 +
77 +This allow users to disable building nonfree components (brightmaps.pk3
78 +and game_support.pk3) if they so desire.
79 +---
80 + CMakeLists.txt | 8 ++++++--
81 + 1 file changed, 6 insertions(+), 2 deletions(-)
82 +
83 +diff --git a/CMakeLists.txt b/CMakeLists.txt
84 +index 4e59452..c2f49b2 100644
85 +--- a/CMakeLists.txt
86 ++++ b/CMakeLists.txt
87 +@@ -393,10 +393,14 @@ add_subdirectory( libraries/lzma )
88 + add_subdirectory( tools )
89 + add_subdirectory( libraries/gdtoa )
90 + add_subdirectory( wadsrc )
91 +-add_subdirectory( wadsrc_bm )
92 + add_subdirectory( wadsrc_lights )
93 +-add_subdirectory( wadsrc_extra )
94 + add_subdirectory( src )
95 ++option (BUILD_NONFREE "Build nonfree components" ON)
96 ++if( BUILD_NONFREE )
97 ++ add_subdirectory( wadsrc_bm )
98 ++ add_subdirectory( wadsrc_extra )
99 ++endif()
100 ++
101 +
102 + if( NOT CMAKE_CROSSCOMPILING )
103 + export(TARGETS ${CROSS_EXPORTS} FILE "${CMAKE_BINARY_DIR}/ImportExecutables.cmake" )
104 +--
105 +2.26.2
106 +
107
108 diff --git a/games-fps/gzdoom/gzdoom-4.4.2.ebuild b/games-fps/gzdoom/gzdoom-4.4.2.ebuild
109 new file mode 100644
110 index 00000000000..5c345dd665b
111 --- /dev/null
112 +++ b/games-fps/gzdoom/gzdoom-4.4.2.ebuild
113 @@ -0,0 +1,81 @@
114 +# Copyright 1999-2020 Gentoo Authors
115 +# Distributed under the terms of the GNU General Public License v2
116 +
117 +EAPI=7
118 +
119 +inherit cmake desktop xdg
120 +
121 +DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
122 +HOMEPAGE="https://zdoom.org"
123 +SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
124 +
125 +LICENSE="Apache-2.0 BSD BZIP2 GPL-3 LGPL-2.1+ LGPL-3 MIT
126 + non-free? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist )"
127 +SLOT="0"
128 +KEYWORDS="~amd64 ~x86"
129 +IUSE="gtk gtk2 +non-free openmp"
130 +
131 +DEPEND="
132 + app-arch/bzip2
133 + media-libs/libsdl2[opengl]
134 + media-libs/openal
135 + media-libs/zmusic
136 + sys-libs/zlib
137 + virtual/jpeg:0
138 + gtk? (
139 + gtk2? ( x11-libs/gtk+:2 )
140 + !gtk2? ( x11-libs/gtk+:3 )
141 + )"
142 +RDEPEND="${DEPEND}"
143 +
144 +S="${WORKDIR}/${PN}-g${PV}"
145 +
146 +PATCHES=(
147 + "${FILESDIR}/${PN}-4.2.1-install_soundfonts.patch"
148 + "${FILESDIR}/${P}-Introduce-the-BUILD_NONFREE-option.patch"
149 + "${FILESDIR}/${P}-Force-STATIC-for-internal-GZDoom-SPIRV-library.patch"
150 +)
151 +
152 +src_prepare() {
153 + rm -rf docs/licenses || die
154 + rm -rf libraries/{bzip2,jpeg,zlib} || die
155 + if ! use non-free ; then
156 + rm -rf wadsrc_bm wadsrc_extra || die
157 + fi
158 +
159 + cmake_src_prepare
160 +}
161 +
162 +src_configure() {
163 + local mycmakeargs=(
164 + -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
165 + -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
166 + -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
167 + -DDYN_OPENAL=OFF
168 + -DNO_GTK="$(usex !gtk)"
169 + -DNO_OPENAL=OFF
170 + -DNO_OPENMP="$(usex !openmp)"
171 + -DBUILD_NONFREE="$(usex non-free)"
172 + )
173 + cmake_src_configure
174 +}
175 +
176 +src_install() {
177 + newicon src/posix/zdoom.xpm "${PN}.xpm"
178 + make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
179 + cmake_src_install
180 +}
181 +
182 +pkg_postinst() {
183 + xdg_pkg_postinst
184 +
185 + if ! use non-free ; then
186 + ewarn
187 + ewarn "GZDoom installed without non-free components."
188 + ewarn "Note: The non-free game_support.pk3 file is needed to play"
189 + ewarn " games natively supported by GZDoom."
190 + ewarn "A list of games natively supported by GZDoom is available"
191 + ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"
192 + ewarn
193 + fi
194 +}