|
|
|
@ -5,8 +5,8 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Name: gdcm
|
|
|
|
|
Version: 2.2.4
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Version: 2.4.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
License: BSD
|
|
|
|
@ -14,12 +14,13 @@ URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page
|
|
|
|
|
Source0: http://sourceforge.net/projects/gdcm/files/gdcm%202.x/GDCM%20%{version}/%{name}-%{version}.tar.bz2
|
|
|
|
|
Source1: http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.gz
|
|
|
|
|
|
|
|
|
|
Patch1: gdcm-2.0.14-inplacebuild.patch
|
|
|
|
|
Patch2: gdcm-2.0.14-usecopyright.patch
|
|
|
|
|
Patch3: gdcm-2.0.17-install2libarch.patch
|
|
|
|
|
Patch4: gdcm-2.0.17-no_versioned_dir.patch
|
|
|
|
|
Patch1: gdcm-2.4.0-inplace-build.patch
|
|
|
|
|
Patch2: gdcm-2.4.0-usecopyright.patch
|
|
|
|
|
Patch3: gdcm-2.4.0-install2libarch.patch
|
|
|
|
|
Patch4: gdcm-2.4.0-no-versioned-dir.patch
|
|
|
|
|
# From http://public.kitware.com/pipermail/vtkusers/2013-February/127377.html
|
|
|
|
|
Patch5: gdcm-0005-support-vtk6.patch
|
|
|
|
|
Patch6: gdcm-2.4.0-find-python27.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: CharLS-devel >= 1.0
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
@ -39,6 +40,7 @@ BuildRequires: openjpeg-devel
|
|
|
|
|
#BuildRequires: /usr/bin/pdflatex
|
|
|
|
|
#BuildRequires: poppler-devel
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
|
BuildRequires: swig
|
|
|
|
|
#BuildRequires: texlive-ec
|
|
|
|
@ -85,14 +87,24 @@ Requires: %{name} = %{version}-%{release}
|
|
|
|
|
You should install the gdcm-python package if you would like to
|
|
|
|
|
used this library with python
|
|
|
|
|
|
|
|
|
|
%package -n python3-gdcm
|
|
|
|
|
Summary: Python binding for GDCM
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-gdcm
|
|
|
|
|
|
|
|
|
|
You should install the python3-gdcm package if you would like to
|
|
|
|
|
used this library with python
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%setup -T -D -a 1
|
|
|
|
|
%patch1
|
|
|
|
|
%patch2
|
|
|
|
|
%patch1 -p 1
|
|
|
|
|
%patch2 -p 1
|
|
|
|
|
%patch3 -p 1
|
|
|
|
|
%patch4 -p 1
|
|
|
|
|
%patch5 -p 2
|
|
|
|
|
%patch5 -p 1
|
|
|
|
|
|
|
|
|
|
# Remove bundled utilities (we use Fedora's ones)
|
|
|
|
|
|
|
|
|
@ -111,12 +123,52 @@ rm -rf Utilities/wxWidgets
|
|
|
|
|
# Needed for testing:
|
|
|
|
|
#rm -rf Utilities/gdcmmd5
|
|
|
|
|
|
|
|
|
|
# prepare python3 build
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
|
|
|
|
|
# apply patch after copying files for python3 build
|
|
|
|
|
%patch6 -p 1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# build python3 build
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
|
|
|
|
|
mkdir -p %{_target_platform}
|
|
|
|
|
pushd %{_target_platform}
|
|
|
|
|
|
|
|
|
|
%cmake .. \
|
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
|
|
-DGDCM_BUILD_TESTING=ON \
|
|
|
|
|
-DGDCM_DATA_ROOT=../gdcmData/ \
|
|
|
|
|
-DGDCM_BUILD_EXAMPLES:BOOL=ON \
|
|
|
|
|
-DGDCM_DOCUMENTATION:BOOL=ON \
|
|
|
|
|
-DGDCM_PDF_DOCUMENTATION:BOOL=OFF \
|
|
|
|
|
-DGDCM_WRAP_PYTHON:BOOL=ON \
|
|
|
|
|
-DPYTHON_EXECUTABLE=%{__python3} \
|
|
|
|
|
-DGDCM_INSTALL_PYTHONMODULE_DIR=%{python3_sitearch} \
|
|
|
|
|
-DGDCM_WRAP_JAVA=OFF \
|
|
|
|
|
-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
|
|
|
|
|
-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
|
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
|
|
|
|
|
-DGDCM_USE_VTK:BOOL=OFF \
|
|
|
|
|
-DGDCM_USE_SYSTEM_CHARLS=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_EXPAT=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_OPENJPEG=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_ZLIB=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_UUID=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_LJPEG=OFF \
|
|
|
|
|
-DGDCM_USE_SYSTEM_OPENSSL=ON \
|
|
|
|
|
-DGDCM_USE_JPEGLS=ON \
|
|
|
|
|
-DGDCM_USE_SYSTEM_POPPLER=OFF
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
make %{?_smp_mflags} -C %{_target_platform}
|
|
|
|
|
popd
|
|
|
|
|
# end python3
|
|
|
|
|
|
|
|
|
|
mkdir -p %{_target_platform}
|
|
|
|
|
pushd %{_target_platform}
|
|
|
|
|
|
|
|
|
|
%cmake .. \
|
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
|
@ -126,6 +178,8 @@ pushd %{_target_platform}
|
|
|
|
|
-DGDCM_DOCUMENTATION:BOOL=ON \
|
|
|
|
|
-DGDCM_PDF_DOCUMENTATION:BOOL=OFF \
|
|
|
|
|
-DGDCM_WRAP_PYTHON:BOOL=ON \
|
|
|
|
|
-DPYTHON_EXECUTABLE=%{__python2} \
|
|
|
|
|
-DGDCM_INSTALL_PYTHONMODULE_DIR=%{python2_sitearch} \
|
|
|
|
|
-DGDCM_WRAP_JAVA=OFF \
|
|
|
|
|
-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
|
|
|
|
|
-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
|
|
|
|
@ -150,13 +204,15 @@ popd
|
|
|
|
|
make %{?_smp_mflags} -C %{_target_platform}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
# install python3 build
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
|
|
|
|
|
install -d %{buildroot}%{python3_sitearch}
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
install -d $RPM_BUILD_ROOT%{python_sitelib}/
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_libdir}/*.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}/
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
|
|
|
|
|
|
|
|
|
|
## Rearranging directory layout and removing version from dir
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_libdir}/gdcm/*.cmake $RPM_BUILD_ROOT%{_datadir}/gdcm/
|
|
|
|
@ -196,9 +252,16 @@ make test -C %{_target_platform} || exit 0
|
|
|
|
|
%{_datadir}/gdcm/*.cmake
|
|
|
|
|
|
|
|
|
|
%files python
|
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
%{python2_sitearch}/*
|
|
|
|
|
|
|
|
|
|
%files -n python3-gdcm
|
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sun Oct 20 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 2.4.0-1
|
|
|
|
|
- Update to 2.4.0
|
|
|
|
|
- Added python3-gdcm package
|
|
|
|
|
|
|
|
|
|
* Tue Aug 13 2013 Mario Ceresa <mrceresa AT fedoraproject DOT org> - 2.2.4-5
|
|
|
|
|
- Still getting "vtkImageData has no member named 'GetWholeExtent" with vtk-devel
|
|
|
|
|
- Added additional debug symbols
|
|
|
|
|