gargoyle: use makeopts_jobs from eutils.eclass
[gentoo-interactive-fiction.git] / games-engines / gargoyle / gargoyle-2011.1.ebuild
Commit [+]AuthorDateLineData
57c2d7c7
NC
Nikos Chantziaras2012-03-26 00:47:02 +03001# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5# Regarding licenses: libgarglk is licensed under the GPLv2. Bundled
6# interpreters are licensed under GPLv2, BSD or MIT license, except:
7# - glulxe: custom license, see "terps/glulxle/README"
8# - hugo: custom license, see "licenses/HUGO License.txt"
9# Since we don't compile or install any of the bundled fonts, their licenses
10# don't apply. (Fonts are installed through dependencies instead.)
11
57c2d7c7
NC
Nikos Chantziaras2012-03-26 00:47:02 +030012EAPI=3
13
14inherit eutils games
15
16DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats"
17HOMEPAGE="http://ccxvii.net/gargoyle/"
dfae41be Nikos Chantziaras2012-03-27 08:44:23 +030018SRC_URI="http://garglk.googlecode.com/files/${P}-sources.zip"
57c2d7c7
NC
Nikos Chantziaras2012-03-26 00:47:02 +030019
20LICENSE="BSD GPL-2 MIT Hugo Glulxe"
21SLOT="0"
22KEYWORDS="amd64 x86"
23
24RDEPEND="media-libs/freetype:2
25 virtual/jpeg
26 media-libs/libpng
27 media-fonts/liberation-fonts
28 >=media-fonts/libertine-ttf-5
29 sys-libs/zlib
30 x11-libs/gtk+:2
31 media-libs/sdl-mixer
32 media-libs/sdl-sound"
33
34DEPEND="${RDEPEND}
35 app-arch/unzip
36 dev-util/ftjam"
37
38src_prepare() {
39 # Substitute custom CFLAGS/LDFLAGS.
40 sed -i -e \
41 "/^\s*OPTIM = / {
42 s/ \(-O.*\)\? ;/ ${CFLAGS} ;/
43 a LINKFLAGS = ${LDFLAGS} ;
44 a SHRLINKFLAGS = ${LDFLAGS} ;
45 }" Jamrules || die
46
47 # Convert garglk.ini to UNIX format.
48 edos2unix garglk/garglk.ini
49
50 # The font name of Linux Libertine changed in version 5.
51 sed -i -e 's/Linux Libertine O/Linux Libertine/g' garglk/garglk.ini
52}
53
54src_compile() {
55 jam \
56 -sGARGLKINI="${GAMES_SYSCONFDIR}/garglk.ini" \
57 -sUSESDL=yes \
58 -sBUNDLEFONTS=no \
d99cea3d Nikos Chantziaras2012-04-17 13:17:39 +030059 -j$(makeopts_jobs) || die
57c2d7c7
NC
Nikos Chantziaras2012-03-26 00:47:02 +030060}
61
62src_install() {
63 DESTDIR="${D}" \
64 _BINDIR="${GAMES_PREFIX}/libexec/${PN}" \
65 _APPDIR="${GAMES_PREFIX}/libexec/${PN}" \
66 _LIBDIR="$(games_get_libdir)" \
67 EXEMODE=755 \
68 FILEMODE=755 \
69 jam install || die
70
71 # Install config file.
72 insinto "${GAMES_SYSCONFDIR}"
73 newins garglk/garglk.ini garglk.ini || die
74
75 # Install application entry and icon.
76 insinto /usr/share/applications
77 doins garglk/${PN}.desktop || die
78 doicon garglk/${PN}-house.png || die
79
80 # Symlink binaries to avoid name clashes.
81 for terp in advsys agility alan2 alan3 frotz geas git glulxe hugo jacl \
82 level9 magnetic nitfol scare tadsr
83 do
84 dosym "${GAMES_PREFIX}/libexec/${PN}/${terp}" \
85 "${GAMES_BINDIR}/${PN}-${terp}" || die
86 done
87
88 # Also symlink the main binary since it resides in libexec.
89 dosym "${GAMES_PREFIX}/libexec/${PN}/${PN}" \
90 "${GAMES_BINDIR}/${PN}" || die
91
92 prepgamesdirs
93}