# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P="${PN}${PV}" DESCRIPTION="Graphics extensions library for SDL" HOMEPAGE="http://www.etek.chalmers.se/~e8cal1/sge/" SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/${MY_P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 x86" IUSE="examples image truetype" RDEPEND=">=media-libs/libsdl-1.2 image? ( >=media-libs/sdl-image-1.2 ) truetype? ( >=media-libs/freetype-2 )" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-gentoo.patch } src_compile() { rm sge_config.h yesno() { use $1 && echo y || echo n ; } emake \ USE_IMG=$(yesno image) \ USE_FT=$(yesno truetype) \ || die "emake failed" if use examples ; then cd examples emake -j1 \ USE_IMG=$(yesno image) \ USE_FT=$(yesno truetype) \ || die "emake (examples) failed" fi } src_install() { make install DESTDIR="${D}" || die "make install failed" dodoc README Todo WhatsNew dohtml docs/* if use examples ; then cd examples insinto /usr/share/doc/${PF}/examples doins *.cpp *\.c font.bmp font.ttf Makefile README sfont.png \ smiley.bmp ttf_readme tux.bmp exeinto /usr/share/doc/${PF}/examples doexe bitmapfont blib collision fire poly rotate speedtest sprite \ sprite2 use truetype && doexe alpha basics blitting input inputdeluxe sfont use image && doexe sfont fi }