# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-libs/gaul-devel/gaul-devel-0.1846.ebuild,v 1.2 2004/06/24 23:10:44 agriffis Exp $ inherit eutils DESCRIPTION="Genetic Algorithm Utility Library" HOMEPAGE="http://GAUL.sourceforge.net/" SRC_URI="mirror://sourceforge/gaul/${P}-0.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="slang doc debug" DEPEND=" slang? ( >=slang-1.4.5-r2 ) >=sed-4.0.7 " RDEPEND="slang? ( >=slang-1.4.5-r2 )" # Talked to Stewart about his version scheme, but he is unlikely to chnage it S=${WORKDIR}/${P}-0 src_unpack() { unpack ${P}-0.tar.gz # better CFLAGS support (patch from CVS) echo "${S}" cd "${S}" epatch "${FILESDIR}/${P}-CFLAGS-fix.diff" } src_compile() { local myconf="--bindir=/usr/share/${PN}/bin --enable-ccoptim=no" useq slang || myconf="${myconf} --enable-slang=no" # do not install examples in bindir unless +doc useq doc || sed -i -e 's/bin_PROGRAMS/noinst_PROGRAMS/g' ${S}/examples/Makefile.am # do not add -g and use ${CFLAGS} as set unless +debug useq debug || myconf="${myconf} --enable-g=no --enable-debug=no" econf ${myconf} || die "econf failed" emake || die } src_install() { make DESTDIR=${D} install || die useq doc && ( dodir /usr/share/${PN} for dir in tests examples do cd ${S}/${dir} && make clean cp -a ${S}/${dir} ${D}/usr/share/${PN} done ) } pkg_postinst() { einfo einfo "There are a few important API changes between 0.1846 and 0.1847" einfo "As they may break your code, please read the following:" einfo "http://gaul.sourceforge.net/porting_1846_to_1847.html" einfo }