public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/advancemame/files/, games-emulation/advancemame/
@ 2018-05-09  5:53 Lars Wendler
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2018-05-09  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     9b025698b3eaa01d5c717e5c9e2a9a1e202d6358
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed May  9 05:53:08 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed May  9 05:53:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b025698

games-emulation/advancemame: Use pkg-config to find freetype and sdl

Closes: https://bugs.gentoo.org/655040
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 games-emulation/advancemame/Manifest               |  1 +
 games-emulation/advancemame/advancemame-3.7.ebuild | 22 ++++--
 ...advancemame-3.7-move_aclocal_to_acinclude.patch | 78 ++++++++++++++++++++++
 ...cemame-3.7-remove_static_configure_option.patch | 41 ++++++++++++
 4 files changed, 136 insertions(+), 6 deletions(-)

diff --git a/games-emulation/advancemame/Manifest b/games-emulation/advancemame/Manifest
index 5c414d0ed64..43195af9296 100644
--- a/games-emulation/advancemame/Manifest
+++ b/games-emulation/advancemame/Manifest
@@ -1 +1,2 @@
+DIST advancemame-3.7-use_pkgconfig_for_freetype_and_sdl.patch 21144 BLAKE2B ba374d664db45f938d3b054820868b5aaa63a7461938f5e8a320dc607ef3444c8fc5f87cdd3ef9db130c1048ef9e75afed4f856997f048bcb44eb99d3bcbaefc SHA512 80136d71117329997846fe0f03a3cf3439ee8ff3db649f50a3008595ed2d82cd0e3dcd9c6908edf30e19d516943eeed129eb994a6326effaf94a7eaa5d1b8fa2
 DIST advancemame-3.7.tar.gz 25616260 BLAKE2B 455004ff7ce3f7517c6b06767e9d1656bff6b93f822d363cbd42738e0f9ba988c243f600db5f20e24897c27faaf5c458072e2bc9c97cf92803f76299cf3010b8 SHA512 b5af59cdd3cf70dfae0769ed35eb6ce00a6f01d05eefcb687f322420faa2ee5aabf83394249c2ab7f7f1241d3fd09c2f0412666b2dbd27b91e7bc3622f925f74

diff --git a/games-emulation/advancemame/advancemame-3.7.ebuild b/games-emulation/advancemame/advancemame-3.7.ebuild
index 37773715f8e..c371c14107c 100644
--- a/games-emulation/advancemame/advancemame-3.7.ebuild
+++ b/games-emulation/advancemame/advancemame-3.7.ebuild
@@ -2,12 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit flag-o-matic
+inherit autotools flag-o-matic
 
 DESCRIPTION="GNU/Linux port of the MAME emulator with GUI menu"
 HOMEPAGE="http://www.advancemame.it/"
 SRC_URI="https://github.com/amadvance/advancemame/releases/download/v${PV}/${P}.tar.gz"
 
+# Fetch too big upstream patch
+SRC_URI+=" https://github.com/amadvance/advancemame/commit/70f099ac49786a287ebd3949ce8f8670a5731abd.patch -> ${PN}-3.7-use_pkgconfig_for_freetype_and_sdl.patch"
+
 LICENSE="GPL-2 XMAME"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
@@ -25,20 +28,28 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}
 	virtual/os-headers
