# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/app-sci/snns/snns-4.2.ebuild,v 1.1 2002/11/08 08:22:05 vapier Exp $ MY_P="SNNSv${PV}" DESCRIPTION="Stuttgart Neural Network Simulator" HOMEPAGE="http://www-ra.informatik.uni-tuebingen.de/SNNS/" SRC_URI="http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.tar.gz doc? ( http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.Manual.pdf )" LICENSE="SNNS-${PV}" KEYWORDS="x86" SLOT="0" IUSE="X doc" DEPEND="virtual/x11 virtual/glibc" S="${WORKDIR}/${MY_P}" src_unpack() { for file in ${A}; do echo ${file} | egrep -q ".pdf$" || unpack ${file} done cd ${S} patch -p0 < ${FILESDIR}/${P}-gentoo.patch || die "patch failed" } src_compile() { local myconf="--enable-global" local compileopts="compile-kernel compile-tools" use X || myconf="${myconf} --without-x" use X && compileopts="${compileopts} compile-xgui" econf --host=${CHOST} ${myconf} || die "econf failed" emake ${compileopts} || die "emake failed" } src_install() { for file in `find tools -type f -perm +100`; do dobin $file done if [ -x xgui/sources/xgui ]; then newbin xgui/sources/xgui snns fi dodir /etc/env.d use X && echo XGUILOADPATH=/usr/share/doc/${P}/ > ${D}/etc/env.d/99snns insinto /usr/share/doc/${P} use X && doins default.cfg help.hdoc use doc && doins ${DISTDIR}/SNNSv4.2.Manual.pdf insinto /usr/share/doc/${P}/examples doins examples/* doman man/man*/* }