commit:     9d39930de91d127dafe5536f0ac676b828ad4b66
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 14 07:24:23 2024 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 07:30:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d39930d

games-server/mednafen-server: add 0.5.2-r3

C99/C23 fixes to the configure process.

Closes: https://bugs.gentoo.org/879695
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 .../mednafen-server-0.5.2-m4-macro-include.patch   | 32 +++++++++++++++++++
 .../mednafen-server-0.5.2-r3.ebuild                | 37 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)

diff --git 
a/games-server/mednafen-server/files/mednafen-server-0.5.2-m4-macro-include.patch
 
b/games-server/mednafen-server/files/mednafen-server-0.5.2-m4-macro-include.patch
new file mode 100644
index 000000000000..e204595eb7fd
--- /dev/null
+++ 
b/games-server/mednafen-server/files/mednafen-server-0.5.2-m4-macro-include.patch
@@ -0,0 +1,32 @@
+From 2770dffa54f73cab801c96ff85f34dbe8abc5e47 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kan...@gentoo.org>
+Date: Mon, 14 Oct 2024 15:58:37 +1000
+Subject: [PATCH] games-server/mednafen-server: Explicitly include
+ `ax_cflags_gcc_option.m4`
+
+We need to call `eautoreconf` in `src_prepare` to
+fix some C99/C23 issues in the shipped configure file.
+
+In order to do this, we need to explicitly include
+`ax_cflags_gcc_option.m4` in `configure.ac`. I'm
+not sure how this worked previously but it doesn't
+anymore.
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0da3ab4..483f837 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,6 +8,7 @@ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+ AM_INIT_AUTOMAKE([mednafen_server], $MEDNAFEN_SERVER_VERSION)
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
++m4_include([m4/ax_cflags_gcc_option.m4])
+ AM_CONFIG_HEADER([include/config.h:include/config.h.in])
+ 
+ AC_PROG_CC
+-- 
+2.46.2

diff --git a/games-server/mednafen-server/mednafen-server-0.5.2-r3.ebuild 
b/games-server/mednafen-server/mednafen-server-0.5.2-r3.ebuild
new file mode 100644
index 000000000000..b478d846fc6d
--- /dev/null
+++ b/games-server/mednafen-server/mednafen-server-0.5.2-r3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Server for Mednafen emulator"
+HOMEPAGE="https://mednafen.github.io/releases/";
+SRC_URI="https://mednafen.github.io/releases/files/${P}.tar.xz";
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-m4-macro-include.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+
+       mv standard.conf standard.conf.example || die
+       mv run.sh run.sh.example || die
+}
+
+src_install() {
+       dobin src/${PN}
+       dodoc README *.example
+}
+
+pkg_postinst() {
+       einfo "Example config file and run file can be found in"
+       einfo "/usr/share/doc/${PF}/"
+}

Reply via email to