Skip to content

Commit

Permalink
games-puzzle/gnurobbo: Respect CC and LDFLAGS, use pkg-config
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: James Le Cuirot <[email protected]>
  • Loading branch information
chewi committed Sep 6, 2020
1 parent 1268584 commit 9030205
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
14 changes: 0 additions & 14 deletions games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch

This file was deleted.

22 changes: 22 additions & 0 deletions games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 4 additions & 2 deletions games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand All @@ -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}"
}

Expand Down

0 comments on commit 9030205

Please sign in to comment.