commit:     fdbb9179c2657bc867f33f5918df8914c787c41a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 14 02:23:26 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 03:19:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdbb9179

media-video/tcmplex-panteltje: EAPI6->8, fix direct CC, clang16

Also:
* pass -std=gnu89 (broken with clang -std=c2x)
* add CPPFLAGS to the old sed
* GPL-2 -> GPL-2+

Closes: https://bugs.gentoo.org/724824
Closes: https://bugs.gentoo.org/871534
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/tcmplex-panteltje-0.4.7-clang16.patch    |  7 ++++++
 ...r1.ebuild => tcmplex-panteltje-0.4.7-r2.ebuild} | 26 ++++++++++++++++------
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git 
a/media-video/tcmplex-panteltje/files/tcmplex-panteltje-0.4.7-clang16.patch 
b/media-video/tcmplex-panteltje/files/tcmplex-panteltje-0.4.7-clang16.patch
new file mode 100644
index 000000000000..ffd06af6992a
--- /dev/null
+++ b/media-video/tcmplex-panteltje/files/tcmplex-panteltje-0.4.7-clang16.patch
@@ -0,0 +1,7 @@
+https://bugs.gentoo.org/871534
+--- a/main.h
++++ b/main.h
+@@ -11,2 +11,3 @@
+ 
++#include <ctype.h>
+ #include <string.h>

diff --git a/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r1.ebuild 
b/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r2.ebuild
similarity index 56%
rename from media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r1.ebuild
rename to media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r2.ebuild
index 2d0a5c45d5fb..d2ee480f2230 100644
--- a/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r1.ebuild
+++ b/media-video/tcmplex-panteltje/tcmplex-panteltje-0.4.7-r2.ebuild
@@ -1,25 +1,37 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="Audio video multiplexer for 8 audio channels"
 HOMEPAGE="http://panteltje.com/panteltje/dvd/";
 SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz";
 
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
+
+PATCHES=(
+       "${FILESDIR}"/${P}-clang16.patch
+)
 
 src_prepare() {
-       sed -e "s:CFLAGS = -O2:CFLAGS +=:" \
+       default
+
+       sed -e "s:CFLAGS = -O2:CFLAGS += \$(CPPFLAGS):" \
                -e "s:\$(LIBRARY):\$(LIBRARY) \$(LDFLAGS):" \
                -i Makefile || die
-       default
+}
+
+src_compile() {
+       append-cflags -std=gnu89 # old codebase, incompatible with c2x
+
+       emake CC="$(tc-getCC)"
 }
 
 src_install() {
        dobin tcmplex-panteltje
-       dodoc CHANGES COPYRIGHT README
+       einstalldocs
 }

Reply via email to