+	virtual/pkgconfig
 	x86? ( >=dev-lang/nasm-0.98 )
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-1.2-pic.patch"
+	"${FILESDIR}"/${PN}-1.2-verboselog.patch
+
+	# Patches from upstream
+	"${FILESDIR}/${P}-move_aclocal_to_acinclude.patch"
+	"${DISTDIR}/${P}-use_pkgconfig_for_freetype_and_sdl.patch"
+	"${FILESDIR}/${P}-remove_static_configure_option.patch"
+)
+
 src_prepare() {
 	default
-
-	eapply "${FILESDIR}/${PN}-1.2-pic.patch" \
-		"${FILESDIR}"/${PN}-1.2-verboselog.patch
+	eautoreconf
 
 	sed -i -e 's/"-s"//' configure || die
 
 	use x86 && ln -s $(type -P nasm) "${T}/${CHOST}-nasm"
 	ln -s $(type -P sdl2-config) "${T}/${CHOST}-sdl2-config"
-	use truetype && ln -s $(type -P freetype-config) "${T}/${CHOST}-freetype-config"
 }
 
 src_configure() {
@@ -55,7 +66,6 @@ src_configure() {
 		--enable-zlib \
 		--disable-slang \
 		--disable-svgalib \
-		--disable-static \
 		$(use_enable alsa) \
 		$(use_enable fbcon fb) \
 		$(use_enable oss) \

diff --git a/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch b/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch
new file mode 100644
index 00000000000..4a30e179ae2
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch
@@ -0,0 +1,78 @@
+From b0edfe1e5bb1a705fad539e5ab1c299d38dcf9d4 Mon Sep 17 00:00:00 2001
+From: Andrea Mazzoleni <amadvance@gmail.com>
+Date: Tue, 8 May 2018 18:55:39 +0200
+Subject: [PATCH 1/3] Use acinclude instead of aclocal
+
+aclocal.m4 is generated automatically, and we don't have to lose the content.
+---
+ acinclude.m4 | 20 ++++++++++++++++++++
+ aclocal.m4   | 29 ++++++++++++-----------------
+ 2 files changed, 32 insertions(+), 17 deletions(-)
+ create mode 100644 acinclude.m4
+
+diff --git a/acinclude.m4 b/acinclude.m4
+new file mode 100644
+index 00000000..ceed823a
+--- /dev/null
++++ b/acinclude.m4
+@@ -0,0 +1,20 @@
++dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
++dnl 
++dnl Shows a message as like "checking wether gcc accepts flag ... no"
++dnl and executess ifyes or ifno.
++
++AC_DEFUN([AC_CHECK_CC_OPT],
++[
++AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
++echo 'void f(){}' > conftest.c
++if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then
++  AC_MSG_RESULT([yes])
++  $2
++else
++  AC_MSG_RESULT([no])
++  $3
++fi
++rm -f conftest*
++])
++
++
+diff --git a/aclocal.m4 b/aclocal.m4
+index d6e7b527..56e944be 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1,20 +1,15 @@
+-dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
+-dnl 
+-dnl Shows a message as like "checking wether gcc accepts flag ... no"
+-dnl and executess ifyes or ifno.
++# generated automatically by aclocal 1.15 -*- Autoconf -*-
+ 
+-AC_DEFUN(AC_CHECK_CC_OPT,
+-[
+-AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
+-echo 'void f(){}' > conftest.c
+-if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then
+-  AC_MSG_RESULT([yes])
+-  $2
+-else
+-  AC_MSG_RESULT([no])
+-  $3
+-fi
+-rm -f conftest*
+-])
++# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ 
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
+ 
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
++m4_include([acinclude.m4])
+-- 
+2.17.0
+

diff --git a/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch b/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch
new file mode 100644
index 00000000000..342ba1c5c07
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch
@@ -0,0 +1,41 @@
+From 890af36a3939f0978af779caa878ddeb44183d8d Mon Sep 17 00:00:00 2001
+From: Andrea Mazzoleni <amadvance@gmail.com>
+Date: Tue, 8 May 2018 19:32:44 +0200
+Subject: [PATCH 3/3] Remove the --enable-static configure option
+
+I doubt it still work and it doesn't make sense anymore.
+---
+ configure.ac | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4e609993..1c94e037 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -139,13 +139,6 @@ AC_ARG_ENABLE(
+ )
+ AC_SUBST([CONF_DEBUG],[$ac_enable_debug])
+ 
+-AC_ARG_ENABLE(
+-	[static],
+-	AC_HELP_STRING([--enable-static],[enable static compilation. (default no)]),
+-	[ac_enable_static=$enableval],
+-	[ac_enable_static=no]
+-)
+-
+ AC_ARG_ENABLE(
+ 	[bare],
+ 	AC_HELP_STRING([--enable-bare],[enable compilation without drivers. (default no)]),
+@@ -232,9 +225,6 @@ if test $ac_auto_ldflags = yes ; then
+ 	else
+ 		LDFLAGS="-s"
+ 	fi
+-	if test $ac_enable_static = yes ; then
+-		LDFLAGS="-static $LDFLAGS"
+-	fi
+ 	if test ! -z $ac_host_ldflags; then
+ 		LDFLAGS="$ac_host_ldflags $LDFLAGS"
+ 	fi
+-- 
+2.17.0
+


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/advancemame/files/, games-emulation/advancemame/
@ 2020-04-28 22:55 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2020-04-28 22:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6c3a76a2952c7aa6bdb0dccf7dcd13e3a4faf1b7
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 28 22:48:40 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 28 22:55:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c3a76a2

games-emulation/advancemame: Fix autover.sh error, improve src_install

The nasty src_install hasn't changed much since 2004 so I've sent some
long overdue patches upstream to make things better going forwards.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/advancemame/advancemame-3.9.ebuild |  36 +---
 .../files/advancemame-3.9-DESTDIR.patch            | 196 +++++++++++++++++++
 .../advancemame/files/advancemame-3.9-FHS.patch    | 212 +++++++++++++++++++++
 .../files/advancemame-3.9-blank-flags.patch        |  32 ++++
 4 files changed, 450 insertions(+), 26 deletions(-)

diff --git a/games-emulation/advancemame/advancemame-3.9.ebuild b/games-emulation/advancemame/advancemame-3.9.ebuild
index 0c69669f9ac..a0c04dabff6 100644
--- a/games-emulation/advancemame/advancemame-3.9.ebuild
+++ b/games-emulation/advancemame/advancemame-3.9.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 inherit autotools flag-o-matic
 
 DESCRIPTION="GNU/Linux port of the MAME emulator with GUI menu"
@@ -13,7 +14,6 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="alsa fbcon ncurses oss slang truetype"
 
-# sdl is required (bug #158417)
 DEPEND="
 	dev-libs/expat
 	media-libs/libsdl2[video]
@@ -39,6 +39,9 @@ PATCHES=(
 
 	# Patches from upstream
 	"${FILESDIR}"/${P}-pkgconfig_for_ncurses_and_slang.patch
+	"${FILESDIR}"/${P}-blank-flags.patch
+	"${FILESDIR}"/${P}-DESTDIR.patch
+	"${FILESDIR}"/${P}-FHS.patch
 )
 
 src_prepare() {
@@ -48,14 +51,11 @@ src_prepare() {
 	sed -i -e 's/AC_CHECK_CC_OPT/AX_CHECK_COMPILE_FLAG/' configure.ac || die
 
 	eautoreconf
-	sed -i -e 's/"-s"//' configure || die
 }
 
 src_configure() {
 	# Fix for bug #78030
-	if use ppc; then
-		append-ldflags "-Wl,--relax"
-	fi
+	use ppc && append-ldflags "-Wl,--relax"
 
 	ac_cv_prog_ASM=nasm \
 	econf \
@@ -75,28 +75,12 @@ src_configure() {
 }
 
 src_compile() {
-	STRIPPROG=true emake
+	emake \
+		VERSION="${PV}"
 }
 
 src_install() {
-	local f
-
-	for f in adv* ; do
-		if [[ -L "${f}" ]] ; then
-			dobin "${f}"
-		fi
-	done
-
-	insinto "/usr/share/advance"
-	doins support/event.dat
-	keepdir "/usr/share/advance/"{artwork,diff,image,rom,sample,snap}
-
-	dodoc HISTORY README RELEASE
-	cd doc
-	dodoc *.txt
-	HTMLDOCS="*.html" einstalldocs
-
-	for f in *.1 ; do
-		newman ${f} ${f/1/6}
-	done
+	emake install \
+		VERSION="${PV}" \
+		DESTDIR="${D}"
 }

diff --git a/games-emulation/advancemame/files/advancemame-3.9-DESTDIR.patch b/games-emulation/advancemame/files/advancemame-3.9-DESTDIR.patch
new file mode 100644
index 00000000000..755f8b45188
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.9-DESTDIR.patch
@@ -0,0 +1,196 @@
+From fca370c9f7a6dcb0a3625cc15f6d0a80182dd4b3 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 25 Apr 2020 10:56:27 +0100
+Subject: [PATCH] Support make install DESTDIR=/foo just like Automake does
+
+Distributions really need this.
+---
+ advance/advance.mak | 94 ++++++++++++++++++++++-----------------------
+ 1 file changed, 47 insertions(+), 47 deletions(-)
+
+diff --git a/advance/advance.mak b/advance/advance.mak
+index 6c4d89c..100dd23 100644
+--- a/advance/advance.mak
++++ b/advance/advance.mak
+@@ -376,131 +376,131 @@ pkgdir = $(datadir)/advance
+ pkgdocdir = $(docdir)/advance
+ 
+ install-dirs:
+-	-$(INSTALL_PROGRAM_DIR) $(bindir)
+-	-$(INSTALL_DATA_DIR) $(pkgdir)
+-	-$(INSTALL_DATA_DIR) $(pkgdocdir)
+-	-$(INSTALL_MAN_DIR) $(mandir)/man1
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/rom
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/sample
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/artwork
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/image
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/image/ti99_4a
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/crc
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/snap
+-	-$(INSTALL_DATA_DIR) $(pkgdir)/snap/ti99_4a
++	-$(INSTALL_PROGRAM_DIR) $(DESTDIR)$(bindir)
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdocdir)
++	-$(INSTALL_MAN_DIR) $(DESTDIR)$(mandir)/man1
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/rom
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/sample
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/artwork
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/image
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/image/ti99_4a
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/crc
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/snap
++	-$(INSTALL_DATA_DIR) $(DESTDIR)$(pkgdir)/snap/ti99_4a
+ 
+ install-data: $(INSTALL_DATAFILES) $(INSTALL_ROMFILES) $(INSTALL_IMAGEFILES_TI99_4A) $(INSTALL_SAMPLEFILES) $(INSTALL_SNAPFILES) $(INSTALL_SNAPFILES_TI99_4A)
+ ifdef INSTALL_DATAFILES
+ 	@for i in $(INSTALL_DATAFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)"; \
+-		$(INSTALL_DATA) $$i $(pkgdir); \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir); \
+ 	done
+ endif
+ ifdef INSTALL_ROMFILES
+ 	@for i in $(INSTALL_ROMFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)/rom"; \
+-		$(INSTALL_DATA) $$i $(pkgdir)/rom; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/rom"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/rom; \
+ 	done
+ endif
+ ifdef INSTALL_IMAGEFILES_TI99_4A
+ 	@for i in $(INSTALL_IMAGEFILES_TI99_4A); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)/image/ti99_4a"; \
+-		$(INSTALL_DATA) $$i $(pkgdir)/image/ti99_4a; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/image/ti99_4a"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/image/ti99_4a; \
+ 	done
+ endif
+ ifdef INSTALL_SAMPLEFILES
+ 	@for i in $(INSTALL_SAMPLEFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)/sample"; \
+-		$(INSTALL_DATA) $$i $(pkgdir)/sample; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/sample"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/sample; \
+ 	done
+ endif
+ ifdef INSTALL_SNAPFILES
+ 	@for i in $(INSTALL_SNAPFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)/snap"; \
+-		$(INSTALL_DATA) $$i $(pkgdir)/snap; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/snap"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/snap; \
+ 	done
+ endif
+ ifdef INSTALL_SNAPFILES_TI99_4A
+ 	@for i in $(INSTALL_SNAPFILES_TI99_4A); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdir)/snap/ti99_4a"; \
+-		$(INSTALL_DATA) $$i $(pkgdir)/snap/ti99_4a; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/snap/ti99_4a"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdir)/snap/ti99_4a; \
+ 	done
+ endif
+ 
+ uninstall-data:
+ ifdef INSTALL_DATAFILES
+ 	@for i in $(notdir $(INSTALL_DATAFILES)); do \
+-		rm -f $(pkgdir)/$$i; \
++		rm -f $(DESTDIR)$(pkgdir)/$$i; \
+ 	done
+ endif
+ ifdef INSTALL_ROMFILES
+ 	@for i in $(notdir $(INSTALL_ROMFILES)); do \
+-		rm -f $(pkgdir)/rom/$$i; \
++		rm -f $(DESTDIR)$(pkgdir)/rom/$$i; \
+ 	done
+ endif
+ ifdef INSTALL_SAMPLEFILES
+ 	@for i in $(notdir $(INSTALL_SAMPLEFILES)); do \
+-		rm -f $(pkgdir)/sample/$$i; \
++		rm -f $(DESTDIR)$(pkgdir)/sample/$$i; \
+ 	done
+ endif
+ ifdef INSTALL_SNAPFILES
+ 	@for i in $(notdir $(INSTALL_SNAPFILES)); do \
+-		rm -f $(pkgdir)/snap/$$i; \
++		rm -f $(DESTDIR)$(pkgdir)/snap/$$i; \
+ 	done
+ endif
+ 
+ install-bin: $(INSTALL_BINFILES)
+ 	@for i in $(INSTALL_BINFILES); do \
+-		echo "$(INSTALL_PROGRAM) $$i $(bindir)"; \
+-		$(INSTALL_PROGRAM) $$i $(bindir); \
++		echo "$(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)"; \
++		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir); \
+ 	done
+ 
+ uninstall-bin:
+ 	@for i in $(notdir $(INSTALL_BINFILES)); do \
+-		rm -f $(bindir)/$$i; \
++		rm -f $(DESTDIR)$(bindir)/$$i; \
+ 	done
+ 
+ install-doc: $(INSTALL_DOCFILES)
+ ifdef INSTALL_DOCFILES
+ 	@for i in $(INSTALL_DOCFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(pkgdocdir)"; \
+-		$(INSTALL_DATA) $$i $(pkgdocdir); \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdocdir)"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdocdir); \
+ 	done
+ endif
+ 
+ uninstall-doc:
+ ifdef INSTALL_DOCFILES
+ 	@for i in $(notdir $(INSTALL_DOCFILES)); do \
+-		rm -f $(pkgdocdir)/$$i; \
++		rm -f $(DESTDIR)$(pkgdocdir)/$$i; \
+ 	done
+ endif
+ 
+ install-man: $(INSTALL_MANFILES)
+ ifdef INSTALL_MANFILES
+ 	@for i in $(INSTALL_MANFILES); do \
+-		echo "$(INSTALL_DATA) $$i $(mandir)/man1"; \
+-		$(INSTALL_DATA) $$i $(mandir)/man1; \
++		echo "$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1"; \
++		$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1; \
+ 	done
+ endif
+ 
+ uninstall-man:
+ ifdef INSTALL_MANFILES
+ 	@for i in $(notdir $(INSTALL_MANFILES)); do \
+-		rm -f $(mandir)/man1/$$i; \
++		rm -f $(DESTDIR)$(mandir)/man1/$$i; \
+ 	done
+ endif
+ 
+ uninstall-dirs:
+-	-rmdir $(pkgdir)/rom
+-	-rmdir $(pkgdir)/sample
+-	-rmdir $(pkgdir)/artwork
+-	-rmdir $(pkgdir)/image/ti99_4a
+-	-rmdir $(pkgdir)/image
+-	-rmdir $(pkgdir)/crc
+-	-rmdir $(pkgdir)/snap/ti99_4a
+-	-rmdir $(pkgdir)/snap
+-	-rmdir $(pkgdir)
+-	-rmdir $(pkgdocdir)
++	-rmdir $(DESTDIR)$(pkgdir)/rom
++	-rmdir $(DESTDIR)$(pkgdir)/sample
++	-rmdir $(DESTDIR)$(pkgdir)/artwork
++	-rmdir $(DESTDIR)$(pkgdir)/image/ti99_4a
++	-rmdir $(DESTDIR)$(pkgdir)/image
++	-rmdir $(DESTDIR)$(pkgdir)/crc
++	-rmdir $(DESTDIR)$(pkgdir)/snap/ti99_4a
++	-rmdir $(DESTDIR)$(pkgdir)/snap
++	-rmdir $(DESTDIR)$(pkgdir)
++	-rmdir $(DESTDIR)$(pkgdocdir)
+ 
+ install: install-dirs install-bin install-data install-doc install-man
+ 
+-- 
+2.26.0
+

