summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2023-11-24 14:01:14 +0100
committerPacho Ramos <pacho@gentoo.org>2023-11-24 14:01:14 +0100
commitd80a90c5e5a4f7bf166bdc4a722e8277ba6251be (patch)
tree24c750b66947252027bf7a7c456f5c58f9d5c2da /games-engines/odamex
parentgames-emulation/vbam: add 2.1.7 (diff)
downloadgentoo-d80a90c5e5a4f7bf166bdc4a722e8277ba6251be.tar.gz
gentoo-d80a90c5e5a4f7bf166bdc4a722e8277ba6251be.tar.bz2
gentoo-d80a90c5e5a4f7bf166bdc4a722e8277ba6251be.zip
games-engines/odamex: Works with wxGTK 3.2
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'games-engines/odamex')
-rw-r--r--games-engines/odamex/odamex-10.4.0-r1.ebuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/games-engines/odamex/odamex-10.4.0-r1.ebuild b/games-engines/odamex/odamex-10.4.0-r1.ebuild
new file mode 100644
index 000000000000..cf946901e853
--- /dev/null
+++ b/games-engines/odamex/odamex-10.4.0-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 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.gz"
+
+LICENSE="GPL-2+ MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~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.3.0-unbundle-fltk.patch
+)
+
+src_prepare() {
+ rm -r libraries/miniupnp || 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
+ 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
+}