* [gentoo-commits] repo/gentoo:master commit in: games-puzzle/twindistress/, games-puzzle/twindistress/files/
@ 2020-02-23 11:21 David Seifert
0 siblings, 0 replies; only message in thread
From: David Seifert @ 2020-02-23 11:21 UTC (permalink / raw
To: gentoo-commits
commit: 1c18f65f6321dc59f8f66318369a9b9e5269a55a
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 23 11:21:01 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Feb 23 11:21:01 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c18f65f
games-puzzle/twindistress: Port to EAPI 7
Closes: https://bugs.gentoo.org/710556
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../files/twindistress-1.1.0-ldflags.patch | 38 +++++++++++--
.../twindistress/twindistress-1.1.0.ebuild | 65 ++++++++++------------
2 files changed, 62 insertions(+), 41 deletions(-)
diff --git a/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch b/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch
index 0ac589d8836..1a77572836d 100644
--- a/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch
+++ b/games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch
@@ -1,6 +1,32 @@
---- Makefile.old 2010-10-19 09:06:48.000000000 +0200
-+++ Makefile 2010-10-19 09:06:59.000000000 +0200
-@@ -50,7 +50,7 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,20 +2,20 @@
+ BIN_PREFIX = /usr/local/bin/
+ # if you don't have privileges to install systemwide, comment out both
+ # lines below and the game will then play from the current directory
+-DATA_PREFIX = /usr/local/share/games/twind/
+-HIGH_SCORE_PREFIX = /var/lib/games/twind/
++DATA_PREFIX = $(EPREFIX)/usr/share/twindistress/
++HIGH_SCORE_PREFIX = $(EPREFIX)/var/lib/twindistress/
+ # uncomment out the EXTENSION if you don't have the png libs on your system
+ #EXTENSION = ".bmp"
+ AUDIOFLAG = AUDIO
+-CC = gcc
+ ifdef EXTENSION
+-CFLAGS = -Wall -g -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
++CPPFLAGS += -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
+ -DEXTENSION=\"$(EXTENSION)\" -D$(AUDIOFLAG) -DLINUX \
+ -DHIGH_SCORE_PREFIX=\"$(HIGH_SCORE_PREFIX)\"
+ else
+-CFLAGS = -Wall -g -DDATA_PREFIX=\"$(DATA_PREFIX)\" -D$(AUDIOFLAG) -DLINUX \
++CPPFLAGS += -DDATA_PREFIX=\"$(DATA_PREFIX)\" -D$(AUDIOFLAG) -DLINUX \
+ -DHIGH_SCORE_PREFIX=\"$(HIGH_SCORE_PREFIX)\"
+ endif
++CFLAGS += -Wall
+ LIBS = -lm
+ SDL_CFLAGS = `sdl-config --cflags`
+ SDL_LIBS = `sdl-config --libs` -lSDL_image
+@@ -50,10 +50,10 @@
make twind MIXER_LIB= AUDIOFLAG=NOAUDIO
twind: twind.o
@@ -8,4 +34,8 @@
+ $(CC) $(LDFLAGS) twind.o $(LIBS) $(SDL_LIBS) $(MIXER_LIB) -o twind
twind.o: twind.c
- $(CC) $(CFLAGS) $(SDL_CFLAGS) -c twind.c
+- $(CC) $(CFLAGS) $(SDL_CFLAGS) -c twind.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) -c twind.c
+
+ clean:
+ rm -f twind *.o
diff --git a/games-puzzle/twindistress/twindistress-1.1.0.ebuild b/games-puzzle/twindistress/twindistress-1.1.0.ebuild
index cdc29698575..cc4e08909d2 100644
--- a/games-puzzle/twindistress/twindistress-1.1.0.ebuild
+++ b/games-puzzle/twindistress/twindistress-1.1.0.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils games
+EAPI=7
+
+inherit desktop toolchain-funcs
MY_P="twind-${PV}"
+
DESCRIPTION="Match and remove all of the blocks before time runs out"
HOMEPAGE="http://twind.sourceforge.net/"
SRC_URI="mirror://sourceforge/twind/${MY_P}.tar.gz"
@@ -12,48 +14,37 @@ SRC_URI="mirror://sourceforge/twind/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="media-libs/libsdl[video]
- media-libs/sdl-mixer
- media-libs/sdl-image[png]"
-RDEPEND="${DEPEND}"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- sed -i \
- -e '/^CC/d' \
- -e "/^CFLAGS/s:-g:${CFLAGS}:" \
- -e "/^DATA_PREFIX/s:/.*$:${GAMES_DATADIR}/${PN}/:" \
- -e "/^HIGH_SCORE_PREFIX/s:/.*$:${GAMES_STATEDIR}/${PN}/:" \
- Makefile || die "sed failed"
- epatch \
- "${FILESDIR}"/${P}-ldflags.patch \
- "${FILESDIR}"/${P}-warnings.patch
+
+RDEPEND="
+ media-libs/libsdl[video]
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[vorbis]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ldflags.patch
+ "${FILESDIR}"/${P}-warnings.patch
+)
+
+src_configure() {
+ tc-export CC
}
src_install() {
- dogamesbin twind
+ dobin twind
- insinto "${GAMES_DATADIR}/${PN}"
+ insinto /usr/share/twindistress
doins -r graphics music sound
doicon graphics/twind.png
make_desktop_entry twind "Twin Distress"
- dodoc AUTHORS ChangeLog CREDITS NEWS README TODO
-
- dodir "${GAMES_STATEDIR}/${PN}"
- touch "${D}/${GAMES_STATEDIR}/${PN}/twind.hscr"
- fperms 660 "${GAMES_STATEDIR}/${PN}/twind.hscr"
- prepgamesdirs
-}
+ einstalldocs
-pkg_postinst() {
- games_pkg_postinst
- if ! has_version "media-libs/sdl-mixer[vorbis]" ; then
- ewarn "Music support will be disabled since sdl-mixer"
- ewarn "wasn't built with USE=vorbis"
- fi
+ dodir /var/lib/twindistress/
+ touch "${ED}"/var/lib/twindistress/twind.hscr || die
+ fowners root:users /var/lib/twindistress/twind.hscr
+ fperms 660 /var/lib/twindistress/twind.hscr
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-23 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-23 11:21 [gentoo-commits] repo/gentoo:master commit in: games-puzzle/twindistress/, games-puzzle/twindistress/files/ David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox