Gentoo Archives: gentoo-commits

From: Stefan Strogin <steils@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/gzdoom/files/, games-fps/gzdoom/
Date: Sun, 02 Jun 2019 19:33:15
Message-Id: 1559503964.98a6807d2b7584ad5f97e38c2dc19f8551e7e8ff.steils@gentoo
1 commit: 98a6807d2b7584ad5f97e38c2dc19f8551e7e8ff
2 Author: William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
3 AuthorDate: Thu May 2 13:00:54 2019 +0000
4 Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 2 19:32:44 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98a6807d
7
8 games-fps/gzdoom: New package
9
10 Package-Manager: Portage-2.3.65, Repoman-2.3.12
11 Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/11967
13 Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
14
15 games-fps/gzdoom/Manifest | 1 +
16 .../files/gzdoom-4.1.2-static-libraries.patch | 139 +++++++++++++++++++++
17 games-fps/gzdoom/gzdoom-4.1.2.ebuild | 70 +++++++++++
18 games-fps/gzdoom/metadata.xml | 28 +++++
19 4 files changed, 238 insertions(+)
20
21 diff --git a/games-fps/gzdoom/Manifest b/games-fps/gzdoom/Manifest
22 new file mode 100644
23 index 00000000000..c4522753675
24 --- /dev/null
25 +++ b/games-fps/gzdoom/Manifest
26 @@ -0,0 +1 @@
27 +DIST gzdoom-4.1.2.tar.gz 13045742 BLAKE2B 38c70eb82ba266e5b41bf62f28f4cee77ba17c0cc1e4186bf11be9021386511346c111874b695ef56a4ed3c93668bb64a71ba4169183646e49d0ab60a1c0793a SHA512 915029e676b17dd330aeee17fa8a9e07bb8e7a16e8ebce9fcdcd24e5b2f0cc48fd8f6914314029b332112ad4215a0f0d45d8e448e9025ac3c2a708a5e0bbd399
28
29 diff --git a/games-fps/gzdoom/files/gzdoom-4.1.2-static-libraries.patch b/games-fps/gzdoom/files/gzdoom-4.1.2-static-libraries.patch
30 new file mode 100644
31 index 00000000000..344fc0193d2
32 --- /dev/null
33 +++ b/games-fps/gzdoom/files/gzdoom-4.1.2-static-libraries.patch
34 @@ -0,0 +1,139 @@
35 +From 6fafa297bfe0f82696d898d66e39c50f4f5eef16 Mon Sep 17 00:00:00 2001
36 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
37 +Date: Wed, 15 May 2019 23:58:28 +0900
38 +Subject: [PATCH] Force STATIC for internal GZDoom libraries
39 +
40 +This makes sure the internal versions of these libraries bundled with
41 +the GZDoom source code is used. This prevents the system from building
42 +GZDoom for dynamic linking with incompatible external libraries (see
43 +<https://forum.zdoom.org/viewtopic.php?f=2&t=64633>).
44 +---
45 + asmjit/CMakeLists.txt | 2 +-
46 + bzip2/CMakeLists.txt | 2 +-
47 + game-music-emu/gme/CMakeLists.txt | 2 +-
48 + gdtoa/CMakeLists.txt | 2 +-
49 + glslang/glslang/CMakeLists.txt | 2 +-
50 + glslang/spirv/CMakeLists.txt | 2 +-
51 + jpeg/CMakeLists.txt | 2 +-
52 + lzma/CMakeLists.txt | 2 +-
53 + zlib/CMakeLists.txt | 2 +-
54 + 9 files changed, 9 insertions(+), 9 deletions(-)
55 +
56 +diff --git a/asmjit/CMakeLists.txt b/asmjit/CMakeLists.txt
57 +index ab5c2fb4f..6b7636ebe 100644
58 +--- a/asmjit/CMakeLists.txt
59 ++++ b/asmjit/CMakeLists.txt
60 +@@ -97,7 +97,7 @@ set(ASMJIT_SRCS
61 + asmjit/x86/x86regalloc.cpp
62 + )
63 +
64 +-add_library(${ASMJITNAME} ${ASMJIT_SRCS} ${ASMJIT_PUBLIC_HDRS})
65 ++add_library(${ASMJITNAME} STATIC ${ASMJIT_SRCS} ${ASMJIT_PUBLIC_HDRS})
66 +
67 + set_target_properties(${ASMJITNAME} PROPERTIES OUTPUT_NAME asmjit)
68 +
69 +diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt
70 +index 6ff9a2172..7fefb2bf2 100644
71 +--- a/bzip2/CMakeLists.txt
72 ++++ b/bzip2/CMakeLists.txt
73 +@@ -7,7 +7,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
74 + endif()
75 +
76 + add_definitions( -DBZ_NO_STDIO )
77 +-add_library( bz2
78 ++add_library( bz2 STATIC
79 + blocksort.c
80 + bzlib.c
81 + compress.c
82 +diff --git a/game-music-emu/gme/CMakeLists.txt b/game-music-emu/gme/CMakeLists.txt
83 +index a5e06bc8a..5c37ebd29 100644
84 +--- a/game-music-emu/gme/CMakeLists.txt
85 ++++ b/game-music-emu/gme/CMakeLists.txt
86 +@@ -163,7 +163,7 @@ set (EXPORTED_HEADERS gme.h)
87 + include_directories(${CMAKE_CURRENT_BINARY_DIR})
88 +
89 + # Add library to be compiled.
90 +-add_library(gme ${libgme_SRCS})
91 ++add_library(gme STATIC ${libgme_SRCS})
92 +
93 + if(ZLIB_FOUND)
94 + message(" ** ZLib library located, compressed file formats will be supported")
95 +diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt
96 +index a0b76e0c3..485f3778b 100644
97 +--- a/gdtoa/CMakeLists.txt
98 ++++ b/gdtoa/CMakeLists.txt
99 +@@ -35,7 +35,7 @@ if( NOT MSVC AND NOT APPLE )
100 + set( GEN_FP_DEPS ${CMAKE_CURRENT_BINARY_DIR}/arith.h ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h )
101 + endif()
102 +
103 +-add_library( gdtoa
104 ++add_library( gdtoa STATIC
105 + ${GEN_FP_FILES}
106 + dmisc.c
107 + dtoa.c
108 +diff --git a/glslang/glslang/CMakeLists.txt b/glslang/glslang/CMakeLists.txt
109 +index c86eccb6e..e376a9178 100644
110 +--- a/glslang/glslang/CMakeLists.txt
111 ++++ b/glslang/glslang/CMakeLists.txt
112 +@@ -120,7 +120,7 @@ endmacro(glslang_pch)
113 +
114 + glslang_pch(SOURCES MachineIndependent/pch.cpp)
115 +
116 +-add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
117 ++add_library(glslang STATIC ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
118 + set_property(TARGET glslang PROPERTY FOLDER glslang)
119 + set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
120 + target_link_libraries(glslang OGLCompiler OSDependent)
121 +diff --git a/glslang/spirv/CMakeLists.txt b/glslang/spirv/CMakeLists.txt
122 +index 8062f8067..03d34d8f4 100644
123 +--- a/glslang/spirv/CMakeLists.txt
124 ++++ b/glslang/spirv/CMakeLists.txt
125 +@@ -59,7 +59,7 @@ if(ENABLE_NV_EXTENSIONS)
126 + GLSL.ext.NV.h)
127 + endif(ENABLE_NV_EXTENSIONS)
128 +
129 +-add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
130 ++add_library(SPIRV STATIC ${LIB_TYPE} ${SOURCES} ${HEADERS})
131 + set_property(TARGET SPIRV PROPERTY FOLDER glslang)
132 + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
133 + target_include_directories(SPIRV PUBLIC ..)
134 +diff --git a/jpeg/CMakeLists.txt b/jpeg/CMakeLists.txt
135 +index 81834c742..33a3938cf 100644
136 +--- a/jpeg/CMakeLists.txt
137 ++++ b/jpeg/CMakeLists.txt
138 +@@ -6,7 +6,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
139 + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
140 + endif()
141 +
142 +-add_library( jpeg
143 ++add_library( jpeg STATIC
144 + jaricom.c
145 + jcomapi.c
146 + jdapimin.c
147 +diff --git a/lzma/CMakeLists.txt b/lzma/CMakeLists.txt
148 +index 3948ea2ee..4246a34f8 100644
149 +--- a/lzma/CMakeLists.txt
150 ++++ b/lzma/CMakeLists.txt
151 +@@ -34,5 +34,5 @@ else()
152 + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_7ZIP_ST" )
153 + endif()
154 +
155 +-add_library( lzma ${LZMA_FILES} )
156 ++add_library( lzma STATIC ${LZMA_FILES} )
157 + target_link_libraries( lzma )
158 +diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
159 +index 52542bbaa..a1d6637a9 100644
160 +--- a/zlib/CMakeLists.txt
161 ++++ b/zlib/CMakeLists.txt
162 +@@ -137,7 +137,7 @@ if(MINGW)
163 + set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
164 + endif()
165 +
166 +-add_library(${ZLIBNAME} ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
167 ++add_library(${ZLIBNAME} STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
168 + set_target_properties(${ZLIBNAME} PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
169 +
170 + set_target_properties(${ZLIBNAME} PROPERTIES SOVERSION 1)
171 +--
172 +2.21.0
173 +
174
175 diff --git a/games-fps/gzdoom/gzdoom-4.1.2.ebuild b/games-fps/gzdoom/gzdoom-4.1.2.ebuild
176 new file mode 100644
177 index 00000000000..57242205a7a
178 --- /dev/null
179 +++ b/games-fps/gzdoom/gzdoom-4.1.2.ebuild
180 @@ -0,0 +1,70 @@
181 +# Copyright 1999-2019 Gentoo Authors
182 +# Distributed under the terms of the GNU General Public License v2
183 +
184 +EAPI=7
185 +
186 +inherit cmake-utils desktop xdg
187 +
188 +DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
189 +HOMEPAGE="https://zdoom.org"
190 +SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
191 +
192 +LICENSE="BSD BZIP2 cephes DUMB-0.9.2 GPL-3 LGPL-3 MIT"
193 +SLOT="0"
194 +KEYWORDS="~amd64 ~x86"
195 +IUSE="fluidsynth gtk gtk2 openal openmp"
196 +
197 +DEPEND="
198 + media-libs/libsdl2[opengl]
199 + sys-libs/zlib
200 + virtual/jpeg:0
201 + gtk? (
202 + gtk2? ( x11-libs/gtk+:2 )
203 + !gtk2? ( x11-libs/gtk+:3 )
204 + )"
205 +RDEPEND="
206 + ${DEPEND}
207 + fluidsynth? ( media-sound/fluidsynth )
208 + openal? (
209 + media-libs/libsndfile
210 + media-libs/openal
211 + media-sound/mpg123
212 + )"
213 +
214 +S="${WORKDIR}/${PN}-g${PV}"
215 +
216 +PATCHES="${FILESDIR}/${P}-static-libraries.patch"
217 +
218 +src_prepare() {
219 + rm -rf docs/licenses || die
220 + cmake-utils_src_prepare
221 +}
222 +
223 +src_configure() {
224 + local mycmakeargs=(
225 + -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
226 + -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
227 + -DNO_GTK="$(usex !gtk)"
228 + -DNO_OPENAL="$(usex !openal)"
229 + -DNO_OPENMP="$(usex !openmp)"
230 + )
231 + cmake-utils_src_configure
232 +}
233 +
234 +src_install() {
235 + newicon src/posix/zdoom.xpm "${PN}.xpm"
236 + make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
237 + cmake-utils_src_install
238 +}
239 +
240 +pkg_preinst() {
241 + xdg_pkg_preinst
242 +}
243 +
244 +pkg_postinst() {
245 + xdg_pkg_postinst
246 +}
247 +
248 +pkg_postrm() {
249 + xdg_pkg_postrm
250 +}
251
252 diff --git a/games-fps/gzdoom/metadata.xml b/games-fps/gzdoom/metadata.xml
253 new file mode 100644
254 index 00000000000..95f6ed619ed
255 --- /dev/null
256 +++ b/games-fps/gzdoom/metadata.xml
257 @@ -0,0 +1,28 @@
258 +<?xml version="1.0" encoding="UTF-8"?>
259 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
260 +<pkgmetadata>
261 + <longdescription lang="en">
262 + GZDoom is a modder-friendly OpenGL source port based on the DOOM engine
263 + </longdescription>
264 + <maintainer type="person">
265 + <email>vilhelm.gray@×××××.com</email>
266 + <name>William Breathitt Gray</name>
267 + </maintainer>
268 + <maintainer type="project">
269 + <email>proxy-maint@g.o</email>
270 + <name>Proxy Maintainers</name>
271 + </maintainer>
272 + <maintainer type="project">
273 + <email>games@g.o</email>
274 + <name>Gentoo Games Project</name>
275 + </maintainer>
276 + <use>
277 + <flag name="fluidsynth">Use <pkg>media-sound/fluidsynth</pkg> for MIDI support</flag>
278 + <flag name="gtk2">Enable support for GTK+2 instead of GTK+3</flag>
279 + </use>
280 + <upstream>
281 + <bugs-to>https://forum.zdoom.org/viewforum.php?f=2</bugs-to>
282 + <doc lang="en">https://zdoom.org</doc>
283 + <remote-id type="github">coelckers/gzdoom</remote-id>
284 + </upstream>
285 +</pkgmetadata>