add cgal-4.0 and missing edb-0.9.18
[shuber-gentoo-overlay.git] / sci-mathematics / cgal / cgal-3.8.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/cgal/cgal-3.7.ebuild,v 1.1 2010/11/01 21:43:15 bicatali Exp $
4
5 EAPI=3
6 CMAKE_BUILD_TYPE=Release
7 inherit base multilib cmake-utils
8
9 MY_P=CGAL-${PV}
10 PID=28501
11 DPID=28499
12
13 DESCRIPTION="C++ library for geometric algorithms and data structures"
14 HOMEPAGE="http://www.cgal.org/"
15 SRC_URI="http://gforge.inria.fr/frs/download.php/${PID}/${MY_P}.tar.xz
16 doc? ( http://gforge.inria.fr/frs/download.php/${DPID}/${MY_P}-doc_html.tar.xz )"
17
18 LICENSE="LGPL-2.1 MIT QPL"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 RESTRICT="mirror"
22 IUSE="+cxx doc examples +gmp lapack qt4"
23
24 RDEPEND="dev-libs/boost
25 dev-libs/mpfr
26 sys-libs/zlib
27 x11-libs/libX11
28 virtual/opengl
29 gmp? ( dev-libs/gmp
30 cxx? ( dev-libs/gmp[cxx] ) )
31 lapack? ( virtual/lapack )
32 qt4? ( x11-libs/qt-gui:4
33 x11-libs/qt-opengl:4 )"
34 DEPEND="${RDEPEND}
35 app-arch/xz-utils
36 dev-util/pkgconfig"
37
38 S="${WORKDIR}/${MY_P}"
39
40 DOCS="AUTHORS CHANGES* README"
41
42 src_prepare() {
43 base_src_prepare
44 sed -i \
45 -e '/install(FILES AUTHORS/d' \
46 CMakeLists.txt || die
47 }
48
49 src_configure() {
50 local mycmakeargs
51 if use gmp; then
52 mycmakeargs+=( $(cmake-utils_use_with cxx GMPXX) )
53 else
54 mycmakeargs+=( "-DWITH_GMPXX=OFF" )
55 fi
56 mycmakeargs+=(
57 "-DCGAL_INSTALL_LIB_DIR=$(get_libdir)"
58 "-DWITH_CGAL_Qt3=OFF"
59 "-DWITH_LEDA=OFF"
60 $(cmake-utils_use_with examples)
61 $(cmake-utils_use_with examples DEMOS)
62 $(cmake-utils_use_with gmp)
63 $(cmake-utils_use_with lapack CPACK)
64 $(cmake-utils_use_with qt4 CGAL_Qt4)
65 )
66 cmake-utils_src_configure
67 }
68
69 src_install() {
70 cmake-utils_src_install
71 if use doc; then
72 dohtml -r "${WORKDIR}"/doc_html/cgal_manual/*
73 fi
74 if use examples; then
75 insinto /usr/share/doc/${PF}
76 doins -r examples || die
77 fi
78 }