commit:     3fb8f40ec2c632603d3cef4949dbc46b4ccaadda
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Sun Jun 30 23:30:50 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 22:36:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fb8f40e

dev-games/clanlib: add patch to successfully eautoreconf

It uses a heavily vintage autoconf 2.59 and libtool 1.5.22, which emits
an autoconf-based Modern C warning in configure probes and isn't
currently patch'able for e.g. LTO warning flags by elibtoolize.

Closes: https://bugs.gentoo.org/898980
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 dev-games/clanlib/clanlib-0.8.1-r2.ebuild          |  6 ++++-
 .../clanlib-0.8.1-makefile-duplicate-headers.patch | 29 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-games/clanlib/clanlib-0.8.1-r2.ebuild 
b/dev-games/clanlib/clanlib-0.8.1-r2.ebuild
index 4235f050aabd..e14357adc276 100644
--- a/dev-games/clanlib/clanlib-0.8.1-r2.ebuild
+++ b/dev-games/clanlib/clanlib-0.8.1-r2.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+inherit autotools
+
 DESCRIPTION="Multi-platform game development library"
 HOMEPAGE="https://github.com/sphair/ClanLib";
 SRC_URI="mirror://gentoo/ClanLib-${PV}.tgz"
@@ -48,6 +50,7 @@ PATCHES=(
        "${FILESDIR}/${P}-docbuilder.patch"
        "${FILESDIR}/${P}-glibc2.34.patch"
        "${FILESDIR}/${P}-gcc12.patch"
+       "${FILESDIR}"/${P}-makefile-duplicate-headers.patch
 )
 
 DOCS=(
@@ -57,6 +60,7 @@ DOCS=(
 
 src_prepare() {
        default
+       eautoreconf
        # See #739358
        sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=@libdir@:g" \
                pkgconfig/*.pc.in || die

diff --git 
a/dev-games/clanlib/files/clanlib-0.8.1-makefile-duplicate-headers.patch 
b/dev-games/clanlib/files/clanlib-0.8.1-makefile-duplicate-headers.patch
new file mode 100644
index 000000000000..cdd7e67f83ab
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-0.8.1-makefile-duplicate-headers.patch
@@ -0,0 +1,29 @@
+From 54eb2a8e72f782792ab53d7c989deec52059990a Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <[email protected]>
+Date: Sun, 30 Jun 2024 19:24:50 -0400
+Subject: [PATCH] build: fix duplicated header in Makefile.am
+
+Regenerating configure/Makefiles with newer autotools versions results
+in build failures: a more optimized routine is used for installing
+headers in bulk, which is sensitive to listing the same file twice as
+part of a single `install ...` invocation. Not present in newer clanlib
+versions.
+---
+ Sources/API/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Sources/API/Makefile.am b/Sources/API/Makefile.am
+index 5686330..8dcb56e 100644
+--- a/Sources/API/Makefile.am
++++ b/Sources/API/Makefile.am
+@@ -232,7 +232,6 @@ clanCore_includes = \
+       Core/System/event_trigger.h \
+       Core/System/console_window.h \
+       Core/System/keep_alive.h \
+-      Core/System/log.h \
+       Core/System/crash_reporter.h \
+       Core/System/call_stack.h \
+       Core/System/clanstring.h \
+-- 
+2.44.2
+

Reply via email to