# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="PGPLOT Graphics Subroutine Library" HOMEPAGE="http://www.astro.caltech.edu/~tjp/pgplot/index.html" SRC_URI="ftp://ftp.astro.caltech.edu/pub/${PN}/${PN}${PVR}.tar.gz" LICENSE="free-noncomm" SLOT="0" KEYWORDS="~x86" IUSE="doc" DEPEND="" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} || die "Unpacking the source failed" cd ${S} || die "Could not change directory." epatch ${FILESDIR}/useful_drivers.patch } src_compile() { ${S}/makemake ${S} linux g77_gcc || die "Configure failed" make || die "Make failed" make cpg || die "Make cpg failed" ld -shared -o libcpgplot.so --whole-archive libcpgplot.a || die "Could not create shared lib" use doc && make pgplot.html pgplot-routines.tex make clean || die "Make clean failed" } src_install() { dodir ${ROOT}/usr/share/${P}/demo chmod +x pgdemo* cp pgdemo* ${D}/usr/share/${P}/demo cp rgb.txt ${D}/usr/share/${P} cp grfont.dat ${D}/usr/share/${P} cp rg ${D}/usr/share/${P} dolib *.a *.so dodir ${ROOT}/usr/include cp *.h ${D}/usr/include dobin pgxwin_server cpgdemo dodoc pgplot.doc ver*.txt copyright.notice aaaread.me }