Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-roguelike/stone-soup/files: stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch stone-soup-0.15.2-respect-flags-and-compiler.patch
Date: Mon, 27 Oct 2014 19:59:06
Message-Id: 20141027195902.7248C8E0B@oystercatcher.gentoo.org
1 hasufell 14/10/27 19:59:02
2
3 Added:
4 stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch
5 stone-soup-0.15.2-respect-flags-and-compiler.patch
6 Log:
7 version bump, possibly fix bug #527034
8
9 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
10
11 Revision Changes Path
12 1.1 games-roguelike/stone-soup/files/stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/stone-soup/files/stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/stone-soup/files/stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch?rev=1.1&content-type=text/plain
16
17 Index: stone-soup-0.15.2-Use-pkg-config-for-linking-to-ncurses.patch
18 ===================================================================
19 From 88579f929f0fc777762de1ad0895264ad077e0ee Mon Sep 17 00:00:00 2001
20 From: hasufell <hasufell@g.o>
21 Date: Mon, 27 Oct 2014 20:48:03 +0100
22 Subject: [PATCH 2/2] Use pkg-config for linking to ncurses
23
24 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=527034
25 ---
26 source/Makefile | 14 ++++++--------
27 1 file changed, 6 insertions(+), 8 deletions(-)
28
29 diff --git a/source/Makefile b/source/Makefile
30 index df51e70..2db2781 100644
31 --- a/source/Makefile
32 +++ b/source/Makefile
33 @@ -956,17 +956,15 @@ endif
34 # Your ncurses library may include Unicode support, and you may not have a
35 # separate libncursesw; this is the case on Mac OS/Darwin.
36 ifdef LIBNCURSES_IS_UNICODE
37 -NC_LIB = ncurses
38 -NC_INCLUDE = $(NC_PREFIX)/include/ncurses
39 +NC_LIBS = $(shell $(PKGCONFIG) --lib ncurses 2>/dev/null || echo "-L$(NC_PREFIX)/lib -lncurses")
40 +NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncurses 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncurses")
41 else
42 -NC_LIB = ncursesw
43 -NC_INCLUDE = $(NC_PREFIX)/include/ncursesw
44 +NC_LIBS = $(shell $(PKGCONFIG) --lib ncursesw || echo "-L$(NC_PREFIX)/lib -lncursesw")
45 +NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncursesw 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncursesw")
46 endif
47
48 -INCLUDES_L += -isystem $(NC_INCLUDE)
49 -
50 ifndef TILES
51 -LIBS += -L$(NC_PREFIX)/lib -l$(NC_LIB)
52 +LIBS += $(NC_LIBS)
53 endif
54
55 endif
56 @@ -1111,7 +1109,7 @@ CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN) $(CFLAGS)
57 else
58 CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN)
59 endif
60 -CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L)
61 +CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L) $(NC_CFLAGS)
62 ALL_CFLAGS := $(CFLAGS) $(CFLAGS_L)
63 YACC_CFLAGS := $(ALL_CFLAGS) -Wno-unused-function -Wno-sign-compare -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0
64
65 --
66 2.1.2
67
68
69
70
71 1.1 games-roguelike/stone-soup/files/stone-soup-0.15.2-respect-flags-and-compiler.patch
72
73 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/stone-soup/files/stone-soup-0.15.2-respect-flags-and-compiler.patch?rev=1.1&view=markup
74 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/stone-soup/files/stone-soup-0.15.2-respect-flags-and-compiler.patch?rev=1.1&content-type=text/plain
75
76 Index: stone-soup-0.15.2-respect-flags-and-compiler.patch
77 ===================================================================
78 From 14abbe4e6c888148caecbf16231ae48499d6d2b2 Mon Sep 17 00:00:00 2001
79 From: hasufell <hasufell@g.o>
80 Date: Mon, 27 Oct 2014 20:39:50 +0100
81 Subject: [PATCH 1/2] respect flags and compiler
82
83 ---
84 source/Makefile | 5 ++---
85 source/rltiles/Makefile | 22 +++++++++++-----------
86 2 files changed, 13 insertions(+), 14 deletions(-)
87
88 diff --git a/source/Makefile b/source/Makefile
89 index db39bd9..df51e70 100644
90 --- a/source/Makefile
91 +++ b/source/Makefile
92 @@ -101,7 +101,7 @@ include Makefile.obj
93 #
94
95
96 -CFOTHERS := -pipe $(EXTERNAL_FLAGS)
97 +CFOTHERS := $(EXTERNAL_FLAGS)
98 CFWARN := -Wall -Wformat-security
99 CFWARN_L := -Wundef
100
101 @@ -770,7 +770,6 @@ ifdef FULLDEBUG
102 DEFINES += -DFULLDEBUG
103 endif
104 ifdef DEBUG
105 -CFOTHERS := -ggdb $(CFOTHERS)
106 DEFINES += -DDEBUG
107 endif
108 ifndef NOWIZARD
109 @@ -1559,7 +1558,7 @@ ifdef ANDROID
110 # prove that tiles were generated properly
111 grep tile_info rltiles/*.cc| head
112 else
113 - +$(MAKE) -C $(RLTILES) all ARCH=$(ARCH) TILES=$(TILES)$(WEBTILES)
114 + +$(MAKE) -C $(RLTILES) all V=$(V) ARCH=$(ARCH) DEBUG=$(DEBUG) TILES=$(TILES)$(WEBTILES)
115 endif
116
117 $(TILEDEFSRCS) $(TILEDEFHDRS) $(ORIGTILEFILES): build-rltiles
118 diff --git a/source/rltiles/Makefile b/source/rltiles/Makefile
119 index aacd551..41b3ebe 100644
120 --- a/source/rltiles/Makefile
121 +++ b/source/rltiles/Makefile
122 @@ -1,7 +1,7 @@
123 uname_S := $(shell uname -s)
124
125 ifneq (,$(findstring MINGW,$(uname_S)))
126 -LDFLAGS += -lmingw32
127 +LIBS += -lmingw32
128 endif
129
130 # Note: since generation of tiles is done on the host, we don't care about
131 @@ -10,7 +10,7 @@ endif
132 # Also, cross-compilation with no system libraries for host rather than target
133 # is not supported. If host=target, contribs are enough.
134
135 -CFLAGS := -O2 -g -Wall -Wextra -Wno-parentheses -Wno-unused-parameter
136 +CXXFLAGS := -Wall -Wextra -Wno-parentheses -Wno-unused-parameter
137
138 ifdef ANDROID
139 CXXFLAGS :=
140 @@ -35,24 +35,24 @@ ifdef TILES
141 PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a
142 endif
143
144 - CFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE)
145 - LDFLAGS += $(SDL_LDFLAGS) $(PNG_LIB)
146 + CXXFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE)
147 + LIBS += $(SDL_LDFLAGS) $(PNG_LIB)
148
149 - CFLAGS += -DUSE_TILE
150 + CXXFLAGS += -DUSE_TILE
151 endif
152
153 ifdef DEBUG
154 -CFLAGS += -O0 -DDEBUG -ggdb
155 +CXXFLAGS += -DDEBUG
156 endif
157
158 ifneq (,$(findstring MINGW,$(uname_S)))
159 -LDFLAGS += -lgdi32 -lwinmm
160 +LIBS += -lgdi32 -lwinmm
161 endif
162 ifeq ($(uname_S),Darwin)
163 LDFLAGS += -framework AppKit -framework AudioUnit -framework Carbon -framework IOKit -framework OpenGL
164 endif
165 ifeq ($(uname_S),Linux)
166 -LDFLAGS += -ldl -lpthread
167 +LIBS += -ldl -lpthread
168 endif
169
170 # Attempt to use a full compiler name, to make
171 @@ -137,10 +137,10 @@ clean:
172
173 distclean: clean
174
175 -%.o: %.cc .cflags
176 - $(QUIET_HOSTCXX)$(HOSTCXX) $(CFLAGS) -MMD -c $< -o $@
177 +%.o: %.cc
178 + $(QUIET_HOSTLINK)$(HOSTCXX) $(CXXFLAGS) -c $< -o $@
179
180 $(TILEGEN): $(OBJECTS)
181 - $(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(LDFLAGS)
182 + $(QUIET_HOSTLINK)$(HOSTCXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(LDFLAGS) $(LIBS)
183
184 .PHONY: all clean distclean
185 --
186 2.1.2