# Copyright 1999-2006 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="library providing pixel operations, graphics primitives, FreeType rendering, rotation/scaling and more to SDL" HOMEPAGE="http://www.digitalfanatics.org/cal/sge/index.html" SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/sge${PV}.tar.gz http://www.digitalfanatics.org/cal/sge/files/sge${PV}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="truetype image" RDEPEND=">=media-libs/libsdl-1.2 image? ( >=media-libs/sdl-image-1.2 ) truetype? ( >=media-libs/freetype-2 )" DEPEND="${RDEPEND} >=sys-apps/sed-4" S=${WORKDIR}/sge${PV} src_unpack() { unpack ${A} cd ${S} sed -i "s,PREFIX =\$(shell sdl-config --prefix),PREFIX =$D/\$(shell sdl-config --prefix),g" ${S}/Makefile.conf || die "sed Makefile.conf failed" sed -i "s,PREFIX_H =\$(shell sdl-config --prefix)/include/SDL,PREFIX_H=$D/\$(shell sdl-config --prefix)/include/SDL,g" ${S}/Makefile.conf || die "sed Makefile.conf 2 failed" epatch ${FILESDIR}/sge-freetype.patch || die "patching for freetype failed" } src_install() { emake install || die "emake install failed" dodoc INSTALL LICENSE README Todo WhatsNew || die "dodoc failed" dohtml docs/* sed -i "4,6d" examples/README insinto /usr/doc/${P}/examples doins examples/README examples/ttf_readme doins examples/*.{c,cpp,bmp,ttf} }