diff options
Diffstat (limited to 'games-engines/odamex')
-rw-r--r-- | games-engines/odamex/Manifest | 10 | ||||
-rw-r--r-- | games-engines/odamex/files/odamex-10.0.0-musl.patch | 60 | ||||
-rw-r--r-- | games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch | 105 | ||||
-rw-r--r-- | games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch | 85 | ||||
-rw-r--r-- | games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch | 96 | ||||
-rw-r--r-- | games-engines/odamex/metadata.xml | 11 | ||||
-rw-r--r-- | games-engines/odamex/odamex-0.9.5.ebuild | 7 | ||||
-rw-r--r-- | games-engines/odamex/odamex-10.0.0.ebuild | 90 |
8 files changed, 450 insertions, 14 deletions
diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest index f51339b70063..997555d1b0a9 100644 --- a/games-engines/odamex/Manifest +++ b/games-engines/odamex/Manifest @@ -1,4 +1,10 @@ AUX odamex-0.9.0-Unbundle-miniupnpc.patch 2765 BLAKE2B f1a7307c82d6ab9ee17524d0384ec7b54ee51a1ee611a89cad9cdd3e8a98b448327a85242f71f0432ec266cbb8b24b893a0ca86dd62b994bc1320ef4157dc9f6 SHA512 a310ede1fc3340e6ee28ea0925da828dae517d7f9f83d015b744e0b3185ed82fa737f0a1d6c73ab000edf87a4467910ab14aa3a6bb34dc7c157535bd8270173c +AUX odamex-10.0.0-musl.patch 1976 BLAKE2B 5c0a9a71c37296e5de95528476e1d70198ff15358db15db1203ac44ecfc8d6b2b57613a03a3143e06ae9ff1860ba81a5b65ada64d60325fa8978e573167b0833 SHA512 3acb26554e7237386e239ddb1a62ed695cb79c28f65f2b1a29994438650c5858594f545570532f9b6c89dc33fe1ca7cb3f71b17ca2c00733b867476ca3aad9af +AUX odamex-10.0.0-unbundle-fltk.patch 3986 BLAKE2B 56507d7aa52eb3708016e0dd1a3c86d6554ef7e44a38ca5be6dc5f0e358d475b78a602bfa9879994047466506722a1fda0454ee752181489e52ec2634ed8a639 SHA512 1a058a69e84343e6f4d1599ccbb3a0b074ed36b87e095c29888d22c848522c7910297e27a5a7799f0ffc0ecc3b6dc92630b7b55642c6dafbc4c825a2f0f93fc9 +AUX odamex-10.0.0-unbundle-jsoncpp.patch 3311 BLAKE2B cf826f9012d2ccd7ee3031ba75dad9044450583f7bc8126841ac63a274b257ab304ab4e0c5cdda88147c5e476d78b430020ebf41801dda3ae012e4a98177a80c SHA512 cfd09a51b3b8ca103d5e77919445c903843f867806a3b6e0ac13c01b61c7986ca4b1a8d662ca70a1e3c0694da81323edfe66895a86e40738a24914fded05e11e +AUX odamex-10.0.0-unbundle-miniupnpc.patch 3660 BLAKE2B dde9066a0a9da7119ed668cce8443c91c070c93e70d55ec6d47600ea1a02038c8473706f9ff911b9b164ed7599730115f466926cf8ac564a79698d658ccb3098 SHA512 afe2211f70d56284754ecc2ba59f2b519bfce5084b4f9ebd6b514a65b2e624c97fa4317bf505a7dbfedae91de3ad878cd454ba4ff7f56a5064ca5a2ca05858d9 DIST odamex-0.9.5.tar.bz2 6659528 BLAKE2B 6f6052aff5a1e0c9a54c417113b67a91044d05ebf13d8ab5fb01132f9bb90b1c97392e881b8bff8baee4621c8e53abbb360fc8c7e6de8ff53d45ee55f73c48ec SHA512 70a0deb5e5b5902620f8fe692dc8507f9f19d7d6afabb4e2efbc25dc6879d469aa250dc55bb165db83a4288af9d5adda72ce3823a3db6dd9ccb83f5c684d3ac8 -EBUILD odamex-0.9.5.ebuild 1778 BLAKE2B f6da456c93acdf987c6d12699559582482440a3f01f7429f08dd1cf94624f17d483b2e730f174b2c204052d7b10e3abaa2bfb0adb32996aab3f93af8c1bd9fa4 SHA512 ee03b72d0b6f067cc918d57120dc95f78616f6b63fbae96a408607c36a0f426af02df1ccdfddba71fd726d972032da0d5fbaea3725d949bc0d93697dce29066f -MISC metadata.xml 1561 BLAKE2B f9bb5e3ab12423041b6f2277ba2faaaf219a40ae29dee9c935a4741deab9caad5821adc6fd376ce7f4a91945fb50b651f78cca8567b217112fbfe3a9e4002e89 SHA512 d12235228ebe55962bea2cd0b846e89c521bd217a828c46e99adc700f9a2cc9ebb201cff3c47d2b83e2cecc9d188018e6e48e71f23bd557db3a705589f2bc23a +DIST odamex-src-10.0.0.tar.xz 17680868 BLAKE2B 95df336ccc24c2658174bdd051cb9b98ca906d653d84a120330d8fe6f11ad91ba70ba7edfc960f8815d02795f7392761a0174171de30ea78b37389a61deacae7 SHA512 b825953a446a4eb46d2d004b20df876bceec823cb5f0bf661ecac03eff2f07c11fe47c6861f3c3ee417ce9ca869474ff422d78bba1b742485315ba5ba86bd702 +EBUILD odamex-0.9.5.ebuild 1845 BLAKE2B 39c34dba167f4a7c23471cd6725885fc726c16e5d0d75d235cbe0709da76b22e6a51ede94cb00cc03751fd447484df2b9b53b3e5419a7f64d251c4f654003884 SHA512 aa1fe92f0184c745a8974f95efd68a1b2a6f5d5688720e8c30de873e4226eef739f4465554251fc8b9982c0374a7cb75fe0b360697bbf3d7d0541a7fc7fc2920 +EBUILD odamex-10.0.0.ebuild 2322 BLAKE2B 3ca6443984f7c8c9385cb1498549224cb567b5c65785909c448911b505314edb7bd641d7dda176ed415f47c8f7fae67a7777d518542a3303e41f845a349a2488 SHA512 5d7d44123932daf7560d7c460885c7b319c0ace9fcb182b6c2263be779cfd03277bd299d123dd651fe90ddb823e6e8d4e72556c03fd70c2549d3f0b3a9be4f86 +MISC metadata.xml 1385 BLAKE2B f97715d64f4798d968ae5e17c32f66df5728f1f1994ffdca7001926931f998796a727b965fbb69b6bb1641028b3c36c36505553fe08f090138a967065d0ccf0c SHA512 4f9cbdef3d8005b6f533248379cc1798487d8e2e2b4fca5791c3a62e52f1164ba3a1de253db2be382d5ec50e053d0f9e37a8a08432857c7ec94a84d9cdccdcbc diff --git a/games-engines/odamex/files/odamex-10.0.0-musl.patch b/games-engines/odamex/files/odamex-10.0.0-musl.patch new file mode 100644 index 000000000000..92af6ad305bd --- /dev/null +++ b/games-engines/odamex/files/odamex-10.0.0-musl.patch @@ -0,0 +1,60 @@ +From b87798fe9fed746e98871aaa10978324e4b9378f Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Tue, 1 Mar 2022 21:29:32 +0000 +Subject: [PATCH] Fix musl build by checking whether execinfo.h's backtrace is + present + +Closes: https://github.com/odamex/odamex/issues/533 +(cherry picked from commit df3f5976416d342198879db80e4bf35f69eb2ed7) +--- + common/CMakeLists.txt | 9 +++++++++ + common/i_crash_noop.cpp | 2 +- + common/i_crash_posix.cpp | 2 +- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 2850607e5..8d02b3212 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -6,3 +6,12 @@ configure_file(git_describe.h.in "${CMAKE_CURRENT_BINARY_DIR}/git_describe.h") + add_library(odamex-common INTERFACE) + target_sources(odamex-common INTERFACE ${COMMON_SOURCES} ${COMMON_HEADERS}) + target_include_directories(odamex-common INTERFACE . ${CMAKE_CURRENT_BINARY_DIR}) ++ ++if(UNIX) ++ include(CheckSymbolExists) ++ check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) ++ ++ if(HAVE_BACKTRACE) ++ target_compile_definitions(odamex-common INTERFACE HAVE_BACKTRACE) ++ endif() ++endif() +diff --git a/common/i_crash_noop.cpp b/common/i_crash_noop.cpp +index 4eb8e70f4..84a406fb3 100644 +--- a/common/i_crash_noop.cpp ++++ b/common/i_crash_noop.cpp +@@ -23,7 +23,7 @@ + + + #if defined _WIN32 && !defined _XBOX && defined _MSC_VER && !defined _DEBUG +-#elif defined UNIX && !defined GEKKO ++#elif defined UNIX && defined HAVE_BACKTRACE && !defined GEKKO + #else + + #include "odamex.h" +diff --git a/common/i_crash_posix.cpp b/common/i_crash_posix.cpp +index 8e6270872..4bf8727f6 100644 +--- a/common/i_crash_posix.cpp ++++ b/common/i_crash_posix.cpp +@@ -22,7 +22,7 @@ + //----------------------------------------------------------------------------- + + +-#if defined UNIX && !defined GCONSOLE ++#if defined UNIX && defined HAVE_BACKTRACE && !defined GCONSOLE + + #include "odamex.h" + +-- +2.34.1 + diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch new file mode 100644 index 000000000000..1c9a8753b44a --- /dev/null +++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-fltk.patch @@ -0,0 +1,105 @@ +From 8a2b7c043fe86916d56044d7489f8dce6ed2d479 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +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. + +(cherry picked from commit 656afab54e30598022f4dd2af298cf6a487a1fe1) +--- + CMakeLists.txt | 1 + + client/CMakeLists.txt | 23 ++++++++++++++++++++++- + client/gui/gui_boot.cpp | 2 ++ + libraries/CMakeLists.txt | 2 +- + 4 files changed, 26 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9353d0c6b..599b6e85b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,7 @@ option(USE_INTERNAL_DEUTEX "Use internal DeuTex" ${USE_INTERNAL_LIBS}) + 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 )
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt +index bd071a7a5..ff1e72ba3 100644 +--- a/client/CMakeLists.txt ++++ b/client/CMakeLists.txt +@@ -206,7 +206,28 @@ 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_images) ++ ++ 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) +diff --git a/client/gui/gui_boot.cpp b/client/gui/gui_boot.cpp +index f0a0035d1..834038209 100644 +--- a/client/gui/gui_boot.cpp ++++ b/client/gui/gui_boot.cpp +@@ -315,12 +315,14 @@ static BootWindow* MakeBootWindow() + */ + std::string 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(); +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index 493d8f12b..a53441d13 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -255,7 +255,7 @@ endif() + + ### FLTK (dep: libpng) ### + +-if(BUILD_CLIENT) ++if(BUILD_CLIENT AND USE_INTERNAL_FLTK) + message(STATUS "Compiling FLTK...") + + set(_FLTK_BUILDGEN_PARAMS +-- +2.34.1 + diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch new file mode 100644 index 000000000000..9b0d3284dc48 --- /dev/null +++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-jsoncpp.patch @@ -0,0 +1,85 @@ +From c8d1cd6465d8d64a23a111edb5fba67565660fe8 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sun, 27 Feb 2022 22:51:18 +0000 +Subject: [PATCH 2/3] Allow building against the system JsonCpp library + +`USE_INTERNAL_JSONCPP` defaults to true and ignores `USE_INTERNAL_LIBS` +because users are unlikely to have it installed. + +More recent versions of JsonCpp require C++11, but Odamex targets C++98 +for compatibility with older platforms. The standard is therefore only +changed to C++11 when `USE_INTERNAL_JSONCPP` is false, and only for the +server where JsonCpp is used. Note that C++11 still works when building +against an older JsonCpp version. + +Tested against JsonCpp 1.9.5 on Gentoo Linux. + +Closes: https://github.com/odamex/odamex/issues/261 +(cherry picked from commit 5162c6297c7177af907e5e0502eac9d59ffcc22b) +--- + CMakeLists.txt | 1 + + libraries/CMakeLists.txt | 2 +- + server/CMakeLists.txt | 15 ++++++++++++++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c43c9f111..9353d0c6b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,7 @@ option(USE_INTERNAL_DEUTEX "Use internal DeuTex" ${USE_INTERNAL_LIBS}) + 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_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 )
+ cmake_dependent_option( USE_MINIUPNP "Build with UPnP support" 1 BUILD_SERVER 0 )
+diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index ae7db4c86..493d8f12b 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -295,7 +295,7 @@ endif() + + ### JsonCpp ### + +-if(BUILD_SERVER) ++if(BUILD_SERVER AND USE_INTERNAL_JSONCPP) + message(STATUS "Compiling JsonCpp...") + + # Figure out the correct library path to attach to our imported target +diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt +index 32297080f..a9bf8c44d 100644 +--- a/server/CMakeLists.txt ++++ b/server/CMakeLists.txt +@@ -45,7 +45,12 @@ endif() + add_executable(odasrv + ${COMMON_SOURCES} ${SERVER_SOURCES} ${SERVER_WIN32_SOURCES}) + odamex_target_settings(odasrv) +-set_property(TARGET odasrv PROPERTY CXX_STANDARD 98) ++ ++if(USE_INTERNAL_JSONCPP) ++ set_property(TARGET odasrv PROPERTY CXX_STANDARD 98) ++else() ++ set_property(TARGET odasrv PROPERTY CXX_STANDARD 11) ++endif() + + target_include_directories(odasrv PRIVATE src) + if(WIN32) +@@ -53,6 +58,14 @@ if(WIN32) + endif() + target_link_libraries(odasrv ZLIB::ZLIB jsoncpp odamex-common odaproto) + ++if(USE_INTERNAL_JSONCPP) ++ target_link_libraries(odasrv jsoncpp) ++else() ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(JSONCPP jsoncpp REQUIRED IMPORTED_TARGET) ++ target_link_libraries(odasrv PkgConfig::JSONCPP) ++endif() ++ + if(USE_MINIUPNP) + if(USE_INTERNAL_MINIUPNP) + target_link_libraries(odasrv upnpc-static) +-- +2.34.1 + diff --git a/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch b/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch new file mode 100644 index 000000000000..80b0806e0c11 --- /dev/null +++ b/games-engines/odamex/files/odamex-10.0.0-unbundle-miniupnpc.patch @@ -0,0 +1,96 @@ +From 4e9fec4ce56fda2568a3a656e1f7c59cdbc5fb21 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sun, 20 Feb 2022 11:24:24 +0000 +Subject: [PATCH 1/3] Allow building against the system miniupnpc library + +`USE_INTERNAL_MINIUPNP` defaults to true and ignores `USE_INTERNAL_LIBS` because +users are unlikely to have it installed. + +Although miniupnpc uses pkg-config, it doesn't add any include paths to the +flags because it expects your include directives to include the miniupnpc +directory. We should therefore do the same with the internal build so that +either can be used. + +Bug: https://github.com/odamex/odamex/issues/261 +(cherry picked from commit 1832a4a1c06504de953cdec2413a47ee393101c7) +--- + CMakeLists.txt | 1 + + common/i_net.cpp | 7 +++---- + libraries/CMakeLists.txt | 4 ++-- + server/CMakeLists.txt | 8 +++++++- + 4 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fd17dd36b..c43c9f111 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,7 @@ cmake_dependent_option( USE_INTERNAL_CURL "Use internal libcurl" ${USE_INTERNAL_ + 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 )
+ cmake_dependent_option( USE_MINIUPNP "Build with UPnP support" 1 BUILD_SERVER 0 )
++cmake_dependent_option( USE_INTERNAL_MINIUPNP "Use internal MiniUPnP" 1 USE_MINIUPNP 0 )
+
+ set(PROJECT_COPYRIGHT "2006-2022")
+ set(PROJECT_RC_VERSION "10,0,0,0")
+diff --git a/common/i_net.cpp b/common/i_net.cpp +index 27b218d0d..dba512346 100644 +--- a/common/i_net.cpp ++++ b/common/i_net.cpp +@@ -93,10 +93,9 @@ typedef int SOCKET; + #include "minilzo.h" + + #ifdef ODA_HAVE_MINIUPNP +-#define MINIUPNP_STATICLIB +-#include "miniwget.h" +-#include "miniupnpc.h" +-#include "upnpcommands.h" ++#include "miniupnpc/miniwget.h" ++#include "miniupnpc/miniupnpc.h" ++#include "miniupnpc/upnpcommands.h" + #endif + + unsigned int inet_socket; +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index 1785ed0d8..ae7db4c86 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -350,7 +350,7 @@ endif() + ### MiniUPnPc ### + if(BUILD_SERVER AND NOT USE_MINIUPNP) + message(STATUS "Skipping MiniUPnPc...") +-elseif(BUILD_SERVER AND USE_MINIUPNP) ++elseif(BUILD_SERVER AND USE_MINIUPNP AND USE_INTERNAL_MINIUPNP) + message(STATUS "Compiling MiniUPnPc...") + + # Figure out the correct library path to attach to our imported target +@@ -386,7 +386,7 @@ elseif(BUILD_SERVER AND USE_MINIUPNP) + # Synthesize an imported target that can be linked against. + add_library(upnpc-static STATIC IMPORTED GLOBAL) + set_target_properties(upnpc-static PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}" ++ INTERFACE_COMPILE_DEFINITIONS MINIUPNP_STATICLIB + IMPORTED_LOCATION ${MINIUPNPC_LIBRARY}) + if(WIN32) + set_target_properties(upnpc-static PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32;iphlpapi") +diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt +index c9fa17b64..32297080f 100644 +--- a/server/CMakeLists.txt ++++ b/server/CMakeLists.txt +@@ -54,7 +54,13 @@ endif() + target_link_libraries(odasrv ZLIB::ZLIB jsoncpp odamex-common odaproto) + + if(USE_MINIUPNP) +- target_link_libraries(odasrv upnpc-static) ++ if(USE_INTERNAL_MINIUPNP) ++ target_link_libraries(odasrv upnpc-static) ++ else() ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(MINIUPNPC miniupnpc REQUIRED IMPORTED_TARGET) ++ target_link_libraries(odasrv PkgConfig::MINIUPNPC) ++ endif() + endif() + + if(WIN32) +-- +2.34.1 + diff --git a/games-engines/odamex/metadata.xml b/games-engines/odamex/metadata.xml index 59df9d30675e..1548d4273e2e 100644 --- a/games-engines/odamex/metadata.xml +++ b/games-engines/odamex/metadata.xml @@ -1,20 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person" proxied="yes"> - <email>vilhelm.gray@gmail.com</email> - <name>William Breathitt Gray</name> - </maintainer> <maintainer type="project"> <email>games@gentoo.org</email> <name>Gentoo Games Project</name> </maintainer> - <maintainer type="project" proxied="proxy"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> <use> <flag name="client">Build client target</flag> + <flag name="hidpi">Use bundled FLTK 1.4, which has better support for HiDPI screens</flag> <flag name="master">Build master server target (advertises odamex server list)</flag> <flag name="odalaunch">Build the wxWidgets based launcher</flag> <flag name="portmidi">Enable PortMidi support</flag> @@ -33,6 +26,6 @@ broader expanse of security features, personal configuration, gameplay options, and editing features. Odamex can run on a wide range of operating systems and hardware, so players should be able to play - on almost any platform. + on almost any platform. </longdescription> </pkgmetadata> diff --git a/games-engines/odamex/odamex-0.9.5.ebuild b/games-engines/odamex/odamex-0.9.5.ebuild index 62d3c471ea58..eb8519c9e40f 100644 --- a/games-engines/odamex/odamex-0.9.5.ebuild +++ b/games-engines/odamex/odamex-0.9.5.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 WX_GTK_VER="3.0-gtk3" inherit cmake desktop prefix wxwidgets xdg @@ -36,6 +36,7 @@ S="${WORKDIR}/${PN}-src-${PV}" PATCHES=( "${FILESDIR}/${PN}-0.9.0-Unbundle-miniupnpc.patch" + "${FILESDIR}/${PN}-10.0.0-musl.patch" ) src_prepare() { @@ -49,7 +50,6 @@ src_prepare() { src_configure() { local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex !X) -DUSE_INTERNAL_LIBS=0 -DBUILD_CLIENT=$(usex client) -DBUILD_LAUNCHER=$(usex odalaunch) @@ -59,6 +59,7 @@ src_configure() { -DENABLE_PORTMIDI=$(usex portmidi) -DUSE_MINIUPNP=$(usex upnp) ) + use client && mycmakeargs+=(-DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex !X)) cmake_src_configure } diff --git a/games-engines/odamex/odamex-10.0.0.ebuild b/games-engines/odamex/odamex-10.0.0.ebuild new file mode 100644 index 000000000000..36c7c98744f3 --- /dev/null +++ b/games-engines/odamex/odamex-10.0.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.0-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" + +LICENSE="GPL-2+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+client hidpi master +odalaunch portmidi server upnp X" +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 + !hidpi? ( x11-libs/fltk:1 ) + portmidi? ( media-libs/portmidi ) + X? ( x11-libs/libX11 ) + ) + odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) + server? ( + dev-libs/jsoncpp:= + upnp? ( net-libs/miniupnpc:= ) + )" +DEPEND="${RDEPEND}" +BDEPEND="games-util/deutex" + +S="${WORKDIR}/${PN}-src-${PV}" + +PATCHES=( + "${FILESDIR}"/${PN}-10.0.0-unbundle-miniupnpc.patch + "${FILESDIR}"/${PN}-10.0.0-unbundle-jsoncpp.patch + "${FILESDIR}"/${PN}-10.0.0-unbundle-fltk.patch + "${FILESDIR}"/${PN}-10.0.0-musl.patch +) + +src_prepare() { + rm -r libraries/libminiupnpc || die + hprefixify common/d_main.cpp + + use odalaunch && setup-wxwidgets + + cmake_src_prepare +} + +src_configure() { + 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) + ) + use client && mycmakeargs+=(-DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex !X)) + + cmake_src_configure +} + +src_install() { + if use client ; then + newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" + make_desktop_entry "${PN}" "Odamex" + + if use odalaunch ; then + newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png" + make_desktop_entry odalaunch "Odamex Launcher" odalaunch + fi + fi + + cmake_src_install +} |