blob: fb06acb9dc1744bf8656ef0a7f3cdf1dce22ec53 (
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
63
64
65
66
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/kalzium/kalzium-4.0.2.ebuild,v 1.1 2008/03/10 23:21:11 philantrop Exp $
EAPI="1"
KMNAME=kdeedu
CPPUNIT_REQUIRED="optional"
inherit kde4-meta
DESCRIPTION="KDE: periodic table of the elements."
KEYWORDS="~amd64 ~x86"
IUSE="${IUSE} cviewer debug htmlhandbook solver"
COMMONDEPEND=">=kde-base/libkdeedu-${PV}:${SLOT}
cviewer? ( >=dev-cpp/eigen-1.0.5
>=sci-chemistry/openbabel-2.1
|| ( x11-libs/qt-opengl:4
>=x11-libs/qt-4.3.3:4 )
virtual/opengl )"
DEPEND="${DEPEND} ${COMMONDEPEND}
solver? ( dev-ml/facile )"
RDEPEND="${RDEPEND} ${COMMONDEPEND}"
KMEXTRACTONLY="libkdeedu/kdeeduui libkdeedu/libscience"
pkg_setup() {
if use cviewer && has_version '<x11-libs/qt-4.4.0_alpha:4'; then
QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl"
fi
if use solver && ! built_with_use --missing true dev-lang/ocaml ocamlopt; then
eerror "In order to build the solver for ${PN}, you first need"
eerror "to have dev-lang/ocaml built with the ocamlopt useflag"
eerror "in order to get a native code ocaml compiler"
die "Please install dev-lang/ocaml with ocamlopt support"
fi
if use solver && ! built_with_use --missing true dev-ml/facile ocamlopt; then
eerror "In order to build the solver for ${PN}, you first need"
eerror "to have dev-ml/facile built with the ocamlopt useflag"
eerror "in order to get the native code library"
die "Please install dev-ml/facile with ocamlopt support"
fi
kde4-meta_pkg_setup
}
src_compile() {
if use solver ; then
# Compile the solver on its own as the cmake-based build is
# currently broken. Fixes bug 206620.
cd "${S}/${PN}/src/solver"
emake || die "compiling the ocaml resolver failed"
mkdir -p "${WORKDIR}/${PN}_build/${PN}/src/"
cp * "${WORKDIR}/${PN}_build/${PN}/src/"
fi
mycmakeargs="${mycmakeargs}
$(cmake-utils_use_with cviewer Eigen)
$(cmake-utils_use_with cviewer OpenBabel2)
$(cmake-utils_use_with cviewer OpenGL)
$(cmake-utils_use_with solver OCaml)
$(cmake-utils_use_with solver Libfacile)"
kde4-meta_src_compile
}
|