From 2c5f5b7682e49e3f140632b6f8b03d3226ed3dc1 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 9 Sep 2019 23:05:48 +0100 Subject: games-engines/odamex: Search our usual data directory and prefix paths Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: James Le Cuirot --- .../odamex/files/odamex-0.8.1-SearchDir.patch | 11 +++ games-engines/odamex/odamex-0.8.1-r1.ebuild | 83 ++++++++++++++++++++++ games-engines/odamex/odamex-0.8.1.ebuild | 81 --------------------- 3 files changed, 94 insertions(+), 81 deletions(-) create mode 100644 games-engines/odamex/files/odamex-0.8.1-SearchDir.patch create mode 100644 games-engines/odamex/odamex-0.8.1-r1.ebuild delete mode 100644 games-engines/odamex/odamex-0.8.1.ebuild (limited to 'games-engines') diff --git a/games-engines/odamex/files/odamex-0.8.1-SearchDir.patch b/games-engines/odamex/files/odamex-0.8.1-SearchDir.patch new file mode 100644 index 000000000000..70bd476eb3f2 --- /dev/null +++ b/games-engines/odamex/files/odamex-0.8.1-SearchDir.patch @@ -0,0 +1,11 @@ +diff -Naur a/common/d_main.cpp b/common/d_main.cpp +--- a/common/d_main.cpp 2019-07-22 19:11:28.000000000 +0100 ++++ b/common/d_main.cpp 2019-09-09 22:57:47.624246017 +0100 +@@ -459,6 +459,7 @@ + D_AddSearchDir(dirs, INSTALL_PREFIX "/" INSTALL_DATADIR "/games/odamex", separator); + #endif + ++ D_AddSearchDir(dirs, "/usr/share/doom", separator); + D_AddSearchDir(dirs, "/usr/share/games/doom", separator); + D_AddSearchDir(dirs, "/usr/local/share/games/doom", separator); + D_AddSearchDir(dirs, "/usr/local/share/doom", separator); diff --git a/games-engines/odamex/odamex-0.8.1-r1.ebuild b/games-engines/odamex/odamex-0.8.1-r1.ebuild new file mode 100644 index 000000000000..a4aa73ce963d --- /dev/null +++ b/games-engines/odamex/odamex-0.8.1-r1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +WX_GTK_VER="3.0-gtk3" +inherit cmake-utils 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" + +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? ( + upnp? ( net-libs/miniupnpc:= ) + )" +DEPEND="${RDEPEND}" +BDEPEND="games-util/deutex" + +S="${WORKDIR}/${PN}-src-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-miniupnpc.patch + "${FILESDIR}"/${P}-SearchDir.patch +) + +src_prepare() { + rm -r libraries/libminiupnpc odamex.wad || die + hprefixify common/d_main.cpp + + use odalaunch && setup-wxwidgets + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_CLIENT=$(usex client) + -DBUILD_MASTER=$(usex master) + -DBUILD_ODALAUNCH=$(usex odalaunch) + -DBUILD_SERVER=$(usex server) + -DENABLE_PORTMIDI=$(usex portmidi) + -DUSE_MINIUPNP=$(usex upnp) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + + # Build odamex.wad + cd wad || die "cd failed" + deutex -rgb 0 255 255 -doom2 bootstrap -build wadinfo.txt ../odamex.wad || die +} + +src_install() { + if use client ; then + newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" + make_desktop_entry "${PN} -waddir /usr/share/doom" "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-utils_src_install +} diff --git a/games-engines/odamex/odamex-0.8.1.ebuild b/games-engines/odamex/odamex-0.8.1.ebuild deleted file mode 100644 index dbf54b31f41a..000000000000 --- a/games-engines/odamex/odamex-0.8.1.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -WX_GTK_VER="3.0-gtk3" -inherit cmake-utils desktop 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" - -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? ( - upnp? ( net-libs/miniupnpc:= ) - )" -DEPEND="${RDEPEND}" -BDEPEND="games-util/deutex" - -S="${WORKDIR}/${PN}-src-${PV}" - -PATCHES=( - "${FILESDIR}"/${P}-miniupnpc.patch -) - -src_prepare() { - rm -r libraries/libminiupnpc odamex.wad || die - - use odalaunch && setup-wxwidgets - - cmake-utils_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DBUILD_CLIENT=$(usex client) - -DBUILD_MASTER=$(usex master) - -DBUILD_ODALAUNCH=$(usex odalaunch) - -DBUILD_SERVER=$(usex server) - -DENABLE_PORTMIDI=$(usex portmidi) - -DUSE_MINIUPNP=$(usex upnp) - ) - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile - - # Build odamex.wad - cd wad || die "cd failed" - deutex -rgb 0 255 255 -doom2 bootstrap -build wadinfo.txt ../odamex.wad || die -} - -src_install() { - if use client ; then - newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" - make_desktop_entry "${PN} -waddir /usr/share/doom" "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-utils_src_install -} -- cgit v1.2.3-65-gdbad