# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="The Scalable Parallel Random Number Generators Library" HOMEPAGE="http://sprng.cs.fsu.edu" SRC_URI="http://sprng.cs.fsu.edu/Version1.0/${PN}.tar.Z" LICENSE="as-is" SLOT="0" KEYWORDS="~x86" IUSE="doc fortran" # none that I can dig up DEPEND="" # package folder is explicit S="${WORKDIR}/${PN}" src_compile() { # replace platform with variables specified in make.CHOICES # there are also options like SUN and DEC, so uname might have # to be changed to uname -m PLAT="$(uname)" PLAT="$(echo ${PLAT} | sed -e s/Linux/LINUX/)" if [${PLAT}!="LINUX"]; then eerror "Compilation on ${PLAT} not enabled!" else einfo "Compiling sprng for ${PLAT} platform" sed -i "s/^PLAT/#PLAT/g" make.CHOICES sed -i "s/^#PLAT = ${PLAT}/PLAT = ${PLAT}/g" make.CHOICES fi if use fortran; then einfo "compiling with fortran support" else sed -i "s/^F77/#F77/g" SRC/make.${PLAT} sed -i "s/#F77 = echo/F77 = echo/g" SRC/make.${PLAT} fi cd SRC && make || die "emake failed" } src_test() { # make tests and extraneous packages make || die "emake failed" einfo "Beginning test suite" ./checksprng | tee tests.log # this doesn't work here. why? # PASSED=$(grep FAILED tests.log) # if [${PASSED}!="1"]; then # die "Test suite failed!" # fi } src_install() { # none of this should have to change for version 2 dolib lib/*.a insinto /usr/include doins include/interface.h include/sprng.h if use fortran; then doins include/sprng_f.h fi dodoc DOCS/README if use doc; then echo ">>> Unpacking ${PN}.html.tar.Z to $PWD/DOCS" cd DOCS && tar -Zxf ${PN}.html.tar.Z dohtml www/* fi }