commit:     750623134d103e852f0ee66f4c71cacf3ad17d05
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 17 20:47:48 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 17 20:47:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75062313

games-engines/odamex: Version bump to 11.0.0

Closes: https://bugs.gentoo.org/919287
Closes: https://bugs.gentoo.org/958186
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-engines/odamex/Manifest                      |  1 +
 .../odamex/files/odamex-11.0.0-unbundle-fltk.patch | 48 +++++++++++
 games-engines/odamex/odamex-11.0.0.ebuild          | 94 ++++++++++++++++++++++
 3 files changed, 143 insertions(+)

diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest
index a05e76deb85d..fba0ec7ec062 100644
--- a/games-engines/odamex/Manifest
+++ b/games-engines/odamex/Manifest
@@ -1 +1,2 @@
 DIST odamex-src-10.6.0.tar.xz 17560572 BLAKE2B 
eeb9742b587a7e45fa5d33ae7a96b767a4d6517732ffc82a58c68557edfd43305413667fdcc24f7256613c05421da85a81db2c5d36d7ad09b91e4b2d76fa1693
 SHA512 
c1269a9047199af16c64aee5d0520070cfa36c7a2488628bb19744024f13e083a6841b65f8dc18b930d3b0ef39cdebddfcf028ea44af98b4418319c364e806c0
+DIST odamex-src-11.0.0.tar.xz 21138664 BLAKE2B 
b2690c7f6580c3596a0b04cafc61f3a581ac631746e9bae3eaf0d803a89a317866b906959ad4e77b21d9daa4244f0f6aae1af4f88169a8815d30e0d1a86a29c3
 SHA512 
6e2e55404a076c9f121ff4944fcdda0ee8bcfb891a3e0631359ce626e4c0cb70b3898cecd0f7f9f282ea18f4bbd0bd30596ac2c18ddae703455c92f7bf4dce39

