mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
games-emulation/advancemame: Bump to 5.0, EAPI 8, SDL now optional
Closes: https://bugs.gentoo.org/944042 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST advancemame-3.9.tar.gz 27287755 BLAKE2B 020a10a9b9fa207a733747273e749b4d9adabbd50104ae10b1568144bcdcb3694fe19e4ca5fd31119a02c64bca9872b1b3d1eb3ce305a611f006a8168f5bcb89 SHA512 43f9ba746f222b17ade2d213d6af7cc8fe6b3ee6008633f02b8877f4c7f75628bdf1cc9718db09f5f9a482d194c8ba94f9047334e8012d23c598454e5dab2eb3
|
||||
DIST advancemame-5.0.tar.gz 27668230 BLAKE2B cd057514f2d85e30a9c911051201d55a31e600b89fba5a602f2cb0125ae3c23cf6c2dea00dc0b3b9a9fb9412d928452337a89c27f82e9b14f5e9e7cb2c4c9fb6 SHA512 5b10b4a0a0a66ad87c50ef0201d5d79dd36c65bf99be57986ac6049cfa0225a8c247b23a0f1eb49884871ce6c9ceb3bcf13af242bcf59c68371b84f365b4b83e
|
||||
|
||||
108
games-emulation/advancemame/advancemame-5.0.ebuild
Normal file
108
games-emulation/advancemame/advancemame-5.0.ebuild
Normal file
@@ -0,0 +1,108 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="GNU/Linux port of the MAME emulator with GUI menu"
|
||||
HOMEPAGE="https://www.advancemame.it/"
|
||||
SRC_URI="https://github.com/amadvance/advancemame/releases/download/v${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 XMAME"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
IUSE="alsa fbcon ncurses openmp oss +sdl slang truetype"
|
||||
|
||||
REQUIRED_USE="
|
||||
|| ( fbcon sdl )
|
||||
|| ( alsa oss sdl )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/expat
|
||||
sys-libs/zlib
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
ncurses? ( sys-libs/ncurses:= )
|
||||
sdl? ( media-libs/libsdl2[video] )
|
||||
slang? ( sys-libs/slang )
|
||||
truetype? ( media-libs/freetype:2 )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
dev-build/autoconf-archive
|
||||
virtual/pkgconfig
|
||||
x86? ( >=dev-lang/nasm-0.98 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-pic.patch
|
||||
"${FILESDIR}"/${PN}-verboselog.patch
|
||||
"${FILESDIR}"/${P}-docdir.patch
|
||||
)
|
||||
|
||||
check_openmp() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
check_openmp
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
check_openmp
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# AC_CHECK_CC_OPT is obsolete, superseded by AX_CHECK_COMPILE_FLAG
|
||||
sed -i -e 's/AC_CHECK_CC_OPT/AX_CHECK_COMPILE_FLAG/' configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# https://bugs.gentoo.org/858626
|
||||
#
|
||||
# From upstream configure.ac, only enabled if CFLAGS is not set:
|
||||
# - Code was written when compilers were not aggressively optimizing undefined behaviour about aliasing
|
||||
# - Code was written when compilers were not aggressively optimizing undefined behaviour about overflow in signed integers
|
||||
# - Code was written on Intel where char is signed
|
||||
#
|
||||
# Do not trust with LTO either, BTW
|
||||
append-flags -fno-strict-aliasing -fno-strict-overflow -fsigned-char
|
||||
filter-lto
|
||||
|
||||
# Fix for bug #78030
|
||||
use ppc && append-ldflags "-Wl,--relax"
|
||||
|
||||
ac_cv_prog_ASM=nasm \
|
||||
econf \
|
||||
--enable-expat \
|
||||
--disable-sdl \
|
||||
--enable-zlib \
|
||||
--disable-svgalib \
|
||||
$(use_enable alsa) \
|
||||
$(use_enable fbcon fb) \
|
||||
$(use_enable ncurses) \
|
||||
$(use_enable openmp) \
|
||||
$(use_enable oss) \
|
||||
$(use_enable sdl sdl2) \
|
||||
$(use_enable slang) \
|
||||
$(use_enable truetype freetype) \
|
||||
$(use_enable x86 asm)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
VERSION="${PV}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 install \
|
||||
VERSION="${PV}" \
|
||||
DESTDIR="${D}"
|
||||
}
|
||||
212
games-emulation/advancemame/files/advancemame-5.0-docdir.patch
Normal file
212
games-emulation/advancemame/files/advancemame-5.0-docdir.patch
Normal file
@@ -0,0 +1,212 @@
|
||||
From 0bed080cd873dc42100bcfcb4ea2764445c0485d Mon Sep 17 00:00:00 2001
|
||||
From: James Le Cuirot <chewi@gentoo.org>
|
||||
Date: Sat, 25 Apr 2020 11:16:01 +0100
|
||||
Subject: [PATCH 1/2] Use docdir the standard way so that it can be overridden
|
||||
with --docdir
|
||||
|
||||
The default is determined by the 4th argument (PACKAGE_TARBALL) to
|
||||
AC_INIT, which itself defaults to the 1st argument (PACKAGE_NAME). That
|
||||
would currently name the docdir `advancemame` rather than the desired
|
||||
`advance`. Rather than change the 1st argument, set the 4th argument so
|
||||
that only the docdir is affected. These variables/macros are not really
|
||||
used elsewhere anyway.
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -5,6 +5,7 @@
|
||||
# configuration edit the Makefile.usr file and NOT this file.
|
||||
#
|
||||
|
||||
+PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||
VERSION=@PACKAGE_VERSION@
|
||||
prefix=@prefix@
|
||||
datadir=@datadir@
|
||||
--- a/Makefile.usr
|
||||
+++ b/Makefile.usr
|
||||
@@ -238,8 +238,8 @@ srcdir=.
|
||||
datadir=${prefix}/share
|
||||
sysconfdir=${prefix}/etc
|
||||
bindir=${prefix}/bin
|
||||
-mandir=${prefix}/man
|
||||
-docdir=${prefix}/share/doc
|
||||
+mandir=${datadir}/man
|
||||
+docdir=${datadir}/doc/advance
|
||||
|
||||
#############################################################################
|
||||
# Extra configuration common for ./configure and manual
|
||||
--- a/advance/advance.mak
|
||||
+++ b/advance/advance.mak
|
||||
@@ -374,12 +374,11 @@ CONF_SRC = \
|
||||
# Install
|
||||
|
||||
pkgdir = $(datadir)/advance
|
||||
-pkgdocdir = $(docdir)/advance
|
||||
|
||||
install-dirs:
|
||||
-$(INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)
|
||||
- -$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdocdir)
|
||||
+ -$(INSTALL_DATA_DIR) $(DESTDIR)$(docdir)
|
||||
-$(INSTALL_MAN_DIR) $(DESTDIR)$(mandir)/man1
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/rom
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/sample
|
||||
@@ -464,15 +463,15 @@ uninstall-bin:
|
||||
install-doc: $(INSTALL_DOCFILES)
|
||||
ifdef INSTALL_DOCFILES
|
||||
@for i in $(INSTALL_DOCFILES); do \
|
||||
- echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdocdir)"; \
|
||||
- $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdocdir); \
|
||||
+ echo "$(INSTALL_DATA) $$i $(DESTDIR)$(docdir)"; \
|
||||
+ $(INSTALL_DATA) $$i $(DESTDIR)$(docdir); \
|
||||
done
|
||||
endif
|
||||
|
||||
uninstall-doc:
|
||||
ifdef INSTALL_DOCFILES
|
||||
@for i in $(notdir $(INSTALL_DOCFILES)); do \
|
||||
- rm -f $(DESTDIR)$(pkgdocdir)/$$i; \
|
||||
+ rm -f $(DESTDIR)$(docdir)/$$i; \
|
||||
done
|
||||
endif
|
||||
|
||||
@@ -501,7 +500,7 @@ uninstall-dirs:
|
||||
-rmdir $(DESTDIR)$(pkgdir)/snap/ti99_4a
|
||||
-rmdir $(DESTDIR)$(pkgdir)/snap
|
||||
-rmdir $(DESTDIR)$(pkgdir)
|
||||
- -rmdir $(DESTDIR)$(pkgdocdir)
|
||||
+ -rmdir $(DESTDIR)$(docdir)
|
||||
|
||||
install: install-dirs install-bin install-data install-doc install-man
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.69])
|
||||
dnl Get version number from git
|
||||
m4_define([git_revision], m4_esyscmd_s([./autover.sh]))
|
||||
-AC_INIT([advancemame],[git_revision],[],[],[http://www.advancemame.it])
|
||||
+AC_INIT([advancemame],[git_revision],[],[advance],[http://www.advancemame.it])
|
||||
AC_CONFIG_SRCDIR([advance/advance.mak])
|
||||
AC_CONFIG_HEADERS([advance/lib/config.h:advance/lib/config.hin])
|
||||
AC_CANONICAL_HOST
|
||||
@@ -1233,8 +1233,6 @@ AC_SUBST([CONF_LIB_JEVENT],[$ac_lib_jevent])
|
||||
|
||||
dnl Final
|
||||
AC_SUBST([CONF_LIB_DIRECT],[$ac_lib_direct_flag])
|
||||
-AC_SUBST([mandir],['${prefix}/man'])
|
||||
-AC_SUBST([docdir],['${prefix}/doc'])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
|
||||
From 0baa0af9e3daf8aed0accd8b5311255249c55dba Mon Sep 17 00:00:00 2001
|
||||
From: James Le Cuirot <chewi@gentoo.org>
|
||||
Date: Sat, 25 Apr 2020 11:52:13 +0100
|
||||
Subject: [PATCH 2/2] Install *.html files to a separate htmldir rather than
|
||||
docdir
|
||||
|
||||
Autoconf already sets up htmldir for you. It defaults to the same as
|
||||
docdir but some distributions set it differently.
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -15,6 +15,7 @@ exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
mandir=@mandir@
|
||||
docdir=@docdir@
|
||||
+htmldir=@htmldir@
|
||||
CONF_SYSTEM=@CONF_SYSTEM@
|
||||
CONF_HOST=@CONF_HOST@
|
||||
CONF_BUILD=@CONF_BUILD@
|
||||
--- a/Makefile.usr
|
||||
+++ b/Makefile.usr
|
||||
@@ -240,6 +240,7 @@ sysconfdir=${prefix}/etc
|
||||
bindir=${prefix}/bin
|
||||
mandir=${datadir}/man
|
||||
docdir=${datadir}/doc/advance
|
||||
+htmldir=${docdir}
|
||||
|
||||
#############################################################################
|
||||
# Extra configuration common for ./configure and manual
|
||||
--- a/advance/advance.mak
|
||||
+++ b/advance/advance.mak
|
||||
@@ -153,7 +153,7 @@ endif
|
||||
endif
|
||||
|
||||
INSTALL_DOCFILES += $(subst $(srcdir)/doc/,$(DOCOBJ)/,$(subst .d,.txt,$(wildcard $(srcdir)/doc/*.d)))
|
||||
-INSTALL_DOCFILES += $(subst $(srcdir)/doc/,$(DOCOBJ)/,$(subst .d,.html,$(wildcard $(srcdir)/doc/*.d)))
|
||||
+INSTALL_HTMLFILES += $(subst $(srcdir)/doc/,$(DOCOBJ)/,$(subst .d,.html,$(wildcard $(srcdir)/doc/*.d)))
|
||||
WEB_DOCFILES += $(subst $(srcdir)/doc/,$(DOCOBJ)/,$(subst .d,.hh,$(wildcard $(srcdir)/doc/*.d)))
|
||||
|
||||
############################################################################
|
||||
@@ -163,7 +163,7 @@ ifdef ADV_ALL
|
||||
all_override: $(ADV_ALL)
|
||||
endif
|
||||
|
||||
-all: $(OBJ_DIRS) $(INSTALL_BINFILES) $(INSTALL_DOCFILES) $(INSTALL_MANFILES)
|
||||
+all: $(OBJ_DIRS) $(INSTALL_BINFILES) $(INSTALL_DOCFILES) $(INSTALL_HTMLFILES) $(INSTALL_MANFILES)
|
||||
mame: $(OBJ) $(OBJ)/advmame$(EXE)
|
||||
mess: $(MESSOBJ) $(MESSOBJ)/advmess$(EXE)
|
||||
emu: mame mess
|
||||
@@ -183,7 +183,7 @@ web: $(WEB_DOCFILES)
|
||||
# Ensure that the doc target is always created also if a doc directory exists
|
||||
.PHONY: doc
|
||||
|
||||
-doc: $(INSTALL_DOCFILES)
|
||||
+doc: $(INSTALL_DOCFILES) $(INSTALL_HTMLFILES)
|
||||
|
||||
############################################################################
|
||||
# Source
|
||||
@@ -379,6 +379,7 @@ install-dirs:
|
||||
-$(INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(docdir)
|
||||
+ -$(INSTALL_DATA_DIR) $(DESTDIR)$(htmldir)
|
||||
-$(INSTALL_MAN_DIR) $(DESTDIR)$(mandir)/man1
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/rom
|
||||
-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/sample
|
||||
@@ -460,13 +461,19 @@ uninstall-bin:
|
||||
rm -f $(DESTDIR)$(bindir)/$$i; \
|
||||
done
|
||||
|
||||
-install-doc: $(INSTALL_DOCFILES)
|
||||
+install-doc: $(INSTALL_DOCFILES) $(INSTALL_HTMLFILES)
|
||||
ifdef INSTALL_DOCFILES
|
||||
@for i in $(INSTALL_DOCFILES); do \
|
||||
echo "$(INSTALL_DATA) $$i $(DESTDIR)$(docdir)"; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(docdir); \
|
||||
done
|
||||
endif
|
||||
+ifdef INSTALL_HTMLFILES
|
||||
+ @for i in $(INSTALL_HTMLFILES); do \
|
||||
+ echo "$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)"; \
|
||||
+ $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir); \
|
||||
+ done
|
||||
+endif
|
||||
|
||||
uninstall-doc:
|
||||
ifdef INSTALL_DOCFILES
|
||||
@@ -474,6 +481,11 @@ ifdef INSTALL_DOCFILES
|
||||
rm -f $(DESTDIR)$(docdir)/$$i; \
|
||||
done
|
||||
endif
|
||||
+ifdef INSTALL_HTMLFILES
|
||||
+ @for i in $(notdir $(INSTALL_HTMLFILES)); do \
|
||||
+ rm -f $(DESTDIR)$(htmldir)/$$i; \
|
||||
+ done
|
||||
+endif
|
||||
|
||||
install-man: $(INSTALL_MANFILES)
|
||||
ifdef INSTALL_MANFILES
|
||||
@@ -500,6 +512,7 @@ uninstall-dirs:
|
||||
-rmdir $(DESTDIR)$(pkgdir)/snap/ti99_4a
|
||||
-rmdir $(DESTDIR)$(pkgdir)/snap
|
||||
-rmdir $(DESTDIR)$(pkgdir)
|
||||
+ -rmdir $(DESTDIR)$(htmldir)
|
||||
-rmdir $(DESTDIR)$(docdir)
|
||||
|
||||
install: install-dirs install-bin install-data install-doc install-man
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
limitations you can anyway choice from different types of stretch.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">amadvance/advancemame</remote-id>
|
||||
<remote-id type="sourceforge">advancemame</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
Reference in New Issue
Block a user