1 # Copyright 1999-2008 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-r1"
36 epatch
"${FILESDIR}"/garglk-20060917-64bit.
patch
38 cp "${FILESDIR}"/garglk-20081225-configure.ac configure.ac || die
"cp configure.ac failed"
39 cp "${FILESDIR}"/garglk-20081225-Makefile.am Makefile.am || die
"cp Makefile.am failed"
40 sed -i -e "s,@PV@,${PV}," configure.ac || die
"sed failed"
43 rm glk.h gi_blorb.h gi_dispa.h glkstart.h || die
"rm glk headers failed"
46 -e s
/Frotz
/GlkFrotz
/ -e s
/frotz
/glkfrotz
/ \
47 -e s
/Git
/GlulxGit
/ -e s
/git
/glulxgit
/ \
48 garglk.ini || die
"sed garglk.ini failed"
52 econf $
(use_with sdl
) || die
"econf failed"
53 emake || die
"emake failed"
57 emake DESTDIR
="${D}" install || die
"emake install failed"
58 dodoc TODO CharterBT.txt || die
"dodoc failed"
60 doins garglk.ini || die
"doins garglk.ini failed"
62 insinto
/etc
/glkloader.d
63 cat >"${T}"/garglk.rc
<<-EOF
65 path = /usr/$(get_libdir)/libgarglk.so
67 doins
"${T}"/garglk.rc || die
"doins garglk.rc failed"