summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-09-06 21:56:39 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-09-06 21:59:58 +0100
commit9030205024d99b280b5dfb35de5e5ee173d511ee (patch)
tree88915461ec1dab371f0640ec264f305fda1d1345 /games-puzzle/gnurobbo
parentgames-puzzle/gnurobbo: Don't set BINDIR or DOCDIR when calling Make (diff)
downloadgentoo-9030205024d99b280b5dfb35de5e5ee173d511ee.tar.gz
gentoo-9030205024d99b280b5dfb35de5e5ee173d511ee.tar.bz2
gentoo-9030205024d99b280b5dfb35de5e5ee173d511ee.zip
games-puzzle/gnurobbo: Respect CC and LDFLAGS, use pkg-config
Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-puzzle/gnurobbo')
-rw-r--r--games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch14
-rw-r--r--games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch22
-rw-r--r--games-puzzle/gnurobbo/gnurobbo-0.68.ebuild6
3 files changed, 26 insertions, 16 deletions
diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch
deleted file mode 100644
index 84a7567a7887..000000000000
--- a/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Drop -d which causes an error with GCC 7
-Author: Stephen Kitt <skitt@debian.org>
-
---- a/Makefile
-+++ b/Makefile
-@@ -61,7 +61,7 @@
-
-
-
--CFLAGS+=-d -Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
-+CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
- -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
- LDFLAGS?=
- # Use these instead for debugging and/or profiling (mainly intended for GNU Robbo developers)
diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch
new file mode 100644
index 000000000000..2a0f63ce8807
--- /dev/null
+++ b/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch
@@ -0,0 +1,22 @@
+diff --color -Naur a/Makefile b/Makefile
+--- a/Makefile 2015-08-26 21:35:29.000000000 +0100
++++ b/Makefile 2020-09-06 21:54:50.074658932 +0100
+@@ -61,16 +61,15 @@
+
+
+
+-CFLAGS+=-d -Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
++CFLAGS+=-Wall `$(PKG_CONFIG) --cflags sdl SDL_image SDL_mixer SDL_ttf` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
+ -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
+-LDFLAGS=
+ # Use these instead for debugging and/or profiling (mainly intended for GNU Robbo developers)
+ #CFLAGS?=-O0 -pipe -g -pg
+ #CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" \
+ # -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
+ #LDFLAGS=-pg
+ LINK=$(CC)
+-LIBS=`$(SDL_CONFIG) --libs` -lm -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF)
++LIBS=`$(PKG_CONFIG) --libs sdl SDL_image SDL_mixer SDL_ttf` -lm
+
+ #for caanoo compilation
+ #LIBS=-L$(GPH_SDK)/DGE/lib/target -L$(GPH_SDK)/lib/target -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF)
diff --git a/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild b/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
index 1f142c1ff64e..fded8903934c 100644
--- a/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
+++ b/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit desktop
+inherit desktop toolchain-funcs
DESCRIPTION="Robbo, a popular Atari XE/XL game ported to Linux"
HOMEPAGE="http://gnurobbo.sourceforge.net/"
@@ -26,12 +26,14 @@ RDEPEND="
DEPEND="${RDEPEND}"
PATCHES=(
- "${FILESDIR}/${P}-cflags-d.patch"
+ "${FILESDIR}/${P}-flags.patch"
"${DISTDIR}/${P}-single-variable-declarations.patch"
)
src_compile() {
emake \
+ CC="$(tc-getCC)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
PACKAGE_DATA_DIR="${EPREFIX}/usr/share/${PN}"
}