# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P=${P//./} DESCRIPTION="An X Window implementation of the Glk API 0.61" HOMEPAGE="http://www.eblong.com/zarf/glk" SRC_URI="http://mirror.ifarchive.org/if-archive/programming/glk/implementations/${MY_P}.tar.Z" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND=">=media-libs/libpng-1.2.8 >=media-libs/jpeg-6b-r4 >=x11-base/xorg-x11-6.8.2-r4 >=media-libs/libsdl-1.2.7-r2 >=media-libs/sdl-mixer-1.2.5-r1" S="${WORKDIR}/${PN}" PROVIDE="virtual/glk" src_unpack() { unpack ${A} # patch from http://www.ifarchive.org/if-archive/programming/glk/implementations/patches/xglk0411-sdl-mixer-sound.tgz # by Adam Thornton, fixes a number of issues and adds sound epatch "${FILESDIR}"/xglk-sdl-mixer-24bit-sanity.diff epatch "${FILESDIR}"/0.4.11-64bit.patch cp "${FILESDIR}"/0.4.11-Makefile ${S}/Makefile } src_compile() { emake || die "emake failed" } src_install() { make GLKLIBDIR=${D}/usr/$(get_libdir)/glk GLKINCLUDEDIR=${D}/usr/include/glk install || die dodoc PREFS README TODO insinto /etc/glkloader.d newins ${FILESDIR}/0.4.11-xglk.rc xglk.rc sed -ie "s,lib,$(get_libdir)," "${D}/etc/glkloader.d/xglk.rc" insinto /usr/include/glk doins glkstart.h }