diff --git a/games-engines/odamex/files/odamex-11.0.0-unbundle-fltk.patch 
b/games-engines/odamex/files/odamex-11.0.0-unbundle-fltk.patch
new file mode 100644
index 000000000000..2c31bbbf9e65
--- /dev/null
+++ b/games-engines/odamex/files/odamex-11.0.0-unbundle-fltk.patch
@@ -0,0 +1,48 @@
+From a1237bdbc1ea88407a330e86aa574d7178ba8293 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Mon, 16 Jun 2025 21:11:03 +0100
+Subject: [PATCH] Allow building against the system FLTK library
+
+`USE_INTERNAL_FLTK` defaults to true and ignores `USE_INTERNAL_LIBS`
+because users are unlikely to have it installed.
+
+Tested against FLTK 1.4.3 on Gentoo Linux.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,6 +48,7 @@ option(USE_LTO "Build Release builds with Link Time 
Optimization" 1)
+ cmake_dependent_option( USE_INTERNAL_ZLIB "Use internal zlib" 
${USE_INTERNAL_LIBS} BUILD_CLIENT 0 )
+ cmake_dependent_option( USE_INTERNAL_PNG "Use internal libpng" 
${USE_INTERNAL_LIBS} BUILD_CLIENT 0 )
+ cmake_dependent_option( USE_INTERNAL_CURL "Use internal libcurl" 
${USE_INTERNAL_LIBS} BUILD_CLIENT 0 )
++cmake_dependent_option( USE_INTERNAL_FLTK "Use internal FLTK" 1 BUILD_CLIENT 
0 )
+ cmake_dependent_option( USE_INTERNAL_JSONCPP "Use internal JsonCpp" 1 
BUILD_SERVER 0 )
+ cmake_dependent_option( USE_INTERNAL_WXWIDGETS "Use internal wxWidgets" 
${USE_INTERNAL_LIBS} BUILD_LAUNCHER 0 )
+ cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 
BUILD_CLIENT 0 )
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -208,7 +208,12 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
+   target_link_libraries(odamex ${PNG_LIBRARY} ${ZLIB_LIBRARY} CURL::libcurl)
+   if(NOT GCONSOLE)
+     target_include_directories(odamex PRIVATE gui)
+-    target_link_libraries(odamex fltk::fltk fltk::images)
++    if(USE_INTERNAL_FLTK)
++      target_link_libraries(odamex fltk::fltk fltk::images)
++    else()
++      find_package(FLTK 1.4 CONFIG REQUIRED)
++      target_link_libraries(odamex fltk::fltk-shared fltk::images-shared)
++    endif()
+   endif()
+ 
+   if(USE_INTERNAL_JSONCPP)
+--- a/libraries/fltk-lib.cmake
++++ b/libraries/fltk-lib.cmake
+@@ -1,6 +1,6 @@
+ ### FLTK (dep: libpng) ###
+ 
+-if(BUILD_CLIENT)
++if(BUILD_CLIENT AND USE_INTERNAL_FLTK)
+   set(_FLTK_BUILDGEN_PARAMS
+     "-DOPTION_USE_SYSTEM_LIBJPEG=OFF"
+     "-DOPTION_USE_SYSTEM_LIBPNG=OFF"
+-- 
+2.49.0
+

diff --git a/games-engines/odamex/odamex-11.0.0.ebuild 
b/games-engines/odamex/odamex-11.0.0.ebuild
new file mode 100644
index 000000000000..22bc3300da0c
--- /dev/null
+++ b/games-engines/odamex/odamex-11.0.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.2-gtk3"
+inherit cmake desktop prefix wxwidgets xdg
+
+DESCRIPTION="Online multiplayer free software engine for DOOM"
+HOMEPAGE="https://odamex.net/";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${PN}-src-${PV}.tar.xz";
+S="${WORKDIR}/${PN}-src-${PV}"
+LICENSE="GPL-2+ MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="+client master +odalaunch portmidi server upnp"
+REQUIRED_USE="|| ( client master server )"
+
+# protobuf is still bundled. Unfortunately an old version is required for C++98
+# compatibility. We could use C++11, but upstream is concerned about using a
+# completely different protobuf version on a multiplayer-focused engine.
+
+RDEPEND="
+       client? (
+               dev-libs/jsoncpp:=
+               media-libs/libpng:0=
+               media-libs/libsdl2[joystick,sound,video]
+               media-libs/sdl2-mixer
+               net-misc/curl
+               >=x11-libs/fltk-1.4.3-r1:1=
+               x11-libs/libX11
+               portmidi? ( media-libs/portmidi )
+       )
+       odalaunch? (
+               x11-libs/wxGTK:${WX_GTK_VER}=
+       )
+       server? (
+               dev-libs/jsoncpp:=
+               sys-libs/zlib
+               upnp? ( net-libs/miniupnpc:= )
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="games-util/deutex"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-11.0.0-unbundle-fltk.patch
+)
+
+src_prepare() {
+       # All this is unneeded and includes old CMake declarations.
+       rm -r 
libraries/{curl,fltk,jsoncpp,libpng,miniupnp,portmidi,protobuf/{examples,third_party},zlib}/
 || die
+
+       cmake_src_prepare
+       hprefixify common/d_main.cpp
+}
+
+src_configure() {
+       use odalaunch && setup-wxwidgets
+
+       local mycmakeargs=(
+               -DUSE_INTERNAL_FLTK=0
+               -DUSE_INTERNAL_JSONCPP=0
+               -DUSE_INTERNAL_LIBS=0
+               -DUSE_INTERNAL_MINIUPNP=0
+               -DBUILD_CLIENT=$(usex client)
+               -DBUILD_LAUNCHER=$(usex odalaunch)
+               -DBUILD_MASTER=$(usex master)
+               -DBUILD_SERVER=$(usex server)
+               -DBUILD_OR_FAIL=1
+               -DENABLE_PORTMIDI=$(usex portmidi)
+               -DUSE_MINIUPNP=$(usex upnp)
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       if use client ; then
+               for size in 96 128 256 512; do
+                       newicon -s ${size} "${S}/media/icon_${PN}_${size}.png" 
"${PN}.png"
+               done
+               make_desktop_entry "${PN}" "Odamex"
+
+               if use odalaunch ; then
+                       for size in 96 128 256 512; do
+                               newicon -s ${size} 
"${S}/media/icon_odalaunch_${size}.png" "odalaunch.png"
+                       done
+                       make_desktop_entry odalaunch "Odamex Launcher" odalaunch
+               fi
+       fi
+
+       cmake_src_install
+}

Reply via email to