Mercurial > hg > orthanc
changeset 1638:158e7b6f859a dcmtk-3.6.1
dcmtk 3.6.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Sep 2015 10:23:22 +0200 |
parents | dfbde7c3fe19 |
children | 1b82bb0446d2 |
files | Resources/CMake/Compiler.cmake Resources/CMake/DcmtkConfiguration.cmake Resources/Patches/dcmtk-linux-speed.patch Resources/Patches/dcmtk-mingw64.patch Resources/Patches/dcmtk-mingw64.txt Resources/Patches/dcmtk-speed.patch |
diffstat | 6 files changed, 44 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Wed Sep 23 10:00:26 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Wed Sep 23 10:23:22 2015 +0200 @@ -42,7 +42,6 @@ -D_CRT_SECURE_NO_DEPRECATE=1 ) include_directories(${ORTHANC_ROOT}/Resources/ThirdParty/VisualStudio) - link_libraries(netapi32) endif() @@ -69,6 +68,8 @@ endif() elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + link_libraries(netapi32) + if (MSVC) message("MSVC compiler version = " ${MSVC_VERSION} "\n") # Starting Visual Studio 2013 (version 1800), it is not possible
--- a/Resources/CMake/DcmtkConfiguration.cmake Wed Sep 23 10:00:26 2015 +0200 +++ b/Resources/CMake/DcmtkConfiguration.cmake Wed Sep 23 10:23:22 2015 +0200 @@ -17,7 +17,7 @@ SET(DCMTK_VERSION_NUMBER 361) set(DCMTK_PACKAGE_VERSION "3.6.1") SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.1_20150629) - SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.zip") + SET(DCMTK_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.1_20150629.tar.gz") SET(DCMTK_MD5 "219ad631b82031806147e4abbfba4fa4") if (IS_DIRECTORY "${DCMTK_SOURCES_DIR}") @@ -31,6 +31,7 @@ endmacro() set(DCMTK_CMAKE_INCLUDE ${DCMTK_SOURCES_DIR}/) + add_definitions(-DDCMTK_INSIDE_LOG4CPLUS=1) # End @@ -63,6 +64,18 @@ ${DCMTK_SOURCES_DIR}/CMake/osconfig.h.in ${DCMTK_SOURCES_DIR}/config/include/dcmtk/config/osconfig.h) + + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-speed.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) + + if (Failure AND FirstRun) + message(FATAL_ERROR "Error while patching a file") + endif() + + AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmnet/libsrc DCMTK_SOURCES) AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/dcmdata/libsrc DCMTK_SOURCES) AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/ofstd/libsrc DCMTK_SOURCES) @@ -110,12 +123,14 @@ ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") list(REMOVE_ITEM DCMTK_SOURCES + ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc ${DCMTK_SOURCES_DIR}/oflog/libsrc/windebap.cc ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc ) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") list(REMOVE_ITEM DCMTK_SOURCES + ${DCMTK_SOURCES_DIR}/oflog/libsrc/clfsap.cc ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc ) endif()
--- a/Resources/Patches/dcmtk-linux-speed.patch Wed Sep 23 10:00:26 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc dcmtk-3.6.0/dcmnet/libsrc/dul.cc ---- dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc 2010-12-01 09:26:36.000000000 +0100 -+++ dcmtk-3.6.0/dcmnet/libsrc/dul.cc 2015-05-15 17:03:50.762451757 +0200 -@@ -1840,7 +1840,7 @@ - } - #endif - #endif -- setTCPBufferLength(sock); -+ //setTCPBufferLength(sock); - - #ifndef DONT_DISABLE_NAGLE_ALGORITHM - /* -diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc ---- dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc 2010-12-01 09:26:36.000000000 +0100 -+++ dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc 2015-05-15 17:03:55.570451952 +0200 -@@ -2417,7 +2417,7 @@ - return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); - } - #endif -- setTCPBufferLength(s); -+ //setTCPBufferLength(s); - - #ifndef DONT_DISABLE_NAGLE_ALGORITHM - /*
--- a/Resources/Patches/dcmtk-mingw64.patch Wed Sep 23 10:00:26 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/ofstd/include/dcmtk/ofstd/offile.h dcmtk-3.6.0/ofstd/include/dcmtk/ofstd/offile.h ---- dcmtk-3.6.0.orig/ofstd/include/dcmtk/ofstd/offile.h 2010-12-17 11:50:30.000000000 +0100 -+++ dcmtk-3.6.0/ofstd/include/dcmtk/ofstd/offile.h 2013-07-19 15:56:25.688996134 +0200 -@@ -196,7 +196,7 @@ - OFBool popen(const char *command, const char *modes) - { - if (file_) fclose(); --#ifdef _WIN32 -+#if 0 - file_ = _popen(command, modes); - #else - file_ = :: popen(command, modes); -@@ -258,7 +258,7 @@ - { - if (popened_) - { --#ifdef _WIN32 -+#if 0 - result = _pclose(file_); - #else - result = :: pclose(file_); -Only in dcmtk-3.6.0/ofstd/include/dcmtk/ofstd: offile.h~
--- a/Resources/Patches/dcmtk-mingw64.txt Wed Sep 23 10:00:26 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -diff -urEb dcmtk-3.6.0.orig/ dcmtk-3.6.0 > ../Resources/Patches/dcmtk-mingw64.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/Patches/dcmtk-speed.patch Wed Sep 23 10:23:22 2015 +0200 @@ -0,0 +1,26 @@ +diff -r -u dcmtk-3.6.1_20150629.orig/dcmnet/libsrc/dul.cc dcmtk-3.6.1_20150629/dcmnet/libsrc/dul.cc +--- dcmtk-3.6.1_20150629.orig/dcmnet/libsrc/dul.cc 2015-06-29 10:56:45.000000000 +0200 ++++ dcmtk-3.6.1_20150629/dcmnet/libsrc/dul.cc 2015-09-23 10:18:58.796546032 +0200 +@@ -1833,7 +1833,7 @@ + return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); + } + #endif +- setTCPBufferLength(sock); ++ //setTCPBufferLength(sock); + + #ifndef DONT_DISABLE_NAGLE_ALGORITHM + /* +Only in dcmtk-3.6.1_20150629/dcmnet/libsrc: dul.cc~ +diff -r -u dcmtk-3.6.1_20150629.orig/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.1_20150629/dcmnet/libsrc/dulfsm.cc +--- dcmtk-3.6.1_20150629.orig/dcmnet/libsrc/dulfsm.cc 2015-06-29 10:56:45.000000000 +0200 ++++ dcmtk-3.6.1_20150629/dcmnet/libsrc/dulfsm.cc 2015-09-23 10:19:10.088545747 +0200 +@@ -2421,7 +2421,7 @@ + return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); + } + #endif +- setTCPBufferLength(s); ++ //setTCPBufferLength(s); + + #ifndef DONT_DISABLE_NAGLE_ALGORITHM + /* +Only in dcmtk-3.6.1_20150629/dcmnet/libsrc: dulfsm.cc~