1 |
commit: b029eb6c402e6c3b489bc1e2aff7e7424711f4f6 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 29 12:55:06 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 29 13:06:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b029eb6c |
7 |
|
8 |
games-engines/odamex: Drop games.eclass, fix bugs #575762 and #649226 |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
.../odamex/files/odamex-0.7.0-miniupnpc20.patch | 28 +++++ |
13 |
games-engines/odamex/odamex-0.7.0-r1.ebuild | 116 +++++++++++++++++++++ |
14 |
2 files changed, 144 insertions(+) |
15 |
|
16 |
diff --git a/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..716a07fe628 |
19 |
--- /dev/null |
20 |
+++ b/games-engines/odamex/files/odamex-0.7.0-miniupnpc20.patch |
21 |
@@ -0,0 +1,28 @@ |
22 |
+Index: common/i_net.cpp |
23 |
+=================================================================== |
24 |
+--- common/i_net.cpp (revision 5459) |
25 |
++++ common/i_net.cpp (working copy) |
26 |
+@@ -151,7 +151,11 @@ |
27 |
+ |
28 |
+ Printf(PRINT_HIGH, "UPnP: Discovering router (max 1 unit supported)\n"); |
29 |
+ |
30 |
++#if MINIUPNPC_API_VERSION < 14 |
31 |
+ devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, &res); |
32 |
++#else |
33 |
++ devlist = upnpDiscover(sv_upnp_discovertimeout.asInt(), NULL, NULL, 0, 0, 2, &res); |
34 |
++#endif |
35 |
+ |
36 |
+ if (!devlist || res != UPNPDISCOVER_SUCCESS) |
37 |
+ { |
38 |
+@@ -179,7 +183,11 @@ |
39 |
+ // " desc: %s\n st: %s\n", |
40 |
+ // dev->descURL, dev->st); |
41 |
+ |
42 |
++#if MINIUPNPC_API_VERSION < 16 |
43 |
+ descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0); |
44 |
++#else |
45 |
++ descXML = (char *)miniwget(dev->descURL, &descXMLsize, 0, &res); |
46 |
++#endif |
47 |
+ |
48 |
+ if (descXML) |
49 |
+ { |
50 |
|
51 |
diff --git a/games-engines/odamex/odamex-0.7.0-r1.ebuild b/games-engines/odamex/odamex-0.7.0-r1.ebuild |
52 |
new file mode 100644 |
53 |
index 00000000000..0d2e515d29d |
54 |
--- /dev/null |
55 |
+++ b/games-engines/odamex/odamex-0.7.0-r1.ebuild |
56 |
@@ -0,0 +1,116 @@ |
57 |
+# Copyright 1999-2018 Gentoo Foundation |
58 |
+# Distributed under the terms of the GNU General Public License v2 |
59 |
+ |
60 |
+EAPI=5 |
61 |
+WX_GTK_VER="3.0" |
62 |
+inherit cmake-utils eutils gnome2-utils readme.gentoo-r1 wxwidgets |
63 |
+ |
64 |
+MY_P=${PN}-src-${PV} |
65 |
+DESCRIPTION="An online multiplayer, free software engine for Doom and Doom II" |
66 |
+HOMEPAGE="http://odamex.net/" |
67 |
+SRC_URI="mirror://sourceforge/${PN}/Odamex/${PV}/${MY_P}.tar.bz2" |
68 |
+ |
69 |
+LICENSE="GPL-2" |
70 |
+SLOT="0" |
71 |
+KEYWORDS="~amd64 ~x86" |
72 |
+IUSE="dedicated +odalaunch master portmidi server" |
73 |
+ |
74 |
+RDEPEND=" |
75 |
+ dedicated? ( >=net-libs/miniupnpc-1.8:0= ) |
76 |
+ !dedicated? ( |
77 |
+ media-libs/libpng:0= |
78 |
+ >=media-libs/libsdl-1.2.9[X,sound,joystick,video] |
79 |
+ >=media-libs/sdl-mixer-1.2.6 |
80 |
+ odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) |
81 |
+ portmidi? ( media-libs/portmidi ) |
82 |
+ server? ( >=net-libs/miniupnpc-1.8:0= ) |
83 |
+ ) |
84 |
+" |
85 |
+DEPEND="${RDEPEND}" |
86 |
+ |
87 |
+DOC_CONTENTS=" |
88 |
+ This is just the engine, you will need doom resource files in order to play. |
89 |
+ Check: http://odamex.net/wiki/FAQ#What_data_files_are_required.3F |
90 |
+" |
91 |
+ |
92 |
+S="${WORKDIR}/src-${PV:2:3}" |
93 |
+ |
94 |
+pkg_pretend() { |
95 |
+ if ! test-flag-CXX -std=c++11; then |
96 |
+ die "You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags" |
97 |
+ fi |
98 |
+} |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ epatch "${FILESDIR}"/1-${P}-install-rules.patch \ |
102 |
+ "${FILESDIR}"/2-${P}-cmake-options.patch \ |
103 |
+ "${FILESDIR}"/3-${P}-wad-search-path.patch \ |
104 |
+ "${FILESDIR}"/4-${P}-odalauncher-bin-path.patch \ |
105 |
+ "${FILESDIR}"/${P}-miniupnpc.patch \ |
106 |
+ "${FILESDIR}"/${P}-miniupnpc20.patch \ |
107 |
+ "${FILESDIR}"/${P}-gcc6.patch |
108 |
+ |
109 |
+ rm -r libraries/libminiupnpc || die |
110 |
+ cmake-utils_src_prepare |
111 |
+} |
112 |
+ |
113 |
+src_configure() { |
114 |
+ local mycmakeargs=( |
115 |
+ -DUSE_INTREE_PORTMIDI=OFF |
116 |
+ -DCMAKE_INSTALL_BINDIR="/usr/bin" |
117 |
+ -DCMAKE_INSTALL_DATADIR="/usr/share" |
118 |
+ $(cmake-utils_use_build master MASTER) |
119 |
+ ) |
120 |
+ |
121 |
+ if use dedicated ; then |
122 |
+ mycmakeargs+=( |
123 |
+ -DBUILD_CLIENT=OFF |
124 |
+ -DBUILD_ODALAUNCH=OFF |
125 |
+ -DBUILD_SERVER=ON |
126 |
+ -DENABLE_PORTMIDI=OFF |
127 |
+ ) |
128 |
+ else |
129 |
+ mycmakeargs+=( |
130 |
+ -DBUILD_CLIENT=ON |
131 |
+ $(cmake-utils_use_build odalaunch ODALAUNCH) |
132 |
+ $(cmake-utils_use_build server SERVER) |
133 |
+ $(cmake-utils_use_enable portmidi PORTMIDI) |
134 |
+ ) |
135 |
+ fi |
136 |
+ |
137 |
+ append-cxxflags -std=c++11 |
138 |
+ |
139 |
+ cmake-utils_src_configure |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ cmake-utils_src_compile |
144 |
+} |
145 |
+ |
146 |
+src_install() { |
147 |
+ cmake-utils_src_install |
148 |
+ readme.gentoo_create_doc |
149 |
+ |
150 |
+ if ! use dedicated ; then |
151 |
+ newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png" |
152 |
+ make_desktop_entry ${PN} |
153 |
+ |
154 |
+ if use odalaunch ; then |
155 |
+ newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png" |
156 |
+ make_desktop_entry odalaunch "Odamex Launcher" odalaunch |
157 |
+ fi |
158 |
+ fi |
159 |
+} |
160 |
+ |
161 |
+pkg_preinst() { |
162 |
+ gnome2_icon_savelist |
163 |
+} |
164 |
+ |
165 |
+pkg_postinst() { |
166 |
+ gnome2_icon_cache_update |
167 |
+ readme.gentoo_print_elog |
168 |
+} |
169 |
+ |
170 |
+pkg_postrm() { |
171 |
+ gnome2_icon_cache_update |
172 |
+} |