From cc3fdc68ab3e04141eb8fe5c6ba6a14b60c5b6e9 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 18 Feb 2019 00:00:20 +0000 Subject: [PATCH] Update to 2.8.8 - rebase patches - fix FTBFS --- .gitignore | 1 + 0001-Use-copyright.patch | 29 + 0002-Increase-xslt-maxdepth.patch | 25 + ...tories-instead-of-deprecated-subdirs.patch | 523 ++++++++++++++++++ 0004-Relocate-cmake-file-inclusions.patch | 65 +++ 0005-use-cpp-11-standard.patch | 26 + 0006-Update-for-new-poppler.patch | 183 ++++++ 0007-Use-unversioned-dir.patch | 25 + gdcm-0005-support-vtk6.patch | 13 - gdcm-2.4.0-install2libarch.patch | 11 - gdcm-2.4.0-no-versioned-dir.patch | 11 - gdcm-2.4.0-usecopyright.patch | 15 - gdcm-2.6-fix-cmake-config-paths.patch | 14 - gdcm-2.6-fix-narrowing-error.patch | 11 - gdcm-2.8.4-fix-manpage-gen.patch | 11 - gdcm-2.8.4-fix-poppler.patch | 12 - gdcm-2.8.4-poppler-0.67.0.patch | 40 -- gdcm-2.8.4-poppler-0.73.0.patch | 99 ---- gdcm.spec | 134 +++-- sources | 3 +- 20 files changed, 979 insertions(+), 272 deletions(-) create mode 100644 0001-Use-copyright.patch create mode 100644 0002-Increase-xslt-maxdepth.patch create mode 100644 0003-Use-add_subdirectories-instead-of-deprecated-subdirs.patch create mode 100644 0004-Relocate-cmake-file-inclusions.patch create mode 100644 0005-use-cpp-11-standard.patch create mode 100644 0006-Update-for-new-poppler.patch create mode 100644 0007-Use-unversioned-dir.patch delete mode 100644 gdcm-0005-support-vtk6.patch delete mode 100644 gdcm-2.4.0-install2libarch.patch delete mode 100644 gdcm-2.4.0-no-versioned-dir.patch delete mode 100644 gdcm-2.4.0-usecopyright.patch delete mode 100644 gdcm-2.6-fix-cmake-config-paths.patch delete mode 100644 gdcm-2.6-fix-narrowing-error.patch delete mode 100644 gdcm-2.8.4-fix-manpage-gen.patch delete mode 100644 gdcm-2.8.4-fix-poppler.patch delete mode 100644 gdcm-2.8.4-poppler-0.67.0.patch delete mode 100644 gdcm-2.8.4-poppler-0.73.0.patch diff --git a/.gitignore b/.gitignore index 1356ac6..41556b1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /gdcm-2.6.5.tar.gz /gdcm-2.6.5.tar.bz2 /gdcm-2.8.4.tar.bz2 +/gdcm-2.8.8.tar.gz diff --git a/0001-Use-copyright.patch b/0001-Use-copyright.patch new file mode 100644 index 0000000..ce2abcc --- /dev/null +++ b/0001-Use-copyright.patch @@ -0,0 +1,29 @@ +From 589f726562dbd7f1dc0145deb00a768a6e924808 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 18:27:19 +0000 +Subject: [PATCH 1/7] Use copyright + +--- + CMake/UseCopyright.cmake | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/CMake/UseCopyright.cmake b/CMake/UseCopyright.cmake +index fb4fe1fad..b66736522 100644 +--- a/CMake/UseCopyright.cmake ++++ b/CMake/UseCopyright.cmake +@@ -18,8 +18,10 @@ macro(APPEND_COPYRIGHT) + # need to raise an error if COPYRIGHT_MODULE_FILENAME is not set... + if(EXISTS ${COPYRIGHT_MODULE_FILENAME} ) + foreach(filename ${ARGN}) +- file(READ ${filename} content) +- file(APPEND ${COPYRIGHT_MODULE_FILENAME} ${content}) ++ if(EXISTS ${filename} ) ++ file(READ ${filename} content) ++ file(APPEND ${COPYRIGHT_MODULE_FILENAME} ${content}) ++ endif() + endforeach() + endif() + endmacro() +-- +2.20.1 + diff --git a/0002-Increase-xslt-maxdepth.patch b/0002-Increase-xslt-maxdepth.patch new file mode 100644 index 0000000..42e643f --- /dev/null +++ b/0002-Increase-xslt-maxdepth.patch @@ -0,0 +1,25 @@ +From b50d2402d588ab5c67da3051109a836287bcd742 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 18:27:43 +0000 +Subject: [PATCH 2/7] Increase xslt maxdepth + +--- + Utilities/doxygen/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Utilities/doxygen/CMakeLists.txt b/Utilities/doxygen/CMakeLists.txt +index 5281bee8e..e192f34a3 100644 +--- a/Utilities/doxygen/CMakeLists.txt ++++ b/Utilities/doxygen/CMakeLists.txt +@@ -252,7 +252,7 @@ find_package(LibXslt) + if(LIBXSLT_XSLTPROC_EXECUTABLE) + set(XSLT_PROCESSOR ${LIBXSLT_XSLTPROC_EXECUTABLE}) + # http://docbook.sourceforge.net/release/xsl/current/doc/manpages/man.output.quietly.html +- set(XSLT_PROCESSOR_ARG --param man.output.quietly 1) ++ set(XSLT_PROCESSOR_ARG --param man.output.quietly 1 --maxdepth 5000) + # User can change the behavior at cmake time: + if(NOT DEFINED GDCM_MANPAGES_USE_NONET) + set(GDCM_MANPAGES_USE_NONET FALSE) +-- +2.20.1 + diff --git a/0003-Use-add_subdirectories-instead-of-deprecated-subdirs.patch b/0003-Use-add_subdirectories-instead-of-deprecated-subdirs.patch new file mode 100644 index 0000000..0d20d89 --- /dev/null +++ b/0003-Use-add_subdirectories-instead-of-deprecated-subdirs.patch @@ -0,0 +1,523 @@ +From 06ad1df56f41b2cf4718307e9c2a15f929010925 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 19:53:12 +0000 +Subject: [PATCH 3/7] Use add_subdirectories instead of deprecated subdirs + +--- + Applications/CMakeLists.txt | 2 +- + CMakeLists.txt | 16 ++++++------- + Examples/CMakeLists.txt | 10 ++++---- + Source/CMakeLists.txt | 16 ++++++------- + Testing/CMakeLists.txt | 4 +--- + Testing/Source/CMakeLists.txt | 16 ++++++------- + Testing/Source/Common/CMakeLists.txt | 4 ++-- + Testing/Source/DataDictionary/CMakeLists.txt | 4 ++-- + .../CMakeLists.txt | 6 ++--- + .../CMakeLists.txt | 4 ++-- + .../MediaStorageAndFileFormat/CMakeLists.txt | 6 ++--- + .../MessageExchangeDefinition/CMakeLists.txt | 2 +- + Utilities/CMakeLists.txt | 24 +++++++++---------- + Utilities/VTK/CMakeLists.txt | 6 ++--- + Utilities/VTK/Examples/CMakeLists.txt | 8 +++---- + Utilities/VTK/Testing/CMakeLists.txt | 6 ++--- + Utilities/doxygen/CMakeLists.txt | 2 +- + Utilities/gdcmexpat/CMakeLists.txt | 2 +- + Utilities/gdcmjpeg/CMakeLists.txt | 4 +++- + Wrapping/CMakeLists.txt | 10 ++++---- + 20 files changed, 74 insertions(+), 78 deletions(-) + +diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt +index ccbaece9f..35f9732a9 100644 +--- a/Applications/CMakeLists.txt ++++ b/Applications/CMakeLists.txt +@@ -1 +1 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f82bfd251..86a4f6751 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -205,7 +205,7 @@ if(NOT GDCM_HAVE_STDINT_H) + "${GDCM_SOURCE_DIR}/Utilities/C99" + ) + # Process the install rules from C99 +- subdirs(Utilities/C99) ++ add_subdirectory(Utilities/C99) + endif() + endif() + +@@ -602,11 +602,11 @@ if(GDCM_STANDALONE) + else() + set(BUILD_APPLICATIONS OFF) + endif() +-subdirs(Utilities) ++add_subdirectory(Utilities) + add_subdirectory(Source) + + if(GDCM_STANDALONE) +- subdirs(Wrapping) ++ add_subdirectory(Wrapping) + if(GDCM_WRAP_CSHARP) + add_subdirectory(Wrapping/Csharp) + endif() +@@ -615,7 +615,7 @@ endif() + if(GDCM_STANDALONE) + # After Wrapping please + if(BUILD_EXAMPLES) +- subdirs(Examples) ++ add_subdirectory(Examples) + endif() + endif() + +@@ -655,7 +655,7 @@ if(GDCM_STANDALONE) + mark_as_advanced(DART_TESTING_TIMEOUT) + enable_testing() + include(CTest) +- subdirs(Testing) ++ add_subdirectory(Testing) + if(NOT GDCM_DATA_ROOT) + message("If you want to build the test suite, you must set GDCM_DATA_ROOT (advanced option) " + "to the full path name of the gdcmData directory; if you don't want, disable GDCM_BUILD_TESTING.\n" +@@ -687,7 +687,7 @@ if(GDCM_STANDALONE) + mark_as_advanced(VTK_DIR) + set(GDCM_VTK_DIR ${VTK_DIR}) + mark_as_advanced(GDCM_USE_PARAVIEW) +- subdirs(Utilities/VTK) ++ add_subdirectory(Utilities/VTK) + endif() + endif() + +@@ -696,7 +696,7 @@ if(GDCM_STANDALONE) + option(GDCM_BUILD_APPLICATIONS "apps ?" OFF) + set(BUILD_APPLICATIONS ${GDCM_BUILD_APPLICATIONS}) + if(BUILD_APPLICATIONS) +- subdirs(Applications) ++ add_subdirectory(Applications) + endif() + else() + set(BUILD_APPLICATIONS OFF) +@@ -1051,5 +1051,5 @@ if(GDCM_USE_VTK) + endif() + set(GDCM_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH}) + if(GDCM_STANDALONE) +-subdirs(CMake/ExportConfiguration) ++add_subdirectory(CMake/ExportConfiguration) + endif() +diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt +index 8ac324abf..ca76e1bad 100644 +--- a/Examples/CMakeLists.txt ++++ b/Examples/CMakeLists.txt +@@ -2,18 +2,18 @@ cmake_minimum_required(VERSION 2.8.7) + + # Choose behavior based on whether we are building inside the GDCM tree. + if(GDCM_BINARY_DIR) +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() + + if(GDCM_WRAP_CSHARP) +- subdirs(Csharp) ++ add_subdirectory(Csharp) + endif() + + if(GDCM_WRAP_JAVA) +- subdirs(Java) ++ add_subdirectory(Java) + endif() + + else() +@@ -25,6 +25,6 @@ else() + find_package(GDCM REQUIRED) + include(${GDCM_USE_FILE}) + +- subdirs(Cxx) ++ add_subdirectory(Cxx) + + endif() +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 7e1586754..e8011d6fd 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -1,10 +1,8 @@ + # ... +-subdirs( +- Common +- Attribute +- DataDictionary +- DataStructureAndEncodingDefinition +- InformationObjectDefinition +- MediaStorageAndFileFormat +- MessageExchangeDefinition +- ) ++add_subdirectory(Common) ++add_subdirectory(Attribute) ++add_subdirectory(DataDictionary) ++add_subdirectory(DataStructureAndEncodingDefinition) ++add_subdirectory(InformationObjectDefinition) ++add_subdirectory(MediaStorageAndFileFormat) ++add_subdirectory(MessageExchangeDefinition) +diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt +index 66fc2da4f..79359b327 100644 +--- a/Testing/CMakeLists.txt ++++ b/Testing/CMakeLists.txt +@@ -2,9 +2,7 @@ + find_package(DCMTK) + find_package(DICOM3TOOLS) + +-subdirs( +- Source +- ) ++add_subdirectory(Source) + + #----------------------------------------------------------------------------- + # Here is one cool test: you can pretty much test all configuration using +diff --git a/Testing/Source/CMakeLists.txt b/Testing/Source/CMakeLists.txt +index 6d1a4649c..e7986b787 100644 +--- a/Testing/Source/CMakeLists.txt ++++ b/Testing/Source/CMakeLists.txt +@@ -8,12 +8,10 @@ get_directory_property(gdcm_data_image_filenames_glob DIRECTORY Data DEFINITION + get_directory_property(gdcm_data_filenames_glob DIRECTORY Data DEFINITION GDCM_DATA_FILENAMES_GLOB) + get_directory_property(black_list_reader DIRECTORY Data DEFINITION BLACK_LIST_READER) + +-subdirs( +- Attribute +- Common +- DataDictionary +- DataStructureAndEncodingDefinition +- InformationObjectDefinition +- MediaStorageAndFileFormat +- MessageExchangeDefinition +-) ++add_subdirectory(Attribute) ++add_subdirectory(Common) ++add_subdirectory(DataDictionary) ++add_subdirectory(DataStructureAndEncodingDefinition) ++add_subdirectory(InformationObjectDefinition) ++add_subdirectory(MediaStorageAndFileFormat) ++add_subdirectory(MessageExchangeDefinition) +diff --git a/Testing/Source/Common/CMakeLists.txt b/Testing/Source/Common/CMakeLists.txt +index 5fee2e107..1577b6b2a 100644 +--- a/Testing/Source/Common/CMakeLists.txt ++++ b/Testing/Source/Common/CMakeLists.txt +@@ -1,5 +1,5 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() +diff --git a/Testing/Source/DataDictionary/CMakeLists.txt b/Testing/Source/DataDictionary/CMakeLists.txt +index 5fee2e107..1577b6b2a 100644 +--- a/Testing/Source/DataDictionary/CMakeLists.txt ++++ b/Testing/Source/DataDictionary/CMakeLists.txt +@@ -1,5 +1,5 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() +diff --git a/Testing/Source/DataStructureAndEncodingDefinition/CMakeLists.txt b/Testing/Source/DataStructureAndEncodingDefinition/CMakeLists.txt +index 2e31593f3..583adbe2f 100644 +--- a/Testing/Source/DataStructureAndEncodingDefinition/CMakeLists.txt ++++ b/Testing/Source/DataStructureAndEncodingDefinition/CMakeLists.txt +@@ -1,9 +1,9 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() + + if(GDCM_WRAP_JAVA) +- subdirs(Java) ++ add_subdirectory(Java) + endif() +diff --git a/Testing/Source/InformationObjectDefinition/CMakeLists.txt b/Testing/Source/InformationObjectDefinition/CMakeLists.txt +index 5fee2e107..1577b6b2a 100644 +--- a/Testing/Source/InformationObjectDefinition/CMakeLists.txt ++++ b/Testing/Source/InformationObjectDefinition/CMakeLists.txt +@@ -1,5 +1,5 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() +diff --git a/Testing/Source/MediaStorageAndFileFormat/CMakeLists.txt b/Testing/Source/MediaStorageAndFileFormat/CMakeLists.txt +index 515862320..afe32837e 100644 +--- a/Testing/Source/MediaStorageAndFileFormat/CMakeLists.txt ++++ b/Testing/Source/MediaStorageAndFileFormat/CMakeLists.txt +@@ -1,10 +1,10 @@ + # Always +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() + + if(GDCM_WRAP_CSHARP) +- subdirs(Csharp) ++ add_subdirectory(Csharp) + endif() +diff --git a/Testing/Source/MessageExchangeDefinition/CMakeLists.txt b/Testing/Source/MessageExchangeDefinition/CMakeLists.txt +index ccbaece9f..35f9732a9 100644 +--- a/Testing/Source/MessageExchangeDefinition/CMakeLists.txt ++++ b/Testing/Source/MessageExchangeDefinition/CMakeLists.txt +@@ -1 +1 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) +diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt +index ab685cb56..054ec525b 100644 +--- a/Utilities/CMakeLists.txt ++++ b/Utilities/CMakeLists.txt +@@ -8,7 +8,7 @@ if(NOT GDCM_USE_SYSTEM_LJPEG) + set(JPEG_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(JPEG_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) + set(JPEG_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR}/gdcmjpeg) +- subdirs(gdcmjpeg) ++ add_subdirectory(gdcmjpeg) + endif() + + # Do expat +@@ -18,7 +18,7 @@ if(NOT GDCM_USE_SYSTEM_EXPAT) + set(EXPAT_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES}) + set(EXPAT_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(EXPAT_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) +- subdirs(gdcmexpat) ++ add_subdirectory(gdcmexpat) + endif() + + # Do openjpeg (jpeg2000 implementation) +@@ -29,7 +29,7 @@ if(NOT GDCM_USE_SYSTEM_OPENJPEG) + set(OPENJPEG_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(OPENJPEG_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) + set(OPENJPEG_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR}/gdcmopenjpeg) +- subdirs(gdcmopenjpeg) ++ add_subdirectory(gdcmopenjpeg) + mark_as_advanced(BUILD_JPIP BUILD_JPWL BUILD_CODEC BUILD_DOC BUILD_MJ2 BUILD_PKGCONFIG_FILES BUILD_SHARED_LIBS BUILD_THIRDPARTY OPJ_DATA_ROOT OPJ_DISABLE_TPSOT_FIX) + endif() + +@@ -42,7 +42,7 @@ if(NOT GDCM_USE_SYSTEM_CHARLS) + set(CHARLS_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(CHARLS_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) + set(CHARLS_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR}/gdcmcharls) +- subdirs(gdcmcharls) ++ add_subdirectory(gdcmcharls) + endif() + endif() + +@@ -54,7 +54,7 @@ if(NOT GDCM_USE_SYSTEM_MD5) + set(MD5_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES}) + set(MD5_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(MD5_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) +- subdirs(gdcmmd5) ++ add_subdirectory(gdcmmd5) + endif() + endif() + +@@ -65,7 +65,7 @@ if(NOT GDCM_USE_SYSTEM_ZLIB) + set(ZLIB_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES}) + set(ZLIB_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(ZLIB_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) +- subdirs(gdcmzlib) ++ add_subdirectory(gdcmzlib) + endif() + + # Do getopt +@@ -75,10 +75,10 @@ if(WIN32 AND NOT CYGWIN) + set(GETOPT_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES}) + set(GETOPT_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(GETOPT_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) +- subdirs(getopt) ++ add_subdirectory(getopt) + endif() + +-subdirs(doxygen) ++add_subdirectory(doxygen) + + # you could be running mingw32 on linux in which case you do NOT want the gdcmuuid lib + APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmuuid/COPYING) +@@ -88,14 +88,14 @@ if(NOT WIN32 AND NOT MINGW) + set(UUID_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES}) + set(UUID_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(UUID_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) +- subdirs(gdcmuuid) ++ add_subdirectory(gdcmuuid) + endif() + endif() + + APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/pvrg/COPYING) + if(GDCM_USE_PVRG) + if(NOT GDCM_USE_SYSTEM_PVRG) +- subdirs(pvrg) ++ add_subdirectory(pvrg) + endif() + endif() + +@@ -116,7 +116,7 @@ APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/C99/COPYING) + #endif() + + #if(GDCM_USE_KWSTYLE) +- subdirs(KWStyle) ++ add_subdirectory(KWStyle) + #endif() + + if(NOT GDCM_USE_SYSTEM_SOCKETXX) +@@ -125,7 +125,7 @@ if(NOT GDCM_USE_SYSTEM_SOCKETXX) + set(SOCKETXX_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR}) + set(SOCKETXX_INSTALL_LIB_DIR ${GDCM_INSTALL_LIB_DIR}) + set(SOCKETXX_INSTALL_INCLUDE_DIR ${GDCM_INSTALL_INCLUDE_DIR}/socketxx) +- subdirs(socketxx) ++ add_subdirectory(socketxx) + endif() + + add_subdirectory(gdcmrle) +diff --git a/Utilities/VTK/CMakeLists.txt b/Utilities/VTK/CMakeLists.txt +index 0431b3ea2..6c3fed0e7 100644 +--- a/Utilities/VTK/CMakeLists.txt ++++ b/Utilities/VTK/CMakeLists.txt +@@ -814,15 +814,15 @@ if(GDCM_WRAP_PYTHON) + endif() + + if(BUILD_TESTING) +- subdirs(Testing) ++ add_subdirectory(Testing) + endif() + + if(BUILD_APPLICATIONS) +- subdirs(Applications) ++ add_subdirectory(Applications) + endif() + + if(BUILD_EXAMPLES) +- subdirs(Examples) ++ add_subdirectory(Examples) + endif() + + if(GDCM_USE_PARAVIEW) +diff --git a/Utilities/VTK/Examples/CMakeLists.txt b/Utilities/VTK/Examples/CMakeLists.txt +index 0cee6f2e5..9e52e3446 100644 +--- a/Utilities/VTK/Examples/CMakeLists.txt ++++ b/Utilities/VTK/Examples/CMakeLists.txt +@@ -1,14 +1,14 @@ +-#subdirs(Cxx Python) +-subdirs(Cxx) ++#add_subdirectory(Cxx Python) ++add_subdirectory(Cxx) + + if(GDCM_WRAP_CSHARP) +- subdirs(Csharp) ++ add_subdirectory(Csharp) + endif() + + if(GDCM_WRAP_JAVA) + if(VTK_WRAP_JAVA) + if(EXISTS ${GDCM_VTK_JAVA_JAR}) +- subdirs(Java) ++ add_subdirectory(Java) + endif() + endif() + endif() +diff --git a/Utilities/VTK/Testing/CMakeLists.txt b/Utilities/VTK/Testing/CMakeLists.txt +index a06b19589..5118d2743 100644 +--- a/Utilities/VTK/Testing/CMakeLists.txt ++++ b/Utilities/VTK/Testing/CMakeLists.txt +@@ -1,13 +1,13 @@ +-subdirs(Cxx) ++add_subdirectory(Cxx) + + if(VTK_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() + + if(GDCM_WRAP_JAVA) + if(VTK_WRAP_JAVA) + if(EXISTS ${GDCM_VTK_JAVA_JAR}) +- subdirs(Java) ++ add_subdirectory(Java) + endif() + endif() + endif() +diff --git a/Utilities/doxygen/CMakeLists.txt b/Utilities/doxygen/CMakeLists.txt +index e192f34a3..55a28e31c 100644 +--- a/Utilities/doxygen/CMakeLists.txt ++++ b/Utilities/doxygen/CMakeLists.txt +@@ -221,7 +221,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/latex/Makefile + if(GDCM_VTK_DOCUMENTATION) + set(BUILD_DOCUMENTATION 1) + endif() +- subdirs(vtk) ++ add_subdirectory(vtk) + endif() + endif() + +diff --git a/Utilities/gdcmexpat/CMakeLists.txt b/Utilities/gdcmexpat/CMakeLists.txt +index 9c86fb569..a1685476d 100644 +--- a/Utilities/gdcmexpat/CMakeLists.txt ++++ b/Utilities/gdcmexpat/CMakeLists.txt +@@ -45,4 +45,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/expat_mangle.h.in + + # for expat_config.h + include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +-subdirs(lib) ++add_subdirectory(lib) +diff --git a/Utilities/gdcmjpeg/CMakeLists.txt b/Utilities/gdcmjpeg/CMakeLists.txt +index c687acd09..bfcc94b88 100644 +--- a/Utilities/gdcmjpeg/CMakeLists.txt ++++ b/Utilities/gdcmjpeg/CMakeLists.txt +@@ -170,7 +170,9 @@ endforeach() + # I could not get the depencencies in CMake to work properly so instead + # have multiple directory for each target that will ensure proper recompilation + # of the objects files +-subdirs(8 12 16) ++add_subdirectory(8) ++add_subdirectory(12) ++add_subdirectory(16) + + if(NOT JPEG_INSTALL_NO_DEVELOPMENT) + file(GLOB header_files "*.h") +diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt +index 89e0f3fdb..aca078b13 100644 +--- a/Wrapping/CMakeLists.txt ++++ b/Wrapping/CMakeLists.txt +@@ -1,20 +1,20 @@ + # python + if(GDCM_WRAP_PYTHON) +- subdirs(Python) ++ add_subdirectory(Python) + endif() + # java + if(GDCM_WRAP_JAVA) +- subdirs(Java) ++ add_subdirectory(Java) + endif() + # php + if(GDCM_WRAP_PHP) +- subdirs(PHP) ++ add_subdirectory(PHP) + endif() + # perl + if(GDCM_WRAP_PERL) +- subdirs(Perl) ++ add_subdirectory(Perl) + endif() + # C# + if(GDCM_WRAP_CSHARP) +-# subdirs(Csharp) ++# add_subdirectory(Csharp) + endif() +-- +2.20.1 + diff --git a/0004-Relocate-cmake-file-inclusions.patch b/0004-Relocate-cmake-file-inclusions.patch new file mode 100644 index 0000000..04cb427 --- /dev/null +++ b/0004-Relocate-cmake-file-inclusions.patch @@ -0,0 +1,65 @@ +From 31ba0efdc107d5f20734c4663ee29789ab051e15 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 20:41:05 +0000 +Subject: [PATCH 4/7] Relocate cmake file inclusions + +--- + CMakeLists.txt | 9 --------- + Wrapping/Java/CMakeLists.txt | 5 +++++ + Wrapping/Python/CMakeLists.txt | 4 ++++ + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 86a4f6751..c49fe738b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -620,21 +620,12 @@ if(GDCM_STANDALONE) + endif() + + #----------------------------------------------------------------------------- +-# Special CMake Module required when doing Python Testing + if(GDCM_STANDALONE) +- if(BUILD_TESTING AND GDCM_WRAP_PYTHON) +- include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake) +- endif() +- + # Special CMake Module required when doing C# Testing + if(BUILD_TESTING AND GDCM_WRAP_CSHARP) + include(${GDCM_SOURCE_DIR}/CMake/UseCSharpTest.cmake) + endif() + +-# Special CMake Module required when doing Java Testing +- if(BUILD_TESTING AND GDCM_WRAP_JAVA) +- include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake) +- endif() + endif() + #----------------------------------------------------------------------------- + # Need pthread for the following class: +diff --git a/Wrapping/Java/CMakeLists.txt b/Wrapping/Java/CMakeLists.txt +index b6301128b..e3bccc79e 100644 +--- a/Wrapping/Java/CMakeLists.txt ++++ b/Wrapping/Java/CMakeLists.txt +@@ -1,3 +1,8 @@ ++# Special CMake Module required when doing Java Testing ++if(BUILD_TESTING AND GDCM_WRAP_JAVA) ++ include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake) ++endif() ++ + find_package(SWIG REQUIRED) + include(${SWIG_USE_FILE}) + option(GDCM_AUTOLOAD_GDCMJNI "Automatically load gdcmjni" ON) +diff --git a/Wrapping/Python/CMakeLists.txt b/Wrapping/Python/CMakeLists.txt +index 3bf724764..f9f706c51 100644 +--- a/Wrapping/Python/CMakeLists.txt ++++ b/Wrapping/Python/CMakeLists.txt +@@ -1,3 +1,7 @@ ++# Special CMake Module required when doing Python Testing ++if(BUILD_TESTING AND GDCM_WRAP_PYTHON) ++ include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake) ++endif() + # Try to rebuild wrapping a little more often: + include_regular_expression("^(gdcm).*$") + # TODO: +-- +2.20.1 + diff --git a/0005-use-cpp-11-standard.patch b/0005-use-cpp-11-standard.patch new file mode 100644 index 0000000..b8209c3 --- /dev/null +++ b/0005-use-cpp-11-standard.patch @@ -0,0 +1,26 @@ +From eaf7fa5c5a58383b6183d7d32b889771faabd3cd Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 20:59:46 +0000 +Subject: [PATCH 5/7] use cpp 11 standard + +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c49fe738b..c955ee232 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,8 @@ if( POLICY CMP0074 ) + cmake_policy(SET CMP0074 NEW) + endif() + project(GDCM) +-set(CMAKE_CXX_STANDARD 98) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_EXTENSIONS OFF) + mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX) + set(GDCM_CMAKE_DIR "${GDCM_SOURCE_DIR}/CMake" CACHE INTERNAL "") +-- +2.20.1 + diff --git a/0006-Update-for-new-poppler.patch b/0006-Update-for-new-poppler.patch new file mode 100644 index 0000000..30b712f --- /dev/null +++ b/0006-Update-for-new-poppler.patch @@ -0,0 +1,183 @@ +From 84da37121e7814cf1e5c423cc0779d6df6b1c660 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 21:23:45 +0000 +Subject: [PATCH 6/7] Update for new poppler + +--- + Applications/Cxx/gdcminfo.cxx | 34 +++++++++++++++++----------------- + Applications/Cxx/gdcmpdf.cxx | 12 ++++++------ + 2 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/Applications/Cxx/gdcminfo.cxx b/Applications/Cxx/gdcminfo.cxx +index 2c510d7df..d9506be4e 100644 +--- a/Applications/Cxx/gdcminfo.cxx ++++ b/Applications/Cxx/gdcminfo.cxx +@@ -105,22 +105,22 @@ static int checkdeflated(const char *name) + return 1; + } + in = fopen(name, "r"); +- if (in == NULL) ++ if (in == nullptr) + { + fprintf( stderr, "in is NULL\n" ); + return 1; + } + buf = (unsigned char*)malloc(size); +- if (buf != NULL && (size1 = (unsigned long)fread(buf, 1, size, in)) != size) { ++ if (buf != nullptr && (size1 = (unsigned long)fread(buf, 1, size, in)) != size) { + free(buf); +- buf = NULL; ++ buf = nullptr; + fprintf( stderr, "could not fread: %lu bytes != %lu\n", size, size1 ); + fprintf( stderr, "feof: %i ferror %i\n", feof(in), ferror(in) ); + } + fclose(in); + len = size; + source = buf; +- if( source == NULL ) { ++ if( source == nullptr ) { + fprintf( stderr, "source is NULL\n" ); + return 1; + } +@@ -172,7 +172,7 @@ static int checkdeflated(const char *name) + printf( "deflate stream has proper length: %lu\n", len ); + } + +- ret = puff(NULL, &destlen, source, &sourcelen); ++ ret = puff(nullptr, &destlen, source, &sourcelen); + + if (ret) + fprintf(stdout,"puff() failed with return code %d\n", ret); +@@ -202,7 +202,7 @@ static std::string getInfoDate(Dict *infoDict, const char *key) + #endif + { + const GooString* gs = obj.getString(); +- s = gs->getCString(); ++ s = gs->c_str(); + if (s[0] == 'D' && s[1] == ':') + { + s += 2; +@@ -258,7 +258,7 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM + { + Object obj; + const GooString *s1; +- GBool isUnicode; ++ bool isUnicode; + Unicode u; + char buf[8]; + int i, n; +@@ -274,12 +274,12 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM + if ((s1->getChar(0) & 0xff) == 0xfe && + (s1->getChar(1) & 0xff) == 0xff) + { +- isUnicode = gTrue; ++ isUnicode = true; + i = 2; + } + else + { +- isUnicode = gFalse; ++ isUnicode = false; + i = 0; + } + while (i < obj.getString()->getLength()) +@@ -400,7 +400,7 @@ static int ProcessOneFile( std::string const & filename, gdcm::Defs const & defs + return 1; + } + gdcm::SplitMosaicFilter filter; +- const gdcm::Image *pimage = NULL; ++ const gdcm::Image *pimage = nullptr; + const gdcm::Image &image = reader.GetImage(); + if( mosaic ) + { +@@ -539,10 +539,10 @@ static int ProcessOneFile( std::string const & filename, gdcm::Defs const & defs + int pages = doc->getNumPages(); + const char *encrypted = doc->isEncrypted() ? "yes" : "no"; + // printf("yes (print:%s copy:%s change:%s addNotes:%s)\n", +- // doc->okToPrint(gTrue) ? "yes" : "no", +- // doc->okToCopy(gTrue) ? "yes" : "no", +- // doc->okToChange(gTrue) ? "yes" : "no", +- // doc->okToAddNotes(gTrue) ? "yes" : "no"); ++ // doc->okToPrint(true) ? "yes" : "no", ++ // doc->okToCopy(true) ? "yes" : "no", ++ // doc->okToChange(true) ? "yes" : "no", ++ // doc->okToAddNotes(true) ? "yes" : "no"); + + // print linearization info + const char *optimized = doc->isLinearized() ? "yes" : "no"; +@@ -608,10 +608,10 @@ int main(int argc, char *argv[]) + int version = 0; + int debug = 0; + int error = 0; +- while (1) { ++ while (true) { + int option_index = 0; + static struct option long_options[] = { +- {"input", 1, 0, 0}, ++ {"input", 1, nullptr, 0}, + {"recursive", 0, &recursive, 1}, + {"check-deflated", 0, &deflated, 1}, + {"resources-path", 0, &resourcespath, 1}, +@@ -627,7 +627,7 @@ int main(int argc, char *argv[]) + {"error", 0, &error, 1}, + {"help", 0, &help, 1}, + {"version", 0, &version, 1}, +- {0, 0, 0, 0} // required ++ {nullptr, 0, nullptr, 0} // required + }; + static const char short_options[] = "i:rdVWDEhv"; + c = getopt_long (argc, argv, short_options, +diff --git a/Applications/Cxx/gdcmpdf.cxx b/Applications/Cxx/gdcmpdf.cxx +index b3f22b520..15220a34b 100644 +--- a/Applications/Cxx/gdcmpdf.cxx ++++ b/Applications/Cxx/gdcmpdf.cxx +@@ -50,7 +50,7 @@ static std::string getInfoDate(Dict *infoDict, const char *key) + #endif + { + const GooString* gs = obj.getString(); +- s = gs->getCString(); ++ s = gs->c_str(); + if (s[0] == 'D' && s[1] == ':') + { + s += 2; +@@ -102,11 +102,11 @@ static std::string getInfoDate(Dict *infoDict, const char *key) + return out; + } + +-static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, GBool & unicode) ++static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, bool & unicode) + { + Object obj; + const GooString *s1; +- GBool isUnicode = gFalse; ++ bool isUnicode = false; + Unicode u; + char buf[8]; + int i, n; +@@ -122,12 +122,12 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM + if ((s1->getChar(0) & 0xff) == 0xfe && + (s1->getChar(1) & 0xff) == 0xff) + { +- isUnicode = gTrue; ++ isUnicode = true; + i = 2; + } + else + { +- isUnicode = gFalse; ++ isUnicode = false; + i = 0; + } + while (i < obj.getString()->getLength()) +@@ -398,7 +398,7 @@ http://msdn.microsoft.com/en-us/library/078sfkak(VS.80).aspx + std::string creationdate; + std::string moddate; + +- GBool isUnicode = gFalse; ++ bool isUnicode = false; + if (doc->isOk()) + { + #ifdef LIBPOPPLER_NEW_OBJECT_API +-- +2.20.1 + diff --git a/0007-Use-unversioned-dir.patch b/0007-Use-unversioned-dir.patch new file mode 100644 index 0000000..3154145 --- /dev/null +++ b/0007-Use-unversioned-dir.patch @@ -0,0 +1,25 @@ +From 6f2a780a35e1cfafb238b2eca2e3d28f9cbea3a0 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 17 Feb 2019 22:56:02 +0000 +Subject: [PATCH 7/7] Use unversioned dir + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c955ee232..338ed6260 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,7 +237,7 @@ endif() + # Install directories + + string(TOLOWER ${PROJECT_NAME} projectname) +-set(subdir "${projectname}-${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}") ++set(subdir "${projectname}") + + if(NOT GDCM_INSTALL_BIN_DIR) + set(GDCM_INSTALL_BIN_DIR "bin") +-- +2.20.1 + diff --git a/gdcm-0005-support-vtk6.patch b/gdcm-0005-support-vtk6.patch deleted file mode 100644 index 1722452..0000000 --- a/gdcm-0005-support-vtk6.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- gdcm-2.4.0.orig/Utilities/VTK/CMakeLists.txt 2013-10-16 10:28:54.000000000 +0200 -+++ gdcm-2.4.0/Utilities/VTK/CMakeLists.txt 2013-10-20 21:06:06.247345157 +0200 -@@ -2,6 +2,10 @@ - # We need VTK - # Technically we require VTK 5.0 and above - -+# To support VTK 6.0 -+include(${VTK_CMAKE_DIR}/vtkMakeInstantiator.cmake) -+ -+ - # Define the src for the vtk-gdcm bridge - set(vtkgdcm_SRCS - vtkGDCMTesting.cxx diff --git a/gdcm-2.4.0-install2libarch.patch b/gdcm-2.4.0-install2libarch.patch deleted file mode 100644 index ab81f0a..0000000 --- a/gdcm-2.4.0-install2libarch.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gdcm-2.4.0.orig/CMakeLists.txt 2013-10-16 10:28:54.000000000 +0200 -+++ gdcm-2.4.0/CMakeLists.txt 2013-10-20 21:16:59.552765990 +0200 -@@ -237,7 +230,7 @@ - - if(NOT GDCM_INSTALL_LIB_DIR) - #set(GDCM_INSTALL_LIB_DIR "lib/${PROJECT_NAME}") -- set(GDCM_INSTALL_LIB_DIR "lib") -+ set(GDCM_INSTALL_LIB_DIR "lib${LIB_SUFFIX}") - endif() - - if(NOT GDCM_INSTALL_DATA_DIR) diff --git a/gdcm-2.4.0-no-versioned-dir.patch b/gdcm-2.4.0-no-versioned-dir.patch deleted file mode 100644 index 7c92cf6..0000000 --- a/gdcm-2.4.0-no-versioned-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gdcm-2.4.0.orig/CMakeLists.txt 2013-10-16 10:28:54.000000000 +0200 -+++ gdcm-2.4.0/CMakeLists.txt 2013-10-20 21:01:35.475088018 +0200 -@@ -229,7 +229,7 @@ - # Install directories - - string(TOLOWER ${PROJECT_NAME} projectname) --set(subdir "${projectname}-${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}") -+set(subdir "${projectname}") - - if(NOT GDCM_INSTALL_BIN_DIR) - set(GDCM_INSTALL_BIN_DIR "bin") diff --git a/gdcm-2.4.0-usecopyright.patch b/gdcm-2.4.0-usecopyright.patch deleted file mode 100644 index 6b22818..0000000 --- a/gdcm-2.4.0-usecopyright.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- gdcm-2.4.0.orig/CMake/UseCopyright.cmake 2013-10-16 10:28:54.000000000 +0200 -+++ gdcm-2.4.0/CMake/UseCopyright.cmake 2013-10-20 21:11:37.532101984 +0200 -@@ -18,8 +18,10 @@ - # need to raise an error if COPYRIGHT_MODULE_FILENAME is not set... - if(EXISTS ${COPYRIGHT_MODULE_FILENAME} ) - foreach(filename ${ARGN}) -- file(READ ${filename} content) -- file(APPEND ${COPYRIGHT_MODULE_FILENAME} ${content}) -+ if(EXISTS ${filename} ) -+ file(READ ${filename} content) -+ file(APPEND ${COPYRIGHT_MODULE_FILENAME} ${content}) -+ endif() - endforeach() - endif() - endmacro() diff --git a/gdcm-2.6-fix-cmake-config-paths.patch b/gdcm-2.6-fix-cmake-config-paths.patch deleted file mode 100644 index 3e5c7ef..0000000 --- a/gdcm-2.6-fix-cmake-config-paths.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- gdcm-2.6.1.orig/CMake/ExportConfiguration/GDCMConfig.cmake.in 2015-10-30 17:25:14.000000000 +0100 -+++ gdcm-2.6.1/CMake/ExportConfiguration/GDCMConfig.cmake.in 2015-11-15 23:54:41.944053797 +0100 -@@ -37,9 +37,9 @@ - if(EXISTS ${SELF_DIR}/GDCMTargets.cmake) - # This is an install tree - include(${SELF_DIR}/GDCMTargets.cmake) -- get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) -+ get_filename_component(GDCM_INCLUDE_ROOT "@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) - set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT}) -- get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) -+ get_filename_component(GDCM_LIB_ROOT "@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) - set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT}) - else() - if(EXISTS ${SELF_DIR}/GDCMExports.cmake) diff --git a/gdcm-2.6-fix-narrowing-error.patch b/gdcm-2.6-fix-narrowing-error.patch deleted file mode 100644 index 5016f90..0000000 --- a/gdcm-2.6-fix-narrowing-error.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gdcm-2.6.3.orig/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement1.cxx 2016-01-27 14:25:39.000000000 +0100 -+++ gdcm-2.6.3/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement1.cxx 2016-02-01 22:34:34.559716794 +0100 -@@ -88,7 +88,7 @@ - - int TestUL() - { -- const char array[4] = {-78, 1, 0, 0}; // 434 -+ const signed char array[4] = {-78, 1, 0, 0}; // 434 - { - Element a; - // reinterpret_cast< const Element& > ( array ); diff --git a/gdcm-2.8.4-fix-manpage-gen.patch b/gdcm-2.8.4-fix-manpage-gen.patch deleted file mode 100644 index 675eef0..0000000 --- a/gdcm-2.8.4-fix-manpage-gen.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./Utilities/doxygen/CMakeLists.txt.backup ./Utilities/doxygen/CMakeLists.txt ---- ./Utilities/doxygen/CMakeLists.txt.backup 2017-11-09 09:09:58.000000000 +0100 -+++ ./Utilities/doxygen/CMakeLists.txt 2018-02-14 15:17:12.223249372 +0100 -@@ -253,6 +253,7 @@ if(LIBXSLT_XSLTPROC_EXECUTABLE) - set(XSLT_PROCESSOR ${LIBXSLT_XSLTPROC_EXECUTABLE}) - # http://docbook.sourceforge.net/release/xsl/current/doc/manpages/man.output.quietly.html - set(XSLT_PROCESSOR_ARG --param man.output.quietly 1) -+ set(XSLT_PROCESSOR_ARG --maxdepth 5000) - # User can change the behavior at cmake time: - if(NOT DEFINED GDCM_MANPAGES_USE_NONET) - set(GDCM_MANPAGES_USE_NONET FALSE) diff --git a/gdcm-2.8.4-fix-poppler.patch b/gdcm-2.8.4-fix-poppler.patch deleted file mode 100644 index 40b42bb..0000000 --- a/gdcm-2.8.4-fix-poppler.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./CMakeLists.txt.dt ./CMakeLists.txt ---- ./CMakeLists.txt.dt 2018-02-14 15:33:46.376657320 +0100 -+++ ./CMakeLists.txt 2018-02-14 15:33:51.173615948 +0100 -@@ -15,7 +15,7 @@ if( POLICY CMP0063 ) - cmake_policy(SET CMP0063 NEW) - endif() - project(GDCM) --set(CMAKE_CXX_STANDARD 98) -+set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX) - set(GDCM_CMAKE_DIR "${GDCM_SOURCE_DIR}/CMake" CACHE INTERNAL "") diff --git a/gdcm-2.8.4-poppler-0.67.0.patch b/gdcm-2.8.4-poppler-0.67.0.patch deleted file mode 100644 index b7200c1..0000000 --- a/gdcm-2.8.4-poppler-0.67.0.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- gdcm-2.8.4/Applications/Cxx/gdcminfo.cxx -+++ gdcm-2.8.4/Applications/Cxx/gdcminfo.cxx -@@ -188,7 +188,7 @@ static int checkdeflated(const char *nam - static std::string getInfoDate(Dict *infoDict, const char *key) - { - Object obj; -- char *s; -+ const char *s; - int year, mon, day, hour, min, sec, n; - struct tm tmStruct; - //char buf[256]; -@@ -255,7 +255,7 @@ static std::string getInfoDate(Dict *inf - static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap) - { - Object obj; -- GooString *s1; -+ const GooString *s1; - GBool isUnicode; - Unicode u; - char buf[8]; ---- gdcm-2.8.4/Applications/Cxx/gdcmpdf.cxx -+++ gdcm-2.8.4/Applications/Cxx/gdcmpdf.cxx -@@ -37,7 +37,7 @@ - static std::string getInfoDate(Dict *infoDict, const char *key) - { - Object obj; -- char *s; -+ const char *s; - int year, mon, day, hour, min, sec, n; - struct tm tmStruct; - //char buf[256]; -@@ -104,7 +104,7 @@ static std::string getInfoDate(Dict *inf - static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, GBool & unicode) - { - Object obj; -- GooString *s1; -+ const GooString *s1; - GBool isUnicode = gFalse; - Unicode u; - char buf[8]; diff --git a/gdcm-2.8.4-poppler-0.73.0.patch b/gdcm-2.8.4-poppler-0.73.0.patch deleted file mode 100644 index 240d4e1..0000000 --- a/gdcm-2.8.4-poppler-0.73.0.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- gdcm-2.8.4/Applications/Cxx/gdcminfo.cxx -+++ gdcm-2.8.4/Applications/Cxx/gdcminfo.cxx -@@ -200,7 +200,7 @@ static std::string getInfoDate(Dict *inf - if (infoDict->lookup((char*)key, &obj)->isString()) - #endif - { -- s = obj.getString()->getCString(); -+ s = obj.getString()->c_str(); - if (s[0] == 'D' && s[1] == ':') - { - s += 2; -@@ -256,7 +256,7 @@ static std::string getInfoString(Dict *i - { - Object obj; - const GooString *s1; -- GBool isUnicode; -+ bool isUnicode; - Unicode u; - char buf[8]; - int i, n; -@@ -272,12 +272,12 @@ static std::string getInfoString(Dict *i - if ((s1->getChar(0) & 0xff) == 0xfe && - (s1->getChar(1) & 0xff) == 0xff) - { -- isUnicode = gTrue; -+ isUnicode = true; - i = 2; - } - else - { -- isUnicode = gFalse; -+ isUnicode = false; - i = 0; - } - while (i < obj.getString()->getLength()) -@@ -523,10 +523,10 @@ static int ProcessOneFile( std::string c - int pages = doc->getNumPages(); - const char *encrypted = doc->isEncrypted() ? "yes" : "no"; - // printf("yes (print:%s copy:%s change:%s addNotes:%s)\n", -- // doc->okToPrint(gTrue) ? "yes" : "no", -- // doc->okToCopy(gTrue) ? "yes" : "no", -- // doc->okToChange(gTrue) ? "yes" : "no", -- // doc->okToAddNotes(gTrue) ? "yes" : "no"); -+ // doc->okToPrint(true) ? "yes" : "no", -+ // doc->okToCopy(true) ? "yes" : "no", -+ // doc->okToChange(true) ? "yes" : "no", -+ // doc->okToAddNotes(true) ? "yes" : "no"); - - // print linearization info - const char *optimized = doc->isLinearized() ? "yes" : "no"; ---- gdcm-2.8.4/Applications/Cxx/gdcmpdf.cxx -+++ gdcm-2.8.4/Applications/Cxx/gdcmpdf.cxx -@@ -49,7 +49,7 @@ static std::string getInfoDate(Dict *inf - if (infoDict->lookup((char*)key, &obj)->isString()) - #endif - { -- s = obj.getString()->getCString(); -+ s = obj.getString()->c_str(); - if (s[0] == 'D' && s[1] == ':') - { - s += 2; -@@ -101,11 +101,11 @@ static std::string getInfoDate(Dict *inf - return out; - } - --static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, GBool & unicode) -+static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, bool & unicode) - { - Object obj; - const GooString *s1; -- GBool isUnicode = gFalse; -+ bool isUnicode = false; - Unicode u; - char buf[8]; - int i, n; -@@ -121,12 +121,12 @@ static std::string getInfoString(Dict *i - if ((s1->getChar(0) & 0xff) == 0xfe && - (s1->getChar(1) & 0xff) == 0xff) - { -- isUnicode = gTrue; -+ isUnicode = true; - i = 2; - } - else - { -- isUnicode = gFalse; -+ isUnicode = false; - i = 0; - } - while (i < obj.getString()->getLength()) -@@ -397,7 +397,7 @@ http://msdn.microsoft.com/en-us/library/ - std::string creationdate; - std::string moddate; - -- GBool isUnicode = gFalse; -+ bool isUnicode = false; - if (doc->isOk()) - { - #ifdef LIBPOPPLER_NEW_OBJECT_API diff --git a/gdcm.spec b/gdcm.spec index 0c4b4da..8ff2fc7 100644 --- a/gdcm.spec +++ b/gdcm.spec @@ -1,30 +1,44 @@ +%bcond_with tests + Name: gdcm -Version: 2.8.4 -Release: 13%{?dist} +Version: 2.8.8 +Release: 1%{?dist} Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files License: BSD 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 +# Use github release +Source0: https://github.com/malaterre/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.gz -Patch1: gdcm-2.4.0-usecopyright.patch -Patch2: gdcm-2.4.0-install2libarch.patch -Patch3: gdcm-2.4.0-no-versioned-dir.patch -# From http://public.kitware.com/pipermail/vtkusers/2013-February/127377.html -#Patch4: gdcm-0005-support-vtk6.patch -Patch6: gdcm-2.6-fix-cmake-config-paths.patch -Patch7: gdcm-2.8.4-fix-manpage-gen.patch -Patch8: gdcm-2.8.4-fix-poppler.patch -Patch9: gdcm-2.8.4-poppler-0.67.0.patch -Patch10: gdcm-2.8.4-poppler-0.73.0.patch +Patch1: 0001-Use-copyright.patch +# Increase maxdepth to permit generation of man pages +# https://sourceforge.net/p/gdcm/bugs/449/ +Patch2: 0002-Increase-xslt-maxdepth.patch +# Use add_subdirectories since subdirs may not pass variables properly +# https://stackoverflow.com/a/30894329/375067 +# https://cmake.org/pipermail/cmake/2007-August/015928.html +# Upstream has already made this change in their master branch +Patch3: 0003-Use-add_subdirectories-instead-of-deprecated-subdirs.patch +# Move inclusions to right locations +Patch4: 0004-Relocate-cmake-file-inclusions.patch +# Use c++11 standard +Patch5: 0005-use-cpp-11-standard.patch +# For new poppler +Patch6: 0006-Update-for-new-poppler.patch +# Use unversioned directory name +Patch7: 0007-Use-unversioned-dir.patch BuildRequires: CharLS-devel >= 1.0 BuildRequires: cmake BuildRequires: doxygen BuildRequires: libxslt-devel +BuildRequires: dcmtk-devel BuildRequires: docbook5-style-xsl BuildRequires: expat-devel BuildRequires: fontconfig-devel +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: git-core BuildRequires: graphviz BuildRequires: gl2ps-devel BuildRequires: libogg-devel @@ -33,15 +47,20 @@ BuildRequires: libuuid-devel BuildRequires: mesa-libOSMesa-devel BuildRequires: openssl-devel BuildRequires: pkgconfig(libopenjp2) -#BuildRequires: /usr/bin/pdflatex BuildRequires: poppler-devel BuildRequires: python3-devel BuildRequires: swig +BuildRequires: sqlite-devel BuildRequires: json-c-devel BuildRequires: libxml2-devel +# TODO: enable VTK +# BuildRequires: vtk-devel +# Still needed +BuildRequires: /usr/bin/latex +BuildRequires: /usr/bin/pdflatex +BuildRequires: /usr/bin/dvips +BuildRequires: /usr/bin/epstopdf #BuildRequires: texlive-ec -#BuildRequires: vtk-devel -BuildRequires: gcc gcc-c++ %description @@ -97,20 +116,16 @@ 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 -p 1 -%patch2 -p 1 -%patch3 -p 1 -%patch6 -p 1 -%patch7 -p 1 -%patch8 -p 1 -%patch9 -p 1 -%patch10 -p 1 +%autosetup -n GDCM-%{version} -S git +# Data source +%setup -n GDCM-%{version} -q -T -D -a 1 # Fix cmake command sed -i.backup 's/add_dependency/add_dependencies/' Utilities/doxygen/CMakeLists.txt +# Stop doxygen from producing LaTeX output +# sed -i.backup 's/^GENERATE_LATEX.*=.*YES/GENERATE_LATEX = NO/' Utilities/doxygen/doxyfile.in + # Remove bundled utilities (we use Fedora's ones) rm -rf Utilities/gdcmexpat @@ -184,14 +199,38 @@ find %{_builddir}/%{?buildsubdir}/Examples -depth -size 0 | xargs rm -rf ## Moving Example dir into _datadir cp -r %{_builddir}/%{?buildsubdir}/Examples $RPM_BUILD_ROOT%{_datadir}/%{name}/ +%if %{with tests} %check # 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 make test -C %{_target_platform} || exit 0 +%endif %files -%doc AUTHORS Copyright.txt README.Copyright.txt README.txt -%{_libdir}/*.so.* +%doc AUTHORS README.txt +%license Copyright.txt README.Copyright.txt +%{_libdir}/libgdcmCommon.so.2.8 +%{_libdir}/libgdcmCommon.so.2.8.8 +%{_libdir}/libgdcmDICT.so.2.8 +%{_libdir}/libgdcmDICT.so.2.8.8 +%{_libdir}/libgdcmDSED.so.2.8 +%{_libdir}/libgdcmDSED.so.2.8.8 +%{_libdir}/libgdcmIOD.so.2.8 +%{_libdir}/libgdcmIOD.so.2.8.8 +%{_libdir}/libgdcmMEXD.so.2.8 +%{_libdir}/libgdcmMEXD.so.2.8.8 +%{_libdir}/libgdcmMSFF.so.2.8 +%{_libdir}/libgdcmMSFF.so.2.8.8 +%{_libdir}/libgdcmjpeg12.so.2.8 +%{_libdir}/libgdcmjpeg12.so.2.8.8 +%{_libdir}/libgdcmjpeg16.so.2.8 +%{_libdir}/libgdcmjpeg16.so.2.8.8 +%{_libdir}/libgdcmjpeg8.so.2.8 +%{_libdir}/libgdcmjpeg8.so.2.8.8 +%{_libdir}/libgdcmmd5.so.2.8 +%{_libdir}/libgdcmmd5.so.2.8.8 +%{_libdir}/libsocketxx.so.1.2 +%{_libdir}/libsocketxx.so.1.2.0 %dir %{_datadir}/%{name} %{_datadir}/%{name}/XML/ %exclude %{_docdir}/%{name}/html/ @@ -200,12 +239,35 @@ make test -C %{_target_platform} || exit 0 %doc %{_docdir}/%{name}/html/ %files applications -%{_bindir}/* +%{_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 %doc %{_mandir}/man1/*.1* %files devel %{_includedir}/%{name}/ -%{_libdir}/*.so +%{_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 %{_libdir}/cmake/%{name}/ %files examples @@ -217,6 +279,14 @@ make test -C %{_target_platform} || exit 0 %{python3_sitearch}/__pycache__/%{name}* %changelog +* Sun Feb 17 2019 Ankur Sinha - 2.8.8-1 +- Update to latest upstream release +- use autosetup +- rebase patches +- add dcmtk and sqlite deps +- add patch to use add_subdirectories +- explicitly list binaries and shared objects + * Thu Jan 31 2019 Fedora Release Engineering - 2.8.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild @@ -419,7 +489,7 @@ make test -C %{_target_platform} || exit 0 * Tue Nov 19 2013 Sebastian Pölsterl - 2.4.0-2 - Fixed duplicate documentation files: -https://bugzilla.redhat.com/show_bug.cgi?id=1001298 +- https://bugzilla.redhat.com/show_bug.cgi?id=1001298 * Sun Oct 20 2013 Sebastian Pölsterl - 2.4.0-1 - Update to 2.4.0 @@ -457,7 +527,6 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1001298 - Various fixes to spec file - Dropped pdf documentation because cmake scripts still search for pdfopt - * Mon Feb 4 2013 Mario Ceresa - 2.0.18-8 - Added missing BR for pdflatex @@ -588,4 +657,3 @@ already included upstream * Wed Feb 17 2010 Mario Ceresa 2.0.14 - Initial RPM Release - diff --git a/sources b/sources index d9bd29c..cfa9455 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (gdcm-2.8.4.tar.bz2) = faa9d7efab8eb998b2a768edc4ba6a9f17d6451641749024fccb71654621c6be3bc8be8ecbdd5e001e2c820b3333bf1f190ffc5b3d3d23839409476268bbd43f -SHA512 (gdcmData.tar.gz) = ddc67a7a0b41b2d6e1e03defb6fb8a06ceeb2e9dd9bb47dfa4f7283d79df7c1e52577b799c00e930719ae6cdda46bded9497a67b8241359f238f5366085ec9ee +SHA512 (gdcm-2.8.8.tar.gz) = 92efa1b85e38a5e463933c36a275e1392608c9da4d7c3ab17acfa70bfa112bc03e8705086eaac4a3ad5153fde5116ccc038093adaa8598b18000f403f39db738