1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils autotools
9 MY_PV
=${PV:0:4}-${PV:4:2}-${PV:6:2}
10 DESCRIPTION
="A typographically beautiful Glk library"
11 HOMEPAGE
="http://ccxvii.net/gargoyle/ http://code.google.com/p/garglk/"
12 SRC_URI
="http://garglk.googlecode.com/files/gargoyle-${MY_PV}-sources.zip"
15 LICENSE
="GPL-2 LICENSE-BITSTREAM font-bh-ttf"
17 KEYWORDS
="~amd64 ~x86"
20 RDEPEND
="media-libs/freetype:2
24 sdl? ( media-libs/sdl-mixer
25 media-libs/sdl-sound )"
28 >=dev-games/glk-headers-0.7.0-r2"
36 cp "${FILESDIR}"/garglk-20081225-configure.ac configure.ac || die
"cp configure.ac failed"
37 cp "${FILESDIR}"/garglk-20090825-Makefile.am Makefile.am || die
"cp Makefile.am failed"
38 sed -i -e "s,@PV@,${PV}," configure.ac || die
"sed failed"
41 rm glk.h gi_blorb.h gi_dispa.h glkstart.h || die
"rm glk headers failed"
44 -e s
/Frotz
/GlkFrotz
/ -e s
/frotz
/glkfrotz
/ \
45 -e s
/Git
/GlulxGit
/ -e s
/git
/glulxgit
/ \
46 garglk.ini || die
"sed garglk.ini failed"
50 econf $
(use_with sdl
) || die
"econf failed"
51 emake || die
"emake failed"
55 emake DESTDIR
="${D}" install || die
"emake install failed"
56 dodoc TODO CharterBT.txt || die
"dodoc failed"
58 doins garglk.ini || die
"doins garglk.ini failed"
60 insinto
/etc
/glkloader.d
61 cat >"${T}"/garglk.rc
<<-EOF
63 path = /usr/$(get_libdir)/libgarglk.so
65 doins
"${T}"/garglk.rc || die
"doins garglk.rc failed"