From 6a9804af2437a8e57297d4c87aec61ccf4cb31f8e3bbfe67f514aaa88d4a0004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 20 Jul 2012 20:59:22 +0000 Subject: [PATCH] Accepting request 128509 from home:scorot:branches:science fix build on SLE 11 by disabling python-vtk-qt an java wrapper. OBS-URL: https://build.opensuse.org/request/show/128509 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=38 --- vtk.changes | 6 ++++++ vtk.spec | 29 ++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/vtk.changes b/vtk.changes index 2b90053..dcb573d 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 25 20:46:30 UTC 2012 - scorot@free.fr + +- build python-qt and java binding for openSUSE version higher than + 11.2 which fixes build on SLE 11 + ------------------------------------------------------------------- Fri May 18 21:20:14 UTC 2012 - badshah400@gmail.com diff --git a/vtk.spec b/vtk.spec index 221095d..190e7ec 100644 --- a/vtk.spec +++ b/vtk.spec @@ -78,7 +78,11 @@ BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: wget BuildRequires: zlib-devel +%if %{?sles_version} +BuildRequires: libxml2-devel +%else BuildRequires: pkgconfig(libxml-2.0) +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %define qtdir %{_lib}/qt4 @@ -93,7 +97,9 @@ volume rendering, LOD control). Summary: VTK header files for building C++ code Group: Development/Libraries/Other Requires: %{name} = %{version} +%if 0%{?suse_version} >= 1130 Requires: %{name}-java = %{version} +%endif Requires: %{name}-qt = %{version} Requires: %{name}-tcl = %{version} %if 0%{?suse_version} > 1210 @@ -114,7 +120,9 @@ Requires: libqt4-devel Requires: libtheora-devel Requires: libtiff-devel Requires: python-%{name} = %{version} +%if 0%{?suse_version} >= 1130 Requires: python-%{name}-qt = %{version} +%endif %description devel VTK is an open-source software system for image processing, 3D @@ -126,6 +134,7 @@ volume rendering, LOD control). This provides the VTK header files required to compile C++ programs that use VTK to do 3D visualisation. +%if 0%{?suse_version} >= 1130 %package java Summary: Java bindings for VTK Group: Development/Libraries/Java @@ -139,6 +148,7 @@ decimation) and rendering techniques (e.g., hardware-accelerated volume rendering, LOD control). This package provides java bindings for VTK. +%endif %package -n python-%{name} Summary: Python bindings for VTK @@ -155,6 +165,7 @@ volume rendering, LOD control). This package provides python bindings for VTK. +%if 0%{?suse_version} >=1130 %package -n python-%{name}-qt Summary: Qt Python VTK widget Group: System/Libraries @@ -172,6 +183,7 @@ decimation) and rendering techniques (e.g., hardware-accelerated volume rendering, LOD control). This package provides python-qt bindings for VTK. +%endif %package qt Summary: Qt VTK widget @@ -285,9 +297,14 @@ cmake .. \ -DVTK_USE_SYSTEM_GL2PS:BOOL=OFF \ -DVTK_USE_SYSTEM_HDF5:BOOL=OFF \ %endif - -DVTK_WRAP_JAVA:BOOL=ON \ -DVTK_WRAP_PYTHON:BOOL=ON \ +%if 0%{?suse_version} >= 1130 + -DVTK_WRAP_JAVA:BOOL=ON \ -DVTK_WRAP_PYTHON_SIP:BOOL=ON \ +%else + -DVTK_WRAP_JAVA:BOOL=OFF \ + -DVTK_WRAP_PYTHON_SIP:BOOL=OFF \ +%endif -DVTK_WRAP_TCL:BOOL=ON # Package fails to compile with the following option (Note: postgresql-devel and libpqxx-devel are needed as dependencies) @@ -412,14 +429,18 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%if 0%{?suse_version} >= 1130 %post java -p /sbin/ldconfig %postun java -p /sbin/ldconfig +%endif %post -n python-%{name} -p /sbin/ldconfig %postun -n python-%{name} -p /sbin/ldconfig +%if 0%{?suse_version} >=1130 %post -n python-%{name}-qt -p /sbin/ldconfig %postun -n python-%{name}-qt -p /sbin/ldconfig +%endif %post qt -p /sbin/ldconfig %postun qt -p /sbin/ldconfig @@ -441,6 +462,7 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/ %{_libdir}/%{name}/hints/ %{_includedir}/%{name}-%{series}/ +%if 0%{?suse_version} >= 1130 %files java %defattr(-,root,root,-) %{_bindir}/%{name}ParseJava @@ -448,6 +470,7 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/ %{_libdir}/*Java.so.* %{_libdir}/%{name}/*Java.so.* %{_libdir}/%{name}/java/ +%endif %files -n python-%{name} %defattr(-,root,root,-) @@ -462,13 +485,17 @@ mv %{buildroot}%{_libdir}/%{name}/*.tcl %{buildroot}%{_datadir}/tcl/%{name}/ %{_libdir}/%{name}/*PythonD.so.* %{python_sitelib}/VTK-%{version}-py%{py_ver}.egg-info %{python_sitelib}/%{name}/ +%if 0%{?suse_version} >= 1130 %exclude %{python_sitelib}/%{name}/QVTKPython.so %exclude %{python_sitelib}/%{name}/*PythonSIP.so +%endif +%if 0%{?suse_version} >= 1130 %files -n python-%{name}-qt %defattr(-,root,root,-) %{python_sitelib}/%{name}/QVTKPython.so %{python_sitelib}/%{name}/*PythonSIP.so +%endif %files qt %defattr(-,root,root,-)