diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-04-29 14:55:06 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-04-29 15:06:43 +0200 |
commit | b029eb6c402e6c3b489bc1e2aff7e7424711f4f6 (patch) | |
tree | 17ad2d892c11a86b7652d5ede16c00510ca0b5c7 /games-engines/odamex | |
parent | games-emulation/zsnes: Drop old (diff) | |
download | gentoo-b029eb6c402e6c3b489bc1e2aff7e7424711f4f6.tar.gz gentoo-b029eb6c402e6c3b489bc1e2aff7e7424711f4f6.tar.bz2 gentoo-b029eb6c402e6c3b489bc1e2aff7e7424711f4f6.zip |
games-engines/odamex: Drop games.eclass, fix bugs #575762 and #649226
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-engines/odamex')
-rw-r--r-- | games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch | 28 | ||||
-rw-r--r-- | games-engines/odamex/odamex-0.7.0-r1.ebuild | 116 |
2 files changed, 144 insertions, 0 deletions
diff --git a/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch new file mode 100644 index 000000000000..716a07fe628a --- /dev/null +++ b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch @@ -0,0 +1,28 @@ +Index: common/i_net.cpp +=================================================================== +--- common/i_net.cpp (revision 5459) ++++ common/i_net.cpp (working copy) +@@ -151,7 +151,11 @@ + + Printf(PRINT_HIGH, "UPnP: Discovering router (max 1 unit supported)\n"); + ++#if MINIUPNPC_API_VERSION < 14 + devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, &res); ++#else ++ devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, 2, &res); ++#endif + + if (!devlist || res != UPNPDISCOVER_SUCCESS) + { +@@ -179,7 +183,11 @@ + // " desc: %s\n st: %s\n", + // dev->descURL, dev->st); + ++#if MINIUPNPC_API_VERSION < 16 + descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0); ++#else ++ descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0, &res); ++#endif + + if (descXML) + { diff --git a/games-engines/odamex/odamex-0.7.0-r1.ebuild b/games-engines/odamex/odamex-0.7.0-r1.ebuild new file mode 100644 index 000000000000..0d2e515d29dc --- /dev/null +++ b/games-engines/odamex/odamex-0.7.0-r1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +WX_GTK_VER="3.0" +inherit cmake-utils eutils gnome2-utils readme.gentoo-r1 wxwidgets + +MY_P=${PN}-src-${PV} +DESCRIPTION="An online multiplayer, free software engine for Doom and Doom II" +HOMEPAGE="http://odamex.net/" +SRC_URI="mirror://sourceforge/${PN}/Odamex/${PV}/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dedicated +odalaunch master portmidi server" + +RDEPEND=" + dedicated? ( >=net-libs/miniupnpc-1.8:0= ) + !dedicated? ( + media-libs/libpng:0= + >=media-libs/libsdl-1.2.9[X,sound,joystick,video] + >=media-libs/sdl-mixer-1.2.6 + odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) + portmidi? ( media-libs/portmidi ) + server? ( >=net-libs/miniupnpc-1.8:0= ) + ) +" +DEPEND="${RDEPEND}" + +DOC_CONTENTS=" + This is just the engine, you will need doom resource files in order to play. + Check: http://odamex.net/wiki/FAQ#What_data_files_are_required.3F +" + +S="${WORKDIR}/src-${PV:2:3}" + +pkg_pretend() { + if ! test-flag-CXX -std=c++11; then + die "You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/1-${P}-install-rules.patch \ + "${FILESDIR}"/2-${P}-cmake-options.patch \ + "${FILESDIR}"/3-${P}-wad-search-path.patch \ + "${FILESDIR}"/4-${P}-odalauncher-bin-path.patch \ + "${FILESDIR}"/${P}-miniupnpc.patch \ + "${FILESDIR}"/${P}-miniupnpc20.patch \ + "${FILESDIR}"/${P}-gcc6.patch + + rm -r libraries/libminiupnpc || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DUSE_INTREE_PORTMIDI=OFF + -DCMAKE_INSTALL_BINDIR="/usr/bin" + -DCMAKE_INSTALL_DATADIR="/usr/share" + $(cmake-utils_use_build master MASTER) + ) + + if use dedicated ; then + mycmakeargs+=( + -DBUILD_CLIENT=OFF + -DBUILD_ODALAUNCH=OFF + -DBUILD_SERVER=ON + -DENABLE_PORTMIDI=OFF + ) + else + mycmakeargs+=( + -DBUILD_CLIENT=ON + $(cmake-utils_use_build odalaunch ODALAUNCH) + $(cmake-utils_use_build server SERVER) + $(cmake-utils_use_enable portmidi PORTMIDI) + ) + fi + + append-cxxflags -std=c++11 + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + readme.gentoo_create_doc + + if ! use dedicated ; then + newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" + make_desktop_entry ${PN} + + if use odalaunch ; then + newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png" + make_desktop_entry odalaunch "Odamex Launcher" odalaunch + fi + fi +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update + readme.gentoo_print_elog +} + +pkg_postrm() { + gnome2_icon_cache_update +} |