blob: 583d5adb7871f07b6dcd136127936a99959e49e8 (
plain)
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/cgal-python/cgal-python-0.9.4_beta1.ebuild,v 1.4 2010/06/16 01:43:15 arfrever Exp $
EAPI=2
inherit eutils flag-o-matic toolchain-funcs python
MY_P=${P/_/-}
DESCRIPTION="Python bindings for the CGAL library"
HOMEPAGE="http://cgal-python.gforge.inria.fr/"
SRC_URI="http://gforge.inria.fr/frs/download.php/19498/${MY_P}.tgz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"
DEPEND="dev-libs/mpfr
>=sci-mathematics/cgal-3.5.1"
S=${WORKDIR}/${MY_P}
src_prepare() {
epatch "${FILESDIR}"/${P}-linking.patch
if has_version sci-mathematics/cgal[gmp]; then
sed -i \
-e 's:$(CGAL_LDFLAGS):-lgmp $(CGAL_LDFLAGS):' \
bindings/makefile.inc || die
fi
sed -i \
-e "s:-I../.. -O2:-I$(python_get_includedir) -I../..:g" \
bindings/makefile.inc || die
for i in $(find bindings -name Makefile); do
sed -i -e "s:@g++:@$(tc-getCXX):g" ${i} || die
done
}
src_compile() {
append-cxxflags -frounding-math
emake || die
}
src_test() {
emake -j1 tests || die
}
src_install(){
python_need_rebuild
emake package || die
insinto $(python_get_sitedir)
doins -r cgal_package/CGAL || die
dodoc README.txt CHANGES
if use examples; then
cd tests
emake clean
insinto /usr/share/doc/${PF}/examples
cp -r * || die
fi
}
|