public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-puzzle/galaxis/, games-puzzle/galaxis/files/
@ 2022-10-15 20:07 Ionen Wolkens
  0 siblings, 0 replies; only message in thread
From: Ionen Wolkens @ 2022-10-15 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     d74ba779a82016860191670a76c6f31720167214
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 15 18:49:36 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Oct 15 20:06:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d74ba779

games-puzzle/galaxis: add 1.10

Release fixed issues with clang16 3 years ago wrt #874435

Also:
* GPL-2 -> BSD-2 (no GPL in here)
* pass ncurses' --cflags too
* install the newly added .desktop+icon
* small fixes for c2x so won't need -std=gnu89

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

 games-puzzle/galaxis/Manifest                     |  1 +
 games-puzzle/galaxis/files/galaxis-1.10-c2x.patch | 15 +++++++++
 games-puzzle/galaxis/galaxis-1.10.ebuild          | 38 +++++++++++++++++++++++
 3 files changed, 54 insertions(+)

diff --git a/games-puzzle/galaxis/Manifest b/games-puzzle/galaxis/Manifest
index 7c0c3415b549..7733580b0417 100644
--- a/games-puzzle/galaxis/Manifest
+++ b/games-puzzle/galaxis/Manifest
@@ -1 +1,2 @@
+DIST galaxis-1.10.tar.gz 11499 BLAKE2B d18dbedbe9533de3238a6f77dc05854454afe05ceb3ad9fdcdba1b80c3a07a904e1c16932e19ca3ef769121704823a28e62c87fa7e79acc1707226db35b1b67e SHA512 cedaac1923674fdae85dd09d6c38c6a15e0c027cf520ea6d92c15f0613adbc3a3b7e1e627d19e6d8b21c93fdb8acab8236893ce179dc4e898ba7da8f256dd341
 DIST galaxis-1.8.tar.gz 8962 BLAKE2B 3380d44ca6b168ddc71edf4e7fb61bc9a22c24cf73e1bbd4b60a87517a769f3b3b2475d64281168fe6ade7b88bbc75b3eec923cf1d26532b097d6820b14f9817 SHA512 9d4c7447827fea333ddec8a289d5d6415777379c7aab53fc2088418051f3a38c8abeceff2e8ba0472f792fac457345f2307b3f51c8366aa0b9affa37c3eee05f

diff --git a/games-puzzle/galaxis/files/galaxis-1.10-c2x.patch b/games-puzzle/galaxis/files/galaxis-1.10-c2x.patch
new file mode 100644
index 000000000000..bdd7b9cfd95f
--- /dev/null
+++ b/games-puzzle/galaxis/files/galaxis-1.10-c2x.patch
@@ -0,0 +1,15 @@
+Early fixes for upcoming C2x.
+--- a/galaxis.c
++++ b/galaxis.c
+@@ -32,4 +32,2 @@
+ #define rand()		lrand48()
+-extern long lrand48();
+-extern void srand48();
+ #define bzero(s, n)	(void)memset((char *)(s), '\0', n)
+@@ -648,5 +646,3 @@
+ 
+-int main(argc, argv)
+-int argc;
+-char *argv[];
++int main(int argc, char *argv[])
+ {

diff --git a/games-puzzle/galaxis/galaxis-1.10.ebuild b/games-puzzle/galaxis/galaxis-1.10.ebuild
new file mode 100644
index 000000000000..d5baee4147e0
--- /dev/null
+++ b/games-puzzle/galaxis/galaxis-1.10.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 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
+)
+
+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
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-15 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-15 20:07 [gentoo-commits] repo/gentoo:master commit in: games-puzzle/galaxis/, games-puzzle/galaxis/files/ Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox