From 8d2041da5a9efea1e9b2a4e9d741cb8d30082df6 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 18 Jul 2019 16:45:39 +0200 Subject: 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 --- .../nibbles/files/nibbles-0.0.4-as-needed.patch | 6 +-- games-arcade/nibbles/nibbles-0.0.4-r1.ebuild | 59 ++++++++++++++++++++++ games-arcade/nibbles/nibbles-0.0.4.ebuild | 48 ------------------ 3 files changed, 62 insertions(+), 51 deletions(-) create mode 100644 games-arcade/nibbles/nibbles-0.0.4-r1.ebuild delete mode 100644 games-arcade/nibbles/nibbles-0.0.4.ebuild (limited to 'games-arcade/nibbles') 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 7e27d1fb9cac..0f1a587a41db 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-r1.ebuild b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild new file mode 100644 index 000000000000..419c9d24ae6f --- /dev/null +++ b/games-arcade/nibbles/nibbles-0.0.4-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd ~x86-linux ~ppc-macos" +IUSE="" + +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}" + +src_prepare() { + default + + sed -i \ + -e "s#/usr/local/games/nibbles.levels#${GAMES_DATADIR}/${PN}#" \ + nibbles.h || die + + sed -i \ + -e "s#/var/lib/games/nibbles.score#${GAMES_STATEDIR}/nibbles.scores#" \ + scoring.h || die +} + +src_compile() { + PKGCONFIG="$(tc-getPKG_CONFIG)" emake +} + +src_install() { + dobin nibbles + + insinto "${GAMES_DATADIR}/${PN}" + doins nibbles.levels/* + + dodir "${GAMES_STATEDIR}" + touch "${ED}${GAMES_STATEDIR}/nibbles.scores" + + dodoc HISTORY CREDITS TODO README + + fperms 664 "${GAMES_STATEDIR}/nibbles.scores" +} diff --git a/games-arcade/nibbles/nibbles-0.0.4.ebuild b/games-arcade/nibbles/nibbles-0.0.4.ebuild deleted file mode 100644 index fe523f359b3d..000000000000 --- a/games-arcade/nibbles/nibbles-0.0.4.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils games - -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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd ~x86-linux ~ppc-macos" -IUSE="" - -DEPEND="sys-libs/ncurses:0" -RDEPEND=${DEPEND} - -S=${WORKDIR}/${MY_P} - -src_prepare() { - sed -i \ - -e "s#/usr/local/games/nibbles.levels#${GAMES_DATADIR}/${PN}#" \ - nibbles.h || die - - sed -i \ - -e "s#/var/lib/games/nibbles.score#${GAMES_STATEDIR}/nibbles.scores#" \ - scoring.h || die - - epatch "${FILESDIR}"/${P}-as-needed.patch -} - -src_install() { - dogamesbin nibbles - - insinto "${GAMES_DATADIR}/${PN}" - doins nibbles.levels/* - - dodir "${GAMES_STATEDIR}" - touch "${D}${GAMES_STATEDIR}/nibbles.scores" - - dodoc HISTORY CREDITS TODO README - - prepgamesdirs - - fperms 664 "${GAMES_STATEDIR}/nibbles.scores" -} -- cgit v1.2.3-65-gdbad