Add openjpeg2 to build dependencies.
Re-enable dcmtk for 32bit arches.
This commit is contained in:
parent
fec3e2023e
commit
b74dc29235
|
@ -1,3 +1,143 @@
|
||||||
|
From 9e1b3f343d9cc7c217d55a1630aab15e1956b17c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Larry Gritz <lg@larrygritz.com>
|
||||||
|
Date: Tue, 16 Jan 2018 22:24:04 -0800
|
||||||
|
Subject: [PATCH 1/3] Fix dcmtk build errors on some platforms
|
||||||
|
|
||||||
|
Fixes #1841
|
||||||
|
---
|
||||||
|
src/dicom.imageio/dicominput.cpp | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/dicom.imageio/dicominput.cpp b/src/dicom.imageio/dicominput.cpp
|
||||||
|
index aebbc0859..d5a9613e3 100644
|
||||||
|
--- a/src/dicom.imageio/dicominput.cpp
|
||||||
|
+++ b/src/dicom.imageio/dicominput.cpp
|
||||||
|
@@ -297,13 +297,13 @@ DICOMInput::read_metadata ()
|
||||||
|
m_spec.attribute (name, (float)val);
|
||||||
|
// N.B. we cast to float. Will anybody care?
|
||||||
|
} else if (evr == EVR_SL || evr == EVR_IS) {
|
||||||
|
- int val;
|
||||||
|
+ Sint32 val;
|
||||||
|
if (dataset->findAndGetSint32 (tag, val).good())
|
||||||
|
- m_spec.attribute (name, val);
|
||||||
|
+ m_spec.attribute (name, static_cast<int>(val));
|
||||||
|
} else if (evr == EVR_UL) {
|
||||||
|
- unsigned int val;
|
||||||
|
+ Uint32 val;
|
||||||
|
if (dataset->findAndGetUint32 (tag, val).good())
|
||||||
|
- m_spec.attribute (name, TypeDesc::UINT32, &val);
|
||||||
|
+ m_spec.attribute (name, static_cast<unsigned int>(val));
|
||||||
|
} else if (evr == EVR_US) {
|
||||||
|
unsigned short val;
|
||||||
|
if (dataset->findAndGetUint16 (tag, val).good())
|
||||||
|
|
||||||
|
From 533c1e71a7b3a984ddcca84a5c49f706027b6929 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Larry Gritz <lg@larrygritz.com>
|
||||||
|
Date: Tue, 16 Jan 2018 23:22:40 -0800
|
||||||
|
Subject: [PATCH 2/3] DCMTK version enforcement
|
||||||
|
|
||||||
|
Have CMake figure out the version of DCMTK found.
|
||||||
|
Reject anything older than 3.6.1.
|
||||||
|
Older versions botched some preprocessor symbols in ways that are painful
|
||||||
|
to deal with, so since the ones that work (>= 3.6.1) date from 2011 (!),
|
||||||
|
I don't think it's too stringent a requirement.
|
||||||
|
---
|
||||||
|
src/cmake/externalpackages.cmake | 2 +-
|
||||||
|
src/cmake/modules/FindDCMTK.cmake | 31 +++++++++++++++++++++++++------
|
||||||
|
2 files changed, 26 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
|
||||||
|
index 4c8a1f9d3..a41d7fa1c 100644
|
||||||
|
--- a/src/cmake/externalpackages.cmake
|
||||||
|
+++ b/src/cmake/externalpackages.cmake
|
||||||
|
@@ -478,7 +478,7 @@ endif()
|
||||||
|
###########################################################################
|
||||||
|
# DCMTK
|
||||||
|
if (USE_DICOM)
|
||||||
|
- find_package (DCMTK)
|
||||||
|
+ find_package (DCMTK 3.6.1)
|
||||||
|
if (NOT DCMTK_FOUND)
|
||||||
|
set (DCMTK_INCLUDE_DIR "")
|
||||||
|
set (DCMTK_LIBRARIES "")
|
||||||
|
diff --git a/src/cmake/modules/FindDCMTK.cmake b/src/cmake/modules/FindDCMTK.cmake
|
||||||
|
index 9b2edca1b..83f395614 100644
|
||||||
|
--- a/src/cmake/modules/FindDCMTK.cmake
|
||||||
|
+++ b/src/cmake/modules/FindDCMTK.cmake
|
||||||
|
@@ -1,6 +1,3 @@
|
||||||
|
-# FIXME: CMake >= 3.5 has its own FindDCMTK.cmake, so when our minimum
|
||||||
|
-# cmake is at least that, we can remove this file.
|
||||||
|
-
|
||||||
|
# Module to find DCMTK
|
||||||
|
#
|
||||||
|
# This module will first look into the directories defined by the variables:
|
||||||
|
@@ -8,9 +5,11 @@
|
||||||
|
#
|
||||||
|
# This module defines the following variables:
|
||||||
|
#
|
||||||
|
-# DCMTK_FOUND - True if DCMTK was found.
|
||||||
|
-# DCMTK_INCLUDES - where to find DCMTK headers
|
||||||
|
-# DCMTK_LIBRARIES - list of libraries to link against when using DCMTK
|
||||||
|
+# DCMTK_FOUND True if DCMTK was found.
|
||||||
|
+# DCMTK_INCLUDES Where to find DCMTK headers
|
||||||
|
+# DCMTK_LIBRARIES List of libraries to link against when using DCMTK
|
||||||
|
+# DCMTK_VERSION Version of DCMTK (e.g., 3.6.2)
|
||||||
|
+# DCMTK_VERSION_NUMBER Int version of DCMTK (e.g., 362 for 3.6.2)
|
||||||
|
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
include (FindPackageMessage)
|
||||||
|
@@ -53,6 +52,13 @@ foreach (COMPONENT dcmimage dcmimgle dcmdata oflog ofstd iconv)
|
||||||
|
endif ()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
+message (STATUS "DCMTK_INCLUDE_DIR = ${DCMTK_INCLUDE_DIR}")
|
||||||
|
+if (DCMTK_INCLUDE_DIR AND EXISTS "${DCMTK_INCLUDE_DIR}/dcmtk/config/osconfig.h")
|
||||||
|
+ file(STRINGS "${DCMTK_INCLUDE_DIR}/dcmtk/config/osconfig.h" TMP REGEX "^#define PACKAGE_VERSION[ \t].*$")
|
||||||
|
+ string(REGEX MATCHALL "[0-9.]+" DCMTK_VERSION ${TMP})
|
||||||
|
+ file(STRINGS "${DCMTK_INCLUDE_DIR}/dcmtk/config/osconfig.h" TMP REGEX "^#define PACKAGE_VERSION_NUMBER[ \t].*$")
|
||||||
|
+ string(REGEX MATCHALL "[0-9.]+" DCMTK_VERSION_NUMBER ${TMP})
|
||||||
|
+endif ()
|
||||||
|
|
||||||
|
if (DCMTK_INCLUDE_DIR AND DCMTK_LIBRARIES)
|
||||||
|
set(DCMTK_FOUND TRUE)
|
||||||
|
@@ -60,9 +66,22 @@ if (DCMTK_INCLUDE_DIR AND DCMTK_LIBRARIES)
|
||||||
|
if (NOT DCMTK_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found DCMTK library ${DCMTK_LIBRARIES}")
|
||||||
|
message(STATUS "Found DCMTK includes ${DCMTK_INCLUDES}")
|
||||||
|
+ message(STATUS "Found DCMTK short version number ${DCMTK_VERSION_NUMBER}")
|
||||||
|
endif ()
|
||||||
|
else()
|
||||||
|
set(DCMTK_FOUND FALSE)
|
||||||
|
message(STATUS "DCMTK not found. Specify DCMTK_PATH to locate it")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+include (FindPackageHandleStandardArgs)
|
||||||
|
+find_package_handle_standard_args (DCMTK
|
||||||
|
+ REQUIRED_VARS DCMTK_INCLUDE_DIR DCMTK_LIBRARIES
|
||||||
|
+ VERSION_VAR DCMTK_VERSION
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
+mark_as_advanced (
|
||||||
|
+ DCMTK_INCLUDE_DIR
|
||||||
|
+ DCMTK_LIBRARIES
|
||||||
|
+ DCMTK_VERSION
|
||||||
|
+ DCMTK_VERSION_NUMBER
|
||||||
|
+ )
|
||||||
|
|
||||||
|
From b1eb9c97eaa11b423b5bb279e1a60e0a30490ea2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Larry Gritz <lg@larrygritz.com>
|
||||||
|
Date: Tue, 16 Jan 2018 23:26:27 -0800
|
||||||
|
Subject: [PATCH 3/3] dcmtk: More conservative goards on certain symbols.
|
||||||
|
|
||||||
|
EVR_OD, EVR_UC, EVR_UR were added part way through 3.6.1 releases.
|
||||||
|
So test for them with 3.6.2 minimum not 3.6.1.
|
||||||
|
|
||||||
|
(Thanks, Richard Shaw, for the tip on this one.)
|
||||||
|
---
|
||||||
|
src/dicom.imageio/dicominput.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/dicom.imageio/dicominput.cpp b/src/dicom.imageio/dicominput.cpp
|
||||||
|
index d5a9613e3..23294d346 100644
|
||||||
--- a/src/dicom.imageio/dicominput.cpp
|
--- a/src/dicom.imageio/dicominput.cpp
|
||||||
+++ b/src/dicom.imageio/dicominput.cpp
|
+++ b/src/dicom.imageio/dicominput.cpp
|
||||||
@@ -288,7 +288,7 @@ DICOMInput::read_metadata ()
|
@@ -288,7 +288,7 @@ DICOMInput::read_metadata ()
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
%global subname oiio
|
|
||||||
#global beta beta1
|
|
||||||
|
|
||||||
Name: OpenImageIO
|
Name: OpenImageIO
|
||||||
Version: 1.8.7
|
Version: 1.8.7
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Library for reading and writing images
|
Summary: Library for reading and writing images
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://sites.google.com/site/openimageio/home
|
URL: https://sites.google.com/site/openimageio/home
|
||||||
|
|
||||||
Source0: https://github.com/%{name}/%{subname}/archive/Release-%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/%{name}/oiio/archive/Release-%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
# Images for test suite
|
# Images for test suite
|
||||||
#Source1: oiio-images.tar.gz
|
#Source1: oiio-images.tar.gz
|
||||||
|
|
||||||
Patch0: OpenImageIO-man.patch
|
Patch0: OpenImageIO-man.patch
|
||||||
#Patch1: OpenImageIO-dcmtk.patch
|
Patch1: OpenImageIO-dcmtk.patch
|
||||||
Patch2: OpenImageIO-as_needed.patch
|
Patch2: OpenImageIO-as_needed.patch
|
||||||
Patch3: OpenImageIO-GLES.patch
|
Patch3: OpenImageIO-GLES.patch
|
||||||
|
|
||||||
|
@ -30,16 +27,14 @@ BuildRequires: boost-devel
|
||||||
BuildRequires: glew-devel
|
BuildRequires: glew-devel
|
||||||
BuildRequires: OpenEXR-devel ilmbase-devel
|
BuildRequires: OpenEXR-devel ilmbase-devel
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: libpng-devel libtiff-devel libjpeg-turbo-devel giflib-devel
|
BuildRequires: libpng-devel libtiff-devel libjpeg-turbo-devel openjpeg2-devel
|
||||||
|
BuildRequires: giflib-devel
|
||||||
%if ! 0%{?rhel}
|
%if ! 0%{?rhel}
|
||||||
BuildRequires: libwebp-devel
|
BuildRequires: libwebp-devel
|
||||||
BuildRequires: Field3D-devel
|
BuildRequires: Field3D-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: hdf5-devel
|
BuildRequires: hdf5-devel
|
||||||
# Builds fail for 32bit systems.
|
|
||||||
%ifnarch i686 armv7hl
|
|
||||||
BuildRequires: dcmtk-devel
|
BuildRequires: dcmtk-devel
|
||||||
%endif
|
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: jasper-devel
|
BuildRequires: jasper-devel
|
||||||
BuildRequires: pugixml-devel
|
BuildRequires: pugixml-devel
|
||||||
|
@ -54,7 +49,7 @@ BuildRequires: OpenColorIO-devel
|
||||||
|
|
||||||
# We don't want to provide private python extension libs
|
# We don't want to provide private python extension libs
|
||||||
%{?filter_setup:
|
%{?filter_setup:
|
||||||
%filter_provides_in %{python_sitearch}/.*\.so$
|
%filter_provides_in %{python2_sitearch}/.*\.so$
|
||||||
%filter_setup
|
%filter_setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +146,8 @@ rm -rf build/linux && mkdir -p build/linux && pushd build/linux
|
||||||
-DBOOST_INCLUDEDIR=%{_includedir}/boost148 \
|
-DBOOST_INCLUDEDIR=%{_includedir}/boost148 \
|
||||||
-DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
|
-DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
|
||||||
%endif
|
%endif
|
||||||
|
-DJPEG_INCLUDE_DIR=%{_includedir} \
|
||||||
|
-DOPENJPEG_INCLUDE_DIR=$(pkgconf --variable=includedir libopenjp2) \
|
||||||
-DVERBOSE=TRUE \
|
-DVERBOSE=TRUE \
|
||||||
../../
|
../../
|
||||||
|
|
||||||
|
@ -182,7 +179,7 @@ cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
|
||||||
%{_libdir}/libOpenImageIO_Util.so.*
|
%{_libdir}/libOpenImageIO_Util.so.*
|
||||||
|
|
||||||
%files -n python2-openimageio
|
%files -n python2-openimageio
|
||||||
%{python_sitearch}/OpenImageIO.so
|
%{python2_sitearch}/OpenImageIO.so
|
||||||
|
|
||||||
%files utils
|
%files utils
|
||||||
%exclude %{_bindir}/iv
|
%exclude %{_bindir}/iv
|
||||||
|
@ -202,6 +199,10 @@ cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 18 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-3
|
||||||
|
- Add openjpeg2 to build dependencies.
|
||||||
|
- Re-enable dcmtk for 32bit arches.
|
||||||
|
|
||||||
* Sat Jan 13 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-2
|
* Sat Jan 13 2018 Richard Shaw <hobbes1069@gmail.com> - 1.8.7-2
|
||||||
- Rebuild for OpenColorIO 1.1.0.
|
- Rebuild for OpenColorIO 1.1.0.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue