summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-02-23 12:21:01 +0100
committerDavid Seifert <soap@gentoo.org>2020-02-23 12:21:01 +0100
commit1c18f65f6321dc59f8f66318369a9b9e5269a55a (patch)
treee1282b4d210d21ebc65b9fabfa501886177d169a /games-puzzle/twindistress
parentmedia-video/shotcut: Needs newer mlt (diff)
downloadgentoo-1c18f65f6321dc59f8f66318369a9b9e5269a55a.tar.gz
gentoo-1c18f65f6321dc59f8f66318369a9b9e5269a55a.tar.bz2
gentoo-1c18f65f6321dc59f8f66318369a9b9e5269a55a.zip
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@gentoo.org>
Diffstat (limited to 'games-puzzle/twindistress')
-rw-r--r--games-puzzle/twindistress/files/twindistress-1.1.0-ldflags.patch38
-rw-r--r--games-puzzle/twindistress/twindistress-1.1.0.ebuild65
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 0ac589d88368..1a77572836d2 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 cdc296985750..cc4e08909d20 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
}