changeset 3280:fddf3ceed7e5

fixing lsb and msvc builds
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 Feb 2019 15:46:13 +0100
parents dd10fe965870
children ea54109a7312
files Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake Resources/Patches/dcmtk-3.6.4.patch Resources/Patches/dcmtk.txt
diffstat 3 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake	Thu Feb 21 15:13:49 2019 +0100
+++ b/Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake	Thu Feb 21 15:46:13 2019 +0100
@@ -25,6 +25,19 @@
 DownloadPackage(${DCMTK_MD5} ${DCMTK_URL} "${DCMTK_SOURCES_DIR}")
 
 
+# Apply the patches
+execute_process(
+  COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
+  ${ORTHANC_ROOT}/Resources/Patches/dcmtk-3.6.4.patch
+  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+  RESULT_VARIABLE Failure
+  )
+
+if (FirstRun AND Failure)
+  message(FATAL_ERROR "Error while patching files")
+endif()
+
+
 include_directories(
   ${DCMTK_SOURCES_DIR}/dcmiod/include
   )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/Patches/dcmtk-3.6.4.patch	Thu Feb 21 15:46:13 2019 +0100
@@ -0,0 +1,24 @@
+diff -urEb dcmtk-3.6.4.orig/dcmdata/libsrc/dcpxitem.cc dcmtk-3.6.4/dcmdata/libsrc/dcpxitem.cc
+--- dcmtk-3.6.4.orig/dcmdata/libsrc/dcpxitem.cc	2019-02-21 15:30:21.657110805 +0100
++++ dcmtk-3.6.4/dcmdata/libsrc/dcpxitem.cc	2019-02-21 15:41:01.565099612 +0100
+@@ -28,6 +28,7 @@
+ #include "dcmtk/ofstd/ofstdinc.h"
+ 
+ #include "dcmtk/ofstd/ofstream.h"
++#include "dcmtk/ofstd/oflimits.h"
+ #include "dcmtk/dcmdata/dcpxitem.h"
+ #include "dcmtk/dcmdata/dcswap.h"
+ #include "dcmtk/ofstd/ofstring.h"
+diff -urEb dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h
+--- dcmtk-3.6.4.orig/ofstd/include/dcmtk/ofstd/offile.h	2019-02-21 15:30:21.645110805 +0100
++++ dcmtk-3.6.4/ofstd/include/dcmtk/ofstd/offile.h	2019-02-21 15:30:48.273110339 +0100
+@@ -575,7 +575,7 @@
+    */
+   void setlinebuf()
+   {
+-#if defined(_WIN32) || defined(__hpux)
++#if defined(_WIN32) || defined(__hpux) || defined(__LSB_VERSION__)
+     this->setvbuf(NULL, _IOLBF, 0);
+ #else
+     :: setlinebuf(file_);
+Only in dcmtk-3.6.4/ofstd/include/dcmtk/ofstd: offile.h~
--- a/Resources/Patches/dcmtk.txt	Thu Feb 21 15:13:49 2019 +0100
+++ b/Resources/Patches/dcmtk.txt	Thu Feb 21 15:46:13 2019 +0100
@@ -3,6 +3,7 @@
 
 diff -urEb dcmtk-3.6.0.orig/ dcmtk-3.6.0
 diff -urEb dcmtk-3.6.2.orig/ dcmtk-3.6.2
+diff -urEb dcmtk-3.6.4.orig/ dcmtk-3.6.4
 
 For "dcmtk-3.6.2-private.dic"
 =============================