diff --git a/games-emulation/advancemame/files/advancemame-3.9-FHS.patch b/games-emulation/advancemame/files/advancemame-3.9-FHS.patch
new file mode 100644
index 00000000000..312e895b8fd
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.9-FHS.patch
@@ -0,0 +1,212 @@
+From 6d8c1dc720b09fb9c6ff6edb273ad2a2ea31d768 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 /usr/share/man and /usr/share/doc and not /usr/man
+ and /usr/doc
+
+This has been mandated by the Filesystem Hierarchy Standard since 2.0
+in 1997. Autoconf actually does the right thing by default.
+---
+ Makefile.usr        |  4 ++--
+ advance/advance.mak | 11 +++++------
+ configure.ac        |  2 --
+ 3 files changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile.usr b/Makefile.usr
+index 4519857..74a4d53 100644
+--- 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/advancemame
+ 
+ #############################################################################
+ # Extra configuration common for ./configure and manual
+diff --git a/advance/advance.mak b/advance/advance.mak
+index 100dd23..8cd0444 100644
+--- a/advance/advance.mak
++++ b/advance/advance.mak
+@@ -373,12 +373,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
+@@ -463,15 +462,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
+ 
+@@ -500,7 +499,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
+ 
+diff --git a/configure.ac b/configure.ac
+index f8ba989..e54c038 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1220,8 +1220,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.26.0
+
+From e35a602a73880bf529083bee5de911e1490a27b5 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 separately htmldir rather than
+ docdir
+
+Autoconf already sets up htmldir for you. It defaults to the same as
+docdir but some distributions set it differently.
+---
+ Makefile.in         |  1 +
+ Makefile.usr        |  1 +
+ advance/advance.mak | 21 +++++++++++++++++----
+ 3 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index e92a107..86905d7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -14,6 +14,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@
+diff --git a/Makefile.usr b/Makefile.usr
+index 74a4d53..c8e7430 100644
+--- a/Makefile.usr
++++ b/Makefile.usr
+@@ -240,6 +240,7 @@ sysconfdir=${prefix}/etc
+ bindir=${prefix}/bin
+ mandir=${datadir}/man
+ docdir=${datadir}/doc/advancemame
++htmldir=${docdir}
+ 
+ #############################################################################
+ # Extra configuration common for ./configure and manual
+diff --git a/advance/advance.mak b/advance/advance.mak
+index 8cd0444..009ccd6 100644
+--- a/advance/advance.mak
++++ b/advance/advance.mak
+@@ -152,7 +152,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)))
+ 
+ ############################################################################
+@@ -162,7 +162,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
+@@ -182,7 +182,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
+@@ -378,6 +378,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
+@@ -459,13 +460,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
+@@ -473,6 +480,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
+ 	-rmdir $(DESTDIR)$(pkgdir)
+ 	-rmdir $(DESTDIR)$(docdir)
++	-rmdir $(DESTDIR)$(htmldir)
+ 
+ install: install-dirs install-bin install-data install-doc install-man
+ 
+-- 
+2.26.0
+

