2a156e2
# we don't want to provide private python extension libs
2a156e2
%{?filter_setup:
2a156e2
%filter_provides_in %{python_sitearch}/.*\.so$
2a156e2
%filter_setup
2a156e2
}
2a156e2
2a156e2
Name:		gdcm
f94c63b
Version:	2.0.17
81b1192
Release:	7%{?dist}
2a156e2
Summary:	Grassroots DiCoM is a C++ library to parse DICOM medical files
2a156e2
Group:		Development/Libraries
2a156e2
License:	BSD
2a156e2
URL:		http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Main_Page
f94c63b
Source0:	http://sourceforge.net/projects/gdcm/files/gdcm%202.x/GDCM%202.0.17/gdcm-2.0.17.tar.bz2
2a156e2
#Source1:	http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.bz2
2a156e2
Source2:	FindCharLS.cmake
2a156e2
# There is a bug in doxygen preventing compilation on:
2a156e2
ExcludeArch:	ppc ppc64
2a156e2
2a156e2
Patch1: gdcm-2.0.14-inplacebuild.patch
2a156e2
Patch2:	gdcm-2.0.14-usecopyright.patch
f94c63b
Patch3: gdcm-2.0.16-fix_ptrdiff.patch
f94c63b
Patch4: gdcm-2.0.16-fix-decode.patch
f94c63b
Patch5: gdcm-2.0.16-JlsParameters.patch
f94c63b
Patch6: gdcm-2.0.17-install2libarch.patch
f94c63b
Patch7: gdcm-2.0.17-use_openjpeg_1x.patch
f94c63b
Patch8: gdcm-2.0.17-use_system_charls
f94c63b
Patch9: gdcm-2.0.16-remove-stdafx.patch
f94c63b
Patch10: gdcm-2.0.17-no_versioned_dir.patch
2a156e2
2a156e2
BuildRequires:	cmake >= 2.6.0
2a156e2
BuildRequires:	openssl-devel
2a156e2
BuildRequires:	libuuid-devel
2a156e2
BuildRequires:	expat-devel
2a156e2
BuildRequires:	openjpeg-devel
2a156e2
BuildRequires:	poppler-devel
2a156e2
BuildRequires:	mesa-libOSMesa-devel
2a156e2
BuildRequires:	fontconfig-devel
2a156e2
BuildRequires:	doxygen
fd8f86a
BuildRequires:	CharLS-devel >= 1.0
2a156e2
BuildRequires:	texlive-latex
2a156e2
BuildRequires:	graphviz
2a156e2
BuildRequires:	python2-devel
2a156e2
BuildRequires:	swig
e9a604c
BuildRequires:	vtk-devel
39377dd
BuildRequires:	postgresql-devel
39377dd
BuildRequires:	mysql-devel
39377dd
BuildRequires:	libogg-devel
39377dd
BuildRequires:	libtheora-devel
39377dd
BuildRequires:	gl2ps-devel
f657cb0
BuildRequires:	mysql-libs
2a156e2
2a156e2
2a156e2
%description
2a156e2
GDCM implements the dicom base standard part 5 that concentrates on image file
2a156e2
format. Hence GDCM supports the following formats:
2a156e2
- ACR-NEMA version 1 and 2 (huffman compression is not supported),
2a156e2
- DICOM version 3.0, including various encodings of JPEG - lossless & lossy-, 
2a156e2
RLE, J2K, deflated, JPEG-LS (very experimental) (MPEG2 compression is not 
2a156e2
supported)
2a156e2
- Papyrus V2 and V3 file headers should be readable, 
2a156e2
2a156e2
%package	devel
2a156e2
Summary:	Libraries and headers for GDCM
2a156e2
Group:		Development/Libraries
2a156e2
Requires:	%{name} = %{version}-%{release}
2a156e2
2a156e2
%description devel
2a156e2
2a156e2
You should install the gdcm-devel package if you would like to
2a156e2
compile applications based on gdcm
2a156e2
2a156e2
%package	python
2a156e2
Summary:	Python binding for GDCM
2a156e2
Group:		Development/Libraries
2a156e2
Requires:	%{name} = %{version}-%{release}
2a156e2
2a156e2
%description python
2a156e2
2a156e2
You should install the gdcm-python package if you would like to
2a156e2
used this library with python
2a156e2
2a156e2
%prep
2a156e2
%setup -q
2a156e2
%patch1
2a156e2
%patch2
f94c63b
%patch3 -p 2
f94c63b
%patch4 -p 1
f94c63b
%patch5 -p 1
f94c63b
%patch6 -p 1
f94c63b
%patch7 -p 1
f94c63b
%patch8 -p 1
f94c63b
%patch9 -p 1
f94c63b
%patch10 -p 1
2a156e2
2a156e2
# Remove bundled utilities (we use Fedora's ones)
2a156e2
2a156e2
rm -rf Utilities/gdcmexpat
2a156e2
rm -rf Utilities/gdcmopenjpeg
2a156e2
rm -rf Utilities/gdcmzlib
2a156e2
rm -rf Utilities/gdcmuuid
2a156e2
rm -rf Utilities/gdcmcharls
2a156e2
2a156e2
# Remove bundled utilities (we don't use them)
2a156e2
rm -rf Utilities/gdcmmd5
2a156e2
rm -rf Utilities/getopt
2a156e2
rm -rf Utilities/pvrg
2a156e2
rm -rf Utilities/rle
2a156e2
rm -rf Utilities/wxWidgets
2a156e2
2a156e2
cp %{SOURCE2} CMake/
2a156e2
2a156e2
%build
2a156e2
%cmake	-DCMAKE_VERBOSE_MAKEFILE=ON \
2a156e2
	-DCMAKE_SKIP_RPATH:BOOL=YES \
