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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download)
Mon Feb 11 21:29:20 2013 UTC (18 months, 2 weeks ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +1 -1 lines
FILE REMOVED
version bump wrt #317345

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

1 # Copyright 1999-2012 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.6.2.ebuild,v 1.18 2012/05/06 23:13:07 pesa Exp $
4
5 EAPI="3"
6
7 PYTHON_DEPEND="python? 2:2.6"
8
9 inherit eutils flag-o-matic toolchain-funcs versionator python cmake-utils
10
11 MAIN_PV=$(get_major_version)
12 MAJOR_PV=$(get_version_component_range 1-2)
13
14 DESCRIPTION="ParaView is a powerful scientific data visualization application"
15 HOMEPAGE="http://www.paraview.org"
16 SRC_URI="mirror://gentoo/${P}.tar.gz
17 mirror://gentoo/${P}-openfoam-gpl-r173.patch.bz2
18 mirror://gentoo/${P}-openfoam-r173.patch.bz2"
19
20 LICENSE="paraview GPL-2"
21 KEYWORDS="~amd64 ~ppc ~x86"
22 SLOT="0"
23 IUSE="boost cg doc examples +gui mpi mysql plugins +python postgres streaming odbc overview"
24 RDEPEND="sci-libs/hdf5[mpi=]
25 mpi? ( || (
26 sys-cluster/openmpi
27 sys-cluster/mpich2[cxx] ) )
28 gui? ( x11-libs/qt-gui:4
29 x11-libs/qt-qt3support:4
30 x11-libs/qt-opengl:4
31 || ( >=x11-libs/qt-assistant-4.7.0:4[compat]
32 <x11-libs/qt-assistant-4.7.0:4 ) )
33 mysql? ( virtual/mysql )
34 postgres? ( dev-db/postgresql-base )
35 odbc? ( dev-db/unixODBC )
36 dev-libs/libxml2:2
37 media-libs/libpng
38 virtual/jpeg
39 media-libs/tiff
40 virtual/ffmpeg
41 dev-libs/expat
42 sys-libs/zlib
43 media-libs/freetype
44 >=app-admin/eselect-opengl-1.0.6-r1
45 virtual/opengl
46 sci-libs/netcdf
47 x11-libs/libXmu"
48
49 DEPEND="${RDEPEND}
50 boost? ( >=dev-libs/boost-1.40.0 )
51 doc? ( app-doc/doxygen )
52 >=dev-util/cmake-2.6.4"
53
54 PVLIBDIR="$(get_libdir)/${PN}-${MAJOR_PV}"
55 S="${WORKDIR}"/ParaView${MAIN_PV}
56
57 pkg_setup() {
58 if (use overview) && (! use gui); then
59 die "the overview plugin requires the USE='gui'"
60 fi
61 use python && python_set_active_version 2
62 }
63
64 src_prepare() {
65 epatch "${FILESDIR}"/${P}-qt.patch
66 epatch "${FILESDIR}"/${P}-findcg-cmake.patch
67 epatch "${FILESDIR}"/${P}-assistant.patch
68 epatch "${DISTDIR}"/${P}-openfoam-r173.patch.bz2
69 epatch "${DISTDIR}"/${P}-openfoam-gpl-r173.patch.bz2
70 epatch "${FILESDIR}"/${P}-no-doc-finder.patch
71 epatch "${FILESDIR}"/${P}-pointsprite-disable.patch
72 epatch "${FILESDIR}"/${P}-about.html.patch
73 epatch "${FILESDIR}"/${P}-boost-property_map.patch
74 epatch "${FILESDIR}"/${P}-odbc.patch
75 epatch "${FILESDIR}"/${P}-h5part.patch
76 epatch "${FILESDIR}"/${P}-libpng14.patch
77 epatch "${FILESDIR}"/${P}-libpng15.patch
78
79 if has_version '>=sci-libs/hdf5-1.8.0'; then
80 epatch "${FILESDIR}"/${P}-hdf-1.8.3.patch
81 fi
82
83 # fix GL issues
84 sed -e "s:DEPTH_STENCIL_EXT:DEPTH_COMPONENT24:" \
85 -i VTK/Rendering/vtkOpenGLRenderWindow.cxx \
86 || die "Failed to fix GL issues."
87
88 # fix plugin install directory
89 sed -e "s:\${PV_INSTALL_BIN_DIR}/plugins:/usr/${PVLIBDIR}/plugins:" \
90 -i CMake/ParaViewPlugins.cmake \
91 || die "Failed to fix plugin install directories"
92
93 # bug 348151
94 sed -e 's/CURRENT_VERSION 2.6/CURRENT_VERSION 2.7 2.6/' \
95 -i VTK/CMake/FindPythonLibs.cmake || die
96 }
97
98 src_configure() {
99 mycmakeargs=(
100 -DPV_INSTALL_LIB_DIR="${PVLIBDIR}"
101 -DCMAKE_INSTALL_PREFIX=/usr
102 -DEXPAT_INCLUDE_DIR=/usr/include
103 -DEXPAT_LIBRARY=/usr/$(get_libdir)/libexpat.so
104 -DOPENGL_gl_LIBRARY=/usr/$(get_libdir)/libGL.so
105 -DOPENGL_glu_LIBRARY=/usr/$(get_libdir)/libGLU.so
106 -DCMAKE_SKIP_RPATH=YES
107 -DVTK_USE_RPATH=OFF
108 -DBUILD_SHARED_LIBS=ON
109 -DVTK_USE_SYSTEM_FREETYPE=ON
110 -DVTK_USE_SYSTEM_JPEG=ON
111 -DVTK_USE_SYSTEM_PNG=ON
112 -DVTK_USE_SYSTEM_TIFF=ON
113 -DVTK_USE_SYSTEM_ZLIB=ON
114 -DVTK_USE_SYSTEM_EXPAT=ON
115 -DPARAVIEW_USE_SYSTEM_HDF5=ON
116 -DCMAKE_VERBOSE_MAKEFILE=OFF
117 -DCMAKE_COLOR_MAKEFILE=TRUE
118 -DVTK_USE_SYSTEM_LIBXML2=ON
119 -DVTK_USE_OFFSCREEN=TRUE
120 -DCMAKE_USE_PTHREADS=ON
121 -DBUILD_TESTING=OFF
122 -DVTK_USE_FFMPEG_ENCODER=OFF)
123
124 # use flag triggered options
125 mycmakeargs+=(
126 $(cmake-utils_use gui PARAVIEW_BUILD_QT_GUI)
127 $(cmake-utils_use gui VTK_USE_QVTK)
128 $(cmake-utils_use gui VTK_USE_QVTK_QTOPENGL)
129 $(cmake-utils_use boost VTK_USE_BOOST)
130 $(cmake-utils_use mpi PARAVIEW_USE_MPI)
131 $(cmake-utils_use python PARAVIEW_ENABLE_PYTHON)
132 $(cmake-utils_use doc BUILD_DOCUMENTATION)
133 $(cmake-utils_use examples BUILD_EXAMPLES)
134 $(cmake-utils_use cg VTK_USE_CG_SHADERS)
135 $(cmake-utils_use streaming PARAVIEW_BUILD_StreamingParaView)
136 $(cmake-utils_use odbc VTK_USE_ODBC)
137 $(cmake-utils_use mysql VTK_USE_MYSQL)
138 $(cmake-utils_use mysql XDMF_USE_MYSQL)
139 $(cmake-utils_use postgres VTK_USE_POSTGRES))
140
141 if use gui; then
142 mycmakeargs+=(-DVTK_INSTALL_QT_DIR=/${PVLIBDIR}/plugins/designer)
143 fi
144
145 # all the logic needed for overview
146 # we enable all plugins that are either required by overview
147 # or require overview to work
148 mycmakeargs+=(
149 $(cmake-utils_use overview VTK_USE_N_WAY_ARRAYS)
150 $(cmake-utils_use overview PARAVIEW_BUILD_OverView)
151 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientGraphView)
152 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientGraphViewFrame)
153 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientRecordView)
154 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientTableView)
155 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientTreeView)
156 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_Infovis)
157 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_SQLDatabaseGraphSourcePanel)
158 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_SQLDatabaseTableSourcePanel)
159 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_TableToGraphPanel)
160 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_Array)
161 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientGeoView)
162 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientGeoView2D)
163 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientGraphViewFrame)
164 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ClientHierarchyView)
165 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_CommonToolbar)
166 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_GraphLayoutFilterPanel)
167 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_SplitTableFieldPanel)
168 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_StatisticsToolbar)
169 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_TableToSparseArrayPanel)
170 $(cmake-utils_use overview PARAVIEW_BUILD_PLUGIN_ThresholdTablePanel))
171
172 # the rest of the plugins
173 mycmakeargs+=(
174 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ChartViewFrame)
175 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ClientAttributeView)
176 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ClientChartView)
177 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_CosmoFilters)
178 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_H5PartReader)
179 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Moments)
180 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PointSprite)
181 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Prism)
182 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SLACTools)
183 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Streaming)
184 $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_netCDFReaders))
185
186 if use python; then
187 mycmakeargs+=($(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_pvblot))
188 fi
189
190 # we also need to append -DH5Tget_array_dims_vers=1 to our CFLAGS
191 # to make sure we can compile against >=hdf5-1.8.3
192 append-flags -DH5_USE_16_API
193
194 cmake-utils_src_configure
195 # overview needs a second configure to pick things up
196 use overview && cmake-utils_src_configure
197 }
198
199 src_install() {
200 cmake-utils_src_install
201
202 # rename the assistant wrapper
203 if use gui; then
204 mv "${D}"/usr/bin/assistant "${D}"/usr/bin/paraview-assistant \
205 || die "Failed to rename assistant wrapper"
206 chmod 0755 "${D}"/usr/${PVLIBDIR}/assistant-real \
207 || die "Failed to change permissions on assistant wrapper"
208 fi
209
210 # since there is no install target for OverView we have to
211 # do things manually
212 if use overview; then
213 exeinto /usr/"${PVLIBDIR}"
214 newexe "${CMAKE_BUILD_DIR}"/bin/OverView OverView-real \
215 || die "Failed to install OverView binary"
216 dolib.so "${CMAKE_BUILD_DIR}"/bin/libOverViewCore.so \
217 || die "Failed to install OverViewCore shared object"
218
219 insinto /usr/"${PVLIBDIR}"/OverView-startup
220 insopts -m0744
221 doins "${CMAKE_BUILD_DIR}"/bin/OverView-startup/lib*.so \
222 || die "Failed to install OverView libraries"
223
224 dosym /usr/"${PVLIBDIR}"/OverView-real /usr/bin/OverView \
225 || die "Failed to create OverView symlink"
226
227 newicon "${S}"/Applications/OverView/Icon.png overview.png \
228 || die "Failed to create OverView icon"
229 make_desktop_entry OverView "OverView" overview \
230 || die "Failed to install OverView desktop icon"
231 fi
232
233 # set up the environment
234 echo "LDPATH=/usr/${PVLIBDIR}" >> "${T}"/40${PN}
235 echo "PYTHONPATH=/usr/${PVLIBDIR}" >> "${T}"/40${PN}
236 doenvd "${T}"/40${PN}
237
238 # this binary does not work and probably should not be installed
239 rm -f "${D}/usr/bin/vtkSMExtractDocumentation" \
240 || die "Failed to remove vtkSMExtractDocumentation"
241
242 # rename /usr/bin/lproj to /usr/bin/lproj_paraview to avoid
243 # a file collision with vtk which installs the same file
244 mv "${D}/usr/bin/lproj" "${D}/usr/bin/lproj_paraview" \
245 || die "Failed to rename /usr/bin/lproj"
246
247 # last but not least lets make a desktop entry
248 newicon "${S}"/Applications/Client/ParaViewLogo.png paraview.png \
249 || die "Failed to create paraview icon."
250 make_desktop_entry paraview "Paraview" paraview \
251 || die "Failed to install Paraview desktop entry"
252
253 }
254
255 pkg_postinst() {
256 # with Qt4.5 there seem to be issues reading data files
257 # under certain locales. Setting LC_ALL=C should fix these.
258 echo
259 elog "If you experience data corruption during parsing of"
260 elog "data files with paraview please try setting your"
261 elog "locale to LC_ALL=C."
262 elog "The binary /usr/bin/lproj has been renamed to"
263 elog "/usr/bin/lproj_paraview to avoid a file collision"
264 elog "with vtk."
265 echo
266 }

  ViewVC Help
Powered by ViewVC 1.1.20