public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/nibbles/files/, games-arcade/nibbles/
@ 2020-01-26 15:17 Sergei Trofimovich
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-01-26 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d32a3e020d3d92ed7e98ebcd9b33e817c71a2d1e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 15:17:01 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 15:17:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d32a3e02

games-arcade/nibbles: tweak for gcc-10, bug #706446

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706446
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../nibbles/files/nibbles-0.0.4-gcc-10.patch       | 22 ++++++++++++++++++++++
 games-arcade/nibbles/nibbles-0.0.4-r1.ebuild       |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/games-arcade/nibbles/files/nibbles-0.0.4-gcc-10.patch b/games-arcade/nibbles/files/nibbles-0.0.4-gcc-10.patch
new file mode 100644
index 00000000000..e70203f73c7
--- /dev/null
+++ b/games-arcade/nibbles/files/nibbles-0.0.4-gcc-10.patch
@@ -0,0 +1,22 @@
+--- a/scoring.c
++++ b/scoring.c
+@@ -12,6 +12,8 @@
+ #include <time.h>
+ #include "scoring.h"
+ 
++char highscoref[255];
++
+ int get_high_scores(struct highscoreent *highscores[], int *numscores)
+ {
+ 	FILE *scorefile;
+--- a/scoring.h
++++ b/scoring.h
+@@ -11,7 +11,7 @@
+ /* Max number of high scores we store */
+ #define MAXHIGHSCORES 20
+ 
+-char highscoref[255];
++extern char highscoref[255];
+ 
+ struct highscoreent {
+ 	char name[16];

diff --git a/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
index fb8b3229397..f0e88811824 100644
--- a/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
+++ b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -24,6 +24,7 @@ GAMES_STATEDIR="/var/games/${PN}"
 
 PATCHES=(
 	"${FILESDIR}"/${P}-as-needed.patch
+	"${FILESDIR}"/${P}-gcc-10.patch
 )
 
 S="${WORKDIR}/${MY_P}"


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/nibbles/files/, games-arcade/nibbles/
@ 2019-07-18 14:46 Lars Wendler
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler @ 2019-07-18 14:46 UTC (permalink / raw
  To: gentoo-commits

commit:     8d2041da5a9efea1e9b2a4e9d741cb8d30082df6
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 18 14:45:39 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 14:46:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d2041da

games-arcade/nibbles: Fixed build with sys-libs/ncurses[tinfo]

Closes: https://bugs.gentoo.org/690104
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../nibbles/files/nibbles-0.0.4-as-needed.patch    |  6 ++--
 ...ibbles-0.0.4.ebuild => nibbles-0.0.4-r1.ebuild} | 35 ++++++++++++++--------
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/games-arcade/nibbles/files/nibbles-0.0.4-as-needed.patch b/games-arcade/nibbles/files/nibbles-0.0.4-as-needed.patch
index 7e27d1fb9ca..0f1a587a41d 100644
--- a/games-arcade/nibbles/files/nibbles-0.0.4-as-needed.patch
+++ b/games-arcade/nibbles/files/nibbles-0.0.4-as-needed.patch
@@ -1,12 +1,12 @@
---- Makefile.old	2009-02-02 12:40:36.000000000 +0100
-+++ Makefile	2009-02-02 12:41:22.000000000 +0100
+--- a/Makefile
++++ b/Makefile
 @@ -1,19 +1,14 @@
 -CC = gcc -Wall -g
 -
  SRCS = player.c main.c loadMap.c cmdline.c ncdrawlib.c scoring.c 
  OBJS = $(SRCS:.c=.o)
 -LIBS = -lncurses
-+LDLIBS = -lncurses
++LDLIBS = $(shell $(PKGCONFIG) --libs ncurses)
  
  INSTALL=/usr/bin/install -c
  INSTALL_FOLDER=/usr/games

diff --git a/games-arcade/nibbles/nibbles-0.0.4.ebuild b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
similarity index 63%
rename from games-arcade/nibbles/nibbles-0.0.4.ebuild
rename to games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
index fe523f359b3..419c9d24ae6 100644
--- a/games-arcade/nibbles/nibbles-0.0.4.ebuild
+++ b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils games
+EAPI=7
 
-MY_P=${PN}-v${PV}
+inherit toolchain-funcs
+
+MY_P="${PN}-v${PV}"
 DESCRIPTION="An ncurses-based Nibbles clone"
 HOMEPAGE="http://www.earth.li/projectpurple/progs/nibbles.html"
 SRC_URI="http://www.earth.li/projectpurple/files/${MY_P}.tar.gz"
@@ -14,12 +15,22 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd ~x86-linux ~ppc-macos"
 IUSE=""
 
-DEPEND="sys-libs/ncurses:0"
-RDEPEND=${DEPEND}
+DEPEND="sys-libs/ncurses:0="
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+GAMES_DATADIR="/usr/share"
+GAMES_STATEDIR="/var/games/${PN}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-as-needed.patch
+)
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 
 src_prepare() {
+	default
+
 	sed -i \
 		-e "s#/usr/local/games/nibbles.levels#${GAMES_DATADIR}/${PN}#" \
 		nibbles.h || die
@@ -27,22 +38,22 @@ src_prepare() {
 	sed -i \
 		-e "s#/var/lib/games/nibbles.score#${GAMES_STATEDIR}/nibbles.scores#" \
 		scoring.h || die
+}
 
-	epatch "${FILESDIR}"/${P}-as-needed.patch
+src_compile() {
+	PKGCONFIG="$(tc-getPKG_CONFIG)" emake
 }
 
 src_install() {
-	dogamesbin nibbles
+	dobin nibbles
 
 	insinto "${GAMES_DATADIR}/${PN}"
 	doins nibbles.levels/*
 
 	dodir "${GAMES_STATEDIR}"
-	touch "${D}${GAMES_STATEDIR}/nibbles.scores"
+	touch "${ED}${GAMES_STATEDIR}/nibbles.scores"
 
 	dodoc HISTORY CREDITS TODO README
 
-	prepgamesdirs
-
 	fperms 664 "${GAMES_STATEDIR}/nibbles.scores"
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-26 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-26 15:17 [gentoo-commits] repo/gentoo:master commit in: games-arcade/nibbles/files/, games-arcade/nibbles/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2019-07-18 14:46 Lars Wendler

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