diff --git a/games-emulation/advancemame/files/advancemame-3.9-blank-flags.patch b/games-emulation/advancemame/files/advancemame-3.9-blank-flags.patch
new file mode 100644
index 00000000000..68cfa62f1ca
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.9-blank-flags.patch
@@ -0,0 +1,32 @@
+From f306234fbaa6bd3fbcb75ebe5e3b318a9fc1c5f0 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 25 Apr 2020 11:40:18 +0100
+Subject: [PATCH] Don't use auto CFLAGS/LDFLAGS if they are set but blank
+
+Explicitly blank flags are valid.
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f8ba989..330959c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,12 +82,12 @@ case "$build" in
+ esac
+ AC_SUBST([CONF_BUILD],[$ac_build])
+ 
+-if test -z "$CFLAGS" ; then
++if test -z "${CFLAGS+set}" ; then
+ 	ac_auto_cflags=yes
+ else
+ 	ac_auto_cflags=no
+ fi
+-if test -z "$LDFLAGS" ; then
++if test -z "${LDFLAGS+set}" ; then
+ 	ac_auto_ldflags=yes
+ else
+ 	ac_auto_ldflags=no
+-- 
+2.26.0
+


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/advancemame/files/, games-emulation/advancemame/
@ 2020-04-28 22:55 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2020-04-28 22:55 UTC (permalink / raw
  To: gentoo-commits

commit:     e6edf4db508c9d80eb285fcbff4be119ea96edfa
Author:     Alexander Barker <alex <AT> 1stleg <DOT> com>
AuthorDate: Mon Mar 30 16:12:11 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 28 22:54:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6edf4db

games-emulation/advancemame-3.9: Version Bump

Bug: https://bugs.gentoo.org/665770
Closes: https://bugs.gentoo.org/665770
Signed-off-by: Alex Barker <alex <AT> 1stleg.com>
Closes: https://github.com/gentoo/gentoo/pull/15173
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/advancemame/Manifest               |   3 +-
 ...vancemame-3.7.ebuild => advancemame-3.9.ebuild} |  40 +++--
 ...advancemame-3.7-move_aclocal_to_acinclude.patch |  78 ---------
 ...cemame-3.7-remove_static_configure_option.patch |  41 -----
 ...emame-3.9-pkgconfig_for_ncurses_and_slang.patch | 184 +++++++++++++++++++++
 ...ncemame-1.2-pic.patch => advancemame-pic.patch} |   0
 ...rboselog.patch => advancemame-verboselog.patch} |   0
 7 files changed, 207 insertions(+), 139 deletions(-)

diff --git a/games-emulation/advancemame/Manifest b/games-emulation/advancemame/Manifest
index 43195af9296..828db889759 100644
--- a/games-emulation/advancemame/Manifest
+++ b/games-emulation/advancemame/Manifest
@@ -1,2 +1 @@
-DIST advancemame-3.7-use_pkgconfig_for_freetype_and_sdl.patch 21144 BLAKE2B ba374d664db45f938d3b054820868b5aaa63a7461938f5e8a320dc607ef3444c8fc5f87cdd3ef9db130c1048ef9e75afed4f856997f048bcb44eb99d3bcbaefc SHA512 80136d71117329997846fe0f03a3cf3439ee8ff3db649f50a3008595ed2d82cd0e3dcd9c6908edf30e19d516943eeed129eb994a6326effaf94a7eaa5d1b8fa2
-DIST advancemame-3.7.tar.gz 25616260 BLAKE2B 455004ff7ce3f7517c6b06767e9d1656bff6b93f822d363cbd42738e0f9ba988c243f600db5f20e24897c27faaf5c458072e2bc9c97cf92803f76299cf3010b8 SHA512 b5af59cdd3cf70dfae0769ed35eb6ce00a6f01d05eefcb687f322420faa2ee5aabf83394249c2ab7f7f1241d3fd09c2f0412666b2dbd27b91e7bc3622f925f74
+DIST advancemame-3.9.tar.gz 27287755 BLAKE2B 020a10a9b9fa207a733747273e749b4d9adabbd50104ae10b1568144bcdcb3694fe19e4ca5fd31119a02c64bca9872b1b3d1eb3ce305a611f006a8168f5bcb89 SHA512 43f9ba746f222b17ade2d213d6af7cc8fe6b3ee6008633f02b8877f4c7f75628bdf1cc9718db09f5f9a482d194c8ba94f9047334e8012d23c598454e5dab2eb3

