Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/gnurobbo/, games-puzzle/gnurobbo/files/
Date: Sun, 06 Sep 2020 21:00:23
Message-Id: 1599425998.9030205024d99b280b5dfb35de5e5ee173d511ee.chewi@gentoo
1 commit: 9030205024d99b280b5dfb35de5e5ee173d511ee
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 6 20:56:39 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 6 20:59:58 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90302050
7
8 games-puzzle/gnurobbo: Respect CC and LDFLAGS, use pkg-config
9
10 Package-Manager: Portage-3.0.5, Repoman-3.0.1
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 .../gnurobbo/files/gnurobbo-0.68-cflags-d.patch | 14 --------------
14 .../gnurobbo/files/gnurobbo-0.68-flags.patch | 22 ++++++++++++++++++++++
15 games-puzzle/gnurobbo/gnurobbo-0.68.ebuild | 6 ++++--
16 3 files changed, 26 insertions(+), 16 deletions(-)
17
18 diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch
19 deleted file mode 100644
20 index 84a7567a788..00000000000
21 --- a/games-puzzle/gnurobbo/files/gnurobbo-0.68-cflags-d.patch
22 +++ /dev/null
23 @@ -1,14 +0,0 @@
24 -Description: Drop -d which causes an error with GCC 7
25 -Author: Stephen Kitt <skitt@××××××.org>
26 -
27 ---- a/Makefile
28 -+++ b/Makefile
29 -@@ -61,7 +61,7 @@
30 -
31 -
32 -
33 --CFLAGS+=-d -Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
34 -+CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
35 - -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
36 - LDFLAGS?=
37 - # Use these instead for debugging and/or profiling (mainly intended for GNU Robbo developers)
38
39 diff --git a/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch b/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch
40 new file mode 100644
41 index 00000000000..2a0f63ce880
42 --- /dev/null
43 +++ b/games-puzzle/gnurobbo/files/gnurobbo-0.68-flags.patch
44 @@ -0,0 +1,22 @@
45 +diff --color -Naur a/Makefile b/Makefile
46 +--- a/Makefile 2015-08-26 21:35:29.000000000 +0100
47 ++++ b/Makefile 2020-09-06 21:54:50.074658932 +0100
48 +@@ -61,16 +61,15 @@
49 +
50 +
51 +
52 +-CFLAGS+=-d -Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
53 ++CFLAGS+=-Wall `$(PKG_CONFIG) --cflags sdl SDL_image SDL_mixer SDL_ttf` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" $(SMOOTH_SCRL) $(LIGHTNING)\
54 + -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
55 +-LDFLAGS=
56 + # Use these instead for debugging and/or profiling (mainly intended for GNU Robbo developers)
57 + #CFLAGS?=-O0 -pipe -g -pg
58 + #CFLAGS+=-Wall `$(SDL_CONFIG) --cflags` -DPLATFORM_PC -DVERSION=\"$(VERSION)\" \
59 + # -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" $(FONT_USE_PIXMAP) $(MUSIC) $(DESIGNER)
60 + #LDFLAGS=-pg
61 + LINK=$(CC)
62 +-LIBS=`$(SDL_CONFIG) --libs` -lm -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF)
63 ++LIBS=`$(PKG_CONFIG) --libs sdl SDL_image SDL_mixer SDL_ttf` -lm
64 +
65 + #for caanoo compilation
66 + #LIBS=-L$(GPH_SDK)/DGE/lib/target -L$(GPH_SDK)/lib/target -lSDL_image -lSDL_mixer $(FONT_USE_SDL_TTF)
67
68 diff --git a/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild b/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
69 index 1f142c1ff64..fded8903934 100644
70 --- a/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
71 +++ b/games-puzzle/gnurobbo/gnurobbo-0.68.ebuild
72 @@ -2,7 +2,7 @@
73 # Distributed under the terms of the GNU General Public License v2
74
75 EAPI=7
76 -inherit desktop
77 +inherit desktop toolchain-funcs
78
79 DESCRIPTION="Robbo, a popular Atari XE/XL game ported to Linux"
80 HOMEPAGE="http://gnurobbo.sourceforge.net/"
81 @@ -26,12 +26,14 @@ RDEPEND="
82 DEPEND="${RDEPEND}"
83
84 PATCHES=(
85 - "${FILESDIR}/${P}-cflags-d.patch"
86 + "${FILESDIR}/${P}-flags.patch"
87 "${DISTDIR}/${P}-single-variable-declarations.patch"
88 )
89
90 src_compile() {
91 emake \
92 + CC="$(tc-getCC)" \
93 + PKG_CONFIG="$(tc-getPKG_CONFIG)" \
94 PACKAGE_DATA_DIR="${EPREFIX}/usr/share/${PN}"
95 }