[gdcm/f14/master] Re-enabled vtk support as per bug 649669
mrceresa
mrceresa at fedoraproject.org
Fri Nov 19 20:04:54 UTC 2010
commit 98e6606fba0f841d484d645f4400624b2602b63d
Author: Mario Ceresa <mrceresa at gmail.com>
Date: Fri Nov 19 21:04:55 2010 +0100
Re-enabled vtk support as per bug 649669
gdcm-2.0.16-fix_dso_link.patch | 26 ++++++++++++++++++++++++++
gdcm.spec | 12 +++++++++---
2 files changed, 35 insertions(+), 3 deletions(-)
---
diff --git a/gdcm-2.0.16-fix_dso_link.patch b/gdcm-2.0.16-fix_dso_link.patch
new file mode 100644
index 0000000..737d2c1
--- /dev/null
+++ b/gdcm-2.0.16-fix_dso_link.patch
@@ -0,0 +1,26 @@
+diff -ru gdcm-2.0.16_orig/Utilities/VTK/Applications/CMakeLists.txt gdcm-2.0.16/Utilities/VTK/Applications/CMakeLists.txt
+--- gdcm-2.0.16_orig/Utilities/VTK/Applications/CMakeLists.txt 2010-08-18 12:25:43.000000000 +0200
++++ gdcm-2.0.16/Utilities/VTK/Applications/CMakeLists.txt 2010-11-19 20:30:06.447787551 +0100
+@@ -29,7 +29,7 @@
+ IF(GDCM_EXECUTABLE_PROPERTIES)
+ SET_TARGET_PROPERTIES(${app} PROPERTIES ${GDCM_EXECUTABLE_PROPERTIES})
+ ENDIF(GDCM_EXECUTABLE_PROPERTIES)
+- TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME})
++ TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} gdcmMSFF)
+ IF(VTK_USE_RENDERING)
+ TARGET_LINK_LIBRARIES(${app} vtkRendering)
+
+Only in gdcm-2.0.16/Utilities/VTK/Applications: CMakeLists.txt~
+diff -ru gdcm-2.0.16_orig/Utilities/VTK/Examples/Cxx/CMakeLists.txt gdcm-2.0.16/Utilities/VTK/Examples/Cxx/CMakeLists.txt
+--- gdcm-2.0.16_orig/Utilities/VTK/Examples/Cxx/CMakeLists.txt 2010-08-18 12:25:43.000000000 +0200
++++ gdcm-2.0.16/Utilities/VTK/Examples/Cxx/CMakeLists.txt 2010-11-19 20:30:09.457709578 +0100
+@@ -40,7 +40,7 @@
+ FOREACH(app ${GDCM_VTK_APPS})
+ ADD_EXECUTABLE(${app} ${app}.cxx)
+ #SET_TARGET_PROPERTIES(${app} PROPERTIES ${GDCM_EXECUTABLE_PROPERTIES})
+- TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} ${vtkgdcm_LIBS})
++ TARGET_LINK_LIBRARIES(${app} ${VTKGDCM_NAME} ${vtkgdcm_LIBS} gdcmMSFF)
+ IF( "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}" GREATER 5.0 )
+ IF(VTK_USE_RENDERING)
+ TARGET_LINK_LIBRARIES(${app} vtkWidgets vtkVolumeRendering)
+Only in gdcm-2.0.16/Utilities/VTK/Examples/Cxx: CMakeLists.txt~
diff --git a/gdcm.spec b/gdcm.spec
index 2ae0473..0811933 100644
--- a/gdcm.spec
+++ b/gdcm.spec
@@ -11,7 +11,7 @@
Name: gdcm
Version: 2.0.16
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
Group: Development/Libraries
License: BSD
@@ -26,6 +26,7 @@ ExcludeArch: ppc ppc64
Patch1: gdcm-2.0.14-inplacebuild.patch
Patch2: gdcm-2.0.14-usecopyright.patch
Patch3: gdcm-2.0.14-use_system_charls.patch
+Patch4: gdcm-2.0.16-fix_dso_link.patch
BuildRequires: cmake >= 2.6.0
BuildRequires: openssl-devel
@@ -41,6 +42,7 @@ BuildRequires: texlive-latex
BuildRequires: graphviz
BuildRequires: python2-devel
BuildRequires: swig
+BuildRequires: vtk-devel
%description
@@ -79,6 +81,7 @@ used this library with python
%patch1
%patch2
%patch3
+%patch4 -p1
# Remove bundled utilities (we use Fedora's ones)
@@ -109,7 +112,7 @@ cp %{SOURCE2} CMake/
-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING="Release" \
- -DGDCM_USE_VTK:BOOL=OFF \
+ -DGDCM_USE_VTK:BOOL=ON \
-DGDCM_USE_SYSTEM_EXPAT=ON \
-DGDCM_USE_SYSTEM_OPENJPEG=ON \
-DGDCM_USE_SYSTEM_ZLIB=ON \
@@ -135,7 +138,7 @@ install -d $RPM_BUILD_ROOT%{python_sitelib}/
mv $RPM_BUILD_ROOT%{_libdir}/gdcm.py $RPM_BUILD_ROOT%{python_sitelib}/
mv $RPM_BUILD_ROOT%{_libdir}/gdcmswig.py $RPM_BUILD_ROOT%{python_sitelib}/
mv $RPM_BUILD_ROOT%{_libdir}/_gdcmswig.so $RPM_BUILD_ROOT%{python_sitelib}/
-
+mv $RPM_BUILD_ROOT%{_libdir}/vtkgdcm.py $RPM_BUILD_ROOT%{python_sitelib}/
## Rearranging directory layout and removing version from dir
mv $RPM_BUILD_ROOT%{_datadir}/gdcm-2.0 $RPM_BUILD_ROOT%{_datadir}/gdcm
@@ -180,6 +183,9 @@ ctest .
%{python_sitelib}/*
%changelog
+* Tue Nov 19 2010 Mario Ceresa <mrceresa at gmail.com> 2.0.16-6
+- Enabled VTK support
+
* Tue Oct 19 2010 Mario Ceresa <mrceresa at gmail.com> 2.0.16-5
- Filtered out private python extension lib
- Added documentation
More information about the scm-commits
mailing list