diff --git a/games-emulation/advancemame/advancemame-3.7.ebuild b/games-emulation/advancemame/advancemame-3.9.ebuild
similarity index 73%
rename from games-emulation/advancemame/advancemame-3.7.ebuild
rename to games-emulation/advancemame/advancemame-3.9.ebuild
index c371c14107c..08968fbd325 100644
--- a/games-emulation/advancemame/advancemame-3.7.ebuild
+++ b/games-emulation/advancemame/advancemame-3.9.ebuild
@@ -1,51 +1,53 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 inherit autotools flag-o-matic
 
 DESCRIPTION="GNU/Linux port of the MAME emulator with GUI menu"
 HOMEPAGE="http://www.advancemame.it/"
 SRC_URI="https://github.com/amadvance/advancemame/releases/download/v${PV}/${P}.tar.gz"
 
-# Fetch too big upstream patch
-SRC_URI+=" https://github.com/amadvance/advancemame/commit/70f099ac49786a287ebd3949ce8f8670a5731abd.patch -> ${PN}-3.7-use_pkgconfig_for_freetype_and_sdl.patch"
-
 LICENSE="GPL-2 XMAME"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="alsa fbcon oss truetype"
+IUSE="alsa fbcon ncurses oss slang truetype"
 
 # sdl is required (bug #158417)
-RDEPEND="
-	app-arch/unzip
-	app-arch/zip
+DEPEND="
 	dev-libs/expat
-	media-libs/libsdl2
+	media-libs/libsdl2[video]
 	sys-libs/zlib
 	alsa? ( media-libs/alsa-lib )
+	ncurses? ( sys-libs/ncurses )
+	slang? ( sys-libs/slang )
 	truetype? ( media-libs/freetype:2 )
 "
-DEPEND="${RDEPEND}
-	virtual/os-headers
+RDEPEND="
+	${DEPEND}
+	app-arch/unzip
+	app-arch/zip
+"
+BDEPEND="
 	virtual/pkgconfig
 	x86? ( >=dev-lang/nasm-0.98 )
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-1.2-pic.patch"
-	"${FILESDIR}"/${PN}-1.2-verboselog.patch
+	"${FILESDIR}"/${PN}-pic.patch
+	"${FILESDIR}"/${PN}-verboselog.patch
 
 	# Patches from upstream
