From 7584e91fa57993d386ee9c1cf6375f8ce9b80765 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Tue, 17 Jun 2025 21:48:50 +0100 Subject: [PATCH] games-engines/odamex: Drop old 10.6.0-r4 Signed-off-by: James Le Cuirot --- games-engines/odamex/Manifest | 1 - .../files/odamex-10.3.0-unbundle-fltk.patch | 87 ------------------ ...damex-10.6.0-odalaunch-sorting-crash.patch | 28 ------ games-engines/odamex/metadata.xml | 1 - games-engines/odamex/odamex-10.6.0-r4.ebuild | 89 ------------------- 5 files changed, 206 deletions(-) delete mode 100644 games-engines/odamex/files/odamex-10.3.0-unbundle-fltk.patch delete mode 100644 games-engines/odamex/files/odamex-10.6.0-odalaunch-sorting-crash.patch delete mode 100644 games-engines/odamex/odamex-10.6.0-r4.ebuild diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest index fba0ec7ec062..c9d85ec68c07 100644 --- a/games-engines/odamex/Manifest +++ b/games-engines/odamex/Manifest @@ -1,2 +1 @@ -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-10.3.0-unbundle-fltk.patch b/games-engines/odamex/files/odamex-10.3.0-unbundle-fltk.patch deleted file mode 100644 index 6cc6a1d18241..000000000000 --- a/games-engines/odamex/files/odamex-10.3.0-unbundle-fltk.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 8a2b7c043fe86916d56044d7489f8dce6ed2d479 Mon Sep 17 00:00:00 2001 -From: James Le Cuirot -Date: Sun, 27 Feb 2022 14:01:33 +0000 -Subject: [PATCH 3/3] 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. - -Odamex makes of use screen scaling features in FLTK that have not yet -been released. This change therefore checks for the Fl::screen_scale -symbol and skips the associated code if it is absent. In practise, this -only affects the size of the dialog window on HiDPI screens. The game -window is unaffected. - -Tested against FLTK 1.3.5 on Gentoo Linux. - ---- a/CMakeLists.txt 2022-11-24 21:02:08.000000000 -0600 -+++ b/CMakeLists.txt 2023-05-12 14:08:26.838832213 -0500 -@@ -43,6 +43,7 @@ - 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 2022-11-24 21:02:08.000000000 -0600 -+++ b/client/CMakeLists.txt 2023-05-12 14:10:01.895750073 -0500 -@@ -206,8 +206,28 @@ - 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_images) -- endif() -+ if(USE_INTERNAL_FLTK) -+ set(FLTK_LIBRARIES fltk fltk_images) -+ set(HAVE_FLTK_SCREEN_SCALE TRUE) -+ else() -+ set(FLTK_SKIP_OPENGL 1) -+ set(FLTK_SKIP_FORMS 1) -+ set(FLTK_SKIP_FLUID 1) -+ find_package(FLTK REQUIRED) -+ target_include_directories(odamex SYSTEM PRIVATE ${FLTK_INCLUDE_DIR}) -+ -+ include(CheckCXXSymbolExists) -+ set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR}) -+ set(CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES}) -+ check_cxx_symbol_exists(Fl::screen_scale "FL/Fl.H" HAVE_FLTK_SCREEN_SCALE) -+ endif() -+ -+ if(HAVE_FLTK_SCREEN_SCALE) -+ target_compile_definitions(odamex PRIVATE HAVE_FLTK_SCREEN_SCALE) -+ endif() -+ -+ target_link_libraries(odamex ${FLTK_LIBRARIES}) -+ endif() - - if(ENABLE_PORTMIDI) - target_link_libraries(odamex ${PORTMIDI_LIBRARY}) ---- a/client/gui/gui_boot.cpp 2022-11-24 21:02:08.000000000 -0600 -+++ b/client/gui/gui_boot.cpp 2023-05-12 14:11:19.362517260 -0500 -@@ -537,12 +537,14 @@ - */ - scannedWADs_t GUI_BootWindow() - { -+#ifdef HAVE_FLTK_SCREEN_SCALE - // Scale according to 1600x900. - Fl::screen_scale(0, MAX(Fl::h() / 900.0f, 1.0f)); - - // This feature is too clever by half, and in my experience just - // deforms the window. - Fl::keyboard_screen_scaling(0); -+#endif - - BootWindow* win = MakeBootWindow(); - win->initWADDirs(); ---- a/libraries/CMakeLists.txt 2022-11-24 21:02:08.000000000 -0600 -+++ b/libraries/CMakeLists.txt 2023-05-12 14:11:46.463789831 -0500 -@@ -264,7 +264,7 @@ - - ### FLTK (dep: libpng) ### - --if(BUILD_CLIENT) -+if(BUILD_CLIENT AND USE_INTERNAL_FLTK) - set(_FLTK_BUILDGEN_PARAMS - "-DOPTION_USE_SYSTEM_LIBJPEG=OFF" - "-DOPTION_PRINT_SUPPORT=OFF" diff --git a/games-engines/odamex/files/odamex-10.6.0-odalaunch-sorting-crash.patch b/games-engines/odamex/files/odamex-10.6.0-odalaunch-sorting-crash.patch deleted file mode 100644 index b665d16d86a4..000000000000 --- a/games-engines/odamex/files/odamex-10.6.0-odalaunch-sorting-crash.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e8dfbdc08a58d709fa7c23e38911c421cdb2a76d Mon Sep 17 00:00:00 2001 -From: Pavel Miksha <89637241+keyboardcrash32@users.noreply.github.com> -Date: Sun, 20 Oct 2024 15:53:14 +0300 -Subject: [PATCH] Fix odalaunch crashing when sorting servers - ---- - odalaunch/src/lst_custom.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/odalaunch/src/lst_custom.cpp b/odalaunch/src/lst_custom.cpp -index 1ad0387fa..22182b6cb 100644 ---- a/odalaunch/src/lst_custom.cpp -+++ b/odalaunch/src/lst_custom.cpp -@@ -319,6 +319,14 @@ int wxCALLBACK wxCompareFunction(wxIntPtr item1, wxIntPtr item2, - Item.SetColumn(SortCol); - Item.SetMask(wxLIST_MASK_TEXT); - -+ long id1 = ListCtrl->FindItem(-1, item1); -+ long id2 = ListCtrl->FindItem(-1, item2); -+ -+ if (id1 == -1 || id2 == -1) -+ { -+ return 0; -+ } -+ - if(SortCol == ListCtrl->GetSpecialSortColumn()) - { - int Img1, Img2; diff --git a/games-engines/odamex/metadata.xml b/games-engines/odamex/metadata.xml index 6bc351136c9c..07ab93cf84bd 100644 --- a/games-engines/odamex/metadata.xml +++ b/games-engines/odamex/metadata.xml @@ -7,7 +7,6 @@ Build client target - Use bundled FLTK 1.4, which has better support for HiDPI screens Build master server target (advertises odamex server list) Build the wxWidgets based launcher Enable PortMidi support diff --git a/games-engines/odamex/odamex-10.6.0-r4.ebuild b/games-engines/odamex/odamex-10.6.0-r4.ebuild deleted file mode 100644 index b192750b8f9a..000000000000 --- a/games-engines/odamex/odamex-10.6.0-r4.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# 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 hidpi 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? ( - media-libs/libpng:0= - media-libs/libsdl2[joystick,sound,video] - media-libs/sdl2-mixer - net-misc/curl - x11-libs/libX11 - !hidpi? ( x11-libs/fltk:1= ) - portmidi? ( media-libs/portmidi ) - ) - odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}= ) - server? ( - dev-libs/jsoncpp:= - upnp? ( net-libs/miniupnpc:= ) - )" -DEPEND="${RDEPEND}" -BDEPEND="games-util/deutex" - -PATCHES=( - "${FILESDIR}"/${PN}-10.3.0-unbundle-fltk.patch - "${FILESDIR}"/${P}-odalaunch-sorting-crash.patch -) - -src_prepare() { - rm -r libraries/miniupnp || die - hprefixify common/d_main.cpp - - cmake_src_prepare -} - -src_configure() { - use odalaunch && setup-wxwidgets - - local mycmakeargs=( - -DUSE_INTERNAL_FLTK=$(usex hidpi) - -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 -}