2019-02-18 00:01:42 +00:00
|
|
|
# Enabled by default
|
2020-09-13 15:46:40 +00:00
|
|
|
%bcond_without tests
|
2019-02-18 00:00:20 +00:00
|
|
|
|
2021-01-10 19:15:58 +00:00
|
|
|
%if 0%{?fedora} < 33
|
|
|
|
%undefine __cmake_in_source_build
|
|
|
|
%endif
|
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
Name: gdcm
|
2022-04-02 20:19:47 +00:00
|
|
|
Version: 3.0.12
|
2022-01-14 13:53:56 +00:00
|
|
|
Release: %autorelease
|
2019-02-17 12:22:32 +00:00
|
|
|
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
|
|
|
|
License: BSD
|
|
|
|
URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page
|
2019-02-18 00:00:20 +00:00
|
|
|
# Use github release
|
|
|
|
Source0: https://github.com/malaterre/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
2019-02-17 12:22:32 +00:00
|
|
|
Source1: http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.gz
|
|
|
|
|
2019-08-01 16:18:09 +00:00
|
|
|
Patch1: 0001-3.0.1-Use-copyright.patch
|
2019-11-23 15:00:19 +00:00
|
|
|
# Fix for 1687233
|
|
|
|
Patch3: 0002-Fix-export-variables.patch
|
2019-08-01 16:18:09 +00:00
|
|
|
|
|
|
|
BuildRequires: CharLS-devel >= 2.0
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: libxslt-devel
|
2019-02-18 00:00:20 +00:00
|
|
|
BuildRequires: dcmtk-devel
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: docbook5-style-xsl
|
2019-08-01 16:18:09 +00:00
|
|
|
BuildRequires: docbook-style-xsl
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: expat-devel
|
|
|
|
BuildRequires: fontconfig-devel
|
2019-02-18 00:00:20 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: git-core
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: graphviz
|
|
|
|
BuildRequires: gl2ps-devel
|
|
|
|
BuildRequires: libogg-devel
|
|
|
|
BuildRequires: libtheora-devel
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: mesa-libOSMesa-devel
|
|
|
|
BuildRequires: openssl-devel
|
2018-01-10 09:43:44 +00:00
|
|
|
BuildRequires: pkgconfig(libopenjp2)
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: poppler-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: swig
|
2019-02-18 00:00:20 +00:00
|
|
|
BuildRequires: sqlite-devel
|
2019-02-17 12:22:32 +00:00
|
|
|
BuildRequires: json-c-devel
|
|
|
|
BuildRequires: libxml2-devel
|
2020-12-18 23:10:42 +00:00
|
|
|
BuildRequires: make
|
2019-08-01 16:18:09 +00:00
|
|
|
|
2019-02-18 00:00:20 +00:00
|
|
|
# BuildRequires: vtk-devel
|
2019-08-01 16:18:09 +00:00
|
|
|
|
|
|
|
# Do not generate latex
|
|
|
|
# BuildRequires: /usr/bin/latex
|
|
|
|
# BuildRequires: /usr/bin/pdflatex
|
|
|
|
# BuildRequires: /usr/bin/dvips
|
|
|
|
# BuildRequires: /usr/bin/epstopdf
|
2019-02-17 12:22:32 +00:00
|
|
|
#BuildRequires: texlive-ec
|
2010-10-29 09:46:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
%description
|
2015-11-02 21:14:26 +00:00
|
|
|
Grassroots DiCoM (GDCM) is a C++ library for DICOM medical files.
|
|
|
|
It supports ACR-NEMA version 1 and 2 (huffman compression is not supported),
|
|
|
|
RAW, JPEG, JPEG 2000, JPEG-LS, RLE and deflated transfer syntax.
|
|
|
|
It comes with a super fast scanner implementation to quickly scan hundreds of
|
|
|
|
DICOM files. It supports SCU network operations (C-ECHO, C-FIND, C-STORE,
|
|
|
|
C-MOVE). PS 3.3 & 3.6 are distributed as XML files.
|
|
|
|
It also provides PS 3.15 certificates and password based mechanism to
|
|
|
|
anonymize and de-identify DICOM datasets.
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
%package doc
|
|
|
|
Summary: Includes html documentation for gdcm
|
|
|
|
BuildArch: noarch
|
2013-04-14 13:23:51 +00:00
|
|
|
|
2013-05-01 09:57:40 +00:00
|
|
|
%description doc
|
|
|
|
You should install the gdcm-doc package if you would like to
|
2013-12-20 18:48:15 +00:00
|
|
|
access upstream documentation for gdcm.
|
2013-04-14 13:23:51 +00:00
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
%package applications
|
|
|
|
Summary: Includes command line programs for GDCM
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2015-11-02 21:14:26 +00:00
|
|
|
|
|
|
|
%description applications
|
|
|
|
You should install the gdcm-applications package if you would like to
|
|
|
|
use command line programs part of GDCM. Includes tools to convert,
|
|
|
|
anonymize, manipulate, concatenate, and view DICOM files.
|
2013-04-14 13:23:51 +00:00
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Libraries and headers for GDCM
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: %{name}-applications%{?_isa} = %{version}-%{release}
|
2010-10-29 09:46:23 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
You should install the gdcm-devel package if you would like to
|
|
|
|
compile applications based on gdcm
|
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
%package examples
|
|
|
|
Summary: CSharp, C++, Java, PHP and Python example programs for GDCM
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2013-11-19 21:42:40 +00:00
|
|
|
|
|
|
|
%description examples
|
|
|
|
GDCM examples
|
|
|
|
|
2019-02-17 12:22:32 +00:00
|
|
|
%package -n python3-gdcm
|
|
|
|
Summary: Python binding for GDCM
|
2018-09-17 12:13:46 +00:00
|
|
|
%{?python_provide:%python_provide python3-gdcm}
|
2019-02-17 12:22:32 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2013-10-21 09:41:27 +00:00
|
|
|
|
|
|
|
%description -n python3-gdcm
|
|
|
|
You should install the python3-gdcm package if you would like to
|
|
|
|
used this library with python
|
|
|
|
|
2010-10-29 09:46:23 +00:00
|
|
|
%prep
|
2019-08-01 16:18:09 +00:00
|
|
|
%autosetup -n GDCM-%{version} -S git
|
2019-02-18 00:00:20 +00:00
|
|
|
# Data source
|
|
|
|
%setup -n GDCM-%{version} -q -T -D -a 1
|
2016-08-28 18:32:29 +00:00
|
|
|
|
|
|
|
# Fix cmake command
|
|
|
|
sed -i.backup 's/add_dependency/add_dependencies/' Utilities/doxygen/CMakeLists.txt
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2019-02-18 00:00:20 +00:00
|
|
|
# Stop doxygen from producing LaTeX output
|
2019-08-01 16:18:09 +00:00
|
|
|
sed -i.backup 's/^GENERATE_LATEX.*=.*YES/GENERATE_LATEX = NO/' Utilities/doxygen/doxyfile.in
|
2019-02-18 00:00:20 +00:00
|
|
|
|
2010-10-29 09:46:23 +00:00
|
|
|
# Remove bundled utilities (we use Fedora's ones)
|
|
|
|
|
|
|
|
rm -rf Utilities/gdcmexpat
|
2015-11-01 09:01:20 +00:00
|
|
|
rm -rf Utilities/gdcmopenjpeg-v1
|
|
|
|
rm -rf Utilities/gdcmopenjpeg-v2
|
2010-10-29 09:46:23 +00:00
|
|
|
rm -rf Utilities/gdcmzlib
|
|
|
|
rm -rf Utilities/gdcmuuid
|
|
|
|
rm -rf Utilities/gdcmcharls
|
|
|
|
|
|
|
|
# Remove bundled utilities (we don't use them)
|
|
|
|
rm -rf Utilities/getopt
|
|
|
|
rm -rf Utilities/pvrg
|
|
|
|
rm -rf Utilities/rle
|
|
|
|
rm -rf Utilities/wxWidgets
|
|
|
|
|
2013-08-13 14:52:07 +00:00
|
|
|
# Needed for testing:
|
2019-02-17 12:22:32 +00:00
|
|
|
#rm -rf Utilities/gdcmmd5
|
2013-08-13 14:52:07 +00:00
|
|
|
|
2010-10-29 09:46:23 +00:00
|
|
|
%build
|
2019-02-17 12:22:32 +00:00
|
|
|
%cmake .. \
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
|
-DGDCM_INSTALL_PACKAGE_DIR=%{_libdir}/cmake/%{name} \
|
|
|
|
-DGDCM_INSTALL_INCLUDE_DIR=%{_includedir}/%{name} \
|
|
|
|
-DGDCM_INSTALL_DOC_DIR=%{_docdir}/%{name} \
|
|
|
|
-DGDCM_INSTALL_MAN_DIR=%{_mandir} \
|
|
|
|
-DGDCM_INSTALL_LIB_DIR=%{_libdir} \
|
|
|
|
-DGDCM_BUILD_TESTING:BOOL=ON \
|
|
|
|
-DGDCM_DATA_ROOT=../gdcmData/ \
|
2019-08-01 16:18:09 +00:00
|
|
|
-DGDCM_BUILD_EXAMPLES:BOOL=OFF \
|
2019-09-14 04:03:10 +00:00
|
|
|
-DGDCM_DOCUMENTATION:BOOL=OFF \
|
2019-02-17 12:22:32 +00:00
|
|
|
-DGDCM_WRAP_PYTHON:BOOL=ON \
|
2022-02-08 22:00:21 +00:00
|
|
|
-DPYTHON_EXECUTABLE=%{python3} \
|
2019-02-17 12:22:32 +00:00
|
|
|
-DGDCM_INSTALL_PYTHONMODULE_DIR=%{python3_sitearch} \
|
|
|
|
-DGDCM_WRAP_JAVA:BOOL=OFF \
|
2019-08-01 16:18:09 +00:00
|
|
|
-DGDCM_WRAP_CSHARP:BOOL=OFF \
|
2019-02-17 12:22:32 +00:00
|
|
|
-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:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_ZLIB:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_UUID:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_LJPEG:BOOL=OFF \
|
|
|
|
-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON \
|
|
|
|
-DGDCM_USE_JPEGLS:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_JSON:BOOL=ON \
|
|
|
|
-DGDCM_USE_SYSTEM_POPPLER:BOOL=ON
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2013-11-19 21:42:40 +00:00
|
|
|
#Cannot build wrap_java:
|
2019-02-17 12:22:32 +00:00
|
|
|
# -DGDCM_VTK_JAVA_JAR:PATH=/usr/share/java/vtk.jar no found!
|
|
|
|
# yum provides */vtk.jar -> No results found
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2020-09-13 15:46:40 +00:00
|
|
|
%cmake_build
|
2010-10-29 09:46:23 +00:00
|
|
|
|
|
|
|
%install
|
2020-09-13 15:46:40 +00:00
|
|
|
%cmake_install
|
2013-11-19 21:42:40 +00:00
|
|
|
install -d $RPM_BUILD_ROOT%{python3_sitearch}
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2019-08-01 16:18:09 +00:00
|
|
|
# Install examples
|
|
|
|
install -d $RPM_BUILD_ROOT/%{_datadir}/%{name}/Examples/
|
|
|
|
cp -rv ./Examples/* $RPM_BUILD_ROOT/%{_datadir}/%{name}/Examples/
|
2013-12-11 17:50:33 +00:00
|
|
|
|
2019-02-18 00:00:20 +00:00
|
|
|
%if %{with tests}
|
2013-04-14 13:23:51 +00:00
|
|
|
%check
|
2013-08-13 14:52:07 +00:00
|
|
|
# Making the tests informative only for now. Several failing tests (27/228):
|
|
|
|
# 11,40,48,49,107-109,111-114,130-135,146,149,,151-154,157,194,216,219
|
2020-09-13 15:46:40 +00:00
|
|
|
make test -C %{__cmake_builddir} || exit 0
|
2019-02-18 00:00:20 +00:00
|
|
|
%endif
|
2013-04-14 13:23:51 +00:00
|
|
|
|
2010-10-29 09:46:23 +00:00
|
|
|
%files
|
2019-08-01 16:18:09 +00:00
|
|
|
%doc AUTHORS README.md
|
2019-02-18 00:00:20 +00:00
|
|
|
%license Copyright.txt README.Copyright.txt
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmCommon.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmCommon.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmDICT.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmDICT.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmDSED.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmDSED.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmIOD.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmIOD.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmMEXD.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmMEXD.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmMSFF.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmMSFF.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmjpeg12.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmjpeg12.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmjpeg16.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmjpeg16.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmjpeg8.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmjpeg8.so.3.0.12
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_libdir}/libgdcmmd5.so.3.0
|
2022-04-02 20:19:47 +00:00
|
|
|
%{_libdir}/libgdcmmd5.so.3.0.12
|
2019-02-18 00:00:20 +00:00
|
|
|
%{_libdir}/libsocketxx.so.1.2
|
|
|
|
%{_libdir}/libsocketxx.so.1.2.0
|
2013-12-20 18:48:15 +00:00
|
|
|
%dir %{_datadir}/%{name}
|
2019-08-01 16:18:09 +00:00
|
|
|
%{_datadir}/%{name}-3.0/XML/
|
2014-08-04 17:41:43 +00:00
|
|
|
%exclude %{_docdir}/%{name}/html/
|
2019-08-01 16:18:09 +00:00
|
|
|
%exclude %{_docdir}/%{name}/Examples/
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2013-05-01 09:57:40 +00:00
|
|
|
%files doc
|
2019-09-14 04:03:10 +00:00
|
|
|
#doc %{_docdir}/%{name}/html/
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2015-11-02 21:14:26 +00:00
|
|
|
%files applications
|
2019-02-18 00:00:20 +00:00
|
|
|
%{_bindir}/gdcmanon
|
|
|
|
%{_bindir}/gdcmconv
|
|
|
|
%{_bindir}/gdcmdiff
|
|
|
|
%{_bindir}/gdcmdump
|
|
|
|
%{_bindir}/gdcmgendir
|
|
|
|
%{_bindir}/gdcmimg
|
|
|
|
%{_bindir}/gdcminfo
|
|
|
|
%{_bindir}/gdcmpap3
|
|
|
|
%{_bindir}/gdcmpdf
|
|
|
|
%{_bindir}/gdcmraw
|
|
|
|
%{_bindir}/gdcmscanner
|
|
|
|
%{_bindir}/gdcmscu
|
|
|
|
%{_bindir}/gdcmtar
|
|
|
|
%{_bindir}/gdcmxml
|
2015-11-02 21:14:26 +00:00
|
|
|
%doc %{_mandir}/man1/*.1*
|
|
|
|
|
2010-10-29 09:46:23 +00:00
|
|
|
%files devel
|
2013-12-11 17:50:33 +00:00
|
|
|
%{_includedir}/%{name}/
|
2019-02-18 00:00:20 +00:00
|
|
|
%{_libdir}/libgdcmCommon.so
|
|
|
|
%{_libdir}/libgdcmDICT.so
|
|
|
|
%{_libdir}/libgdcmDSED.so
|
|
|
|
%{_libdir}/libgdcmIOD.so
|
|
|
|
%{_libdir}/libgdcmMEXD.so
|
|
|
|
%{_libdir}/libgdcmMSFF.so
|
|
|
|
%{_libdir}/libgdcmjpeg12.so
|
|
|
|
%{_libdir}/libgdcmjpeg16.so
|
|
|
|
%{_libdir}/libgdcmjpeg8.so
|
|
|
|
%{_libdir}/libgdcmmd5.so
|
|
|
|
%{_libdir}/libsocketxx.so
|
2017-08-07 08:41:17 +00:00
|
|
|
%{_libdir}/cmake/%{name}/
|
2010-10-29 09:46:23 +00:00
|
|
|
|
2013-11-19 21:42:40 +00:00
|
|
|
%files examples
|
2013-12-11 17:50:33 +00:00
|
|
|
%{_datadir}/%{name}/Examples/
|
2013-11-19 21:42:40 +00:00
|
|
|
|
2013-10-21 09:41:27 +00:00
|
|
|
%files -n python3-gdcm
|
2018-01-09 19:13:05 +00:00
|
|
|
%{python3_sitearch}/%{name}*.py
|
|
|
|
%{python3_sitearch}/_%{name}swig.so
|
|
|
|
%{python3_sitearch}/__pycache__/%{name}*
|
2010-10-29 09:46:23 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-01-14 13:53:56 +00:00
|
|
|
%autochangelog
|