1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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.)
19 DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats"
20 HOMEPAGE="http://ccxvii.net/gargoyle/"
21 SRC_URI="http://garglk.googlecode.com/files/${MY_P}-sources.zip"
23 LICENSE="BSD GPL-2 MIT Hugo Glulxe"
27 RDEPEND="media-libs/freetype:2
30 media-fonts/liberation-fonts
31 >=media-fonts/libertine-ttf-5
42 # Substitute custom CFLAGS/LDFLAGS.
45 s/ \(-O.*\)\? ;/ ${CFLAGS} ;/
46 a LINKFLAGS = ${LDFLAGS} ;
47 a SHRLINKFLAGS = ${LDFLAGS} ;
50 # Convert garglk.ini to UNIX format.
51 edos2unix garglk/garglk.ini
53 # The font name of Linux Libertine changed in version 5.
54 sed -i -e 's/Linux Libertine O/Linux Libertine/g' garglk/garglk.ini
59 -sGARGLKINI="${GAMES_SYSCONFDIR}/garglk.ini" \
67 _BINDIR="${GAMES_PREFIX}/libexec/${PN}" \
68 _APPDIR="${GAMES_PREFIX}/libexec/${PN}" \
69 _LIBDIR="$(games_get_libdir)" \
74 # Install config file.
75 insinto "${GAMES_SYSCONFDIR}"
76 newins garglk/garglk.ini garglk.ini || die
78 # Install application entry and icon.
79 insinto /usr/share/applications
80 doins garglk/${PN}.desktop || die
81 doicon garglk/${PN}-house.png || die
83 # Symlink binaries to avoid name clashes.
84 for terp in advsys agility alan2 alan3 frotz geas git glulxe hugo jacl \
85 level9 magnetic nitfol scare tadsr
87 dosym "${GAMES_PREFIX}/libexec/${PN}/${terp}" \
88 "${GAMES_BINDIR}/${PN}-${terp}" || die
91 # Also symlink the main binary since it resides in libexec.
92 dosym "${GAMES_PREFIX}/libexec/${PN}/${PN}" \
93 "${GAMES_BINDIR}/${PN}" || die