# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils multilib autotools MY_PN="Pixie" S="${WORKDIR}/${MY_PN}" DESCRIPTION="RenderMan like photorealistic renderer." HOMEPAGE="http://pixie.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-src-${PV}.tgz" LICENSE="GPL-2" IUSE="X static-libs" SLOT="0" KEYWORDS="amd64 ~ppc sparc x86" RDEPEND="!mail-client/nmh media-libs/jpeg media-libs/tiff media-libs/libpng x11-libs/fltk:1.1[opengl] media-libs/openexr virtual/opengl sys-libs/zlib X? ( x11-libs/libXext x11-libs/libICE x11-libs/libSM x11-libs/libX11 x11-libs/libXau x11-libs/libxcb x11-libs/libXdmcp x11-libs/libXi x11-libs/libXmu x11-libs/libXt )" DEPEND="${RDEPEND} sys-devel/flex sys-devel/bison" src_prepare() { # FIX: force make to rebuild the shaders since the ones bundled # are not always compiled with the latest version of 'sdrc' epatch "${FILESDIR}/${P}-shaders.patch" # FIX: missing @includedir@ epatch "${FILESDIR}/${P}-autotools.patch" eautoreconf } src_configure() { econf \ $(use_with X x) \ $(use_enable static-libs static) \ --includedir=/usr/include/pixie \ --libdir=/usr/$(get_libdir)/pixie \ --with-docdir=/usr/share/doc/${P}/html \ --with-shaderdir=/usr/share/Pixie/shaders \ --with-ribdir=/usr/share/Pixie/ribs \ --with-texturedir=/usr/share/Pixie/textures \ --with-displaysdir=/usr/$(get_libdir)/pixie/displays \ --with-modulesdir=/usr/$(get_libdir)/pixie/modules \ --enable-openexr-threads \ --mandir=/usr/share/man \ --bindir=/usr/bin } src_compile() { # compiling Pixie if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ] ; then emake || die "emake failed" fi # regenerating Pixie shaders einfo "Re-building Pixie Shaders for v${PV} format" cd "${S}/shaders" emake || die "shaders regeneration failed." cd "${S}" } src_install() { emake DESTDIR="${D}" install || die "installation failed." # remove useless .la files find "${D}" -name '*.la' -delete dodoc {README,AUTHORS,ChangeLog} }