Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/snes9x/files/, games-emulation/snes9x/
Date: Sun, 03 Mar 2019 14:26:53
Message-Id: 1551623201.ced341362df8b763f8330ed73b4f1561735dee51.polynomial-c@gentoo
1 commit: ced341362df8b763f8330ed73b4f1561735dee51
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 3 14:24:09 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 3 14:26:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ced34136
7
8 games-emulation/snes9x: Bump to version 1.59
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 games-emulation/snes9x/Manifest | 1 +
14 .../snes9x/files/snes9x-1.59-build-system.patch | 40 +++++++
15 games-emulation/snes9x/snes9x-1.59.ebuild | 128 +++++++++++++++++++++
16 3 files changed, 169 insertions(+)
17
18 diff --git a/games-emulation/snes9x/Manifest b/games-emulation/snes9x/Manifest
19 index 0e2e1b50958..c4da18a9d02 100644
20 --- a/games-emulation/snes9x/Manifest
21 +++ b/games-emulation/snes9x/Manifest
22 @@ -1,2 +1,3 @@
23 DIST snes9x-1.57.tar.gz 2959157 BLAKE2B 6307976247eb3a3bcb506028d75d9054ea853db5c629870a89832fd93ee2fe256799b9191922c67fcd8ef1ed2344d16326212001661c5038a88f290346b9f35c SHA512 d17ec45eeae8f57c618a51243ac54bc3a2a3f09632e4e50c51781cf8557362dbfa7856d9d4ecdebeea344041c2686e2256f6bcd2dcc71660fcf336cf887dcb1c
24 DIST snes9x-1.58.tar.gz 2830667 BLAKE2B 66446e56a172b318f7cefecc59d927270377f725df0ca89888e1c50eb3f5475729ffc9da86ead5e50f106ab0781ad644ae3b3ed5719724db9b78b687135ead04 SHA512 51f8e92258db58e55f7b0b6c4537a916358891bb5ee35bd984d1970d2fedbdb2f8b3a4f560e0302d3011e521a1072c8a0d69723e8b151f61d33802c02f392d7d
25 +DIST snes9x-1.59.tar.gz 2819790 BLAKE2B 63328f034bbd8b9905346836e52344c86dccf04e57d8b1d280485d1ff24e3b1d452c2529526b477066d6ace8a0f2aba07e62d98e85bd0eae4d21f0c0186e0587 SHA512 e9bec3e9908705f3ff380c6e2131b8ff7c9a7fc5571a00f05c0f7810a2edd2fe36dd4def242bdb924e9f6d15a303794a626358cd49dedab9a2794e80a2cc920a
26
27 diff --git a/games-emulation/snes9x/files/snes9x-1.59-build-system.patch b/games-emulation/snes9x/files/snes9x-1.59-build-system.patch
28 new file mode 100644
29 index 00000000000..2d8f9f05e59
30 --- /dev/null
31 +++ b/games-emulation/snes9x/files/snes9x-1.59-build-system.patch
32 @@ -0,0 +1,40 @@
33 +--- snes9x-1.59/unix/configure.ac
34 ++++ snes9x-1.59/unix/configure.ac
35 +@@ -56,37 +56,6 @@
36 + # *** Execution begins here ***
37 + # *****************************
38 +
39 +-# Test what compiler flags we should use.
40 +-
41 +-AC_ARG_ENABLE([debug],
42 +- [AS_HELP_STRING([--enable-debug],
43 +- [leave debug information in the final binary (default: no)])],
44 +- [], [enable_debug="no"])
45 +-
46 +-if test "x$enable_debug" = "xyes"; then
47 +- AC_S9X_COMPILER_FLAG([-g], [g])
48 +- AC_S9X_COMPILER_FLAG([-O0], [o0])
49 +-else
50 +- AC_S9X_COMPILER_FLAG([-O3], [o3], [
51 +- AC_S9X_COMPILER_FLAG([-O2], [o2], [
52 +- AC_S9X_COMPILER_FLAG([-O1], [o1])])])
53 +- AC_S9X_COMPILER_FLAG([-fomit-frame-pointer], [omit_frame_pointer])
54 +-fi
55 +-
56 +-AC_ARG_ENABLE([mtune],
57 +- [AS_HELP_STRING([--enable-mtune],
58 +- [use the specified value for the -mtune/-mcpu flag (default: no)])],
59 +- [], [enable_mtune="no"])
60 +-
61 +-if test "x$enable_mtune" != "xno"; then
62 +- AC_S9X_COMPILER_FLAG([-mtune="$enable_mtune"], [mtune],
63 +- [
64 +- AC_MSG_WARN([-mtune failed, trying -mcpu...])
65 +- AC_S9X_COMPILER_FLAG([-mcpu="$enable_mtune"], [mcpu],
66 +- [AC_MSG_ERROR([Please specify a working value for --enable-mtune.])])
67 +- ])
68 +-fi
69 +-
70 + AC_S9X_COMPILER_FLAG([-fno-exceptions], [no_exceptions])
71 + AC_S9X_COMPILER_FLAG([-fno-rtti], [no_rtti])
72 + AC_S9X_COMPILER_FLAG([-pedantic], [pedantic])
73
74 diff --git a/games-emulation/snes9x/snes9x-1.59.ebuild b/games-emulation/snes9x/snes9x-1.59.ebuild
75 new file mode 100644
76 index 00000000000..830686b140f
77 --- /dev/null
78 +++ b/games-emulation/snes9x/snes9x-1.59.ebuild
79 @@ -0,0 +1,128 @@
80 +# Copyright 1999-2019 Gentoo Authors
81 +# Distributed under the terms of the GNU General Public License v2
82 +
83 +EAPI=7
84 +
85 +inherit autotools flag-o-matic meson xdg
86 +
87 +DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator"
88 +HOMEPAGE="https://github.com/snes9xgit/snes9x"
89 +SRC_URI="https://github.com/snes9xgit/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
90 +
91 +LICENSE="Snes9x GPL-2 GPL-2+ LGPL-2.1 LGPL-2.1+ ISC MIT ZLIB Info-ZIP"
92 +SLOT="0"
93 +KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
94 +IUSE="alsa debug gtk multilib netplay opengl oss png pulseaudio portaudio wayland xinerama +xv"
95 +RESTRICT="bindist"
96 +
97 +RDEPEND="
98 + sys-libs/zlib:=[minizip]
99 + x11-libs/libX11
100 + x11-libs/libXext
101 + png? ( media-libs/libpng:0= )
102 + gtk? (
103 + dev-libs/glib:2
104 + media-libs/libsdl2[joystick]
105 + >=x11-libs/gtk+-3.22:3[wayland?]
106 + x11-libs/libXrandr
107 + x11-misc/xdg-utils
108 + alsa? ( media-libs/alsa-lib )
109 + opengl? (
110 + media-libs/libepoxy
111 + virtual/opengl
112 + )
113 + portaudio? ( >=media-libs/portaudio-19_pre )
114 + pulseaudio? ( media-sound/pulseaudio )
115 + xv? ( x11-libs/libXv )
116 + wayland? ( dev-libs/wayland )
117 + )
118 + xinerama? ( x11-libs/libXinerama )"
119 +DEPEND="${RDEPEND}
120 + x11-base/xorg-proto"
121 +BDEPEND="virtual/pkgconfig"
122 +
123 +S="${WORKDIR}/${P}/unix"
124 +
125 +PATCHES=(
126 + "${FILESDIR}"/${PN}-1.53-cross-compile.patch
127 + "${FILESDIR}"/${PN}-1.59-build-system.patch
128 +)
129 +
130 +src_prepare() {
131 + cd "${WORKDIR}/${P}" || die
132 + rm -r unzip || die
133 + default
134 + cd unix || die
135 + eautoreconf
136 + if use gtk ; then
137 + export EMESON_SOURCE="${WORKDIR}/${P}/gtk"
138 + fi
139 +}
140 +
141 +src_configure() {
142 + append-ldflags -Wl,-z,noexecstack
143 +
144 + # build breaks when zlib/zip support is disabled
145 + local myeconfargs=(
146 + --enable-gamepad
147 + --enable-gzip
148 + --enable-zip
149 + --with-system-zip
150 + $(use_enable debug debugger)
151 + $(use_enable netplay)
152 + $(use_enable png screenshot)
153 + $(use_enable xinerama)
154 + )
155 + econf "${myeconfargs[@]}"
156 +
157 + if use gtk; then
158 + local emesonargs=(
159 + -Dalsa="$(usex alsa true false)"
160 + -Ddebugger="$(usex debug true false)"
161 + -Dgtk2=false
162 + -Dgtk3=true
163 + -Dopengl="$(usex opengl true false)"
164 + -Doss="$(usex oss true false)"
165 + -Dportaudio="$(usex portaudio true false)"
166 + -Dpulseaudio="$(usex pulseaudio true false)"
167 + -Dscreenshot="$(usex png true false)"
168 + -Dsystem-zip=true
169 + -Dxv="$(usex xv true false)"
170 + -Dzlib=true
171 + -Dwayland="$(usex wayland true false)"
172 + )
173 + meson_src_configure
174 + fi
175 +}
176 +
177 +src_compile() {
178 + emake
179 + use gtk && meson_src_compile
180 +}
181 +
182 +src_install() {
183 + dobin ${PN}
184 +
185 + dodoc ../docs/{changes,control-inputs,controls,snapshots}.txt
186 + dodoc snes9x.conf.default
187 +
188 + if use gtk ; then
189 + meson_src_install
190 + dodoc ../gtk/AUTHORS
191 + fi
192 +
193 + docinto html
194 + dodoc {.,..}/docs/*.html
195 +}
196 +
197 +pkg_preinst() {
198 + use gtk && xdg_pkg_preinst
199 +}
200 +
201 +pkg_postinst() {
202 + use gtk && xdg_pkg_postinst
203 +}
204 +
205 +pkg_postrm() {
206 + use gtk && xdg_pkg_postrm
207 +}