1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 | # Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# NOTE: neko's install.n checks for availability of optional libraries,
# prompting the user for a path if the library is not found.
# We disable this checking (with patch), and care for availability
# by using dependencies. The .ndlls will be built if the dependency
# is installed, but themselves installed only if the respecive
# USE flag is set.
EAPI="2"
inherit depend.apache eutils flag-o-matic multilib
DESCRIPTION="Intermediate programming language, compiler, and virtual machine"
HOMEPAGE="http://nekovm.org/"
SRC_URI="http://nekovm.org/_media/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="apache2 gtk mysql sqlite"
RDEPEND="
dev-libs/boehm-gc[threads]
dev-libs/libpcre
sys-libs/zlib
apache2? ( www-servers/apache[-threads] )
sqlite? ( dev-db/sqlite:3 )
mysql? ( >=dev-db/mysql-5.0.44-r1 )
gtk? ( x11-libs/gtk+:2 )
"
DEPEND="${RDEPEND}
dev-lang/ocaml
gtk? ( dev-util/pkgconfig )
"
# FWICT, the neko/nekoc binaries contain the std library,
# so stripping them would deprive them of their runtime environment.
RESTRICT="strip"
src_prepare() {
epatch ${FILESDIR}/${P}-gentoo.patch
epatch ${FILESDIR}/${P}-64bit.patch
epatch ${FILESDIR}/${P}-mysql_fpic.patch
sed -i -e "s:-Wall -O3:${CFLAGS}:" Makefile || die "CFLAGS Makefile 'sed' fix failed..."
sed -i -e "s:-O3 :${CFLAGS} :" src/tools/install.neko || die "CFLAGS install.neko 'sed' fix failed..."
}
src_compile() {
emake -j1 || die "emake failed"
}
src_install() {
dobin bin/{neko,nekoc,nekoml,nekotools} || die "Could not install binaries!"
dolib.so bin/libneko.so || die "Could not install libneko.so!"
insinto /usr/$(get_libdir)/neko
doins bin/{std,regexp,zlib}.ndll || die "Could not install neko libraries!"
if use sqlite ; then
doins bin/sqlite.ndll || die "Could not install sqlite module!"
fi
if use mysql ; then
doins bin/mysql.ndll || die "Could not install mysql module!"
fi
if use gtk ; then
doins bin/ui.ndll || die "Could not install gtk module!"
fi
if use apache2 ; then
insinto ${APACHE_MODULESDIR}
doins bin/mod_neko2.ndll || die "Could not install mod_neko!"
insinto ${APACHE_MODULES_CONFDIR}
doins ${FILESDIR}/50_mod_neko.conf || die "Could not install 50_mod_neko.conf!"
fi
insinto /usr/include/neko
doins vm/neko.h || die "Could not install neko.h!"
doenvd ${FILESDIR}/50neko || die "Could not 'doenvd files/50neko'!"
}
|
This item will be deleted in 6 days
URL: http://dpaste.com/132975/