diff --git a/vtk-glext.patch b/vtk-glext.patch new file mode 100644 index 0000000..b5529a5 --- /dev/null +++ b/vtk-glext.patch @@ -0,0 +1,13 @@ +diff -up VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h +--- VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext 2014-01-22 08:55:41.000000000 -0700 ++++ VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h 2014-11-19 10:27:12.349345199 -0700 +@@ -19,7 +19,8 @@ + #include "vtkConfigure.h" + + // To prevent gl.h to include glext.h provided by the system +-#define GL_GLEXT_LEGACY ++// https://bugzilla.redhat.com/show_bug.cgi?id=1138466 ++// #define GL_GLEXT_LEGACY + #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA)) + # include // Include OpenGL API. + #else diff --git a/vtk-tcllib.patch b/vtk-tcllib.patch new file mode 100644 index 0000000..a56bce1 --- /dev/null +++ b/vtk-tcllib.patch @@ -0,0 +1,37 @@ +diff -up VTK-6.1.0/CMake/vtkModuleMacros.cmake.tcllib VTK-6.1.0/CMake/vtkModuleMacros.cmake +diff -up VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt.tcllib VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt +--- VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt.tcllib 2014-01-22 08:55:41.000000000 -0700 ++++ VTK-6.1.0/Wrapping/Tcl/CMakeLists.txt 2015-02-03 16:12:42.635456315 -0700 +@@ -261,7 +261,7 @@ endforeach() + # Configure the Tcl package index file for the install tree. + SET(VTK_TCL_SCRIPT_DIR "[file dirname [info script]]") + IF(UNIX) +- SET(VTK_TCL_LIBRARY_DIR "[file dirname [file dirname [file dirname [info script]]]]") ++ SET(VTK_TCL_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIBRARY_DIR}") + ELSE(UNIX) + SET(VTK_TCL_LIBRARY_DIR + "[file join [file dirname [file dirname [file dirname [file dirname [info script]]]]] bin]") +diff -up VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in.tcllib VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in +--- VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in.tcllib 2014-01-22 08:55:41.000000000 -0700 ++++ VTK-6.1.0/Wrapping/Tcl/pkgIndex.tcl.in 2015-02-03 16:12:42.635456315 -0700 +@@ -7,7 +7,7 @@ package ifneeded vtkinit {@VTK_MAJOR_VER + if {[catch "load {} $libName"]} { + set libExt [info sharedlibextension] + set currentDirectory [pwd] +- set libFile [file join $libPath "$libPrefix$libName-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@$libExt"] ++ set libFile [file join $libPath "$libPrefix$libName$libExt"] + if {[catch "cd {$libPath}; load {$libFile}" errorMessage]} { + puts $errorMessage + } +diff -up VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in +--- VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib 2015-02-03 16:12:42.814455894 -0700 ++++ VTK-6.1.0/Wrapping/Tcl/vtkbase/vtkbase.tcl.in 2015-02-03 16:23:08.653411667 -0700 +@@ -44,7 +44,7 @@ namespace eval ::vtk { + } + + foreach dir $dirs { +- set libname [file join $dir ${prefix}${name}-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@${ext}] ++ set libname [file join $dir ${prefix}${name}${ext}] + if {[file exists $libname]} { + if {![catch {load $libname} errormsg]} { + # WARNING: it HAS to be "" so that pkg_mkIndex work (since diff --git a/vtk-type.patch b/vtk-type.patch new file mode 100644 index 0000000..fc891e9 --- /dev/null +++ b/vtk-type.patch @@ -0,0 +1,23 @@ +diff -up VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx +--- VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type 2014-01-22 08:55:41.000000000 -0700 ++++ VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2015-01-08 15:00:40.492667074 -0700 +@@ -1186,7 +1186,7 @@ bool vtkFreeTypeTools::CalculateBounding + if (bitmap) + { + metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent); +- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)), ++ metaData.descent = std::min(-(static_cast(bitmap->rows) - (bitmapGlyph->top - 1)), + metaData.descent); + } + ++heightString; +@@ -1951,8 +1951,8 @@ void vtkFreeTypeTools::GetLineMetrics(T + if (bitmap) + { + bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left); +- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width); +- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows); ++ bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast(bitmap->width)); ++ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast(bitmap->rows)); + bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1); + } + else diff --git a/vtk.spec b/vtk.spec index a69272f..7b9f8d5 100644 --- a/vtk.spec +++ b/vtk.spec @@ -1,12 +1,7 @@ # Disable OSMesa builds for now - see Bug 744434 %bcond_with OSMesa - -# Disable java on ppc64 - fails to build -%ifarch ppc64 -%bcond_with java -%else +# Make Java conditional %bcond_without java -%endif %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}} @@ -14,7 +9,7 @@ Summary: The Visualization Toolkit - A high level 3D visualization library Name: vtk Version: 6.1.0 -Release: 4%{?dist} +Release: 5%{?dist} # This is a variant BSD license, a cross between BSD and ZLIB. # For all intents, it has the same rights and restrictions as BSD. # http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant @@ -27,18 +22,22 @@ Patch0: vtk-6.1.0-system.patch # Install some more needed cmake files to try to support paraview build # http://www.vtk.org/Bug/view.php?id=14157 Patch1: vtk-install.patch -#Patch to vtk to use system netcdf library +# Patch to vtk to use system netcdf library Patch2: vtk-6.1.0-netcdf.patch +# Fix compilation with mesa 10.4 +# https://bugzilla.redhat.com/show_bug.cgi?id=1138466 +Patch3: vtk-glext.patch +# Fix types for std::min/man +# http://www.vtk.org/Bug/view.php?id=15249 +Patch4: vtk-type.patch +# Fix tcl library loading +# http://www.vtk.org/Bug/view.php?id=15279 +Patch5: vtk-tcllib.patch URL: http://vtk.org/ -%if 0%{?rhel} && (0%{?rhel} <= 6) -BuildRequires: cmake28 -%else BuildRequires: cmake -%endif BuildRequires: gcc-c++ -#%{?with_java:BuildRequires: gcc-java, libgcj-devel, java-devel} %{?with_java:BuildRequires: java-devel} BuildRequires: libX11-devel, libXt-devel, libXext-devel BuildRequires: libICE-devel, libGL-devel @@ -72,6 +71,35 @@ BuildRequires: lapack-devel %{!?with_java:Conflicts: vtk-java} Requires: hdf5 = %{_hdf5_version} +# Bundled KWSys +# https://fedorahosted.org/fpc/ticket/555 +# Components used are specified in Utilities/KWSys/CMakeLists.txt +Provides: bundled(kwsys-base64) +Provides: bundled(kwsys-commandlinearguments) +Provides: bundled(kwsys-directory) +Provides: bundled(kwsys-dynamicloader) +Provides: bundled(kwsys-encoding) +Provides: bundled(kwsys-fstream) +Provides: bundled(kwsys-fundamentaltype) +Provides: bundled(kwsys-glob) +Provides: bundled(kwsys-md5) +Provides: bundled(kwsys-process) +Provides: bundled(kwsys-regularexpression) +Provides: bundled(kwsys-system) +Provides: bundled(kwsys-systeminformation) +Provides: bundled(kwsys-systemtools) +# Other bundled libraries +Provides: bundled(alglib) +Provides: bundled(exodusII) = 2.0.0 +Provides: bundled(ftgl) = 1.32 +Provides: bundled(metaio) +Provides: bundled(sqlite) = 3.6.22 +Provides: bundled(utf8cpp) +Provides: bundled(verdict) = 1.2.0 +Provides: bundled(vpic) +Provides: bundled(xdmf2) = 2.1 +Provides: bundled(xdmf3) + # Do not check .so files in the python_sitearch directory %global __provides_exclude_from ^%{python_sitearch}/.*\\.so$ @@ -84,19 +112,32 @@ volume rendering, LOD control). %package devel Summary: VTK header files for building C++ code -Requires: vtk = %{version}-%{release} -%{?with_OSMesa:Requires: mesa-libOSMesa-devel} +Requires: vtk%{?_isa} = %{version}-%{release} +Requires: vtk-python%{?_isa} = %{version}-%{release} +Requires: vtk-qt-python%{?_isa} = %{version}-%{release} +Requires: vtk-qt-tcl%{?_isa} = %{version}-%{release} +Requires: vtk-tcl%{?_isa} = %{version}-%{release} +%{?with_OSMesa:Requires: mesa-libOSMesa-devel%{?_isa}} Requires: cmake -Requires: gl2ps-devel -Requires: expat-devel, libjpeg-devel, libpng-devel -Requires: freetype-devel -Requires: libogg-devel -Requires: libtheora-devel -Requires: libtiff-devel -Requires: libxml2-devel -Requires: postgresql-devel -Requires: mysql-devel -Requires: qt4-devel +Requires: blas-devel%{?_isa} +Requires: gl2ps-devel%{?_isa} +Requires: expat-devel%{?_isa} +Requires: freetype-devel%{?_isa} +Requires: hdf5-devel%{?_isa} +Requires: lapack-devel%{?_isa} +Requires: libjpeg-devel%{?_isa} +Requires: libpng-devel%{?_isa} +Requires: libogg-devel%{?_isa} +Requires: libtheora-devel%{?_isa} +Requires: libtiff-devel%{?_isa} +Requires: libxml2-devel%{?_isa} +Requires: postgresql-devel%{?_isa} +Requires: mysql-devel%{?_isa} +Requires: netcdf-cxx-devel%{?_isa} +Requires: qt4-devel%{?_isa} +Requires: qtwebkit-devel%{?_isa} +Requires: jsoncpp-devel%{?_isa} +Requires: python2-devel Group: Development/Libraries %description devel @@ -105,7 +146,7 @@ use VTK to do 3D visualization. %package tcl Summary: Tcl bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries %description tcl @@ -113,8 +154,10 @@ tcl bindings for VTK %package python Summary: Python bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries +Requires: sip +Requires: PyQt4 %description python python bindings for VTK @@ -122,7 +165,7 @@ python bindings for VTK %if %{with java} %package java Summary: Java bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries %description java @@ -131,7 +174,7 @@ Java bindings for VTK %package qt Summary: Qt bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries %description qt @@ -139,7 +182,7 @@ Qt bindings for VTK %package qt-python Summary: Qt Python bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries %description qt-python @@ -147,7 +190,7 @@ Qt Python bindings for VTK %package qt-tcl Summary: Qt TCL bindings for VTK -Requires: vtk = %{version}-%{release} +Requires: vtk%{?_isa} = %{version}-%{release} Group: System Environment/Libraries %description qt-tcl @@ -155,7 +198,7 @@ Qt TCL bindings for VTK %package testing Summary: Testing programs for VTK -Requires: vtk = %{version}-%{release}, vtkdata = %{version} +Requires: vtk%{?_isa} = %{version}-%{release}, vtkdata = %{version} Group: Applications/Engineering %description testing @@ -163,7 +206,7 @@ Testing programs for VTK %package examples Summary: Examples for VTK -Requires: vtk = %{version}-%{release}, vtkdata = %{version} +Requires: vtk%{?_isa} = %{version}-%{release}, vtkdata = %{version} Group: Applications/Engineering %description examples @@ -177,9 +220,19 @@ programming languages. %patch0 -p1 -b .system %patch1 -p1 -b .install %patch2 -p1 -b .netcdf +%patch3 -p1 -b .glext +%patch4 -p1 -b .type +%patch5 -p1 -b .tcllib # Remove included thirdparty sources just to be sure -# TODO - vtksqlite -for x in autobahn vtkexpat vtkfreetype vtkgl2ps vtkhdf5 vtkjpeg vtklibxml2 vtknetcdf vtkoggtheora vtkpng vtktiff twisted vtkzlib zope +# TODO - alglib - http://www.vtk.org/Bug/view.php?id=15729 +# TODO - vtkexodusII - not yet packaged +# TODO - vtksqlite - http://www.vtk.org/Bug/view.php?id=14154 +# TODO - utf8cpp(source) - http://www.vtk.org/Bug/view.php?id=15730 +# TODO - vtkverdict - not yet packaged +# TODO - VPIC - not yet packaged +# TODO - vtkxdmf2 - not yet packaged +# TODO - vtkxdmf3 - not yet packaged +for x in autobahn vtkexpat vtkfreetype vtkgl2ps vtkhdf5 vtkjpeg vtkjsoncpp vtklibxml2 vtknetcdf vtkoggtheora vtkpng vtktiff twisted vtkzlib zope do rm -r ThirdParty/*/${x} done @@ -189,6 +242,9 @@ done grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \ perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/vtkdata-%{version},g' +# Remove unused KWSys items +find Utilities/KWSys/vtksys/ -name \*.[ch]\* | grep -vE '^Utilities/KWSys/vtksys/([a-z].*|Configure|SharedForward|String\.hxx|Base64|CommandLineArguments|Directory|DynamicLoader|Encoding|FStream|FundamentalType|Glob|MD5|Process|RegularExpression|System|SystemInformation|SystemTools)(C|CXX|UNIX)?\.' | xargs rm + # Save an unbuilt copy of the Example's sources for %doc mkdir vtk-examples cp -a Examples vtk-examples @@ -201,15 +257,16 @@ export CFLAGS="%{optflags} -D_UNICODE" export CXXFLAGS="%{optflags} -D_UNICODE" %if %{with java} export JAVA_HOME=/usr/lib/jvm/java +# Arm/Aarch64 builders have less ram +# https://bugzilla.redhat.com/show_bug.cgi?id=1115920 +%ifnarch s390 +export JAVA_TOOL_OPTIONS=-Xmx2048m +%endif %endif mkdir build pushd build -%if 0%{?rhel} && (0%{?rhel} <= 6) -%{cmake28} .. \ -%else %{cmake} .. \ -%endif -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_EXAMPLES:BOOL=ON \ -DBUILD_TESTING:BOOL=OFF \ @@ -453,6 +510,20 @@ cp -pr --parents Wrapping/*/README* _docs/ %doc vtk-examples/Examples %changelog +* Sun Dec 13 2015 Orion Poplawski - 6.1.0-5 +- Add patch to fix compilation with mesa 10.4 (bug #1291099) +- Note bundled libraries +- Note bundled kwsys, remove unused kwsys files +- Add requires netcdf-cxx-devel to vtk-devel (bug #1224512) +- Add needed vtk-*-devel requires to vtk-devel (bug #1199310) +- Add patch to fix tcl library loading +- Add jsoncpp-devel and python2-devel to vtk-devel Requires (bug #1183210) +- Add patch to fix compilation error +- Don't override Java memory settings on s390 (related to bug #1115920) +- Increase java heap space for builds (bug #1115920) +- Add requires on blas-devel and lapack-devel to vtk-devel (bug #1105004) +- Add Requires: qtwebkit-devel and hdf5-devel to vtk-devel (bug #1080781) + * Tue Jan 28 2014 Orion Poplawski - 6.1.0-4 - Really fix requires freetype-devel @@ -472,36 +543,20 @@ cp -pr --parents Wrapping/*/README* _docs/ * Sun Dec 22 2013 Kevin Fenzi 6.0.0-9 - Add BuildRequires on blas-devel and lapack-devel - -* Sun Dec 22 2013 François Cami - 6.0.0-8 -* Rebuild for rawhide. - -* Sun Aug 04 2013 Fedora Release Engineering - 6.0.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 30 2013 Petr Machata - 6.0.0-6 -- Rebuild for boost 1.54.0 - -* Mon Jul 29 2013 Orion Poplawski - 6.0.0-5 - Enable VTK_WRAP_PYTHON_SIP - -* Fri Jul 26 2013 Orion Poplawski - 6.0.0-4 - Add patch to install vtkpython - -* Wed Jul 17 2013 Petr Pisar - 6.0.0-3 -- Perl 5.18 rebuild - -* Mon Jul 15 2013 Orion Poplawski - 6.0.0-2 - Install vtkMakeInstantiator files for gdcm build - -* Fri Jul 12 2013 Orion Poplawski - 6.0.0-1 - Add BR on R-devel - -* Thu Jun 27 2013 Orion Poplawski - 6.0.0-1 - Update to 6.0.0 -* Thu May 16 2013 Orion Poplawski - 5.10.1-5 -- Rebuild for hdf5 1.8.11 +* Mon Sep 16 2013 Orion Poplawski - 5.10.1-7 +- Add requires PyQt4 to vtk-python + +* Mon Sep 16 2013 Orion Poplawski - 5.10.1-6 +- Add requires sip to vtk-python + +* Sun Jul 28 2013 Orion Poplawski - 5.10.1-5 +- Build QVTKWidget and QVTKWidget2 (bug #981786) * Fri Feb 15 2013 Fedora Release Engineering - 5.10.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild