commit:     9030205024d99b280b5dfb35de5e5ee173d511ee
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  6 20:56:39 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 20:59:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90302050

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 <AT> gentoo.org>

 .../gnurobbo/files/gnurobbo-0.68-cflags-d.patch    | 14 --------------
 .../gnurobbo/files/gnurobbo-0.68-flags.patch       | 22 ++++++++++++++++++++++
 games-puzzle/gnurobbo/gnurobbo-0.68.ebuild         |  6 ++++--
 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 84a7567a788..00000000000
--- 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 <[email protected]>
-
---- 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 00000000000..2a0f63ce880
--- /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 1f142c1ff64..fded8903934 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}"
 }
 

Reply via email to