summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen <eroen@occam.eroen.eu>2014-12-21 22:56:06 +0100
committereroen <eroen@occam.eroen.eu>2014-12-26 19:01:50 +0100
commitaa11b3d3e64623fbf8c8f43e18a6028f86279dc8 (patch)
treecbeb606e94368fe3b31a221adc84e1b976511c75 /games-simulation
parentsimutrans - make sound optional (diff)
downloaderoen-aa11b3d3e64623fbf8c8f43e18a6028f86279dc8.tar.gz
eroen-aa11b3d3e64623fbf8c8f43e18a6028f86279dc8.tar.bz2
eroen-aa11b3d3e64623fbf8c8f43e18a6028f86279dc8.zip
simutrans - enable freetype
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/simutrans/simutrans-0.120.0.1.ebuild20
1 files changed, 18 insertions, 2 deletions
diff --git a/games-simulation/simutrans/simutrans-0.120.0.1.ebuild b/games-simulation/simutrans/simutrans-0.120.0.1.ebuild
index d08c8b1..0daf90d 100644
--- a/games-simulation/simutrans/simutrans-0.120.0.1.ebuild
+++ b/games-simulation/simutrans/simutrans-0.120.0.1.ebuild
@@ -16,9 +16,13 @@ SRC_URI="mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip
LICENSE="Artistic MIT"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
-IUSE="sdl2 sound"
+IUSE="freetype sdl2 +sound"
RDEPEND="
+ freetype? (
+ virtual/pkgconfig
+ media-libs/freetype:2
+ )
sdl2? (
media-libs/libsdl2[opengl,video]
sound? (
@@ -63,9 +67,20 @@ src_configure() {
else
backend=sdl
fi
+ sed -e '/^BACKEND/s/=.*$/= '"${backend}"'/' \
+ -i config.default || die
+
+ if use freetype; then
+ cat >> config.default <<-EOF
+ FLAGS += -DUSE_FREETYPE
+ CFLAGS += \$(shell pkg-config freetype2 --cflags)
+ CXXFLAGS += \$(shell pkg-config freetype2 --cflags)
+ LIBS += \$(shell pkg-config freetype2 --libs)
+ EOF
+ fi
+
sed -e '/^DEBUG/d' \
-e '/^OPTIMISE/d' \
- -e '/^BACKEND/s/=.*$/= '"${backend}"'/' \
-i config.default || die
echo 'VERBOSE = 1' >> config.default
}
@@ -78,6 +93,7 @@ src_install() {
dodoc documentation/*
doicon simutrans.ico
make_desktop_entry simutrans Simutrans simutrans.ico
+
prepgamesdirs
}