2a156e2
	-DGDCM_BUILD_TESTING=OFF \
2a156e2
	-DGDCM_BUILD_EXAMPLES:BOOL=ON \
2a156e2
	-DGDCM_DOCUMENTATION:BOOL=ON \
2a156e2
	-DGDCM_PDF_DOCUMENTATION:BOOL=ON \
34faf22
	-DGDCM_WRAP_PYTHON:BOOL=ON \
2a156e2
	-DGDCM_WRAP_JAVA=OFF \
2a156e2
	-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
2a156e2
	-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
2a156e2
	-DCMAKE_BUILD_TYPE:STRING="Release" \
e9a604c
	-DGDCM_USE_VTK:BOOL=ON \
2a156e2
	-DGDCM_USE_SYSTEM_EXPAT=ON \
2a156e2
	-DGDCM_USE_SYSTEM_OPENJPEG=ON \
2a156e2
	-DGDCM_USE_SYSTEM_ZLIB=ON \
2a156e2
	-DGDCM_USE_SYSTEM_UUID=ON \
2a156e2
	-DGDCM_USE_SYSTEM_LJPEG=OFF \
2a156e2
	-DGDCM_USE_SYSTEM_OPENSSL=ON \
2a156e2
	-DGDCM_USE_JPEGLS=ON \
2a156e2
	-DGDCM_USE_SYSTEM_JPEGLS=ON \
2a156e2
	-DGDCM_USE_SYSTEM_POPPLER=ON . 
