games-strategy/zod-engine: improve wx-config invocation

This commit is contained in:
Julian Ospald 2016-09-11 18:43:27 +02:00
parent cb61fcafd2
commit 424680bd9a
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
From: Julian Ospald <hasufell@gentoo.org> From: Julian Ospald <hasufell@gentoo.org>
Date: Sun Aug 12 09:26:49 UTC 2012 Date: Sun Aug 12 09:26:49 UTC 2012
Subject: build system Subject: build system
Upstream: yes Upstream: yes/partly (upstream is dead anyway)
respect CXX and CXXFLAGS respect CXX and CXXFLAGS
@ -579,10 +579,11 @@ respect CXX and CXXFLAGS
zip zod_src_${DATE}.zip *.cpp *.h makefile zip zod_src_${DATE}.zip *.cpp *.h makefile
--- zod_engine/zod_launcher_src/makefile --- zod_engine/zod_launcher_src/makefile
+++ zod_engine/zod_launcher_src/makefile +++ zod_engine/zod_launcher_src/makefile
@@ -1,2 +1,11 @@ @@ -1,2 +1,13 @@
+WX_CONFIG ?= wx-config
+CXX ?= g++ +CXX ?= g++
+CXXFLAGS += `wx-config --cppflags` +CXXFLAGS += `$(WX_CONFIG) --cppflags`
+LIBS += `wx-config --libs` +LIBS += `$(WX_CONFIG) --libs`
+EXENAME = zod_launcher +EXENAME = zod_launcher
+ +
+ifdef DATA_PATH +ifdef DATA_PATH
@ -592,3 +593,4 @@ respect CXX and CXXFLAGS
default: default:
- g++ -g -o zod_launcher *.cpp `wx-config --cppflags` `wx-config --libs` - g++ -g -o zod_launcher *.cpp `wx-config --cppflags` `wx-config --libs`
+ $(CXX) $(CXXFLAGS) -o $(EXENAME) *.cpp $(LDFLAGS) $(LIBS) + $(CXX) $(CXXFLAGS) -o $(EXENAME) *.cpp $(LDFLAGS) $(LIBS)
+

View File

@ -37,15 +37,14 @@ src_prepare() {
edo find "${WORK}" -type f \( -name Thumbs.db -o -name "*.xcf" -o -name "*.ico" \) -delete edo find "${WORK}" -type f \( -name Thumbs.db -o -name "*.xcf" -o -name "*.ico" \) -delete
edo rm assets/{splash.png,WebCamScene.icescene} edo rm assets/{splash.png,WebCamScene.icescene}
# fix some tool invocations
eval $(eclectic wxwidgets script 2.8-gtk2) # FIXME: this probably breaks multiarch?
edo sed -i -e "s#-lmysqlclient#\$\(shell /usr/$(exhost --target)/bin/mysql_config \-\-libs\)#" \ edo sed -i -e "s#-lmysqlclient#\$\(shell /usr/$(exhost --target)/bin/mysql_config \-\-libs\)#" \
zod_src/makefile zod_src/makefile
} }
src_compile() { src_compile() {
emake -C zod_src DATA_PATH="\"/usr/share/${PN}\"" main map_editor emake -C zod_src DATA_PATH="\"/usr/share/${PN}\"" main map_editor
emake -C zod_launcher_src DATA_PATH="\"/usr/share/${PN}\"" WX_CONFIG="/usr/$(exhost --target)/bin/wx-config-2.8" \
emake -C zod_launcher_src DATA_PATH="\"/usr/share/${PN}\""
} }
src_install() { src_install() {