-	"${FILESDIR}/${P}-move_aclocal_to_acinclude.patch"
-	"${DISTDIR}/${P}-use_pkgconfig_for_freetype_and_sdl.patch"
-	"${FILESDIR}/${P}-remove_static_configure_option.patch"
+	"${FILESDIR}"/${P}-pkgconfig_for_ncurses_and_slang.patch
 )
 
 src_prepare() {
 	default
-	eautoreconf
 
+	# 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
 	sed -i -e 's/"-s"//' configure || die
 
 	use x86 && ln -s $(type -P nasm) "${T}/${CHOST}-nasm"
@@ -68,7 +70,9 @@ src_configure() {
 		--disable-svgalib \
 		$(use_enable alsa) \
 		$(use_enable fbcon fb) \
+		$(use_enable ncurses) \
 		$(use_enable oss) \
+		$(use_enable slang) \
 		$(use_enable truetype freetype) \
 		$(use_enable x86 asm)
 }

diff --git a/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch b/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch
deleted file mode 100644
index 4a30e179ae2..00000000000
--- a/games-emulation/advancemame/files/advancemame-3.7-move_aclocal_to_acinclude.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From b0edfe1e5bb1a705fad539e5ab1c299d38dcf9d4 Mon Sep 17 00:00:00 2001
-From: Andrea Mazzoleni <amadvance@gmail.com>
-Date: Tue, 8 May 2018 18:55:39 +0200
-Subject: [PATCH 1/3] Use acinclude instead of aclocal
-
-aclocal.m4 is generated automatically, and we don't have to lose the content.
----
- acinclude.m4 | 20 ++++++++++++++++++++
- aclocal.m4   | 29 ++++++++++++-----------------
- 2 files changed, 32 insertions(+), 17 deletions(-)
- create mode 100644 acinclude.m4
-
-diff --git a/acinclude.m4 b/acinclude.m4
-new file mode 100644
-index 00000000..ceed823a
---- /dev/null
-+++ b/acinclude.m4
-@@ -0,0 +1,20 @@
-+dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
-+dnl 
-+dnl Shows a message as like "checking wether gcc accepts flag ... no"
-+dnl and executess ifyes or ifno.
-+
-+AC_DEFUN([AC_CHECK_CC_OPT],
-+[
-+AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
-+echo 'void f(){}' > conftest.c
-+if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then
-+  AC_MSG_RESULT([yes])
-+  $2
-+else
-+  AC_MSG_RESULT([no])
-+  $3
-+fi
-+rm -f conftest*
-+])
-+
-+
-diff --git a/aclocal.m4 b/aclocal.m4
-index d6e7b527..56e944be 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1,20 +1,15 @@
--dnl @synopsis AC_CHECK_CC_OPT(flag, ifyes, ifno)
--dnl 
--dnl Shows a message as like "checking wether gcc accepts flag ... no"
--dnl and executess ifyes or ifno.
-+# generated automatically by aclocal 1.15 -*- Autoconf -*-
- 
--AC_DEFUN(AC_CHECK_CC_OPT,
--[
--AC_MSG_CHECKING([whether ${CC-cc} accepts $1])
--echo 'void f(){}' > conftest.c
--if test -z "`${CC-cc} -c $1 conftest.c 2>&1`"; then
--  AC_MSG_RESULT([yes])
--  $2
--else
--  AC_MSG_RESULT([no])
--  $3
--fi
--rm -f conftest*
--])
-+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
- 
-+# This file is free software; the Free Software Foundation
-+# gives unlimited permission to copy and/or distribute it,
-+# with or without modifications, as long as this notice is preserved.
- 
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-+# PARTICULAR PURPOSE.
-+
-+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-+m4_include([acinclude.m4])
--- 
-2.17.0
-

diff --git a/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch b/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch
deleted file mode 100644
index 342ba1c5c07..00000000000
--- a/games-emulation/advancemame/files/advancemame-3.7-remove_static_configure_option.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 890af36a3939f0978af779caa878ddeb44183d8d Mon Sep 17 00:00:00 2001
-From: Andrea Mazzoleni <amadvance@gmail.com>
-Date: Tue, 8 May 2018 19:32:44 +0200
-Subject: [PATCH 3/3] Remove the --enable-static configure option
-
-I doubt it still work and it doesn't make sense anymore.
----
- configure.ac | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4e609993..1c94e037 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -139,13 +139,6 @@ AC_ARG_ENABLE(
- )
- AC_SUBST([CONF_DEBUG],[$ac_enable_debug])
- 
--AC_ARG_ENABLE(
--	[static],
--	AC_HELP_STRING([--enable-static],[enable static compilation. (default no)]),
--	[ac_enable_static=$enableval],
--	[ac_enable_static=no]
--)
--
- AC_ARG_ENABLE(
- 	[bare],
- 	AC_HELP_STRING([--enable-bare],[enable compilation without drivers. (default no)]),
-@@ -232,9 +225,6 @@ if test $ac_auto_ldflags = yes ; then
- 	else
- 		LDFLAGS="-s"
- 	fi
--	if test $ac_enable_static = yes ; then
--		LDFLAGS="-static $LDFLAGS"
--	fi
- 	if test ! -z $ac_host_ldflags; then
- 		LDFLAGS="$ac_host_ldflags $LDFLAGS"
- 	fi
--- 
-2.17.0
-

diff --git a/games-emulation/advancemame/files/advancemame-3.9-pkgconfig_for_ncurses_and_slang.patch b/games-emulation/advancemame/files/advancemame-3.9-pkgconfig_for_ncurses_and_slang.patch
new file mode 100644
index 00000000000..b91c887e030
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.9-pkgconfig_for_ncurses_and_slang.patch
@@ -0,0 +1,184 @@
+diff --git a/Makefile.in b/Makefile.in
+index 4e30ada3..e92a1072 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -27,6 +27,8 @@ CONF_LIB_ALSA=@CONF_LIB_ALSA@
+ CONF_LIB_OSS=@CONF_LIB_OSS@
+ CONF_LIB_SDL=@CONF_LIB_SDL@
+ CONF_LIB_FREETYPE=@CONF_LIB_FREETYPE@
++CONF_LIB_SLANG=@CONF_LIB_SLANG@
++CONF_LIB_NCURSES=@CONF_LIB_NCURSES@
+ CONF_LIB_SVGAWIN=@CONF_LIB_SVGAWIN@
+ CONF_LIB_PTHREAD=@CONF_LIB_PTHREAD@
+ CONF_LIB_SLANG=@CONF_LIB_SLANG@
+@@ -97,6 +99,10 @@ SDLCFLAGS=@SDLCFLAGS@
+ SDLLIBS=@SDLLIBS@
+ FREETYPECFLAGS=@FREETYPECFLAGS@
+ FREETYPELIBS=@FREETYPELIBS@
++SLANGCFLAGS=@SLANGCFLAGS@
++SLANGLIBS=@SLANGLIBS@
++NCURSESCFLAGS=@NCURSESCFLAGS@
++NCURSESLIBS=@NCURSESLIBS@
+ VCCFLAGS=@VCCFLAGS@
+ VCLIBS=@VCLIBS@
+ ASMFLAGS=@ASMFLAGS@
+diff --git a/advance/cfg.mak b/advance/cfg.mak
+index 222533ff..d2f83233 100644
+--- a/advance/cfg.mak
++++ b/advance/cfg.mak
+@@ -57,15 +57,17 @@ CFGOBJS += \
+ 	$(CFGOBJ)/linux/os.o
+ ifeq ($(CONF_LIB_SLANG),yes)
+ CFGCFLAGS += \
++	$(SLANGCFLAGS) \
+ 	-DUSE_VIDEO_SLANG
+-CFGLIBS += -lslang
++CFGLIBS += $(SLANGLIBS)
+ CFGOBJS += \
+ 	$(CFGOBJ)/linux/vslang.o
+ endif
+ ifeq ($(CONF_LIB_NCURSES),yes)
+ CFGCFLAGS += \
++	$(NCURSESCFLAGS) \
+ 	-DUSE_VIDEO_CURSES
+-CFGLIBS += -lncurses
++CFGLIBS += $(NCURSESLIBS)
+ CFGOBJS += \
+ 	$(CFGOBJ)/linux/vcurses.o
+ endif
+diff --git a/advance/v.mak b/advance/v.mak
+index 4ffe708f..451f0d55 100644
+--- a/advance/v.mak
++++ b/advance/v.mak
+@@ -53,15 +53,17 @@ VOBJS += \
+ 	$(VOBJ)/linux/os.o
+ ifeq ($(CONF_LIB_SLANG),yes)
+ VCFLAGS += \
++	$(SLANGCFLAGS) \
+ 	-DUSE_VIDEO_SLANG
+-VLIBS += -lslang
++VLIBS += $(SLANGLIBS)
+ VOBJS += \
+ 	$(VOBJ)/linux/vslang.o
+ endif
+ ifeq ($(CONF_LIB_NCURSES),yes)
+ VCFLAGS += \
++	$(NCURSESCFLAGS) \
+ 	-DUSE_VIDEO_CURSES
+-VLIBS += -lncurses
++VLIBS += $(NCURSESLIBS)
+ VOBJS += \
+ 	$(VOBJ)/linux/vcurses.o
+ endif
+diff --git a/configure.ac b/configure.ac
+index 063c407a..f8ba989a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -717,29 +717,41 @@ AC_ARG_ENABLE(
+ 	[ac_lib_slang=auto]
+ )
+ if test $ac_lib_slang = auto; then
+-	AC_CHECK_LIB(
+-		[slang],
+-		[SLang_init_tty],
+-		[ac_lib_slang=yes],
+-		[ac_lib_slang=no],
+-		[]
+-	)
++	PKG_CHECK_MODULES([SLANG], [slang], [ac_lib_slang=yes], [ac_lib_slang=no])
++	if test $ac_lib_slang = yes; then
++		ac_save_CFLAGS="$CFLAGS"
++		ac_save_LIBS="$LIBS"
++		CFLAGS="SLANG_CFLAGS $CFLAGS"
++		LIBS="$SLANG_LIBS $LIBS"
++                AC_MSG_CHECKING([for linking slang])
++                AC_TRY_LINK([
++				#include <slang.h>
++			], [
++				if (SLang_init_tty(-1, 0, 0) < 0) {
++					perror("SLang_init_tty");
++					return 1;
++				}
++
++				SLang_reset_tty();
++				return 0;
++			],[ac_lib_slang=yes],[ac_lib_slang=no])
++		AC_MSG_RESULT([$ac_lib_slang])
++		CFLAGS="$ac_save_CFLAGS"
++		LIBS="$ac_save_LIBS"
++        fi
+ elif test $ac_lib_slang = yes; then
+-	AC_CHECK_LIB(
+-		[slang],
+-		[SLang_init_tty],
+-		[],
+-		[AC_MSG_ERROR([the sLang library is missing])],
+-		[]
+-	)
++	PKG_CHECK_MODULES([SLANG], [slang], [], AC_MSG_ERROR([the slang library is missing]))
+ fi
+ if test $ac_lib_slang = yes; then
+ 	AC_CHECK_HEADERS([slang.h slang/slang.h], [break])
+ 	ac_lib_video="$ac_lib_video slang"
+ 	ac_lib_text_flag=yes
+ fi
++AC_SUBST([SLANGCFLAGS],[$SLANG_CFLAGS])
++AC_SUBST([SLANGLIBS],[$SLANG_LIBS])
+ AC_SUBST([CONF_LIB_SLANG],[$ac_lib_slang])
+ 
++
+ dnl Checks for ncurses
+ AC_ARG_ENABLE(
+ 	[ncurses],
+@@ -748,28 +760,37 @@ AC_ARG_ENABLE(
+ 	[ac_lib_ncurses=auto]
+ )
+ if test $ac_lib_ncurses = auto; then
+-	AC_CHECK_LIB(
+-		[ncurses],
+-		[endwin],
+-		[ac_lib_ncurses=yes],
+-		[ac_lib_ncurses=no],
+-		[]
+-	)
++	PKG_CHECK_MODULES([NCURSES], [ncurses], [ac_lib_ncurses=yes], [ac_lib_ncurses=no])
++	if test $ac_lib_ncurses = yes; then
++		ac_save_CFLAGS="$CFLAGS"
++		ac_save_LIBS="$LIBS"
++		CFLAGS="$NCURSES_CFLAGS $CFLAGS"
++		LIBS="$NCURSES_LIBS $LIBS"
++		AC_MSG_CHECKING([for linking ncurses])
++		AC_TRY_LINK([
++				#include <ncurses.h>
++			], [
++				initscr();
++				noecho();
++				curs_set(FALSE);
++				endwin();
++			],[ac_lib_ncurses=yes],[ac_lib_ncurses=no])
++                AC_MSG_RESULT([$ac_lib_ncurses])
++                CFLAGS="$ac_save_CFLAGS"
++                LIBS="$ac_save_LIBS"
++        fi
+ elif test $ac_lib_ncurses = yes; then
+-	AC_CHECK_LIB(
+-		[ncurses],
+-		[endwin],
+-		[],
+-		[AC_MSG_ERROR([the sLang library is missing])],
+-		[]
+-	)
++	PKG_CHECK_MODULES([NCURSES], [ncurses], [], AC_MSG_ERROR([the ncurses library is missing]))
+ fi
+ if test $ac_lib_ncurses = yes; then
+ 	ac_lib_video="$ac_lib_video ncurses"
+ 	ac_lib_text_flag=yes
+ fi
++AC_SUBST([NCURSESCFLAGS],[$NCURSES_CFLAGS])
++AC_SUBST([NCURSESLIBS],[$NCURSES_LIBS])
+ AC_SUBST([CONF_LIB_NCURSES],[$ac_lib_ncurses])
+ 
++
+ dnl Checks for freetype
+ AC_ARG_ENABLE(
+ 	[freetype],

diff --git a/games-emulation/advancemame/files/advancemame-1.2-pic.patch b/games-emulation/advancemame/files/advancemame-pic.patch
similarity index 100%
rename from games-emulation/advancemame/files/advancemame-1.2-pic.patch
rename to games-emulation/advancemame/files/advancemame-pic.patch

diff --git a/games-emulation/advancemame/files/advancemame-1.2-verboselog.patch b/games-emulation/advancemame/files/advancemame-verboselog.patch
similarity index 100%
rename from games-emulation/advancemame/files/advancemame-1.2-verboselog.patch
rename to games-emulation/advancemame/files/advancemame-verboselog.patch


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-28 22:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09  5:53 [gentoo-commits] repo/gentoo:master commit in: games-emulation/advancemame/files/, games-emulation/advancemame/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2020-04-28 22:55 James Le Cuirot
2020-04-28 22:55 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox