commit:     6470e98608038f2d859c90bb7d14e4434e79b30f
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 20:01:39 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 20:13:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6470e986

games-emulation/mednafen: add 1.32.1

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-emulation/mednafen/Manifest               |  1 +
 games-emulation/mednafen/mednafen-1.32.1.ebuild | 82 +++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/games-emulation/mednafen/Manifest 
b/games-emulation/mednafen/Manifest
index d8520a59a041..7952500722a8 100644
--- a/games-emulation/mednafen/Manifest
+++ b/games-emulation/mednafen/Manifest
@@ -1 +1,2 @@
 DIST mednafen-1.29.0.tar.xz 3512784 BLAKE2B 
bea5ecfe00f97d1cf81eccfe4264d8fea666c9c8543449ca8c1e4e064f89a100f6bbe77b23d42d5d9c4a7e005792006d599852a201f1d95a756742bc58ecda81
 SHA512 
375f0fb4f12907faf56b4e9ecdc44c1655b0660a3773240fe3118f2b261e171479b8eb254299f899fc442b54041c941eab2a5f343aec559d9731c3e92cde0569
+DIST mednafen-1.32.1.tar.xz 3571236 BLAKE2B 
1cbc184b180c51ebfbdc5e9979f1767a19c4125b0c0067f74f3b8800cccc4b04c577e4602143049e0a85628a8b50c9c69a52134838a15a9dd6d1ab293b5e5715
 SHA512 
5a99c62561823ba9a59d4dfd3b454f87989c83b873f61d8d25e44af7e8fbf25a7513d26c7566672538a62aac400281f611f2db943e88fe839cd05d088087f8d9

diff --git a/games-emulation/mednafen/mednafen-1.32.1.ebuild 
b/games-emulation/mednafen/mednafen-1.32.1.ebuild
new file mode 100644
index 000000000000..779c7413188c
--- /dev/null
+++ b/games-emulation/mednafen/mednafen-1.32.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic pax-utils toolchain-funcs
+
+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";
+S=${WORKDIR}/${PN}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa cpu_flags_ppc_altivec flac jack"
+
+RDEPEND="
+       app-arch/zstd:=
+       dev-libs/lzo:2
+       dev-libs/trio
+       media-libs/libsdl2[joystick,opengl,video]
+       media-libs/tremor
+       media-sound/musepack-tools
+       sys-libs/zlib:=[minizip]
+       virtual/libintl
+       alsa? ( media-libs/alsa-lib )
+       flac? ( media-libs/flac:= )
+       jack? ( virtual/jack )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-devel/gettext
+       virtual/pkgconfig
+"
+
+src_prepare() {
+       default
+
+       # do not let the build system mess with *FLAGS more than necessary,
+       # most are questionable and leaving it up to users to pick
+       # (please report if any skipped flags cause runtime issues)
+       sed -e '/APPEND_COMPILE_.*CODEGEN_FLAGS/d' \
+               -e '/APPEND_COMPILE_.*NOPICPIE_FLAGS/d' \
+               -e '/APPEND_COMPILE_.*NO_STACK_PROTECTOR_FLAGS/d' \
+               -e '/APPEND_COMPILE_.*OPTIMIZER_FLAGS/c\:' \
+               -e '/APPEND_COMPILE_.*-mtune.*SS_EXTRA_FLAGS/d' \
+               -e '/LINK_FLAG.*NOPICPIE_LDFLAGS/d' \
+               -i configure.ac || die
+       eautoreconf
+}
+
+src_configure() {
+       # disable unnecessary warnings not to confuse users (see src/types.h)
+       append-cppflags -DMDFN_DISABLE_{NO_OPT,PICPIE}_ERRWARN
+
+       local myeconfargs=(
+               $(use_enable alsa)
+               $(use_enable cpu_flags_ppc_altivec altivec)
+               $(use_enable jack)
+               $(use_with flac libflac)
+               --with-external-{libzstd,lzo,mpcdec,tremor,trio}
+       )
+
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       emake AR="$(tc-getAR)"
+}
+
+src_install() {
+       local DOCS=(
+               ChangeLog
+               
Documentation/{cheats.txt,fname_format.txt,modules.def,settings.def}
+       )
+       local HTML_DOCS=( Documentation/*.{css,html,png} )
+
+       default
+
+       pax-mark m "${ED}"/usr/bin/mednafen
+}

Reply via email to