1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils autotools
8 DESCRIPTION
="An X Window implementation of the Glk API"
9 HOMEPAGE
="http://www.eblong.com/zarf/glk/"
10 SRC_URI
="mirror://ifarchive/programming/glk/implementations/${MY_P}.tar.Z
11 mirror://ifarchive/programming/glk/implementations/patches/xglk0411-sdl-mixer-sound.tgz"
15 KEYWORDS
="~amd64 ~x86"
18 RDEPEND
="x11-libs/libX11
19 jpeg? ( media-libs/jpeg )
20 png? ( media-libs/libpng )
21 sdl? ( media-libs/libsdl
22 media-libs/sdl-mixer )"
24 >=dev-games/glk-headers-0.7.0-r1
33 epatch ..
/xglk-sdl-mixer-24bit-sanity.
diff
34 epatch
"${FILESDIR}"/xglk-0.4
.11-64bit.
patch
35 epatch
"${FILESDIR}"/xglk-0.4
.11-optional-sdl.
patch
36 epatch
"${FILESDIR}"/xglk-0.4
.11-r1-garglk-extensions.
patch
38 cp "${FILESDIR}"/xglk-0.4
.11-configure.ac configure.ac || die
"cp configure.ac failed"
39 cp "${FILESDIR}"/xglk-0.4
.11-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"
47 econf $
(use_with jpeg
) \
49 $
(use_with sdl
) || die
"econf failed"
50 emake || die
"emake failed"
54 emake DESTDIR
="${D}" install || die
"emake install failed"
55 dodoc PREFS README TODO || die
"dodoc failed"
57 insinto
/etc
/glkloader.d
58 cat >"${T}"/xglk.rc
<<-EOF
60 path = /usr/$(get_libdir)/libxglk.so
62 doins
"${T}"/xglk.rc || die
"doins xglk.rc failed"