summaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-03-19 14:41:38 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-03-19 14:41:38 +0000
commit8332d1f7699a809b62a2986ba0a7e7530f147062 (patch)
tree900bb9da0f67bf20b735e013bac3224b6ed90a67 /science
parentFix Makefile syntax for PORTSCOUT (diff)
Update CMake to 3.5.0.
Announcement: https://blog.kitware.com/cmake-3-5-0-available-for-download/ Most ports have already been fixed for this update, but science/orthanc was included in this commit because I am not entirely sure the changes in it work with CMake < 3.5.0. In short, FindDCMTK.cmake was rewritten and the way orthanc uses the DCMTK variables was incompatible with the use upstream intended. PR: 208033
Notes
Notes: svn path=/head/; revision=411409
Diffstat (limited to 'science')
-rw-r--r--science/orthanc/Makefile1
-rw-r--r--science/orthanc/files/patch-Resources_CMake_DcmtkConfiguration.cmake22
2 files changed, 23 insertions, 0 deletions
diff --git a/science/orthanc/Makefile b/science/orthanc/Makefile
index 38e52b075a87..bba0052e6e9a 100644
--- a/science/orthanc/Makefile
+++ b/science/orthanc/Makefile
@@ -34,6 +34,7 @@ LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
libpugixml.so:${PORTSDIR}/textproc/pugixml
CMAKE_ARGS= -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \
+ -DDCMTK_DIR="${LOCALBASE}" \
-DDCMTK_DICTIONARY_DIR="${LOCALBASE}/share/dcmtk" \
-DUSE_SYSTEM_MONGOOSE=OFF \
-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=OFF
diff --git a/science/orthanc/files/patch-Resources_CMake_DcmtkConfiguration.cmake b/science/orthanc/files/patch-Resources_CMake_DcmtkConfiguration.cmake
new file mode 100644
index 000000000000..ddc0bcd7c684
--- /dev/null
+++ b/science/orthanc/files/patch-Resources_CMake_DcmtkConfiguration.cmake
@@ -0,0 +1,22 @@
+Fix the build with CMake 3.5.0.
+
+FindDCMTK.cmake was rewritten upstream, and is incompatible with the uses in
+this file: we need to set DCMTK_DIR in the port's Makefile, and it does not
+match the directory used for searching for the headers below.
+--- Resources/CMake/DcmtkConfiguration.cmake.orig 2015-12-15 16:49:02 UTC
++++ Resources/CMake/DcmtkConfiguration.cmake
+@@ -186,10 +186,10 @@ else()
+ -DHAVE_CONFIG_H=1
+ )
+
+- if (EXISTS "${DCMTK_DIR}/config/cfunix.h")
+- set(DCMTK_CONFIGURATION_FILE "${DCMTK_DIR}/config/cfunix.h")
+- elseif (EXISTS "${DCMTK_DIR}/config/osconfig.h") # This is for Arch Linux
+- set(DCMTK_CONFIGURATION_FILE "${DCMTK_DIR}/config/osconfig.h")
++ if (EXISTS "${DCMTK_config_INCLUDE_DIR}/cfunix.h")
++ set(DCMTK_CONFIGURATION_FILE "${DCMTK_config_INCLUDE_DIR}/cfunix.h")
++ elseif (EXISTS "${DCMTK_config_INCLUDE_DIR}/osconfig.h") # This is for Arch Linux
++ set(DCMTK_CONFIGURATION_FILE "${DCMTK_config_INCLUDE_DIR}/osconfig.h")
+ else()
+ message(FATAL_ERROR "Please install libdcmtk*-dev")
+ endif()