Merge from f15 - 5.6.1

This commit is contained in:
Orion Poplawski 2011-05-19 09:30:22 -06:00
commit 268641e7df
5 changed files with 175 additions and 40 deletions

View File

@ -5,7 +5,7 @@
# Create default python setup arguments if they are not set.
IF(NOT DEFINED VTK_PYTHON_SETUP_ARGS)
- SET(VTK_PYTHON_SETUP_ARGS "--prefix=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\""
+ SET(VTK_PYTHON_SETUP_ARGS "--root=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\""
+ SET(VTK_PYTHON_SETUP_ARGS "--prefix=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\" --root=\"${DOLLAR}ENV{DESTDIR}\""
CACHE STRING "Arguments passed to \"python setup.py install ...\" during installation.")
MARK_AS_ADVANCED(VTK_PYTHON_SETUP_ARGS)
ENDIF(NOT DEFINED VTK_PYTHON_SETUP_ARGS)

23
vtk-5.6.1-gcc46.patch Normal file
View File

@ -0,0 +1,23 @@
diff -up VTK/Common/vtkPythonUtil.cxx.gcc46 VTK/Common/vtkPythonUtil.cxx
--- VTK/Common/vtkPythonUtil.cxx.gcc46 2010-09-27 14:40:01.000000000 -0600
+++ VTK/Common/vtkPythonUtil.cxx 2011-02-08 11:15:39.596308982 -0700
@@ -31,6 +31,8 @@
#include <vtkstd/map>
#include <vtkstd/string>
+#include <cstddef>
+
// Silent warning like
// "dereferencing type-punned pointer will break strict-aliasing rules"
// it happens because this kind of expression: (long *)&ptr
diff -up VTK/Utilities/vtkmetaio/metaUtils.cxx.gcc46 VTK/Utilities/vtkmetaio/metaUtils.cxx
--- VTK/Utilities/vtkmetaio/metaUtils.cxx.gcc46 2010-09-27 14:40:10.000000000 -0600
+++ VTK/Utilities/vtkmetaio/metaUtils.cxx 2011-02-08 10:43:25.265499011 -0700
@@ -34,6 +34,7 @@
#include <arpa/inet.h>
#endif
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <string>

30
vtk-5.6.1-soversion.patch Normal file
View File

@ -0,0 +1,30 @@
diff -up VTK/Utilities/Cosmo/CMakeLists.txt.soversion VTK/Utilities/Cosmo/CMakeLists.txt
--- VTK/Utilities/Cosmo/CMakeLists.txt.soversion 2010-09-27 14:40:07.000000000 -0600
+++ VTK/Utilities/Cosmo/CMakeLists.txt 2011-02-18 09:23:40.749509891 -0700
@@ -35,6 +35,11 @@ INCLUDE_DIRECTORIES (${Cosmo_SOURCE_DIR}
ADD_LIBRARY(Cosmo ${Cosmo_SOURCES})
TARGET_LINK_LIBRARIES(Cosmo vtksys vtkCommon ${Cosmo_LIBS})
+# Apply user-defined properties to the library target. Such as SO Version
+IF(VTK_LIBRARY_PROPERTIES)
+ SET_TARGET_PROPERTIES(Cosmo PROPERTIES ${VTK_LIBRARY_PROPERTIES})
+ENDIF(VTK_LIBRARY_PROPERTIES)
+
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS Cosmo
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
diff -up VTK/Utilities/VPIC/CMakeLists.txt.soversion VTK/Utilities/VPIC/CMakeLists.txt
--- VTK/Utilities/VPIC/CMakeLists.txt.soversion 2010-09-27 14:40:08.000000000 -0600
+++ VTK/Utilities/VPIC/CMakeLists.txt 2011-02-18 09:24:46.991211358 -0700
@@ -31,6 +31,11 @@ TARGET_LINK_LIBRARIES(VPIC ${MPI_LIBRARY
ENDIF(MPI_EXTRA_LIBRARY)
ENDIF(VTK_USE_MPI)
+# Apply user-defined properties to the library target. Such as SO Version
+IF(VTK_LIBRARY_PROPERTIES)
+ SET_TARGET_PROPERTIES(VPIC PROPERTIES ${VTK_LIBRARY_PROPERTIES})
+ENDIF(VTK_LIBRARY_PROPERTIES)
+
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS VPIC
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries

39
vtk-5.6.1-system.patch Normal file
View File

@ -0,0 +1,39 @@
diff -up VTK/CMakeLists.txt.system VTK/CMakeLists.txt
--- VTK/CMakeLists.txt.system 2010-09-27 14:40:00.000000000 -0600
+++ VTK/CMakeLists.txt 2011-02-08 14:08:29.367122550 -0700
@@ -106,6 +106,11 @@ IF(CMAKE_CONFIGURATION_TYPES)
ENDIF(CMAKE_CONFIGURATION_TYPES)
#-----------------------------------------------------------------------------
+# Do we try to use system libraries by default?
+OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF)
+MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES)
+
+#-----------------------------------------------------------------------------
# Load some macros.
INCLUDE(vtkDependentOption)
INCLUDE(vtkThirdParty)
diff -up VTK/CMake/vtkThirdParty.cmake.system VTK/CMake/vtkThirdParty.cmake
--- VTK/CMake/vtkThirdParty.cmake.system 2010-09-27 14:40:00.000000000 -0600
+++ VTK/CMake/vtkThirdParty.cmake 2011-02-08 14:07:46.424662568 -0700
@@ -1,6 +1,6 @@
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_OPTION upper lower)
- OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." OFF)
+ OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." ${VTK_USE_SYSTEM_LIBRARIES})
MARK_AS_ADVANCED(VTK_USE_SYSTEM_${upper})
IF(VTK_USE_SYSTEM_${upper})
IF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
diff -up VTK/Rendering/CMakeLists.txt.system VTK/Rendering/CMakeLists.txt
--- VTK/Rendering/CMakeLists.txt.system 2010-09-27 14:40:06.000000000 -0600
+++ VTK/Rendering/CMakeLists.txt 2011-02-08 14:11:47.379633170 -0700
@@ -202,7 +202,8 @@ ENDIF (NOT VTK_LEGACY_REMOVE)
IF(VTK_USE_GL2PS)
SET(Kit_SRCS ${Kit_SRCS} vtkGL2PSExporter.cxx)
-
+ OPTION(VTK_USE_SYSTEM_GL2PS "Use the system's gl2ps library." ${VTK_USE_SYSTEM_LIBRARIES})
+ MARK_AS_ADVANCED(VTK_USE_SYSTEM_GL2PS)
IF(VTK_USE_SYSTEM_GL2PS)
ELSE(VTK_USE_SYSTEM_GL2PS)
SET(Kit_GL2PS_SRCS ${VTK_SOURCE_DIR}/Utilities/vtkgl2ps/gl2ps.c)

121
vtk.spec
View File

@ -5,8 +5,8 @@
Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk
Version: 5.6.0
Release: 38%{?dist}
Version: 5.6.1
Release: 8%{?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
@ -16,13 +16,20 @@ Source: http://www.vtk.org/files/release/5.6/%{name}-%{version}.tar.gz
Patch0: vtk-5.2.0-pythondestdir.patch
Patch1: vtk-5.2.0-gcc43.patch
Patch2: vtk-5.6.0-testcxxjavaremove.patch
# Python 2.7 compatibility: not yet sent upstream:
Patch3: vtk-5.6.0-python27.patch
# Add needed includes for gcc 4.6
# http://public.kitware.com/Bug/view.php?id=11824
Patch4: vtk-5.6.1-gcc46.patch
# Use system libraries
# http://public.kitware.com/Bug/view.php?id=11823
Patch5: vtk-5.6.1-system.patch
# Upstream patch to add soversions to libCosmo and libVPIC
Patch6: vtk-5.6.1-soversion.patch
URL: http://vtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: cmake >= 2.0.4
BuildRequires: cmake
BuildRequires: gcc-c++
#%{?with_java:BuildRequires: gcc-java, libgcj-devel, java-devel}
%{?with_java:BuildRequires: java-devel}
@ -32,11 +39,17 @@ BuildRequires: libICE-devel, libGL-devel
BuildRequires: tk-devel, tcl-devel
BuildRequires: python-devel
BuildRequires: expat-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildRequires: gl2ps-devel
BuildRequires: libtiff-devel, zlib-devel
BuildRequires: libxml2-devel
BuildRequires: qt4-devel
BuildRequires: chrpath
BuildRequires: doxygen, graphviz
BuildRequires: gnuplot
BuildRequires: boost-devel
BuildRequires: libtheora-devel
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: wget
BuildRequires: %{_includedir}/Xm
%{!?with_java:Conflicts: vtk-java}
@ -52,8 +65,13 @@ volume rendering, LOD control).
Summary: VTK header files for building C++ code
Requires: vtk = %{version}-%{release}
%{?with_OSMesa:Requires: mesa-libOSMesa-devel}
Requires: gl2ps-devel
Requires: expat-devel, libjpeg-devel, libpng-devel
Requires: libogg-devel
Requires: libtheora-devel
Requires: libtiff-devel
Requires: postgresql-devel
Requires: mysql-devel
Requires: qt4-devel
Group: Development/Libraries
@ -120,6 +138,9 @@ programming languages.
%patch1 -p1 -b .gcc43
%patch2 -p1 -b .testcxxjava
%patch3 -p1 -b .python27
%patch4 -p1 -b .gcc46
%patch5 -p1 -b .system
%patch6 -p1 -b .soversion
# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version}
# otherwise it will break on symlinks.
@ -140,19 +161,15 @@ export CXXFLAGS="%{optflags} -D_UNICODE"
export JAVA_HOME=/usr/lib/jvm/java
%endif
# Not every subbuild respects build != install
tmpinstall=`pwd`/tmpinstall
cmake_command="cmake . \
-DBUILD_SHARED_LIBS:BOOL=ON \
mkdir build
pushd build
%{cmake} .. \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=$tmpinstall \
-DVTK_INSTALL_BIN_DIR:PATH=%{_bindir} \
-DVTK_INSTALL_INCLUDE_DIR:PATH=%{_includedir}/vtk \
-DVTK_INSTALL_LIB_DIR:PATH=%{_libdir}/vtk-5.6 \
-DVTK_DATA_ROOT:PATH=%{_datadir}/vtkdata-%{version} \
-DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk \
-DVTK_INSTALL_LIB_DIR:PATH=/%{_lib}/vtk-5.6 \
-DVTK_INSTALL_QT_DIR=/%{_lib}/qt4/plugins/designer \
-DTK_INTERNAL_PATH:PATH=/usr/include/tk-private/generic \
%if %{with OSMesa}
-DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
@ -167,33 +184,29 @@ cmake_command="cmake . \
-DVTK_WRAP_JAVA:BOOL=OFF \
%endif
-DVTK_WRAP_TCL:BOOL=ON \
-DVTK_USE_BOOST:BOOL=ON \
-DVTK_USE_GL2PS:BOOL=ON \
-DVTK_USE_GUISUPPORT:BOOL=ON \
-DVTK_USE_MYSQL=ON \
-DVTK_USE_OGGTHEORA_ENCODER=ON \
-DVTK_USE_PARALLEL:BOOL=ON \
-DVTK_USE_SYSTEM_EXPAT=ON \
-DVTK_USE_SYSTEM_FREETYPE=ON \
-DVTK_USE_SYSTEM_JPEG=ON \
-DVTK_USE_SYSTEM_PNG=ON \
-DVTK_USE_SYSTEM_TIFF=ON \
-DVTK_USE_SYSTEM_ZLIB=ON \
-DVTK_USE_POSTGRES=ON \
-DVTK_USE_SYSTEM_LIBRARIES=ON \
-DVTK_USE_SYSTEM_LIBPROJ4=OFF \
-DVTK_USE_QVTK=ON \
-DVTK_USE_QT=ON \
-DVTK_INSTALL_QT_DIR=`qmake-qt4 -query QT_INSTALL_PREFIX`/plugins/designer \
"
# Second cmake is neccessary for vtk
eval $cmake_command
eval $cmake_command
-DVTK_USE_TEXT_ANALYSIS=ON
# Not working, see http://public.kitware.com/Bug/view.php?id=11978
# -DVTK_USE_ODBC=ON \
# Not working, see http://public.kitware.com/Bug/view.php?id=10779
# -DVTK_USE_GNU_R:BOOL=ON \
# Commented old flags in case we'd like to reactive some of them
# -DVTK_USE_DISPLAY:BOOL=OFF \ # This prevents building of graphics tests
# -DVTK_USE_HYBRID:BOOL=ON \
# -DVTK_USE_PATENTED:BOOL=ON \
# -DVTK_USE_RENDERING:BOOL=ON \
# -DVTK_USE_MPI:BOOL=OFF \
# -DVTK_USE_X:BOOL=ON \
# -DOPENGL_INCLUDE_DIR:PATH=/usr/include/GL \
# -DVTK_USE_MPI:BOOL=ON \
make
# Got intermittent build error with -j
make #%{?_smp_mflags}
# Remove executable bits from sources (some of which are generated)
find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \
@ -202,8 +215,8 @@ find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
make install
mv tmpinstall/* %{buildroot}/
pushd build
make install DESTDIR=%{buildroot}
if [ "%{_lib}" != lib -a "`ls %{buildroot}%{_prefix}/lib/*`" != "" ]; then
mkdir -p %{buildroot}%{_libdir}
@ -278,6 +291,7 @@ done
# Main package contains utils and core libs
cat libs.list utils.list > main.list
popd
# Make shared libs and scripts executable
chmod a+x %{buildroot}%{_libdir}/lib*.so.*
@ -327,7 +341,7 @@ rm -rf %{buildroot}
%postun qt -p /sbin/ldconfig
%files -f main.list
%files -f build/main.list
%defattr(-,root,root,-)
%doc --parents Copyright.txt README.html vtkLogo.jpg vtkBanner.gif Wrapping/*/README*
@ -371,18 +385,47 @@ rm -rf %{buildroot}
%files qt
%defattr(-,root,root,-)
%{_libdir}/libQVTK.so.*
%{_libdir}/qt*/plugins/designer
%{_libdir}/qt4/plugins/designer
%files testing -f testing.list
%files testing -f build/testing.list
%defattr(-,root,root,-)
%{_libdir}/vtk-5.6/testing
%files examples -f examples.list
%files examples -f build/examples.list
%defattr(-,root,root,-)
%doc vtk-examples-5.6/Examples
%changelog
* Tue Dec 28 2010 Orion Poplawski <orion@cora.nwra.com> - 5.6.0-38
* Mon Mar 28 2011 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-8
- Rebuild for new mysql
* Thu Mar 17 2011 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-7
- Add needed requires to vtk-devel
* Wed Mar 16 2011 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-6
- Turn on boost, mysql, postgres, ogg theora, and text analysis support,
bug 688275.
* Wed Mar 16 2011 Marek Kasik <mkasik@redhat.com> - 5.6.1-5
- Add backslashes to VTK_INSTALL_LIB_DIR and
- VTK_INSTALL_INCLUDE_DIR (#687895)
* Tue Mar 15 2011 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-4
- Set VTK_INSTALL_LIB_DIR, fix bug 687895
* Fri Feb 18 2011 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-3
- Add patch to support gcc 4.6
- Add patch to make using system libraries easier
- Update pythondestdir patch to use --prefix and --root
- Use system gl2ps and libxml2
- Use standard cmake build macro, out of tree builds
- Add patch from upstream to add sonames to libCosmo and libVPIC (bug #622840)
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Dec 7 2010 Orion Poplawski <orion@cora.nwra.com> - 5.6.1-1
- Update to 5.6.1
- Enable qt4 support, drop qt3 support
* Wed Oct 20 2010 Adam Jackson <ajax@redhat.com> 5.6.0-37