public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/mednafen/
Date: Mon,  5 Jun 2017 20:19:25 +0000 (UTC)	[thread overview]
Message-ID: <1496693955.4a6b55e5b46db4487b418e68800ecf20ccbdae17.soap@gentoo> (raw)

commit:     4a6b55e5b46db4487b418e68800ecf20ccbdae17
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  5 20:16:14 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun  5 20:19:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6b55e5

games-emulation/mednafen: Version bump to 0.9.45

* Only use sed's instead of patches from now on,
  due to the bundling/CFLAGS insanity of upstream.

Bug: https://bugs.gentoo.org/show_bug.cgi?id=612120
Bug: https://bugs.gentoo.org/show_bug.cgi?id=618380
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 games-emulation/mednafen/Manifest               |   1 +
 games-emulation/mednafen/mednafen-0.9.45.ebuild | 109 ++++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/games-emulation/mednafen/Manifest b/games-emulation/mednafen/Manifest
index 4fa53d1142b..741027eccbc 100644
--- a/games-emulation/mednafen/Manifest
+++ b/games-emulation/mednafen/Manifest
@@ -1 +1,2 @@
 DIST mednafen-0.9.41.tar.xz 3148348 SHA256 74736b9b52a7ba6270b67ae8e6c876a887e0e26a00a7d96bdd49af17992aac47 SHA512 d3c7707874eabbec41e5b725813d16e599f3ad89ecbd9c8e1264184d74ab2bf7a21a3f6fe177b6bc429f7bd56f9eea17a9a6fefce8e70b82e87a93d75f5d39c9 WHIRLPOOL f754a45f46a5cd18117b1b710dd7fed5ebcfb311bf4ed4b7961c99636c13559db75f83cf7b34122fb403b7794ddeec6af79469bb7743cb60a7840ffe807fa2d7
+DIST mednafen-0.9.45.tar.xz 3184340 SHA256 49715544a5eb7a678f7f01994f38aa14e2192f00d201684184665665073a600e SHA512 d2d61eef0a5ab2c3109fb3c4fbdb2509504c61ffaab14a51e413204f08a622e47c116c7333866a3406a1fa7ac4bf68349c0212bc9fcb544d4953898b03a2fb71 WHIRLPOOL 3e8466852d8c04207a307ac2d74c5d9b76b51d0f9cd2c0ae16f59d57ae884dec8fd8d62454996c574f25a530ac568f7a2c884657b2f6b85d0810dc1fb51ad9e0

