commit:     3523c47190db130876b884d353e713e0a801f1d7
Author:     Alexandra Parker <alex.iris.parker <AT> gmail <DOT> com>
AuthorDate: Mon Apr 15 04:51:32 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed May  1 21:32:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3523c471

games-fps/gzdoom: bump to 4.12.2

Deactivates buidl too that reads the program's version from 'git
describe' by generating a src/gitinfo.h from ${PV}.

Bug: https://bugs.gentoo.org/926024
Signed-off-by: Alexandra Parker <alex.iris.parker <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36449
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-fps/gzdoom/Manifest             |   1 +
 games-fps/gzdoom/gzdoom-4.12.2.ebuild | 100 ++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/games-fps/gzdoom/Manifest b/games-fps/gzdoom/Manifest
index eeb05548f0af..a0775c9f044a 100644
--- a/games-fps/gzdoom/Manifest
+++ b/games-fps/gzdoom/Manifest
@@ -1 +1,2 @@
 DIST gzdoom-4.10.0.tar.gz 24319337 BLAKE2B 
a683182ed1bb091d19cff127352068faa846f0a10bc0ade07f8277dca7a5367d0bc19d2828c485fba11cefdb47aa8d99224bb8babbebe3df0b99a6fde577a586
 SHA512 
fd2f6e34aaa59e3d153de6359211082398878dae3d396ab55fc736f94e1378d5e03193d7912a29a531cf1dc255d30af63ad1c6472784e3745db6ac4a3a9e6fe6
+DIST gzdoom-4.12.2.tar.gz 25910359 BLAKE2B 
3f456136cfc161d67451d8bf1f359d748d6f30f4461a3bff4ab6b02fd949e4057dcbee79eae9ebc0566e33d2f1f3f42add18417b1932e3bccf8b4d5cae9b9a38
 SHA512 
1e9f34af0d5bf9f3797e0cfef01f993c0b8a742ba0af53b4b13cbce9ecefa15f22949bdbbba5a09e890a01dc32af81806fcb6fc632e0dc9261494580782a5007

diff --git a/games-fps/gzdoom/gzdoom-4.12.2.ebuild 
b/games-fps/gzdoom/gzdoom-4.12.2.ebuild
new file mode 100644
index 000000000000..dcb9477e00de
--- /dev/null
+++ b/games-fps/gzdoom/gzdoom-4.12.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop xdg flag-o-matic
+
+DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
+HOMEPAGE="https://zdoom.org";
+SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BZIP2 GPL-3 LGPL-2.1+ LGPL-3 MIT
+       non-free? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist 
WidePix )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+IUSE="debug gles2 gtk +non-free openmp +swr telemetry vulkan"
+
+DEPEND="
+       app-arch/bzip2
+       media-libs/libjpeg-turbo:0=
+       media-libs/libsdl2[gles2?,opengl,vulkan?]
+       media-libs/libvpx:=
+       media-libs/libwebp
+       media-libs/openal
+       media-libs/zmusic
+       sys-libs/zlib
+       gtk? ( x11-libs/gtk+:3 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-g${PV}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.7.1-Introduce-the-BUILD_NONFREE-option.patch
+)
+
+src_prepare() {
+       rm -rf docs/licenses || die
+       rm -rf libraries/{bzip2,jpeg,zlib} || die
+       if ! use non-free ; then
+               rm -rf wadsrc_bm wadsrc_extra wadsrc_widepix || die
+       fi
+
+       {
+               echo "// 0"
+               echo "// The above line prevents UpdateRevision.cmake from 
replacing this file."
+               echo "// This file was generated by the Gentoo ebuild."
+               echo
+               echo "#define GIT_DESCRIPTION \"g${PV}\""
+               echo "#define GIT_HASH \"0\""
+               echo "#define GIT_TIME \"\""
+       } > "${S}/src/gitinfo.h"
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       # https://bugs.gentoo.org/858749
+       filter-lto
+       append-flags -fno-strict-aliasing
+
+       local mycmakeargs=(
+               -DBUILD_SHARED_LIBS=OFF
+               -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
+               -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
+               -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
+               -DDYN_OPENAL=OFF
+               -DNO_GTK="$(usex !gtk)"
+               -DNO_OPENAL=OFF
+               -DHAVE_VULKAN="$(usex vulkan)"
+               -DHAVE_GLES2="$(usex gles2)"
+               -DNO_OPENMP="$(usex !openmp)"
+               -DZDOOM_ENABLE_SWR="$(usex swr)"
+               -DBUILD_NONFREE="$(usex non-free)"
+       )
+
+       use debug || append-cppflags -DNDEBUG
+       use telemetry || append-cppflags -DNO_SEND_STATS
+
+       cmake_src_configure
+}
+
+src_install() {
+       newicon src/posix/zdoom.xpm "${PN}.xpm"
+       make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
+       cmake_src_install
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if ! use non-free ; then
+               ewarn
+               ewarn "GZDoom installed without non-free components."
+               ewarn "Note: The non-free game_support.pk3 file is needed to 
play"
+               ewarn "      games natively supported by GZDoom."
+               ewarn "A list of games natively supported by GZDoom is 
available"
+               ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD";
+               ewarn
+       fi
+}

Reply via email to