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/, games-emulation/snes9x/files/
Date: Mon, 11 Jun 2018 09:59:54
Message-Id: 1528711185.bd6b4e03bb4c8621ddc4a5330f64c0ed219829ae.polynomial-c@gentoo
1 commit: bd6b4e03bb4c8621ddc4a5330f64c0ed219829ae
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 11 09:14:52 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 11 09:59:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd6b4e03
7
8 games-emulation/snes9x: Bump to version 1.56
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 games-emulation/snes9x/Manifest | 1 +
13 .../snes9x/files/snes9x-1.56-build-system.patch | 53 ++++++++
14 games-emulation/snes9x/snes9x-1.56.ebuild | 137 +++++++++++++++++++++
15 3 files changed, 191 insertions(+)
16
17 diff --git a/games-emulation/snes9x/Manifest b/games-emulation/snes9x/Manifest
18 index 6eda8d9906e..17a4640040d 100644
19 --- a/games-emulation/snes9x/Manifest
20 +++ b/games-emulation/snes9x/Manifest
21 @@ -1,2 +1,3 @@
22 DIST snes9x-1.54.1.tar.gz 2186737 BLAKE2B b433a167035577ab785901acb65b9df289218fa214f664494e7f0559a1a843c9211f81bfea3add73c64c6f87e974b0964a86fa43433fa1b5c6e20a724d3aa320 SHA512 2a8fddc0b9044c0b7e10711b35c06555e280c93ddde3c101c4084f859079947acb209f2632ca08937fa2ca47932094040c4a7a60b6188354fd92f72dbdf854ed
23 DIST snes9x-1.55.tar.gz 2252841 BLAKE2B 52b2e3d5539d95df63ef6f90c974895bc3a3dbe1e89b3a9513a8504eab308d4827f116ebc13fd89ac9c01f7394067eeddf7fd6f640fd071ee8558a6a79f2b56c SHA512 61d1d6f9c1fc4fbf6253ac7a7d214c771563d7d60238197b2f1525a58f8f9011446f400767d39ec464c69d80574a7dcd78557c8f47605df992af28cb107c0f6e
24 +DIST snes9x-1.56.tar.gz 2876904 BLAKE2B b58dd5c31627cbb374183adb5fe0328739bbebda8c6907ab7f9153085c45d612e51c91ad3223cc10694c9c36a00f69c303c5865d3b022f2769353884056a91b2 SHA512 b8c9438a451ed9a52a66dc04e2bea841aaa9403a2fd266e7042555f93a159ced76061233220eb6fac0f106cea08835c13ef008b2432f6d658689e0fa8ee563e6
25
26 diff --git a/games-emulation/snes9x/files/snes9x-1.56-build-system.patch b/games-emulation/snes9x/files/snes9x-1.56-build-system.patch
27 new file mode 100644
28 index 00000000000..d2ee182cb7c
29 --- /dev/null
30 +++ b/games-emulation/snes9x/files/snes9x-1.56-build-system.patch
31 @@ -0,0 +1,53 @@
32 +--- snes9x-1.56/gtk/configure.ac
33 ++++ snes9x-1.56/gtk/configure.ac
34 +@@ -33,8 +33,8 @@
35 +
36 + AM_GLIB_GNU_GETTEXT
37 +
38 +-snes9xlocaledir='${prefix}/${DATADIRNAME}/locale'
39 +-snes9xdatadir='${prefix}/${DATADIRNAME}/snes9x'
40 ++snes9xlocaledir='$(localedir)'
41 ++snes9xdatadir='$(datadir)/snes9x'
42 +
43 + AC_SUBST(snes9xlocaledir)
44 + AC_SUBST(snes9xdatadir)
45 +--- snes9x-1.56/unix/configure.ac
46 ++++ snes9x-1.56/unix/configure.ac
47 +@@ -56,37 +56,6 @@
48 + # *** Execution begins here ***
49 + # *****************************
50 +
51 +-# Test what compiler flags we should use.
52 +-
53 +-AC_ARG_ENABLE([debug],
54 +- [AS_HELP_STRING([--enable-debug],
55 +- [leave debug information in the final binary (default: no)])],
56 +- [], [enable_debug="no"])
57 +-
58 +-if test "x$enable_debug" = "xyes"; then
59 +- AC_S9X_COMPILER_FLAG([-g], [g])
60 +- AC_S9X_COMPILER_FLAG([-O0], [o0])
61 +-else
62 +- AC_S9X_COMPILER_FLAG([-O3], [o3], [
63 +- AC_S9X_COMPILER_FLAG([-O2], [o2], [
64 +- AC_S9X_COMPILER_FLAG([-O1], [o1])])])
65 +- AC_S9X_COMPILER_FLAG([-fomit-frame-pointer], [omit_frame_pointer])
66 +-fi
67 +-
68 +-AC_ARG_ENABLE([mtune],
69 +- [AS_HELP_STRING([--enable-mtune],
70 +- [use the specified value for the -mtune/-mcpu flag (default: no)])],
71 +- [], [enable_mtune="no"])
72 +-
73 +-if test "x$enable_mtune" != "xno"; then
74 +- AC_S9X_COMPILER_FLAG([-mtune="$enable_mtune"], [mtune],
75 +- [
76 +- AC_MSG_WARN([-mtune failed, trying -mcpu...])
77 +- AC_S9X_COMPILER_FLAG([-mcpu="$enable_mtune"], [mcpu],
78 +- [AC_MSG_ERROR([Please specify a working value for --enable-mtune.])])
79 +- ])
80 +-fi
81 +-
82 + AC_S9X_COMPILER_FLAG([-fno-exceptions], [no_exceptions])
83 + AC_S9X_COMPILER_FLAG([-fno-rtti], [no_rtti])
84 + AC_S9X_COMPILER_FLAG([-pedantic], [pedantic])
85
86 diff --git a/games-emulation/snes9x/snes9x-1.56.ebuild b/games-emulation/snes9x/snes9x-1.56.ebuild
87 new file mode 100644
88 index 00000000000..652a1c85921
89 --- /dev/null
90 +++ b/games-emulation/snes9x/snes9x-1.56.ebuild
91 @@ -0,0 +1,137 @@
92 +# Copyright 1999-2018 Gentoo Foundation
93 +# Distributed under the terms of the GNU General Public License v2
94 +
95 +EAPI=6
96 +
97 +inherit autotools flag-o-matic gnome2-utils xdg-utils
98 +
99 +DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator"
100 +HOMEPAGE="https://github.com/snes9xgit/snes9x"
101 +SRC_URI="https://github.com/snes9xgit/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
102 +
103 +LICENSE="Snes9x GPL-2 GPL-2+ LGPL-2.1 LGPL-2.1+ ISC MIT ZLIB Info-ZIP"
104 +SLOT="0"
105 +KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd"
106 +IUSE="alsa debug gtk joystick multilib netplay nls opengl oss png pulseaudio portaudio xinerama +xv"
107 +RESTRICT="bindist"
108 +
109 +RDEPEND="
110 + sys-libs/zlib:=[minizip]
111 + x11-libs/libX11
112 + x11-libs/libXext
113 + png? ( media-libs/libpng:0= )
114 + gtk? (
115 + dev-libs/glib:2
116 + dev-libs/libxml2
117 + >=x11-libs/gtk+-3.0:3
118 + x11-libs/libXrandr
119 + x11-misc/xdg-utils
120 + alsa? ( media-libs/alsa-lib )
121 + joystick? ( media-libs/libsdl2[joystick] )
122 + opengl? (
123 + media-libs/libepoxy
124 + virtual/opengl
125 + )
126 + portaudio? ( >=media-libs/portaudio-19_pre )
127 + pulseaudio? ( media-sound/pulseaudio )
128 + xv? ( x11-libs/libXv )
129 + )
130 + xinerama? ( x11-libs/libXinerama )"
131 +DEPEND="${RDEPEND}
132 + virtual/pkgconfig
133 + x11-base/xorg-proto
134 + nls? ( dev-util/intltool )"
135 +
136 +S="${WORKDIR}/${P}/unix"
137 +
138 +PATCHES=(
139 + "${FILESDIR}"/${PN}-1.53-cross-compile.patch
140 + "${FILESDIR}"/${PN}-1.56-build-system.patch
141 +)
142 +
143 +src_prepare() {
144 + cd "${WORKDIR}"/${P} || die
145 + rm -r unzip || die
146 + default
147 + cd unix || die
148 + eautoreconf
149 + if use gtk; then
150 + cd ../gtk || die
151 + eautoreconf
152 + fi
153 +}
154 +
155 +src_configure() {
156 + append-ldflags -Wl,-z,noexecstack
157 +
158 + # build breaks when zlib/zip support is disabled
159 + local myeconfargs=(
160 + --enable-gzip
161 + --enable-zip
162 + --with-system-zip
163 + $(use_enable joystick gamepad)
164 + $(use_enable debug debugger)
165 + $(use_enable netplay)
166 + $(use_enable png screenshot)
167 + $(use_enable xinerama)
168 + )
169 + econf "${myeconfargs[@]}"
170 +
171 + if use gtk; then
172 + cd ../gtk || die
173 + myeconfargs=(
174 + --with-gtk3
175 + --with-zlib
176 + --with-system-zip
177 + --without-gtk2
178 + $(use_enable nls)
179 + $(use_with opengl)
180 + $(use_with joystick)
181 + $(use_with xv)
182 + $(use_with netplay)
183 + $(use_with alsa)
184 + $(use_with oss)
185 + $(use_with pulseaudio)
186 + $(use_with portaudio)
187 + $(use_with png screenshot)
188 + )
189 + econf "${myeconfargs[@]}"
190 + fi
191 +}
192 +
193 +src_compile() {
194 + emake
195 + use gtk && emake -C ../gtk
196 +}
197 +
198 +src_install() {
199 + dobin ${PN}
200 +
201 + dodoc ../docs/{snes9x.conf.default,{changes,control-inputs,controls,snapshots}.txt}
202 +
203 + if use gtk; then
204 + emake -C ../gtk DESTDIR="${D}" install
205 + dodoc ../gtk/{AUTHORS,doc/README}
206 + fi
207 +
208 + docinto html
209 + dodoc {.,..}/docs/*.html
210 +}
211 +
212 +pkg_preinst() {
213 + use gtk && gnome2_icon_savelist
214 +}
215 +
216 +pkg_postinst() {
217 + if use gtk ; then
218 + gnome2_icon_cache_update
219 + xdg_desktop_database_update
220 + fi
221 +}
222 +
223 +pkg_postrm() {
224 + if use gtk ; then
225 + gnome2_icon_cache_update
226 + xdg_desktop_database_update
227 + fi
228 +}