This repository has been archived by the owner on Jan 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
monetdb-client-1.36.1.ebuild
89 lines (74 loc) · 2.59 KB
/
monetdb-client-1.36.1.ebuild
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
88
89
# Copyright 2009-2010 W-Mark Kubacki
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit flag-o-matic
MY_PN="MonetDB-client"
MY_P=${MY_PN}-${PV}
DESCRIPTION="libraries and programs to communicate with the server(s) that are part of the MonetDB/SQL suite"
HOMEPAGE="http://monetdb.cwi.nl/"
SRC_URI="http://dev.monetdb.org/downloads/sources/Feb2010/${MY_P}.tar.lzma"
RESTRICT="primaryuri"
LICENSE="MonetDBPL-1.1"
SLOT="5"
KEYWORDS="amd64 x86 arm"
IUSE="debug python perl php ruby curl iconv bzip2 zlib odbc"
RDEPEND=">=dev-libs/libpcre-4.5
>=dev-libs/openssl-0.9.8
sys-libs/readline
python? ( >=dev-lang/python-2.4 )
perl? ( dev-lang/perl )
php? ( dev-lang/php )
ruby? ( dev-lang/ruby )
curl? ( net-misc/curl )
iconv? ( virtual/libiconv )
bzip2? ( || ( app-arch/bzip2 app-arch/pbzip2 ) )
zlib? ( sys-libs/zlib )
odbc? ( dev-db/unixODBC )
>=dev-db/monetdb-common-1.36.0
!!dev-db/monetdb"
DEPEND="|| ( app-arch/xz-utils app-arch/lzma-utils )
${RDEPEND}"
S="${WORKDIR}/${MY_P}"
src_configure() {
local myconf=
if use debug; then
myconf+=" --enable-strict --disable-optimize --enable-debug --enable-assert"
else
myconf+=" --disable-strict --disable-debug --disable-assert"
if ! hasq "-O6" ${CFLAGS}; then
myconf+=" --enable-optimize"
filter-flags "-Os" "-O" "-O[012345]"
fi
fi
# Deal with auto-dependencies
use python && myconf+=" $(use_with python)"
use perl && myconf+=" $(use_with perl)"
use php && myconf+=" $(use_with php)"
use ruby && myconf+=" $(use_with ruby)"
use curl && myconf+=" $(use_with curl)"
use iconv && myconf+=" $(use_with iconv)"
use bzip2 && myconf+=" $(use_with bzip2 bz2)"
use zlib && myconf+=" $(use_with zlib z)"
use odbc && myconf+=" $(use_with odbc unixodbc)"
econf ${myconf} || die "econf"
}
src_compile() {
emake || die "emake"
}
src_install() {
emake DESTDIR="${D}" install || die "install"
# prevent binaries from being installed in wrong paths (FHS 2.3)
rm "${D}"/usr/bin/monetdb-clients-config
dosbin conf/monetdb-clients-config
# remove testing framework and compiled tests
rm -rf "${D}"/usr/lib/MonetDB/Tests "${D}"/usr/lib64/MonetDB/Tests || true
# remove windows cruft
find "${D}" -name "*.bat" -exec rm "{}" \; || die "removing windows stuff"
# remove unwanted parts
use php || rm -rf "${D}"/usr/share/php || true
use perl || rm -rf "${D}"/usr/share/MonetDB/perl "${D}"/usr/lib/perl "${D}"/usr/lib64/perl5 || true
use python || rm -rf "${D}"/usr/lib64/python2.6 || true
use odbc || \
rm -rf "${D}"/usr/lib/libMonetODBC* "${D}"/usr/lib64/libMonetODBC* "${D}"/usr/include/MonetDB/odbc/ || true
}