1 |
commit: 4a6b55e5b46db4487b418e68800ecf20ccbdae17 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 5 20:16:14 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 5 20:19:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6b55e5 |
7 |
|
8 |
games-emulation/mednafen: Version bump to 0.9.45 |
9 |
|
10 |
* Only use sed's instead of patches from now on, |
11 |
due to the bundling/CFLAGS insanity of upstream. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=612120 |
14 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=618380 |
15 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
16 |
|
17 |
games-emulation/mednafen/Manifest | 1 + |
18 |
games-emulation/mednafen/mednafen-0.9.45.ebuild | 109 ++++++++++++++++++++++++ |
19 |
2 files changed, 110 insertions(+) |
20 |
|
21 |
diff --git a/games-emulation/mednafen/Manifest b/games-emulation/mednafen/Manifest |
22 |
index 4fa53d1142b..741027eccbc 100644 |
23 |
--- a/games-emulation/mednafen/Manifest |
24 |
+++ b/games-emulation/mednafen/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST mednafen-0.9.41.tar.xz 3148348 SHA256 74736b9b52a7ba6270b67ae8e6c876a887e0e26a00a7d96bdd49af17992aac47 SHA512 d3c7707874eabbec41e5b725813d16e599f3ad89ecbd9c8e1264184d74ab2bf7a21a3f6fe177b6bc429f7bd56f9eea17a9a6fefce8e70b82e87a93d75f5d39c9 WHIRLPOOL f754a45f46a5cd18117b1b710dd7fed5ebcfb311bf4ed4b7961c99636c13559db75f83cf7b34122fb403b7794ddeec6af79469bb7743cb60a7840ffe807fa2d7 |
27 |
+DIST mednafen-0.9.45.tar.xz 3184340 SHA256 49715544a5eb7a678f7f01994f38aa14e2192f00d201684184665665073a600e SHA512 d2d61eef0a5ab2c3109fb3c4fbdb2509504c61ffaab14a51e413204f08a622e47c116c7333866a3406a1fa7ac4bf68349c0212bc9fcb544d4953898b03a2fb71 WHIRLPOOL 3e8466852d8c04207a307ac2d74c5d9b76b51d0f9cd2c0ae16f59d57ae884dec8fd8d62454996c574f25a530ac568f7a2c884657b2f6b85d0810dc1fb51ad9e0 |
28 |
|
29 |
diff --git a/games-emulation/mednafen/mednafen-0.9.45.ebuild b/games-emulation/mednafen/mednafen-0.9.45.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..0c89b4e3892 |
32 |
--- /dev/null |
33 |
+++ b/games-emulation/mednafen/mednafen-0.9.45.ebuild |
34 |
@@ -0,0 +1,109 @@ |
35 |
+# Copyright 1999-2017 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+inherit autotools flag-o-matic pax-utils |
41 |
+ |
42 |
+DESCRIPTION="Argument-driven multi-system emulator utilizing OpenGL and SDL" |
43 |
+HOMEPAGE="https://mednafen.github.io/" |
44 |
+SRC_URI="https://mednafen.github.io/releases/files/${P}.tar.xz" |
45 |
+ |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~ppc ~x86" |
49 |
+IUSE="alsa altivec cjk debugger jack nls pax_kernel" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ dev-libs/libcdio |
53 |
+ dev-libs/lzo |
54 |
+ media-libs/libsdl[sound,joystick,opengl,video] |
55 |
+ media-libs/libsndfile |
56 |
+ sys-libs/zlib[minizip] |
57 |
+ virtual/opengl |
58 |
+ alsa? ( media-libs/alsa-lib ) |
59 |
+ jack? ( media-sound/jack-audio-connection-kit ) |
60 |
+ nls? ( virtual/libintl )" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ virtual/pkgconfig |
63 |
+ nls? ( sys-devel/gettext )" |
64 |
+ |
65 |
+S=${WORKDIR}/${PN} |
66 |
+ |
67 |
+pkg_pretend() { |
68 |
+ if has ccache ${FEATURES}; then |
69 |
+ ewarn |
70 |
+ ewarn "If you experience build failure, try turning off ccache in FEATURES." |
71 |
+ ewarn |
72 |
+ fi |
73 |
+} |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ default |
77 |
+ |
78 |
+ # Unfortunately, upstream is insane and thinks mucking with CFLAGS is okay, if |
79 |
+ # it prevents "users who don't understand the consequences of what they're doing". |
80 |
+ # We use sed's here, as they're more forward-compatible than patches which need to |
81 |
+ # be constantly rebased. DO NOT REPLACE THEM UNLESS YOU HAVE PERMISSION FROM GAMES. |
82 |
+ sed -e '/-fno-fast-math/d' \ |
83 |
+ -e '/-fno-unsafe-math-optimizations/d' \ |
84 |
+ -e '/-fno-aggressive-loop-optimizations/d' \ |
85 |
+ -e '/-fno-ipa-icf/d' \ |
86 |
+ -e '/-fno-printf-return-value/d' \ |
87 |
+ -e '/-fomit-frame-pointer/d' \ |
88 |
+ -e '/-fno-pic/d' \ |
89 |
+ -e '/-fno-pie/d' \ |
90 |
+ -e '/-fno-PIC/d' \ |
91 |
+ -e '/-fno-PIE/d' \ |
92 |
+ -e '/-nopie/d' \ |
93 |
+ -e '/-no-pie/d' \ |
94 |
+ -e '/-fno-stack-protector/d' \ |
95 |
+ -e '/-fno-stack-protector-all/d' \ |
96 |
+ -e '/-fno-stack-protector-strong/d' \ |
97 |
+ -e '/-mtune=haswell/d' \ |
98 |
+ -i configure.ac || die |
99 |
+ |
100 |
+ # Furthermore, upstream is also insane about bundling libraries and considers it |
101 |
+ # "an aesthetics issue" and is even unwilling to make unbundling optional. |
102 |
+ # Libs to unbundle: minilzo, minizip |
103 |
+ sed -e '/PKG_PROG_PKG_CONFIG/a PKG_CHECK_MODULES([LZO], [lzo2])' \ |
104 |
+ -i configure.ac || die |
105 |
+ sed -e '/bin_PROGRAMS/a mednafen_CPPFLAGS = \$(LZO_CFLAGS)' \ |
106 |
+ -i src/Makefile.am || die |
107 |
+ sed -e 's:"compress/minilzo.h":<lzo1x.h>:' \ |
108 |
+ -i src/{mednafen,qtrecord}.cpp || die |
109 |
+ sed -e 's:compress/ioapi.c::' \ |
110 |
+ -e 's:compress/unzip.c::' \ |
111 |
+ -e 's:compress/minilzo.c::' \ |
112 |
+ -i src/compress/Makefile.am.inc || die |
113 |
+ sed -e 's:"compress/unzip.h":<minizip/unzip.h>:' \ |
114 |
+ -i src/file.cpp || die |
115 |
+ sed -e 's:\(mednafen_LDADD.*trio/libtrio\.a\):\1 -lminizip \$(LZO_LIBS):' \ |
116 |
+ -i src/Makefile.am || die |
117 |
+ # delete bundled files just to be sure... |
118 |
+ rm src/compress/{ioapi.?,*lzo*,unzip.?} || die |
119 |
+ |
120 |
+ eautoreconf |
121 |
+} |
122 |
+ |
123 |
+src_configure() { |
124 |
+ # very sensitive code (bug #539992) |
125 |
+ strip-flags |
126 |
+ append-flags -fomit-frame-pointer -fwrapv |
127 |
+ econf \ |
128 |
+ $(use_enable alsa) \ |
129 |
+ $(use_enable altivec) \ |
130 |
+ $(use_enable cjk cjk-fonts) \ |
131 |
+ $(use_enable debugger) \ |
132 |
+ $(use_enable jack) \ |
133 |
+ $(use_enable nls) |
134 |
+} |
135 |
+ |
136 |
+src_install() { |
137 |
+ default |
138 |
+ dodoc Documentation/cheats.txt |
139 |
+ |
140 |
+ if use pax_kernel; then |
141 |
+ pax-mark m "${ED%/}"/usr/bin/mednafen || die |
142 |
+ fi |
143 |
+} |