|
|
c4e84bf |
# Enabled by default
|
|
|
b5fb2b2 |
%bcond_without tests
|
|
|
cc3fdc6 |
|
|
|
7df9d50 |
# note ABI does not change in patch releases
|
|
|
7df9d50 |
# https://sourceforge.net/p/gdcm/mailman/message/36768376/
|
|
|
12d2ae6 |
|
|
|
cc180e6 |
# Docs do not build on i686 because some LaTeX deps are unsatisfied. So skip
|
|
|
cc180e6 |
# these docs entirely.
|
|
|
cc180e6 |
%bcond_with texdocs
|
|
|
cc180e6 |
|
|
|
f0a3165 |
Name: gdcm
|
|
|
7df9d50 |
Version: 3.0.21
|
|
|
25dea3f |
Release: %autorelease
|
|
|
f0a3165 |
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
|
|
|
f0a3165 |
License: BSD
|
|
|
f0a3165 |
URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page
|
|
|
cc3fdc6 |
# Use github release
|
|
|
cc3fdc6 |
Source0: https://github.com/malaterre/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
f0a3165 |
Source1: http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.gz
|
|
|
f0a3165 |
|
|
|
71489a1 |
Patch1: 0001-3.0.1-Use-copyright.patch
|
|
|
2b478a6 |
# Fix for 1687233
|
|
|
2b478a6 |
Patch3: 0002-Fix-export-variables.patch
|
|
|
71489a1 |
|
|
|
71489a1 |
BuildRequires: CharLS-devel >= 2.0
|
|
|
f0a3165 |
BuildRequires: cmake
|
|
|
f0a3165 |
BuildRequires: doxygen
|
|
|
f0a3165 |
BuildRequires: libxslt-devel
|
|
|
cc3fdc6 |
BuildRequires: dcmtk-devel
|
|
|
f0a3165 |
BuildRequires: docbook5-style-xsl
|
|
|
71489a1 |
BuildRequires: docbook-style-xsl
|
|
|
f0a3165 |
BuildRequires: expat-devel
|
|
|
f0a3165 |
BuildRequires: fontconfig-devel
|
|
|
cc3fdc6 |
BuildRequires: gcc
|
|
|
cc3fdc6 |
BuildRequires: gcc-c++
|
|
|
cc3fdc6 |
BuildRequires: git-core
|
|
|
f0a3165 |
BuildRequires: graphviz
|
|
|
f0a3165 |
BuildRequires: gl2ps-devel
|
|
|
f0a3165 |
BuildRequires: libogg-devel
|
|
|
f0a3165 |
BuildRequires: libtheora-devel
|
|
|
f0a3165 |
BuildRequires: libuuid-devel
|
|
|
f0a3165 |
BuildRequires: mesa-libOSMesa-devel
|
|
|
f0a3165 |
BuildRequires: openssl-devel
|
|
|
60a3115 |
BuildRequires: pkgconfig(libopenjp2)
|
|
|
f0a3165 |
BuildRequires: poppler-devel
|
|
|
f0a3165 |
BuildRequires: python3-devel
|
|
|
f0a3165 |
BuildRequires: swig
|
|
|
cc3fdc6 |
BuildRequires: sqlite-devel
|
|
|
f0a3165 |
BuildRequires: json-c-devel
|
|
|
f0a3165 |
BuildRequires: libxml2-devel
|
|
|
6732ab1 |
BuildRequires: make
|
|
|
71489a1 |
|
|
|
cc3fdc6 |
# BuildRequires: vtk-devel
|
|
|
71489a1 |
|
|
|
cc180e6 |
# deps aren't available on i686, so we skip docs building entirely
|
|
|
cc180e6 |
%if %{with texdocs}
|
|
|
6732ab1 |
BuildRequires: texlive-scheme-medium
|
|
|
6732ab1 |
BuildRequires: tex(hanging.sty)
|
|
|
6732ab1 |
BuildRequires: tex(tocloft.sty)
|
|
|
6732ab1 |
BuildRequires: tex(newunicodechar.sty)
|
|
|
cc180e6 |
%endif
|
|
|
2a156e2 |
|
|
|
2a156e2 |
|
|
|
2a156e2 |
%description
|
|
|
9daf857 |
Grassroots DiCoM (GDCM) is a C++ library for DICOM medical files.
|
|
|
9daf857 |
It supports ACR-NEMA version 1 and 2 (huffman compression is not supported),
|
|
|
9daf857 |
RAW, JPEG, JPEG 2000, JPEG-LS, RLE and deflated transfer syntax.
|
|
|
9daf857 |
It comes with a super fast scanner implementation to quickly scan hundreds of
|
|
|
9daf857 |
DICOM files. It supports SCU network operations (C-ECHO, C-FIND, C-STORE,
|
|
|
9daf857 |
C-MOVE). PS 3.3 & 3.6 are distributed as XML files.
|
|
|
9daf857 |
It also provides PS 3.15 certificates and password based mechanism to
|
|
|
9daf857 |
anonymize and de-identify DICOM datasets.
|
|
|
2a156e2 |
|
|
|
f0a3165 |
%package doc
|
|
|
f0a3165 |
Summary: Includes html documentation for gdcm
|
|
|
f0a3165 |
BuildArch: noarch
|
|
|
6732ab1 |
Provides: %{name}-examples = %{version}-%{release}
|
|
|
6732ab1 |
Obsoletes: %{name}-examples < %{version}-%{release}
|
|
|
b745544 |
|
|
|
6cb2b30 |
%description doc
|
|
|
6cb2b30 |
You should install the gdcm-doc package if you would like to
|
|
|
314f33d |
access upstream documentation for gdcm.
|
|
|
6732ab1 |
Includes CSharp, C++, Java, PHP and Python example programs for GDCM
|
|
|
6732ab1 |
in html pages
|
|
|
b745544 |
|
|
|
f0a3165 |
%package applications
|
|
|
f0a3165 |
Summary: Includes command line programs for GDCM
|
|
|
f0a3165 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
9daf857 |
|
|
|
9daf857 |
%description applications
|
|
|
9daf857 |
You should install the gdcm-applications package if you would like to
|
|
|
9daf857 |
use command line programs part of GDCM. Includes tools to convert,
|
|
|
9daf857 |
anonymize, manipulate, concatenate, and view DICOM files.
|
|
|
b745544 |
|
|
|
f0a3165 |
%package devel
|
|
|
f0a3165 |
Summary: Libraries and headers for GDCM
|
|
|
f0a3165 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
f0a3165 |
Requires: %{name}-applications%{?_isa} = %{version}-%{release}
|
|
|
2a156e2 |
|
|
|
2a156e2 |
%description devel
|
|
|
2a156e2 |
You should install the gdcm-devel package if you would like to
|
|
|
2a156e2 |
compile applications based on gdcm
|
|
|
2a156e2 |
|
|
|
f0a3165 |
%package -n python3-gdcm
|
|
|
f0a3165 |
Summary: Python binding for GDCM
|
|
|
25c07a4 |
%{?python_provide:%python_provide python3-gdcm}
|
|
|
f0a3165 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
66e851a |
|
|
|
66e851a |
%description -n python3-gdcm
|
|
|
66e851a |
You should install the python3-gdcm package if you would like to
|
|
|
66e851a |
used this library with python
|
|
|
66e851a |
|
|
|
2a156e2 |
%prep
|
|
|
71489a1 |
%autosetup -n GDCM-%{version} -S git
|
|
|
cc3fdc6 |
# Data source
|
|
|
cc3fdc6 |
%setup -n GDCM-%{version} -q -T -D -a 1
|
|
|
3100233 |
|
|
|
cc180e6 |
# deps not available
|
|
|
cc180e6 |
%if %{with texdocs}
|
|
|
cc180e6 |
sed -i.backup 's/^GENERATE_LATEX.*=.*YES/GENERATE_LATEX = NO/' Utilities/doxygen/doxyfile.in
|
|
|
cc180e6 |
%endif
|
|
|
cc180e6 |
|
|
|
2a156e2 |
# Remove bundled utilities (we use Fedora's ones)
|
|
|
2a156e2 |
rm -rf Utilities/gdcmexpat
|
|
|
a068615 |
rm -rf Utilities/gdcmopenjpeg-v1
|
|
|
a068615 |
rm -rf Utilities/gdcmopenjpeg-v2
|
|
|
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/getopt
|
|
|
2a156e2 |
rm -rf Utilities/pvrg
|
|
|
2a156e2 |
rm -rf Utilities/rle
|
|
|
2a156e2 |
rm -rf Utilities/wxWidgets
|
|
|
2a156e2 |
|
|
Mario Ceresa |
7d6d0b1 |
# Needed for testing:
|
|
|
f0a3165 |
#rm -rf Utilities/gdcmmd5
|
|
Mario Ceresa |
7d6d0b1 |
|
|
|
2a156e2 |
%build
|
|
|
6732ab1 |
%cmake \
|
|
|
f0a3165 |
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
f0a3165 |
-DGDCM_INSTALL_PACKAGE_DIR=%{_libdir}/cmake/%{name} \
|
|
|
f0a3165 |
-DGDCM_INSTALL_INCLUDE_DIR=%{_includedir}/%{name} \
|
|
|
f0a3165 |
-DGDCM_INSTALL_DOC_DIR=%{_docdir}/%{name} \
|
|
|
f0a3165 |
-DGDCM_INSTALL_MAN_DIR=%{_mandir} \
|
|
|
f0a3165 |
-DGDCM_INSTALL_LIB_DIR=%{_libdir} \
|
|
|
f0a3165 |
-DGDCM_BUILD_TESTING:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_DATA_ROOT=../gdcmData/ \
|
|
|
6732ab1 |
-DGDCM_BUILD_EXAMPLES:BOOL=ON \
|
|
|
cc180e6 |
-DGDCM_DOCUMENTATION:BOOL=OFF \
|
|
|
f0a3165 |
-DGDCM_WRAP_PYTHON:BOOL=ON \
|
|
|
4953351 |
-DPYTHON_EXECUTABLE=%{python3} \
|
|
|
f0a3165 |
-DGDCM_INSTALL_PYTHONMODULE_DIR=%{python3_sitearch} \
|
|
|
f0a3165 |
-DGDCM_WRAP_JAVA:BOOL=OFF \
|
|
|
71489a1 |
-DGDCM_WRAP_CSHARP:BOOL=OFF \
|
|
|
f0a3165 |
-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
|
|
|
f0a3165 |
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
|
|
|
f0a3165 |
-DGDCM_USE_VTK:BOOL=OFF \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_CHARLS:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_ZLIB:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_UUID:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_LJPEG:BOOL=OFF \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_JPEGLS:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_JSON:BOOL=ON \
|
|
|
f0a3165 |
-DGDCM_USE_SYSTEM_POPPLER:BOOL=ON
|
|
|
2a156e2 |
|
|
|
89330c9 |
#Cannot build wrap_java:
|
|
|
f0a3165 |
# -DGDCM_VTK_JAVA_JAR:PATH=/usr/share/java/vtk.jar no found!
|
|
|
f0a3165 |
# yum provides */vtk.jar -> No results found
|
|
|
2a156e2 |
|
|
|
b5fb2b2 |
%cmake_build
|
|
|
2a156e2 |
|
|
|
2a156e2 |
%install
|
|
|
b5fb2b2 |
%cmake_install
|
|
|
74a462f |
|
|
|
cc3fdc6 |
%if %{with tests}
|
|
|
b745544 |
%check
|
|
Mario Ceresa |
7d6d0b1 |
# Making the tests informative only for now. Several failing tests (27/228):
|
|
Mario Ceresa |
7d6d0b1 |
# 11,40,48,49,107-109,111-114,130-135,146,149,,151-154,157,194,216,219
|
|
|
b5fb2b2 |
make test -C %{__cmake_builddir} || exit 0
|
|
|
cc3fdc6 |
%endif
|
|
|
b745544 |
|
|
|
2a156e2 |
%files
|
|
|
71489a1 |
%doc AUTHORS README.md
|
|
|
cc3fdc6 |
%license Copyright.txt README.Copyright.txt
|
|
|
71489a1 |
%{_libdir}/libgdcmCommon.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmCommon.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmDICT.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmDICT.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmDSED.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmDSED.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmIOD.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmIOD.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmMEXD.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmMEXD.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmMSFF.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmMSFF.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmjpeg12.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmjpeg12.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmjpeg16.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmjpeg16.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmjpeg8.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmjpeg8.so.3.0.21
|
|
|
71489a1 |
%{_libdir}/libgdcmmd5.so.3.0
|
|
|
7df9d50 |
%{_libdir}/libgdcmmd5.so.3.0.21
|
|
|
cc3fdc6 |
%{_libdir}/libsocketxx.so.1.2
|
|
|
cc3fdc6 |
%{_libdir}/libsocketxx.so.1.2.0
|
|
|
71489a1 |
%{_datadir}/%{name}-3.0/XML/
|
|
|
2a156e2 |
|
|
|
6cb2b30 |
%files doc
|
|
|
6732ab1 |
%doc %{_docdir}/%{name}
|
|
|
2a156e2 |
|
|
|
9daf857 |
%files applications
|
|
|
cc3fdc6 |
%{_bindir}/gdcmanon
|
|
|
cc3fdc6 |
%{_bindir}/gdcmconv
|
|
|
c619ef6 |
%{_bindir}/gdcmclean
|
|
|
cc3fdc6 |
%{_bindir}/gdcmdiff
|
|
|
cc3fdc6 |
%{_bindir}/gdcmdump
|
|
|
cc3fdc6 |
%{_bindir}/gdcmgendir
|
|
|
cc3fdc6 |
%{_bindir}/gdcmimg
|
|
|
cc3fdc6 |
%{_bindir}/gdcminfo
|
|
|
cc3fdc6 |
%{_bindir}/gdcmpap3
|
|
|
cc3fdc6 |
%{_bindir}/gdcmpdf
|
|
|
cc3fdc6 |
%{_bindir}/gdcmraw
|
|
|
cc3fdc6 |
%{_bindir}/gdcmscanner
|
|
|
cc3fdc6 |
%{_bindir}/gdcmscu
|
|
|
cc3fdc6 |
%{_bindir}/gdcmtar
|
|
|
cc3fdc6 |
%{_bindir}/gdcmxml
|
|
|
9daf857 |
%doc %{_mandir}/man1/*.1*
|
|
|
9daf857 |
|
|
|
2a156e2 |
%files devel
|
|
|
74a462f |
%{_includedir}/%{name}/
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmCommon.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmDICT.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmDSED.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmIOD.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmMEXD.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmMSFF.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmjpeg12.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmjpeg16.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmjpeg8.so
|
|
|
cc3fdc6 |
%{_libdir}/libgdcmmd5.so
|
|
|
cc3fdc6 |
%{_libdir}/libsocketxx.so
|
|
|
ea48e70 |
%{_libdir}/cmake/%{name}/
|
|
|
2a156e2 |
|
|
|
66e851a |
%files -n python3-gdcm
|
|
|
b2fa86f |
%{python3_sitearch}/%{name}*.py
|
|
|
b2fa86f |
%{python3_sitearch}/_%{name}swig.so
|
|
|
b2fa86f |
%{python3_sitearch}/__pycache__/%{name}*
|
|
|
2a156e2 |
|
|
|
2a156e2 |
%changelog
|
|
|
25dea3f |
%autochangelog
|