# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Utah Raster Toolkit - tools for manipulation of RLE images." HOMEPAGE="http://www.cs.utah.edu/gdc/projects/${PN}/" SRC_URI="ftp://ftp.iastate.edu/pub/utah-raster/${PN}-${PV}.tar.Z" LICENSE="urt" SLOT="0" KEYWORDS="~x86" IUSE="X tiff" DEPEND="tiff? ( media-libs/tiff ) X? ( virtual/x11 )" RDEPEND="X? ( virtual/x11 )" src_unpack() { mkdir "${P}" cd "${S}" unpack "${A}" epatch "${FILESDIR}/${PF}-gentoo.diff" } src_compile() { fperms u+w "${S}/config/urt" einfo "Injecting portage CFLAGS to urt config file." echo >>"${T}/urt.conf" "ExtraCFLAGS=${CFLAGS}" use X && echo >>"${T}/urt.conf" "#define X11" echo >>"${T}/urt.conf" "#define GIF" use tiff && echo >>"${T}/urt.conf" "#define TIFF" echo >>"${T}/urt.conf" "#define TARGA" echo >>"${T}/urt.conf" "#define PBM" cat >>"${T}/urt.conf" "${S}/config/urt" mv "${T}/urt.conf" "${S}/config/urt" cd "${S}/man" cat makefile.src | awk -f ../makedef.awk > makefile cd "${S}" ./Configure config/urt emake || die "emake failed" } src_install() { einfo install cd "${S}" dodir "/usr/bin" dodir "/usr/share/man/man3" dodir "/usr/share/man/man1" dodir "/usr/share/man/man5" dodir "/usr/lib" dodir "/usr/include" make install dodoc "${S}/3.1-changes" "${S}/CHANGES{,.raw}" "${S}/README" "${S}/MANIFEST.new" \ "${S}/copyright" }