# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Neko is an high-level dynamicly typed programming language." HOMEPAGE="http://nekovm.org/" SRC_URI="http://nekovm.org/_media/${P}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="apache mysql" DEPEND="dev-libs/boehm-gc" S=${WORKDIR}/${P}-src src_unpack() { unpack ${A} epatch ${FILESDIR}/${P}-clock-tick.diff epatch ${FILESDIR}/${P}-makefile.diff echo "LD_LIBRARY_PATH=/usr/lib/neko" >${S}/60neko || die } src_compile() { # Note: The Neko build system doesn't seem to provide a method for choosing # compile-time options, such as including/excluding mysql support. Instead, # it basically scans a directory for other directories and compiles whatever # is in them. So, the simplest way to exclude an optional library such as # mysql and apache is to remove the appropriate directory. And that is what # I've done below. if [ $(use mysql) -z ] then rm -fR ${S}/libs/mysql || die "Unable to disable mysql!" fi if [ $(use apache) -z ] then rm -fR ${S}/libs/mod_neko || die "Unable to disable apache!" fi emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die make DESTDIR=${D} install-doc || die doenvd ${S}/60neko || die } pkg_postinst() { einfo "To setup neko environment now, execute 'env-update; source /etc/profile'" }