# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Neko is a high-level dynamically typed programming language." HOMEPAGE="http://nekovm.org/" SRC_URI="http://nekovm.org/_media/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="apache mysql sqlite" DEPEND="dev-libs/boehm-gc" RDEPEND="" pkg_setup() { # Check for threads enable for boehm-gc ewarn "Checking USE flags of dependencies... one moment" if ! built_with_use dev-libs/boehm-gc threads; then eerror "Re-emerge dev-libs/boehm-gc with the 'threads' USE flag" die fi } 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 if [ $(use sqlite) -z ] then rm -fR ${S}/libs/sqlite || die "Unable to disable sqlite!" fi emake || die "emake failed" } src_install() { dolib bin/libneko.so dobin bin/{neko,nekoc,nekotools} insinto /usr/local/include doins vm/neko*.h insinto /usr/local/lib/neko doins bin/*.ndll } pkg_postinst() { einfo "To setup neko environment now, execute" einfo "'env-update; source /etc/profile'" }