1 |
commit: 31468e24e9f3e312b3251b4e240f9e5883ccdbac |
2 |
Author: François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz> |
3 |
AuthorDate: Tue Feb 7 03:00:41 2012 +0000 |
4 |
Commit: Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz> |
5 |
CommitDate: Wed Feb 8 01:15:09 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=31468e24 |
7 |
|
8 |
Paraview 3.12.0 is in. ugly right now will shape it a bit better. |
9 |
|
10 |
(Portage version: 2.2.0_alpha85/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
sci-visualization/paraview/ChangeLog | 9 +- |
14 |
.../paraview/files/paraview-3.12.0-gcc46.patch | 10 + |
15 |
.../paraview/files/paraview-3.12.0-protobuf.patch | 23 ++ |
16 |
sci-visualization/paraview/paraview-3.12.0.ebuild | 219 ++++++++++++++++++++ |
17 |
4 files changed, 260 insertions(+), 1 deletions(-) |
18 |
|
19 |
diff --git a/sci-visualization/paraview/ChangeLog b/sci-visualization/paraview/ChangeLog |
20 |
index 58f3331..8a71db8 100644 |
21 |
--- a/sci-visualization/paraview/ChangeLog |
22 |
+++ b/sci-visualization/paraview/ChangeLog |
23 |
@@ -1,7 +1,14 @@ |
24 |
# ChangeLog for sci-visualization/paraview |
25 |
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
26 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
27 |
# $Header: $ |
28 |
|
29 |
+*paraview-3.12.0 (07 Feb 2012) |
30 |
+ |
31 |
+ 07 Feb 2012; François Bissey <francois.bissey@×××××××××××××.nz> |
32 |
+ +paraview-3.12.0.ebuild, +files/paraview-3.12.0-gcc46.patch, |
33 |
+ +files/paraview-3.12.0-protobuf.patch: |
34 |
+ introducing paraview-3.12.0 |
35 |
+ |
36 |
24 Aug 2011; Kacper Kowalik <xarthisius@g.o> -paraview-3.8.1.ebuild, |
37 |
paraview-3.10.1.ebuild, +files/paraview-3.10.1-gcc46.patch: |
38 |
Drop old, fix building with gcc-4.6, add missing dependency on PyQt4 |
39 |
|
40 |
diff --git a/sci-visualization/paraview/files/paraview-3.12.0-gcc46.patch b/sci-visualization/paraview/files/paraview-3.12.0-gcc46.patch |
41 |
new file mode 100644 |
42 |
index 0000000..15ff5d0 |
43 |
--- /dev/null |
44 |
+++ b/sci-visualization/paraview/files/paraview-3.12.0-gcc46.patch |
45 |
@@ -0,0 +1,10 @@ |
46 |
+--- a/VTK/Utilities/vtkmetaio/metaUtils.cxx |
47 |
++++ b/VTK/Utilities/vtkmetaio/metaUtils.cxx |
48 |
+@@ -29,6 +29,7 @@ |
49 |
+ #include <arpa/inet.h> |
50 |
+ #endif |
51 |
+ |
52 |
++#include <stddef.h> |
53 |
+ #include <stdlib.h> |
54 |
+ #include <string.h> |
55 |
+ #include <string> |
56 |
|
57 |
diff --git a/sci-visualization/paraview/files/paraview-3.12.0-protobuf.patch b/sci-visualization/paraview/files/paraview-3.12.0-protobuf.patch |
58 |
new file mode 100644 |
59 |
index 0000000..a724e1b |
60 |
--- /dev/null |
61 |
+++ b/sci-visualization/paraview/files/paraview-3.12.0-protobuf.patch |
62 |
@@ -0,0 +1,23 @@ |
63 |
+--- CMake/ParaViewCommon.cmake.orig 2012-02-03 15:31:08.531644115 +1300 |
64 |
++++ CMake/ParaViewCommon.cmake 2012-02-03 15:30:36.420633741 +1300 |
65 |
+@@ -526,13 +526,13 @@ |
66 |
+ |
67 |
+ ######################################################################### |
68 |
+ # Configure protobuf |
69 |
+-SET (PROTOBUF_INSTALL_BIN_DIR ${PV_INSTALL_BIN_DIR}) |
70 |
+-SET (PROTOBUF_INSTALL_LIB_DIR ${PV_INSTALL_LIB_DIR}) |
71 |
+-SET (PROTOBUF_INSTALL_EXPORT_NAME ${PV_INSTALL_EXPORT_NAME}) |
72 |
+-IF (NOT PV_INSTALL_NO_LIBRARIES) |
73 |
+- SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS protobuf) |
74 |
+-ENDIF (NOT PV_INSTALL_NO_LIBRARIES) |
75 |
+-ADD_SUBDIRECTORY(Utilities/protobuf) |
76 |
++# SET (PROTOBUF_INSTALL_BIN_DIR ${PV_INSTALL_BIN_DIR}) |
77 |
++# SET (PROTOBUF_INSTALL_LIB_DIR ${PV_INSTALL_LIB_DIR}) |
78 |
++# SET (PROTOBUF_INSTALL_EXPORT_NAME ${PV_INSTALL_EXPORT_NAME}) |
79 |
++# IF (NOT PV_INSTALL_NO_LIBRARIES) |
80 |
++# SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS protobuf) |
81 |
++# ENDIF (NOT PV_INSTALL_NO_LIBRARIES) |
82 |
++# ADD_SUBDIRECTORY(Utilities/protobuf) |
83 |
+ |
84 |
+ ######################################################################### |
85 |
+ # Configure mpeg2 encoding |
86 |
|
87 |
diff --git a/sci-visualization/paraview/paraview-3.12.0.ebuild b/sci-visualization/paraview/paraview-3.12.0.ebuild |
88 |
new file mode 100644 |
89 |
index 0000000..fbc6984 |
90 |
--- /dev/null |
91 |
+++ b/sci-visualization/paraview/paraview-3.12.0.ebuild |
92 |
@@ -0,0 +1,219 @@ |
93 |
+# Copyright 1999-2012 Gentoo Foundation |
94 |
+# Distributed under the terms of the GNU General Public License v2 |
95 |
+# $Header: $ |
96 |
+ |
97 |
+EAPI=2 |
98 |
+ |
99 |
+PYTHON_DEPEND="python? 2:2.6" |
100 |
+ |
101 |
+inherit cmake-utils eutils flag-o-matic multilib python qt4-r2 toolchain-funcs versionator |
102 |
+ |
103 |
+MAIN_PV=$(get_major_version) |
104 |
+MAJOR_PV=$(get_version_component_range 1-2) |
105 |
+MY_P="ParaView-${PV}" |
106 |
+ |
107 |
+DESCRIPTION="ParaView is a powerful scientific data visualization application" |
108 |
+HOMEPAGE="http://www.paraview.org" |
109 |
+SRC_URI="http://www.paraview.org/files/v${MAJOR_PV}/${MY_P}.tar.gz" |
110 |
+RESTRICT="mirror" |
111 |
+ |
112 |
+LICENSE="paraview GPL-2" |
113 |
+KEYWORDS="~x86 ~amd64" |
114 |
+SLOT="0" |
115 |
+IUSE="adaptive cg -coprocessing doc examples +gui mpi mysql nvcontrol plugins +python streaming webkit" |
116 |
+ |
117 |
+RDEPEND=" |
118 |
+ sci-libs/hdf5[mpi=] |
119 |
+ mpi? ( virtual/mpi[cxx,romio] ) |
120 |
+ gui? ( |
121 |
+ x11-libs/qt-gui:4 |
122 |
+ x11-libs/qt-qt3support:4 |
123 |
+ x11-libs/qt-opengl:4 |
124 |
+ || ( >=x11-libs/qt-assistant-4.7.0:4[compat] <x11-libs/qt-assistant-4.7.0:4 ) |
125 |
+ x11-libs/qt-sql:4 |
126 |
+ webkit? ( x11-libs/qt-webkit:4 ) ) |
127 |
+ adaptive? ( |
128 |
+ x11-libs/qt-gui:4 |
129 |
+ x11-libs/qt-qt3support:4 |
130 |
+ x11-libs/qt-opengl:4 |
131 |
+ x11-libs/qt-assistant:4 |
132 |
+ webkit? ( x11-libs/qt-webkit:4 ) ) |
133 |
+ mysql? ( virtual/mysql ) |
134 |
+ coprocessing? ( plugins? ( x11-libs/qt-gui:4 ) ) |
135 |
+ python? ( |
136 |
+ dev-python/sip |
137 |
+ dev-python/PyQt4 |
138 |
+ ) |
139 |
+ dev-libs/libxml2:2 |
140 |
+ media-libs/libpng |
141 |
+ virtual/jpeg |
142 |
+ media-libs/tiff |
143 |
+ dev-libs/expat |
144 |
+ sys-libs/zlib |
145 |
+ media-libs/freetype |
146 |
+ >=app-admin/eselect-opengl-1.0.6-r1 |
147 |
+ virtual/opengl |
148 |
+ sci-libs/netcdf |
149 |
+ x11-libs/libXmu" |
150 |
+DEPEND="${RDEPEND} |
151 |
+ doc? ( app-doc/doxygen ) |
152 |
+ dev-libs/protobuf |
153 |
+ >=dev-util/cmake-2.6.4" |
154 |
+ |
155 |
+PVLIBDIR=$(get_libdir)/${PN}-${MAJOR_PV} |
156 |
+S=${WORKDIR}/${MY_P} |
157 |
+ |
158 |
+pkg_setup() { |
159 |
+ use python && python_set_active_version 2 |
160 |
+} |
161 |
+ |
162 |
+src_prepare() { |
163 |
+ # gcc header fix |
164 |
+ epatch "${FILESDIR}"/${PN}-3.8.0-xdmf-cstring.patch |
165 |
+ # disable automatic byte compiling that act directly on the live system |
166 |
+ epatch "${FILESDIR}"/${PN}-3.8.0-xdmf-bc.patch |
167 |
+ # mpi + hdf5 fix |
168 |
+ #epatch "${FILESDIR}"/${PN}-3.8.0-h5part.patch |
169 |
+ # gcc fix for vtk |
170 |
+ epatch "${FILESDIR}"/${P}-gcc46.patch |
171 |
+ |
172 |
+ epatch "${FILESDIR}"/${P}-protobuf.patch |
173 |
+ |
174 |
+ # lib64 fixes |
175 |
+ sed -i "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):g" \ |
176 |
+ Utilities/Xdmf2/libsrc/CMakeLists.txt || die |
177 |
+ sed -i "s:\/lib\/python:\/$(get_libdir)\/python:g" \ |
178 |
+ Utilities/Xdmf2/CMake/setup_install_paths.py || die |
179 |
+ |
180 |
+ # Install internal vtk binaries inside /usr/${PVLIBDIR} |
181 |
+ sed -e 's:VTK_INSTALL_BIN_DIR \"/${PV_INSTALL_BIN_DIR}\":VTK_INSTALL_BIN_DIR \"/${PV_INSTALL_LIB_DIR}\":' \ |
182 |
+ -i CMake/ParaViewCommon.cmake || die "failed to patch vtk install location" |
183 |
+ sed -e "s:get_target_property(PROTOC_LOCATION protoc_compiler LOCATION):SET(PROTOC_LOCATION \${SYSTEM_PB}):" \ |
184 |
+ -e "s:protoc_compiler::" \ |
185 |
+ -i ParaViewCore/ServerImplementation/CMakeLists.txt |
186 |
+ sed -i "s:DEPENDS \${in_proto_file} protoc_compiler:DEPENDS \${in_proto_file}:" \ |
187 |
+ CMake/ParaViewMacros.cmake |
188 |
+ |
189 |
+ cd VTK |
190 |
+ epatch "${FILESDIR}"/vtk-5.6.0-cg-path.patch |
191 |
+} |
192 |
+ |
193 |
+src_configure() { |
194 |
+ mycmakeargs=( |
195 |
+ -DPV_INSTALL_LIB_DIR="${PVLIBDIR}" |
196 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr |
197 |
+ -DPV_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" |
198 |
+ -DEXPAT_INCLUDE_DIR="${EPREFIX}"/usr/include |
199 |
+ -DEXPAT_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libexpat.so |
200 |
+ -DOPENGL_gl_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGL.so |
201 |
+ -DOPENGL_glu_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGLU.so |
202 |
+ -DCMAKE_SKIP_RPATH=YES |
203 |
+ -DVTK_USE_RPATH=OFF |
204 |
+ -DBUILD_SHARED_LIBS=ON |
205 |
+ -DVTK_USE_SYSTEM_FREETYPE=ON |
206 |
+ -DVTK_USE_SYSTEM_JPEG=ON |
207 |
+ -DVTK_USE_SYSTEM_PNG=ON |
208 |
+ -DVTK_USE_SYSTEM_TIFF=ON |
209 |
+ -DVTK_USE_SYSTEM_ZLIB=ON |
210 |
+ -DVTK_USE_SYSTEM_EXPAT=ON |
211 |
+ -DPARAVIEW_USE_SYSTEM_HDF5=ON |
212 |
+ -DCMAKE_VERBOSE_MAKEFILE=ON |
213 |
+ -DCMAKE_COLOR_MAKEFILE=TRUE |
214 |
+ -DVTK_USE_SYSTEM_LIBXML2=ON |
215 |
+ -DVTK_USE_OFFSCREEN=TRUE |
216 |
+ -DCMAKE_USE_PTHREADS=ON |
217 |
+ -DBUILD_TESTING=OFF |
218 |
+ -DVTK_USE_FFMPEG_ENCODER=OFF |
219 |
+ -DPARAVIEW_INSTALL_THIRD_PARTY_LIBRARIES=OFF |
220 |
+ -DSYSTEM_PB=$(which protoc)) |
221 |
+ |
222 |
+ # use flag triggered options |
223 |
+ mycmakeargs+=( |
224 |
+ $(cmake-utils_use gui PARAVIEW_BUILD_QT_GUI) |
225 |
+ $(cmake-utils_use gui VTK_USE_QVTK) |
226 |
+ $(cmake-utils_use gui VTK_USE_QVTK_QTOPENGL) |
227 |
+ $(cmake-utils_use mpi PARAVIEW_USE_MPI) |
228 |
+ $(cmake-utils_use mpi PARAVIEW_USE_MPI_SSEND) |
229 |
+ $(cmake-utils_use python PARAVIEW_ENABLE_PYTHON) |
230 |
+ $(cmake-utils_use python VTK_WRAP_PYTHON_SIP) |
231 |
+ $(cmake-utils_use python XDMF_WRAP_PYTHON) |
232 |
+ $(cmake-utils_use doc BUILD_DOCUMENTATION) |
233 |
+ $(cmake-utils_use examples BUILD_EXAMPLES) |
234 |
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS) |
235 |
+ $(cmake-utils_use nvcontrol VTK_USE_NVCONTROL) |
236 |
+ $(cmake-utils_use adaptive PARAVIEW_BUILD_AdaptiveParaView) |
237 |
+ $(cmake-utils_use streaming PARAVIEW_BUILD_StreamingParaView) |
238 |
+ $(cmake-utils_use mysql XDMF_USE_MYSQL) |
239 |
+ $(cmake-utils_use coprocessing PARAVIEW_ENABLE_COPROCESSING)) |
240 |
+ |
241 |
+ if ( use gui || use adaptive ); then |
242 |
+ mycmakeargs+=(-DVTK_INSTALL_QT_DIR=/${PVLIBDIR}/plugins/designer |
243 |
+ $(cmake-utils_use webkit VTK_QT_USE_WEBKIT)) |
244 |
+ if use python ; then |
245 |
+ # paraview cannot guess sip directory right probably because a path is not propagated properly |
246 |
+ mycmakeargs+=( |
247 |
+ -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip" |
248 |
+ -DSIP_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)") |
249 |
+ fi |
250 |
+ fi |
251 |
+ |
252 |
+ # the rest of the plugins |
253 |
+ mycmakeargs+=( |
254 |
+ $(cmake-utils_use plugins PARAVIEW_INSTALL_DEVELOPMENT) |
255 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ClientChartView) |
256 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_CosmoFilters) |
257 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_H5PartReader) |
258 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Moments) |
259 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PointSprite) |
260 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Prism) |
261 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SLACTools) |
262 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIReaderWriter) |
263 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SurfaceLIC) |
264 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_EyeDomeLighting) |
265 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ForceTime) |
266 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SierraPlotTools) |
267 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_StreamingView) |
268 |
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_VisTrailPlugin)) |
269 |
+ |
270 |
+ if use python; then |
271 |
+ mycmakeargs+=($(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_pvblot)) |
272 |
+ fi |
273 |
+ |
274 |
+ if use coprocessing; then |
275 |
+ mycmakeargs+=($(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator)) |
276 |
+ fi |
277 |
+ |
278 |
+ cmake-utils_src_configure |
279 |
+} |
280 |
+ |
281 |
+src_install() { |
282 |
+ cmake-utils_src_install |
283 |
+ |
284 |
+ # set up the environment |
285 |
+ echo "LDPATH=${EPREFIX}/usr/${PVLIBDIR}" >> "${T}"/40${PN} |
286 |
+ echo "PYTHONPATH="${EPREFIX}"/usr/${PVLIBDIR}:/usr/${PVLIBDIR}/site-packages" >> "${T}"/40${PN} |
287 |
+ doenvd "${T}"/40${PN} |
288 |
+ |
289 |
+ # last but not least lets make a desktop entry |
290 |
+ newicon "${S}"/Applications/ParaView/pvIcon.png paraview.png \ |
291 |
+ || die "Failed to create paraview icon." |
292 |
+ make_desktop_entry paraview "Paraview" paraview \ |
293 |
+ || die "Failed to install Paraview desktop entry" |
294 |
+ |
295 |
+} |
296 |
+ |
297 |
+pkg_postinst() { |
298 |
+ # with Qt4.5 there seem to be issues reading data files |
299 |
+ # under certain locales. Setting LC_ALL=C should fix these. |
300 |
+ echo |
301 |
+ elog "If you experience data corruption during parsing of" |
302 |
+ elog "data files with paraview please try setting your" |
303 |
+ elog "locale to LC_ALL=C." |
304 |
+ echo |
305 |
+} |
306 |
+ |
307 |
+pkg_postrm() { |
308 |
+ if use python ; then |
309 |
+ python_mod_cleanup "${EPREFIX}"/usr/$(get_libdir)/"${PN}-${MAJOR_PV}"/site-packages |
310 |
+ fi |
311 |
+} |