Skip to content

Commit

Permalink
games-arcade/stardork: EAPI6->8, fix build with clang16
Browse files Browse the repository at this point in the history
Also pass cppflags bit of ncurses' pkg-config.

Closes: https://bugs.gentoo.org/871498
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Oct 13, 2022
1 parent 07e37e4 commit 2fc2769
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 34 deletions.
13 changes: 13 additions & 0 deletions games-arcade/stardork/files/stardork-0.7-clang16.patch
Original file line number Diff line number Diff line change
@@ -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) {
34 changes: 0 additions & 34 deletions games-arcade/stardork/stardork-0.7-r1.ebuild

This file was deleted.

35 changes: 35 additions & 0 deletions games-arcade/stardork/stardork-0.7-r2.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 2fc2769

Please sign in to comment.