blob: 69ddc7d6bc191b65087cd4be29ac900e237352ec (
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
78
79
80
81
82
83
84
85
86
87
88
89
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-visualization/paraview/paraview-2.4.4.ebuild,v 1.1 2006/10/18 17:45:29 markusle Exp $
inherit distutils eutils flag-o-matic toolchain-funcs versionator python
DESCRIPTION="ParaView is a powerful scientific data visualization application"
HOMEPAGE="http://www.paraview.org"
SRC_URI="http://www.${PN}.org/files/v2.4/${P}.tar.gz"
LICENSE="BSD"
KEYWORDS="~x86"
SLOT="0"
IUSE="mpi python hdf5 doc examples"
RDEPEND="hdf5? ( sci-libs/hdf5 )
doc? ( app-doc/doxygen )
mpi? ( sys-cluster/mpich )
python? ( >=dev-lang/python-2.0 )
media-libs/libpng
media-libs/jpeg
media-libs/tiff
dev-libs/expat
sys-libs/zlib
media-libs/freetype
virtual/opengl
dev-lang/tcl
dev-lang/tk
|| ( x11-libs/libXmu virtual/x11 )"
DEPEND="${RDEPEND}
>=dev-util/cmake-2.4.3"
BUILDDIR="${WORKDIR}/build"
src_unpack() {
unpack ${A}
mkdir "${BUILDDIR}" || die "Failed to generate build directory"
cd "${S}"
epatch "${FILESDIR}"/${P}-hdf5-zlib.patch
epatch "${FILESDIR}"/${P}-png.patch
}
src_compile() {
cd "${BUILDDIR}"
local CMAKE_VARIABLES=""
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DCMAKE_INSTALL_PREFIX:PATH=/usr"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_SHARED_LIBS:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_JPEG:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_PNG:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_TIFF:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_ZLIB:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_SYSTEM_EXPAT:BOOL=ON"
if use hdf5; then
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DPARAVIEW_USE_SYSTEM_HDF5:BOOL=ON"
fi
if use mpi; then
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DVTK_USE_MPI:BOOL=ON"
fi
if use python; then
python_version
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DPARAVIEW_WRAP_PYTHON:BOOL=ON"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DPYTHON_INCLUDE_PATH:PATH=/usr/include/python${PYVER}"
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DPYTHON_LIBRARY:PATH=/usr/$(get_libdir)/libpython${PYVER}.so"
fi
use doc && CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_DOCUMENTATION:BOOL=ON"
if use examples; then
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_EXAMPLES:BOOL=ON"
else
CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_EXAMPLES:BOOL=OFF"
fi
cmake ${CMAKE_VARIABLES} ${S} \
|| die "cmake configuration failed"
emake || die "emake failed"
}
src_install() {
cd ${BUILDDIR}
make DESTDIR=${D} install || die "make install failed"
}
|