2a156e2
2a156e2
#Cannot build wrap_java:	
2a156e2
#	-DGDCM_VTK_JAVA_JAR:PATH=/usr/share/java/vtk.jar no found! 
2a156e2
#	yum provides */vtk.jar -> No results found
2a156e2
2a156e2
make %{?_smp_mflags}
2a156e2
2a156e2
2a156e2
%install
2a156e2
make install DESTDIR=$RPM_BUILD_ROOT
2a156e2
34faf22
install -d $RPM_BUILD_ROOT%{python_sitelib}/
34faf22
mv $RPM_BUILD_ROOT%{_libdir}/gdcm.py $RPM_BUILD_ROOT%{python_sitelib}/
34faf22
mv $RPM_BUILD_ROOT%{_libdir}/gdcmswig.py $RPM_BUILD_ROOT%{python_sitelib}/
34faf22
mv $RPM_BUILD_ROOT%{_libdir}/_gdcmswig.so $RPM_BUILD_ROOT%{python_sitelib}/
34faf22
mv $RPM_BUILD_ROOT%{_libdir}/vtkgdcm.py $RPM_BUILD_ROOT%{python_sitelib}/
2a156e2
2a156e2
## Rearranging directory layout and removing version from dir
2728aff
mv $RPM_BUILD_ROOT%{_libdir}/gdcm/*.cmake $RPM_BUILD_ROOT%{_datadir}/gdcm/
f94c63b
rmdir $RPM_BUILD_ROOT%{_libdir}/gdcm
2a156e2
2a156e2
## Cleaning Example dir from cmake cache files + remove 0-lenght files
2a156e2
find %{_builddir}/%{?buildsubdir}/Examples -depth -name CMakeFiles | xargs rm -rf
2a156e2
find %{_builddir}/%{?buildsubdir}/Examples -depth -size 0 | xargs rm -rf
2a156e2
2a156e2
%files
2a156e2
%doc %{_mandir}/man1/*.1*
2a156e2
%doc AUTHORS Copyright.txt README.Copyright.txt README.txt
2a156e2
%dir %{_datadir}/gdcm/
2a156e2
%{_bindir}/*
2a156e2
%{_libdir}/*.so.*
2a156e2
%{_datadir}/gdcm/XML
2a156e2
2a156e2
%check
2a156e2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/bin
2a156e2
ctest .
2a156e2
2a156e2
%post -p /sbin/ldconfig
2a156e2
2a156e2
%postun -p /sbin/ldconfig
2a156e2
2a156e2
%files devel
2a156e2
%dir %{_includedir}/gdcm/
2a156e2
%doc Examples
2a156e2
%{_includedir}/gdcm/*
2a156e2
%{_libdir}/*.so
2a156e2
%{_datadir}/gdcm/*.cmake
2a156e2
34faf22
%files python
34faf22
%{python_sitelib}/*
2a156e2
2a156e2
%changelog
81b1192
* Mon Oct  3 2011 Marek Kasik <mkasik@redhat.com> - 2.0.17-7
81b1192
- Rebuild (poppler-0.18.0 stable)
81b1192
aadf164
* Wed Sep 21 2011 Marek Kasik <mkasik@redhat.com> - 2.0.17-6
aadf164
- Rebuild (poppler-0.17.3)
aadf164
c398420
* Mon Jul 25 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 2.0.17-5
c398420
- Rebuild for cmake
c398420
- Clean up spec to match current guidelines
c398420
ad0c9ea
* Fri Jul 15 2011 Marek Kasik <mkasik@redhat.com> - 2.0.17-4
ad0c9ea
- Rebuild (poppler-0.17.0)
ad0c9ea
9e44de9
* Wed Apr 20 2011 Mario Ceresa <mrceresa@fedoraproject.org> - 2.0.17-3
9e44de9
- Bump release
9e44de9
25efe1e
* Sun Mar 27 2011 Mario Ceresa mrceresa gmailcom - 2.0.17-2
25efe1e
- Fixed BR mysql-libs
25efe1e
f94c63b
* Sat Mar 19 2011 Mario Ceresa mrceresa gmailcom - 2.0.17-1
f94c63b
- Updated to version 2.0.17
f94c63b
39377dd
* Thu Mar 17 2011 Marek Kasik <mkasik@redhat.com> - 2.0.16-17
39377dd
- Fix BuildRequires
39377dd
a82d297
* Sun Mar 13 2011 Marek Kasik <mkasik@redhat.com> - 2.0.16-16
a82d297
- Rebuild (poppler-0.16.3)
a82d297
Orion Poplawski 2499fc2
* Sun Feb 20 2011 Orion Poplawski <orion@cora.nwra.com> - 2.0.16-15
Orion Poplawski 2499fc2
- Rebuild for new vtk with fixed sonames
Orion Poplawski 2499fc2
fd8f86a
* Mon Feb 14 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-13
fd8f86a
- Adapted to new version of CharLS lib (v 1.0)
fd8f86a
eecefa3
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.16-12
eecefa3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
eecefa3
fd8f86a
* Mon Feb 02 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-11
6637c89
- Removed python bindings because they fail to build with gcc 4.6
6637c89
fd8f86a
* Mon Feb 02 2011 Mario Ceresa <mrceresa@gmail.com> - 2.0.16-10
2728aff
- Added patch to fix upstream bug #3169784
b5ebc79
fd8f86a
* Sun Jan 02 2011 Rex Dieter <rdieter@fedoraproject.org> - 2.0.16-11
48baae0
- rebuild (poppler)
48baae0
48baae0
* Wed Dec 15 2010 Rex Dieter <rdieter@fedoraproject.org> - 2.0.16-8
48baae0
- rebuild (poppler)
48baae0
2728aff
* Mon Nov 22 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-7
2728aff
- Fixed bug 655738
0d788e4
e9a604c
* Tue Nov 19 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-6
e9a604c
- Enabled VTK support
ed9c1a7
2a156e2
* Tue Oct 19 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-5
2a156e2
- Filtered out private python extension lib
2a156e2
- Added documentation
2a156e2
2a156e2
* Tue Oct 19 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-4
2a156e2
- Changed directory ownership
2a156e2
2a156e2
* Fri Oct 15 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-3
2a156e2
- Rearranged directory layout to remove version in dir names
2a156e2
2a156e2
* Sat Sep 18 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-2
2a156e2
- Added ExcludeArch for ppc and ppc64 because of a bug in doxygen
2a156e2
see https://bugzilla.redhat.com/show_bug.cgi?id=566725#c9
2a156e2
2a156e2
* Sat Sep 18 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.16-1
2a156e2
- Updated to release 2.0.16
2a156e2
- Removed patch "stack_namespace" and "poppler_breaks_api" because
2a156e2
already included upstream
2a156e2
- Added swig and texlive-pdflatex to BuildRequires
2a156e2
- Moved python files to a separate package
2a156e2
2a156e2
* Sun Apr 11 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.14-5
2a156e2
- Fixed some issues pointed out by Martin Gieseking. In details:
2a156e2
- BR to build documentation (tex + graphviz)
2a156e2
- Changed man page inclusion
2a156e2
- Fixed changelog format
2a156e2
- Removed VTK support because cmake 2.8 is needed to recognize vtk 5.4!
2a156e2
- Fixed python support
2a156e2
2a156e2
* Thu Mar 25 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.14-4
2a156e2
- Added VTK support
2a156e2
- Added python support
2a156e2
2a156e2
* Mon Mar 21 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.14-3
2a156e2
- Added BuildRequires fontconfig-devel
2a156e2
- Fixed lib /lib64 issue with base CMakeLists.txt
2a156e2
2a156e2
* Mon Mar 15 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.14-2
2a156e2
- Added BuildRequires CharLS-devel
2a156e2
2a156e2
* Wed Feb 17 2010 Mario Ceresa <mrceresa@gmail.com> 2.0.14
2a156e2
- Initial RPM Release
2a156e2