commit:     2fc276966c91e9c0270ed31b1978d7bcff51721b
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 13 07:41:13 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 09:06:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fc27696

games-arcade/stardork: EAPI6->8, fix build with clang16

Also pass cppflags bit of ncurses' pkg-config.

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

 .../stardork/files/stardork-0.7-clang16.patch      | 13 ++++++++
 games-arcade/stardork/stardork-0.7-r1.ebuild       | 34 ---------------------
 games-arcade/stardork/stardork-0.7-r2.ebuild       | 35 ++++++++++++++++++++++
 3 files changed, 48 insertions(+), 34 deletions(-)

diff --git a/games-arcade/stardork/files/stardork-0.7-clang16.patch 
b/games-arcade/stardork/files/stardork-0.7-clang16.patch
new file mode 100644
index 000000000000..c815fcd281fb
--- /dev/null
+++ b/games-arcade/stardork/files/stardork-0.7-clang16.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/871498
+--- a/stardork.c
++++ b/stardork.c
+@@ -376,3 +376,3 @@
+ 
+-void plot_wormhole(y, x) {
++void plot_wormhole(int y, int x) {
+     int r1, r2, i, j;
+@@ -564,3 +564,3 @@
+ 
+-void change_colors(color) {
++void change_colors(int color) {
+     if (has_colors() != FALSE) { 

diff --git a/games-arcade/stardork/stardork-0.7-r1.ebuild 
b/games-arcade/stardork/stardork-0.7-r1.ebuild
deleted file mode 100644
index d2b7e070c095..000000000000
--- a/games-arcade/stardork/stardork-0.7-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-DESCRIPTION="An ncurses-based space shooter"
-HOMEPAGE="http://stardork.sourceforge.net/";
-SRC_URI="mirror://sourceforge/stardork/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE=""
-
-RDEPEND="sys-libs/ncurses:0="
-DEPEND="${RDEPEND}
-       virtual/pkgconfig
-"
-
-src_prepare() {
-       default
-       rm -f Makefile
-}
-
-src_compile() {
-       emake CC="$(tc-getCC)" LDLIBS="$($(tc-getPKG_CONFIG) ncurses --libs)" 
${PN}
-}
-
-src_install() {
-       dobin ${PN}
-       einstalldocs
-}

diff --git a/games-arcade/stardork/stardork-0.7-r2.ebuild 
b/games-arcade/stardork/stardork-0.7-r2.ebuild
new file mode 100644
index 000000000000..f6b1fece5104
--- /dev/null
+++ b/games-arcade/stardork/stardork-0.7-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="ncurses-based space shooter"
+HOMEPAGE="https://stardork.sourceforge.net/";
+SRC_URI="mirror://sourceforge/stardork/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+RDEPEND="sys-libs/ncurses:="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-clang16.patch
+)
+
+src_compile() {
+       tc-export CC
+       append-cppflags $($(tc-getPKG_CONFIG) ncurses --cflags || die)
+       append-libs $($(tc-getPKG_CONFIG) ncurses --libs || die)
+
+       emake -f /dev/null LDLIBS="${LIBS}" ${PN}
+}
+
+src_install() {
+       dobin ${PN}
+       einstalldocs
+}

Reply via email to