summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-10-03 18:49:38 +0000
committerJames Le Cuirot <chewi@gentoo.org>2023-10-09 21:37:57 +0100
commit8d0922f67eb64603d744c26f994027b4662325b4 (patch)
tree9791227e7fc1ed6b868de7fda1f90ec64bd87f2c /games-puzzle
parentx11-libs/libxkbcommon: Limit wayland dependencies to USE=tools (diff)
downloadgentoo-8d0922f67eb64603d744c26f994027b4662325b4.tar.gz
gentoo-8d0922f67eb64603d744c26f994027b4662325b4.tar.bz2
gentoo-8d0922f67eb64603d744c26f994027b4662325b4.zip
games-puzzle/galaxis: Fix call to undeclared library function bzero
Closes: https://bugs.gentoo.org/895986 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/33170 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/galaxis/files/galaxis-1.10-clang16-build-fix.patch11
-rw-r--r--games-puzzle/galaxis/galaxis-1.10-r1.ebuild39
2 files changed, 50 insertions, 0 deletions
diff --git a/games-puzzle/galaxis/files/galaxis-1.10-clang16-build-fix.patch b/games-puzzle/galaxis/files/galaxis-1.10-clang16-build-fix.patch
new file mode 100644
index 000000000000..43d2862cd640
--- /dev/null
+++ b/games-puzzle/galaxis/files/galaxis-1.10-clang16-build-fix.patch
@@ -0,0 +1,11 @@
+Bug: https://bugs.gentoo.org/895986
+--- a/galaxis.c
++++ b/galaxis.c
+@@ -6,6 +6,7 @@
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+ #define _POSIX_SOURCE
++#define _GNU_SOURCE
+
+ #include <stdio.h>
+ #include <termios.h>
diff --git a/games-puzzle/galaxis/galaxis-1.10-r1.ebuild b/games-puzzle/galaxis/galaxis-1.10-r1.ebuild
new file mode 100644
index 000000000000..13029dc32afd
--- /dev/null
+++ b/games-puzzle/galaxis/galaxis-1.10-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic toolchain-funcs
+
+DESCRIPTION="Curses-based clone of the nifty little Macintosh freeware game Galaxis"
+HOMEPAGE="http://www.catb.org/~esr/galaxis/"
+SRC_URI="http://www.catb.org/~esr/galaxis/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+DEPEND="sys-libs/ncurses:="
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-c2x.patch
+ "${FILESDIR}"/${P}-clang16-build-fix.patch
+)
+
+src_compile() {
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags ncurses || die) -DNDEBUG
+ append-libs $($(tc-getPKG_CONFIG) --libs ncurses || die)
+
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" TERMLIB="${LIBS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.6
+ einstalldocs
+
+ doicon ${PN}.png
+ domenu ${PN}.desktop
+}