/[gentoo-x86]/sci-visualization/paraview/paraview-3.98.0.ebuild
Gentoo

Contents of /sci-visualization/paraview/paraview-3.98.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Jul 27 21:48:12 2013 UTC (11 months, 3 weeks ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
remove old

(Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-visualization/paraview/paraview-3.98.0.ebuild,v 1.6 2013/05/29 16:37:35 jlec Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_6 python2_7 )
8 inherit eutils multilib versionator python-single-r1 cmake-utils
9
10 MAIN_PV=$(get_major_version)
11 MAJOR_PV=$(get_version_component_range 1-2)
12 MY_P="ParaView-${PV}-src"
13
14 DESCRIPTION="ParaView is a powerful scientific data visualization application"
15 HOMEPAGE="http://www.paraview.org"
16 SRC_URI="http://www.paraview.org/files/v${MAJOR_PV}/${MY_P}.tgz"
17 RESTRICT="mirror"
18
19 LICENSE="paraview GPL-2"
20 KEYWORDS="~amd64 ~x86"
21 SLOT="0"
22 IUSE="boost cg coprocessing doc examples ffmpeg mpi mysql nvcontrol plugins python qt4 sqlite tcl test tk"
23
24 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
25
26 RDEPEND="
27 dev-db/sqlite:3
28 dev-libs/expat
29 dev-libs/libxml2:2
30 dev-libs/protobuf
31 media-libs/freetype
32 media-libs/libpng:0
33 media-libs/libtheora
34 media-libs/tiff
35 sci-libs/hdf5[mpi=]
36 ~sci-libs/netcdf-4.1.3[cxx,hdf5]
37 sys-libs/zlib
38 virtual/jpeg
39 virtual/opengl
40 >=x11-libs/gl2ps-1.3.8
41 x11-libs/libX11
42 x11-libs/libXext
43 x11-libs/libXmu
44 x11-libs/libXt
45 coprocessing? (
46 plugins? (
47 dev-python/PyQt4
48 dev-qt/qtgui:4
49 )
50 )
51 ffmpeg? ( virtual/ffmpeg )
52 mpi? ( virtual/mpi[cxx,romio] )
53 mysql? ( virtual/mysql )
54 python? (
55 ${PYTHON_DEPS}
56 dev-python/matplotlib[${PYTHON_USEDEP}]
57 dev-python/numpy[${PYTHON_USEDEP}]
58 dev-python/sip[${PYTHON_USEDEP}]
59 mpi? ( dev-python/mpi4py )
60 qt4? ( dev-python/PyQt4[opengl,webkit,${PYTHON_USEDEP}] )
61 )
62 qt4? (
63 dev-qt/qtgui:4
64 dev-qt/qtopengl:4
65 dev-qt/qthelp:4[compat]
66 dev-qt/qtsql:4
67 dev-qt/qtwebkit:4
68 )
69 sqlite? ( dev-db/sqlite )
70 tcl? ( dev-lang/tcl )
71 tk? ( dev-lang/tk )"
72 DEPEND="${RDEPEND}
73 ${PYTHON_DEPS}
74 boost? ( >=dev-libs/boost-1.40.0[mpi?,${PYTHON_USEDEP}] )
75 doc? ( app-doc/doxygen )"
76
77 S=${WORKDIR}/${MY_P}
78
79 pkg_setup() {
80 python-single-r1_pkg_setup
81 PVLIBDIR=$(get_libdir)/${PN}-${MAJOR_PV}
82 }
83
84 src_prepare() {
85 # see patch headers for description
86 epatch "${FILESDIR}"/${P}-xdmf-cstring.patch \
87 "${FILESDIR}"/${P}-mpi4py.patch \
88 "${FILESDIR}"/${P}-removesqlite.patch \
89 "${FILESDIR}"/${P}-gcc-4.7.patch \
90 "${FILESDIR}"/${P}-vtknetcd.patch \
91 "${FILESDIR}"/${P}-vtk-cg-path.patch \
92 "${FILESDIR}"/${P}-pvblot.patch
93
94 # lib64 fixes
95 sed -i \
96 -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):g" \
97 VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt || die
98 sed -i \
99 -e "s:\/lib\/python:\/$(get_libdir)\/python:g" \
100 VTK/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py || die
101 sed -i \
102 -e "s:lib/paraview-:$(get_libdir)/paraview-:g" \
103 {,Plugins/SciberQuestToolKit/}CMakeLists.txt \
104 ParaViewCore/PythonSupport/vtkPVPythonInterpretor.cxx || die
105
106 # no proper switch
107 use nvcontrol || {
108 sed -i \
109 -e '/VTK_USE_NVCONTROL/s#1#0#' \
110 VTK/Rendering/OpenGL/CMakeLists.txt || die
111 }
112 }
113
114 src_configure() {
115 # TODO: use system protobuf
116 local mycmakeargs=(
117 -DPV_INSTALL_LIB_DIR="${PVLIBDIR}"
118 -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
119 -DEXPAT_INCLUDE_DIR="${EPREFIX}"/usr/include
120 -DEXPAT_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libexpat.so
121 -DOPENGL_gl_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGL.so
122 -DOPENGL_glu_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGLU.so
123 -DBUILD_SHARED_LIBS=ON
124 -DVTK_USE_SYSTEM_EXPAT=ON
125 -DVTK_USE_SYSTEM_FREETYPE=ON
126 -DVTK_USE_SYSTEM_GL2PS=ON
127 -DVTK_USE_SYSTEM_HDF5=ON
128 -DVTK_USE_SYSTEM_JPEG=ON
129 -DVTK_USE_SYSTEM_LIBXML2=ON
130 -DVTK_USE_SYSTEM_OGGTHEORA=ON
131 -DVTK_USE_SYSTEM_PNG=ON
132 -DVTK_USE_SYSTEM_PROTOBUF=OFF
133 -DVTK_USE_SYSTEM_TIFF=ON
134 -DVTK_USE_SYSTEM_XDMF2=OFF
135 -DVTK_USE_SYSTEM_ZLIB=ON
136 -DCMAKE_VERBOSE_MAKEFILE=ON
137 -DCMAKE_COLOR_MAKEFILE=TRUE
138 -DVTK_USE_OFFSCREEN=TRUE
139 -DCMAKE_USE_PTHREADS=ON
140 -DVTK_USE_FFMPEG_ENCODER=OFF
141 -DPROTOC_LOCATION=$(type -P protoc)
142 -DVTK_Group_StandAlone=ON
143 # force this module due to incorrect build system deps
144 # wrt bug 460528
145 -DModule_vtkUtilitiesProcessXML=ON
146 )
147
148 # TODO: XDMF_USE_MYSQL?
149 mycmakeargs+=(
150 $(cmake-utils_use qt4 PARAVIEW_BUILD_QT_GUI)
151 $(cmake-utils_use qt4 Module_vtkGUISupportQtOpenGL)
152 $(cmake-utils_use qt4 Module_vtkGUISupportQtSQL)
153 $(cmake-utils_use qt4 Module_vtkGUISupportQtWebkit)
154 $(cmake-utils_use qt4 Module_vtkRenderingQt)
155 $(cmake-utils_use qt4 Module_vtkViewsQt)
156 $(cmake-utils_use qt4 VTK_Group_ParaViewQt)
157 $(cmake-utils_use qt4 VTK_Group_Qt)
158 $(cmake-utils_use boost Module_vtkInfovisBoost)
159 $(cmake-utils_use boost Module_vtkInfovisBoostGraphAlg)
160 $(cmake-utils_use mpi PARAVIEW_USE_MPI)
161 $(cmake-utils_use mpi PARAVIEW_USE_MPI_SSEND)
162 $(cmake-utils_use mpi PARAVIEW_USE_ICE_T)
163 $(cmake-utils_use mpi VTK_Group_MPI)
164 $(cmake-utils_use mpi VTK_XDMF_USE_MPI)
165 $(cmake-utils_use mpi XDMF_BUILD_MPI)
166 $(cmake-utils_use python PARAVIEW_ENABLE_PYTHON)
167 $(cmake-utils_use python VTK_Group_ParaViewPython)
168 $(cmake-utils_use python XDMF_WRAP_PYTHON)
169 $(cmake-utils_use python Module_pqPython)
170 $(cmake-utils_use python Module_vtkWrappingPython)
171 $(cmake-utils_use python Module_vtkPVPythonSupport)
172 $(cmake-utils_use doc BUILD_DOCUMENTATION)
173 $(cmake-utils_use examples BUILD_EXAMPLES)
174 $(cmake-utils_use cg VTK_USE_CG_SHADERS)
175 $(cmake-utils_use mysql Module_vtkIOMySQL)
176 $(cmake-utils_use sqlite Module_vtksqlite)
177 $(cmake-utils_use coprocessing PARAVIEW_ENABLE_COPROCESSING)
178 $(cmake-utils_use coprocessing VTK_Group_CoProcessing)
179 $(cmake-utils_use ffmpeg PARAVIEW_ENABLE_FFMPEG)
180 $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
181 $(cmake-utils_use ffmpeg Module_vtkIOFFMPEG)
182 $(cmake-utils_use tk VTK_Group_Tk)
183 $(cmake-utils_use tk VTK_USE_TK)
184 $(cmake-utils_use tk Module_vtkRenderingTk)
185 $(cmake-utils_use tcl Module_vtkTclTk)
186 $(cmake-utils_use test BUILD_TESTING)
187 )
188
189 if use qt4 ; then
190 mycmakeargs+=( -DVTK_INSTALL_QT_DIR=/${PVLIBDIR}/plugins/designer )
191 if use python ; then
192 # paraview cannot guess sip directory properly
193 mycmakeargs+=( -DSIP_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)" )
194 fi
195 fi
196
197 # TODO: MantaView VaporPlugin VRPlugin
198 mycmakeargs+=(
199 $(cmake-utils_use plugins PARAVIEW_INSTALL_DEVELOPMENT)
200 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_AdiosReader)
201 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO)
202 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ArrowGlyph)
203 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_EyeDomeLighting)
204 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ForceTime)
205 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_GMVReader)
206 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_H5PartReader)
207 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Moments)
208 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_NonOrthogonalSource)
209 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PacMan)
210 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PointSprite)
211 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PrismPlugin)
212 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_QuadView)
213 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SLACTools)
214 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SciberQuestToolKit)
215 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SierraPlotTools)
216 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SurfaceLIC)
217 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_UncertaintyRendering)
218 )
219
220 cmake-utils_src_configure
221 }
222
223 src_compile() {
224 cmake-utils_src_compile
225 }
226
227 src_install() {
228 cmake-utils_src_install
229
230 # set up the environment
231 echo "LDPATH=${EPREFIX}/usr/${PVLIBDIR}" > "${T}"/40${PN}
232 echo "PYTHONPATH="${EPREFIX}"/usr/${PVLIBDIR}:/usr/${PVLIBDIR}/site-packages" >> "${T}"/40${PN}
233 doenvd "${T}"/40${PN}
234
235 newicon "${S}"/Applications/ParaView/pvIcon.png paraview.png
236 make_desktop_entry paraview "Paraview" paraview
237
238 use python && python_optimize "${D}"/usr/$(get_libdir)/${PN}-${MAJOR_PV}
239 }
240
241 pkg_postinst() {
242 # with Qt4.5 there seem to be issues reading data files
243 # under certain locales. Setting LC_ALL=C should fix these.
244 echo
245 elog "If you experience data corruption during parsing of"
246 elog "data files with paraview please try setting your"
247 elog "locale to LC_ALL=C."
248 elog "If you plan to use paraview component from an existing shell"
249 elog "you should run env-update and . /etc/profile first"
250 echo
251 }

  ViewVC Help
Powered by ViewVC 1.1.20