blob: 5e9225721e1d86be80cf236177241b650fa4e54b (
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
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils flag-o-matic python-single-r1
DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL"
HOMEPAGE="http://avogadro.openmolecules.net/"
SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+glsl python cpu_flags_x86_sse2 test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
>=sci-chemistry/openbabel-2.3.0
>=dev-qt/qtgui-4.8.5:4
>=dev-qt/qtopengl-4.8.5:4
x11-libs/gl2ps
glsl? ( >=media-libs/glew-1.5.0:0= )
python? (
>=dev-libs/boost-1.35.0-r5[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/sip[${PYTHON_USEDEP}]
${PYTHON_DEPS}
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
dev-cpp/eigen"
# https://sourceforge.net/p/avogadro/bugs/653/
RESTRICT="test"
PATCHES=(
#"${FILESDIR}"/${PN}-1.1.0-textrel.patch
"${FILESDIR}"/${PN}-1.1.0-xlibs.patch
"${FILESDIR}"/${P}-eigen3.patch
"${FILESDIR}"/${P}-mkspecs-dir.patch
"${FILESDIR}"/${P}-no-strip.patch
"${FILESDIR}"/${P}-pkgconfig_eigen.patch
"${FILESDIR}"/${P}-openbabel.patch
"${FILESDIR}"/${P}-boost-join-moc.patch
)
pkg_setup() {
use python && python-single-r1_pkg_setup
}
src_prepare() {
sed \
-e 's:_BSD_SOURCE:_DEFAULT_SOURCE:g' \
-i CMakeLists.txt || die
# warning: "Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3."
append-cppflags -DEIGEN_NO_EIGEN2_DEPRECATED_WARNING
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DENABLE_THREADEDGL=OFF
-DENABLE_RPATH=OFF
-DENABLE_UPDATE_CHECKER=OFF
-DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs"
-DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
-DENABLE_glsl="$(usex glsl)"
-DENABLE_TESTS="$(usex test)"
-DWITH_SSE2="$(usex cpu_flags_x86_sse2)"
-DENABLE_python="$(usex python)"
)
cmake-utils_src_configure
}
|