diff --git a/games-emulation/mednafen/mednafen-0.9.45.ebuild b/games-emulation/mednafen/mednafen-0.9.45.ebuild
new file mode 100644
index 00000000000..0c89b4e3892
--- /dev/null
+++ b/games-emulation/mednafen/mednafen-0.9.45.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic pax-utils
+
+DESCRIPTION="Argument-driven multi-system emulator utilizing OpenGL and SDL"
+HOMEPAGE="https://mednafen.github.io/"
+SRC_URI="https://mednafen.github.io/releases/files/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="alsa altivec cjk debugger jack nls pax_kernel"
+
+RDEPEND="
+	dev-libs/libcdio
+	dev-libs/lzo
+	media-libs/libsdl[sound,joystick,opengl,video]
+	media-libs/libsndfile
+	sys-libs/zlib[minizip]
+	virtual/opengl
+	alsa? ( media-libs/alsa-lib )
+	jack? ( media-sound/jack-audio-connection-kit )
+	nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}
+
+pkg_pretend() {
+	if has ccache ${FEATURES}; then
+		ewarn
+		ewarn "If you experience build failure, try turning off ccache in FEATURES."
+		ewarn
+	fi
+}
+
+src_prepare() {
+	default
+
+	# Unfortunately, upstream is insane and thinks mucking with CFLAGS is okay, if
+	# it prevents "users who don't understand the consequences of what they're doing".
+	# We use sed's here, as they're more forward-compatible than patches which need to
+	# be constantly rebased. DO NOT REPLACE THEM UNLESS YOU HAVE PERMISSION FROM GAMES.
+	sed -e '/-fno-fast-math/d' \
+		-e '/-fno-unsafe-math-optimizations/d' \
+		-e '/-fno-aggressive-loop-optimizations/d' \
+		-e '/-fno-ipa-icf/d' \
+		-e '/-fno-printf-return-value/d' \
+		-e '/-fomit-frame-pointer/d' \
+		-e '/-fno-pic/d' \
+		-e '/-fno-pie/d' \
+		-e '/-fno-PIC/d' \
+		-e '/-fno-PIE/d' \
+		-e '/-nopie/d' \
+		-e '/-no-pie/d' \
+		-e '/-fno-stack-protector/d' \
+		-e '/-fno-stack-protector-all/d' \
+		-e '/-fno-stack-protector-strong/d' \
+		-e '/-mtune=haswell/d' \
+		-i configure.ac || die
+
+	# Furthermore, upstream is also insane about bundling libraries and considers it
+	# "an aesthetics issue" and is even unwilling to make unbundling optional.
+	# Libs to unbundle: minilzo, minizip
+	sed -e '/PKG_PROG_PKG_CONFIG/a PKG_CHECK_MODULES([LZO], [lzo2])' \
+		-i configure.ac || die
+	sed -e '/bin_PROGRAMS/a mednafen_CPPFLAGS = \$(LZO_CFLAGS)' \
+		-i src/Makefile.am || die
+	sed -e 's:"compress/minilzo.h":<lzo1x.h>:' \
+		-i src/{mednafen,qtrecord}.cpp || die
+	sed -e 's:compress/ioapi.c::' \
+		-e 's:compress/unzip.c::' \
+		-e 's:compress/minilzo.c::' \
+		-i src/compress/Makefile.am.inc || die
+	sed -e 's:"compress/unzip.h":<minizip/unzip.h>:' \
+		-i src/file.cpp || die
+	sed -e 's:\(mednafen_LDADD.*trio/libtrio\.a\):\1 -lminizip \$(LZO_LIBS):' \
+		-i src/Makefile.am || die
+	# delete bundled files just to be sure...
+	rm src/compress/{ioapi.?,*lzo*,unzip.?} || die
+
+	eautoreconf
+}
+
+src_configure() {
+	# very sensitive code (bug #539992)
+	strip-flags
+	append-flags -fomit-frame-pointer -fwrapv
+	econf \
+		$(use_enable alsa) \
+		$(use_enable altivec) \
+		$(use_enable cjk cjk-fonts) \
+		$(use_enable debugger) \
+		$(use_enable jack) \
+		$(use_enable nls)
+}
+
+src_install() {
+	default
+	dodoc Documentation/cheats.txt
+
+	if use pax_kernel; then
+		pax-mark m "${ED%/}"/usr/bin/mednafen || die
+	fi
+}


             reply	other threads:[~2017-06-05 20:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 20:19 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-12 20:25 [gentoo-commits] repo/gentoo:master commit in: games-emulation/mednafen/ Ionen Wolkens
2024-04-26 21:01 Sam James
2024-04-06 20:20 Ionen Wolkens
2022-11-29  6:58 Jakov Smolić
2022-02-16  6:58 Ionen Wolkens
2022-01-19 16:45 Ionen Wolkens
2021-06-23  2:24 Ionen Wolkens
2021-06-15 21:34 Ionen Wolkens
2021-06-02 10:56 Ionen Wolkens
2021-05-09  4:42 Sam James
2019-10-28 21:38 James Le Cuirot
2017-08-13 12:36 David Seifert
2017-06-11 21:44 David Seifert
2017-01-22 15:01 Agostino Sarubbo
2017-01-22 14:53 Agostino Sarubbo
2016-02-01  8:14 Agostino Sarubbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496693955.4a6b55e5b46db4487b418e68800ecf20ccbdae17.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox