From 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Apr 2021 20:21:43 +0100 Subject: gentoo resync : 28.04.2021 --- games-engines/odamex/Manifest | 4 ++ ...x-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch | 24 +++++++ .../files/odamex-0.9.0-Unbundle-miniupnpc.patch | 80 ++++++++++++++++++++++ games-engines/odamex/odamex-0.9.0.ebuild | 79 +++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 games-engines/odamex/files/odamex-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch create mode 100644 games-engines/odamex/files/odamex-0.9.0-Unbundle-miniupnpc.patch create mode 100644 games-engines/odamex/odamex-0.9.0.ebuild (limited to 'games-engines/odamex') diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest index 7577efe392e3..b5e09fb0d266 100644 --- a/games-engines/odamex/Manifest +++ b/games-engines/odamex/Manifest @@ -1,5 +1,9 @@ AUX odamex-0.8.1-miniupnpc.patch 1378 BLAKE2B 06ea9b7154e574d487a2a241474e401951319c7dd0ce71135605d84c8b3442fce1e23fc30ec5b12c77521dff2215640faa4eb1b99484272a51b0ccf67e232cb2 SHA512 5bcf602ae484eed180dbd02c315e2a6bab38a5e90711466a5ba005fed6782ea6a7244b9e8b8ebea38df5875f1d4eced1e51aaaa98e1124710f11aaafe4480049 AUX odamex-0.8.3-Use-C-11-on-odalaunch-target-for-wx-3.0.4-and-up.patch 879 BLAKE2B ac627db089ddeab8d4c34601b44d70a54e5de0a3e7bfdb6eccf3c0798df81526df5e7be97323b5c33f8594c5f83be8d336cd23c6aadd34eb7046b0ad32eca028 SHA512 67a48daeb9774694ed957e4583deddb6e19e1bac965e823c5c165165013b987d5c0ec62e2272ab5e75694270b2c0f793d5bbef4f4946e98047a17c897ce45a77 +AUX odamex-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch 835 BLAKE2B c15d7fcf8e2992a01f8c329c494f118c4d7279b10fd1acce97a03a6bd08a4aeede40b44b7f3d99c6140e252ff154ff607861733e35fa5e0f898f6b56b592cd2c SHA512 86fe37efa3bbb03d89ef02ea7792809d38c6abfaa607af74cda4815722ffc4bd35502a83bccd4c902b697d9420bde078228d8e40b21e722a48cb608627366c71 +AUX odamex-0.9.0-Unbundle-miniupnpc.patch 2765 BLAKE2B f1a7307c82d6ab9ee17524d0384ec7b54ee51a1ee611a89cad9cdd3e8a98b448327a85242f71f0432ec266cbb8b24b893a0ca86dd62b994bc1320ef4157dc9f6 SHA512 a310ede1fc3340e6ee28ea0925da828dae517d7f9f83d015b744e0b3185ed82fa737f0a1d6c73ab000edf87a4467910ab14aa3a6bb34dc7c157535bd8270173c DIST odamex-0.8.3.tar.bz2 8532510 BLAKE2B 751d65dfe07a4c4c0cb5ff360e76a1291cf4ba289c459f15a0c277aca4d15b1e0989e1606cdc4e0f0bec56d6ae437027046302f5c55efb3b835a42df512fb18f SHA512 01a875973d43c87dde7953464e0e3c37fa088b00b6cc0ecbef1a8b3b9a87257ab24ef4e3c224ebcbc0e38cd3139c7adc56b12a03ae2528b66d6498bb8d84d720 +DIST odamex-0.9.0.tar.bz2 6644055 BLAKE2B 656a469665783e0a5aa1a39792454a7ec34843b7fa11539f5504463701b5485eed0b5fabcd4f9f39eef3bdad9062f657c0b1d6147bcd41defa4142b51b4096a4 SHA512 f86e61afd5fdd9be6db03554e07fa140fdcc61747ce9312706af2cada8ec88705647abdfff4f221d8cfbd4a53b991e08edf4cbf0025cf6e5a74d2213fc662855 EBUILD odamex-0.8.3.ebuild 1801 BLAKE2B a96d8efba5ca414b51ac6a3d45e381ae6fc2ecd2dcaec437deab66338152c4f5bf056ea6cb4a3d6505266a0535a39019a4f9a65c8c4eb31e05af9ab7d9284d60 SHA512 3c443abd87b5599f74413020e4f84d5b273357117717dd32b7d8ac3a76dd2c6a33a977878f765a0a793a1994fade7e6ca11c2faba425322203a4258472218cd4 +EBUILD odamex-0.9.0.ebuild 1837 BLAKE2B fef2b8796d963b50f1995a2dd216858c588df500d445e6f851a1ff12cd6260291aee07ab3d58965d4ceef083960d7603adc7432e4c849533a6077fc362df802c SHA512 3d7de60fdeb55593e31ab92d90782b5d2063de1966dddb9235e389523217023fe226572ceef76497c829bb9e4f07028dd7c2399113ef11bb62b50d1bbf3f6ef2 MISC metadata.xml 1560 BLAKE2B 9005fa7ad7cf0c111c7f1843320a325ab2859e125a7fe173585a41efa0c255b7cb547af627bb574e4276052ccc4797d0de214cacf8aa39b9e14576f326f8ba30 SHA512 da4fc9f0f98577b4e221649b6dca286cc00037cd2579d4adafc98bc00b0761ac5f553018394ea8509784754c4adf86963c1098db555aca0b01d62c1bc9efb843 diff --git a/games-engines/odamex/files/odamex-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch b/games-engines/odamex/files/odamex-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch new file mode 100644 index 000000000000..654085d1d252 --- /dev/null +++ b/games-engines/odamex/files/odamex-0.9.0-Set-IMPORTED_LOCATION-for-jsoncpp.patch @@ -0,0 +1,24 @@ +From 3707d8ebad7a4a0664ca4d5a5a5bef4a276af6a2 Mon Sep 17 00:00:00 2001 +From: William Breathitt Gray +Date: Mon, 29 Mar 2021 20:30:10 +0900 +Subject: [PATCH] Set IMPORTED_LOCATION for jsoncpp + +--- + libraries/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index 2ffe95a5..a7dcb83b 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -172,6 +172,7 @@ if(BUILD_SERVER) + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/local/include" + IMPORTED_LOCATION_DEBUG ${JSONCPP_LIBRARY_DEBUG} + IMPORTED_LOCATION_RELEASE ${JSONCPP_LIBRARY_RELEASE} ++ IMPORTED_LOCATION ${JSONCPP_LIBRARY_RELEASE} + MAP_IMPORTED_CONFIG_MINSIZEREL Release + MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release) + endif() +-- +2.31.0 + diff --git a/games-engines/odamex/files/odamex-0.9.0-Unbundle-miniupnpc.patch b/games-engines/odamex/files/odamex-0.9.0-Unbundle-miniupnpc.patch new file mode 100644 index 000000000000..77b6220041da --- /dev/null +++ b/games-engines/odamex/files/odamex-0.9.0-Unbundle-miniupnpc.patch @@ -0,0 +1,80 @@ +From 4b9a8ca565e5cd388a49cd0fbe693b5332577c57 Mon Sep 17 00:00:00 2001 +From: William Breathitt Gray +Date: Mon, 22 Mar 2021 18:20:15 +0900 +Subject: [PATCH] Unbundle miniupnpc + +--- + libraries/CMakeLists.txt | 42 ---------------------------------------- + server/CMakeLists.txt | 3 ++- + 2 files changed, 2 insertions(+), 43 deletions(-) + +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index 177a86a2..2ffe95a5 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -227,48 +227,6 @@ endif() + + ### MiniUPnPc ### + +-if(BUILD_SERVER) +- message(STATUS "Compiling MiniUPnPc...") +- +- # Figure out the correct library path to attach to our imported target +- set(MINIUPNPC_INCLUDE_DIR +- "${CMAKE_CURRENT_BINARY_DIR}/local/include/miniupnpc") +- set(MINIUPNPC_LIBRARY +- "${CMAKE_CURRENT_BINARY_DIR}/local/lib/${libprefix}miniupnpc${libsuffix}") +- +- # This must exist before the target is synthesized. +- file(MAKE_DIRECTORY ${MINIUPNPC_INCLUDE_DIR}) +- +- # Generate the build. +- execute_process(COMMAND "${CMAKE_COMMAND}" +- -S "${CMAKE_CURRENT_SOURCE_DIR}/libminiupnpc" +- -B "${CMAKE_CURRENT_BINARY_DIR}/libminiupnpc-build" +- -G "${CMAKE_GENERATOR}" +- -A "${CMAKE_GENERATOR_PLATFORM}" +- -T "${CMAKE_GENERATOR_TOOLSET}" +- "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" +- "-DCMAKE_LINKER=${CMAKE_LINKER}" +- "-DCMAKE_RC_COMPILER=${CMAKE_RC_COMPILER}" +- "-DCMAKE_BUILD_TYPE=RelWithDebInfo" +- "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/local" +- "-DCMAKE_INSTALL_LIBDIR=lib" # Without this, CentOS installs into lib64 +- "-DUPNPC_BUILD_SHARED=No" +- "-DUPNPC_BUILD_TESTS=No") +- +- # Compile the library. +- execute_process(COMMAND "${CMAKE_COMMAND}" +- --build "${CMAKE_CURRENT_BINARY_DIR}/libminiupnpc-build" +- --config RelWithDebInfo --target install --parallel ${PARALLEL_PROC_COUNT}) +- +- # 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}" +- IMPORTED_LOCATION ${MINIUPNPC_LIBRARY}) +- if(WIN32) +- set_target_properties(upnpc-static PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32;iphlpapi") +- endif() +-endif() + + ### SDL libraries ### + +diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt +index 73a70000..e4b085f2 100644 +--- a/server/CMakeLists.txt ++++ b/server/CMakeLists.txt +@@ -53,7 +53,8 @@ endif() + target_link_libraries(odasrv jsoncpp odamex-common) + + if(USE_MINIUPNP) +- target_link_libraries(odasrv upnpc-static) ++ target_include_directories(odasrv SYSTEM PRIVATE "/usr/include/miniupnpc") ++ target_link_libraries(odasrv -lminiupnpc) + endif() + + if(WIN32) +-- +2.31.0 + diff --git a/games-engines/odamex/odamex-0.9.0.ebuild b/games-engines/odamex/odamex-0.9.0.ebuild new file mode 100644 index 000000000000..dc97bd284d12 --- /dev/null +++ b/games-engines/odamex/odamex-0.9.0.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="mirror://sourceforge/${PN}/Odamex/${PV}/${PN}-src-${PV}.tar.bz2 -> ${P}.tar.bz2" + +LICENSE="GPL-2+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+client master +odalaunch portmidi server upnp X" +REQUIRED_USE="|| ( client master server )" + +RDEPEND=" + client? ( + media-libs/libpng:0= + media-libs/libsdl2[joystick,sound,video] + media-libs/sdl2-mixer + odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) + portmidi? ( media-libs/portmidi ) + X? ( x11-libs/libX11 ) + ) + server? ( + dev-libs/jsoncpp:= + upnp? ( net-libs/miniupnpc:= ) + )" +DEPEND="${RDEPEND}" +BDEPEND="games-util/deutex" + +S="${WORKDIR}/${PN}-src-${PV}" + +PATCHES=( + "${FILESDIR}/${P}-Unbundle-miniupnpc.patch" + "${FILESDIR}/${P}-Set-IMPORTED_LOCATION-for-jsoncpp.patch" +) + +src_prepare() { + rm -r libraries/libminiupnpc || die + hprefixify common/d_main.cpp + + use odalaunch && setup-wxwidgets + + cmake_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) + -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 + 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 +} -- cgit v1.2.3