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/files/, games-fps/gzdoom/
Date: Thu, 19 Sep 2019 22:10:37
Message-Id: 1568930911.cc51ed57d5b277bf9d2df5af62df28265839357b.chewi@gentoo
1 commit: cc51ed57d5b277bf9d2df5af62df28265839357b
2 Author: William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
3 AuthorDate: Tue Sep 10 10:33:09 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 19 22:08:31 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc51ed57
7
8 games-fps/gzdoom: Bump to version 4.2.1
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/12895
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14
15 games-fps/gzdoom/Manifest | 1 +
16 ...-4.2.1-Introduce-the-BUILD_NONFREE-option.patch | 36 ++++++++++
17 .../files/gzdoom-4.2.1-install_soundfonts.patch | 34 +++++++++
18 games-fps/gzdoom/gzdoom-4.2.1.ebuild | 82 ++++++++++++++++++++++
19 4 files changed, 153 insertions(+)
20
21 diff --git a/games-fps/gzdoom/Manifest b/games-fps/gzdoom/Manifest
22 index 1a1880d9565..6ea2bde6cef 100644
23 --- a/games-fps/gzdoom/Manifest
24 +++ b/games-fps/gzdoom/Manifest
25 @@ -1 +1,2 @@
26 DIST gzdoom-4.2.0.tar.gz 13482879 BLAKE2B 5c68718b840ce00a752179b4c735f064ed2ea669eff5e4bd71e3ccea3bb9af238287ddffc297cbfbe6069c658ec1d203b73790c973f836f8aa9ba33ac3ec2803 SHA512 07ad674eb22eb1388a5e3a6bd91d769fef90cb52728034e30d2967c484acaa41cfc7fc9ed486f4dbd0e86ea4d32bbafde402b771fc2fceb0708551328ef08f0d
27 +DIST gzdoom-4.2.1.tar.gz 13660636 BLAKE2B f1399014441d1556cc16e8d89b8c321a0591996fbcf8ad85a99403faef3b4663636b2bc4543982f2fc9ebdba777e88e4685985390d2e798eb01c0cea683305f6 SHA512 37a21bf101442cbe36574666dfb92b28eeee6b4dc982d43a8d5c95255e1f49e2451740b54e100b59120cef67f68f6eb07f687155bbab712854ce7ddc7c0b6c4a
28
29 diff --git a/games-fps/gzdoom/files/gzdoom-4.2.1-Introduce-the-BUILD_NONFREE-option.patch b/games-fps/gzdoom/files/gzdoom-4.2.1-Introduce-the-BUILD_NONFREE-option.patch
30 new file mode 100644
31 index 00000000000..c74d08a24a4
32 --- /dev/null
33 +++ b/games-fps/gzdoom/files/gzdoom-4.2.1-Introduce-the-BUILD_NONFREE-option.patch
34 @@ -0,0 +1,36 @@
35 +From 1e09b211a000c649aae6eea736647daa650141bc Mon Sep 17 00:00:00 2001
36 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
37 +Date: Sat, 31 Aug 2019 21:23:23 +0900
38 +Subject: [PATCH] Introduce the BUILD_NONFREE option
39 +
40 +This allow users to disable building nonfree components (brightmaps.pk3
41 +and game_support.pk3) if they so desire.
42 +---
43 + CMakeLists.txt | 9 +++++++--
44 + 1 file changed, 7 insertions(+), 2 deletions(-)
45 +
46 +diff --git a/CMakeLists.txt b/CMakeLists.txt
47 +index 7860358ef..23d317f42 100644
48 +--- a/CMakeLists.txt
49 ++++ b/CMakeLists.txt
50 +@@ -404,10 +404,15 @@ add_subdirectory( libraries/lzma )
51 + add_subdirectory( tools )
52 + add_subdirectory( libraries/dumb )
53 + add_subdirectory( libraries/gdtoa )
54 ++
55 + add_subdirectory( wadsrc )
56 +-add_subdirectory( wadsrc_bm )
57 + add_subdirectory( wadsrc_lights )
58 +-add_subdirectory( wadsrc_extra )
59 ++option (BUILD_NONFREE "Build nonfree components" ON)
60 ++if( BUILD_NONFREE )
61 ++ add_subdirectory( wadsrc_bm )
62 ++ add_subdirectory( wadsrc_extra )
63 ++endif()
64 ++
65 + add_subdirectory( src )
66 +
67 + if( NOT CMAKE_CROSSCOMPILING )
68 +--
69 +2.23.0
70 +
71
72 diff --git a/games-fps/gzdoom/files/gzdoom-4.2.1-install_soundfonts.patch b/games-fps/gzdoom/files/gzdoom-4.2.1-install_soundfonts.patch
73 new file mode 100644
74 index 00000000000..1fe0b99d9a8
75 --- /dev/null
76 +++ b/games-fps/gzdoom/files/gzdoom-4.2.1-install_soundfonts.patch
77 @@ -0,0 +1,34 @@
78 +From 2d1c7ba17cac3ccd201e77ad01a9dd06ab22cb2e Mon Sep 17 00:00:00 2001
79 +From: William Breathitt Gray <vilhelm.gray@×××××.com>
80 +Date: Thu, 13 Jun 2019 18:01:08 +0900
81 +Subject: [PATCH] Install soundfonts and WOPL/WOPN banks
82 +
83 +The INSTALL_SOUNDFONT_PATH cache entry is used to configure the
84 +installation directory.
85 +---
86 + src/CMakeLists.txt | 9 +++++++++
87 + 1 file changed, 9 insertions(+)
88 +
89 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
90 +index 0bb16f39e..4ff15062d 100644
91 +--- a/src/CMakeLists.txt
92 ++++ b/src/CMakeLists.txt
93 +@@ -1451,6 +1451,15 @@ add_custom_command(TARGET zdoom POST_BUILD
94 + ${CMAKE_SOURCE_DIR}/fm_banks/gs-by-papiezak-and-sneakernets.wopn $<TARGET_FILE_DIR:zdoom>/fm_banks/gs-by-papiezak-and-sneakernets.wopn
95 + )
96 +
97 ++if( WIN32 )
98 ++ set( INSTALL_SOUNDFONT_PATH . CACHE STRING "Directory where soundfonts and WOPL/WOPN banks will be placed during install." )
99 ++else()
100 ++ set( INSTALL_SOUNDFONT_PATH share/games/doom CACHE STRING "Directory where soundfonts and WOPL/WOPN banks will be placed during install." )
101 ++endif()
102 ++install(FILES "${PROJECT_BINARY_DIR}/soundfonts" "${PROJECT_BINARY_DIR}/fm_banks"
103 ++ DESTINATION ${INSTALL_SOUNDFONT_PATH}
104 ++ COMPONENT "Soundfont resources")
105 ++
106 + if( CMAKE_COMPILER_IS_GNUCXX )
107 + # GCC misoptimizes this file
108 + set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
109 +--
110 +2.21.0
111 +
112
113 diff --git a/games-fps/gzdoom/gzdoom-4.2.1.ebuild b/games-fps/gzdoom/gzdoom-4.2.1.ebuild
114 new file mode 100644
115 index 00000000000..baca2173701
116 --- /dev/null
117 +++ b/games-fps/gzdoom/gzdoom-4.2.1.ebuild
118 @@ -0,0 +1,82 @@
119 +# Copyright 1999-2019 Gentoo Authors
120 +# Distributed under the terms of the GNU General Public License v2
121 +
122 +EAPI=7
123 +
124 +inherit cmake-utils desktop xdg
125 +
126 +DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
127 +HOMEPAGE="https://zdoom.org"
128 +SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
129 +
130 +LICENSE="BSD BZIP2 DUMB-0.9.3 GPL-3 LGPL-3 MIT
131 + nonfree? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist )"
132 +SLOT="0"
133 +KEYWORDS="~amd64 ~arm ~x86"
134 +IUSE="gtk gtk2 +nonfree openmp"
135 +
136 +DEPEND="
137 + media-libs/libsdl2[opengl]
138 + media-libs/libsndfile
139 + media-libs/openal
140 + media-sound/fluidsynth:=
141 + media-sound/mpg123
142 + sys-libs/zlib
143 + virtual/jpeg:0
144 + gtk? (
145 + gtk2? ( x11-libs/gtk+:2 )
146 + !gtk2? ( x11-libs/gtk+:3 )
147 + )"
148 +RDEPEND="${DEPEND}"
149 +
150 +S="${WORKDIR}/${PN}-g${PV}"
151 +PATCHES=(
152 + "${FILESDIR}/${P}-install_soundfonts.patch"
153 + "${FILESDIR}/${P}-Introduce-the-BUILD_NONFREE-option.patch"
154 +)
155 +
156 +src_prepare() {
157 + rm -rf docs/licenses || die
158 + if ! use nonfree ; then
159 + rm -rf wadsrc_bm wadsrc_extra || die
160 + fi
161 +
162 + cmake-utils_src_prepare
163 +}
164 +
165 +src_configure() {
166 + local mycmakeargs=(
167 + -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
168 + -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
169 + -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
170 + -DDYN_FLUIDSYNTH=OFF
171 + -DDYN_OPENAL=OFF
172 + -DDYN_SNDFILE=OFF
173 + -DDYN_MPG123=OFF
174 + -DNO_GTK="$(usex !gtk)"
175 + -DNO_OPENAL=OFF
176 + -DNO_OPENMP="$(usex !openmp)"
177 + -DBUILD_NONFREE="$(usex nonfree)"
178 + )
179 + cmake-utils_src_configure
180 +}
181 +
182 +src_install() {
183 + newicon src/posix/zdoom.xpm "${PN}.xpm"
184 + make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
185 + cmake-utils_src_install
186 +}
187 +
188 +pkg_postinst() {
189 + xdg_pkg_postinst
190 +
191 + if ! use nonfree ; then
192 + ewarn
193 + ewarn "GZDoom installed without nonfree components."
194 + ewarn "Note: The nonfree game_support.pk3 file is needed to play"
195 + ewarn " games natively supported by GZDoom."
196 + ewarn "A list of games natively supported by GZDoom may be found"
197 + ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"
198 + ewarn
199 + fi
200 +}