Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2015 14:07:32 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388534 - in head: . science science/orthanc science/orthanc/files
Message-ID:  <201506041407.t54E7WZu094033@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Thu Jun  4 14:07:31 2015
New Revision: 388534
URL: https://svnweb.freebsd.org/changeset/ports/388534

Log:
  - Add science/orthanc
  
  Orthanc aims at providing a simple, yet powerful standalone DICOM
  server. It is designed to improve the DICOM flows in hospitals and to
  support research about the automated analysis of medical images.
  
  Orthanc can turn any computer running Windows, Linux, FreeBSD or OS X
  into a DICOM store (in other words, a mini-PACS system). Its
  architecture is lightweight and standalone, meaning that no complex
  database administration is required, nor the installation of third-party
  dependencies.
  
  What makes Orthanc unique is the fact that it provides a RESTful API.
  Thanks to this major feature, it is possible to drive Orthanc from any
  computer language. The DICOM tags of the stored medical images can be
  downloaded in the JSON file format. Furthermore, standard PNG images can
  be generated on-the-fly from the DICOM instances by Orthanc.
  
  Orthanc lets its users focus on the content of the DICOM files, hiding
  the complexity of the DICOM format and of the DICOM protocol.
  
  WWW: http://www.orthanc-server.com/
  
  PR:		199146
  Submitted by:	mp39590@gmail.com

Added:
  head/science/orthanc/
  head/science/orthanc/Makefile   (contents, props changed)
  head/science/orthanc/distinfo   (contents, props changed)
  head/science/orthanc/files/
  head/science/orthanc/files/orthanc.in   (contents, props changed)
  head/science/orthanc/files/patch-CMakeLists.txt   (contents, props changed)
  head/science/orthanc/files/patch-Core_Compression_HierarchicalZipWriter.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Core_ImageFormats_ImageProcessing.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Core_MultiThreading_Mutex.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Core_MultiThreading_ThreadedCommandProcessor.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Core_Toolbox.cpp   (contents, props changed)
  head/science/orthanc/files/patch-OrthancServer_Internals_StoreScp.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Plugins_Engine_PluginsManager.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Plugins_Engine_SharedLibrary.cpp   (contents, props changed)
  head/science/orthanc/files/patch-Resources_CMake_AutoGeneratedCode.cmake   (contents, props changed)
  head/science/orthanc/files/patch-Resources_CMake_BoostConfiguration.cmake   (contents, props changed)
  head/science/orthanc/files/patch-Resources_CMake_Compiler.cmake   (contents, props changed)
  head/science/orthanc/files/patch-Resources_CMake_SQLiteConfiguration.cmake   (contents, props changed)
  head/science/orthanc/files/patch-Resources_Configuration.json   (contents, props changed)
  head/science/orthanc/pkg-descr   (contents, props changed)
  head/science/orthanc/pkg-plist   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/science/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Thu Jun  4 13:29:44 2015	(r388533)
+++ head/GIDs	Thu Jun  4 14:07:31 2015	(r388534)
@@ -159,6 +159,7 @@ backuppc:*:300:
 _sphinx:*:312:
 dkfilter:*:325:
 smfs:*:326:
+orthanc:*:330:
 daapd:*:337:
 murmur:*:338:
 wildfire:*:340:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Thu Jun  4 13:29:44 2015	(r388533)
+++ head/UIDs	Thu Jun  4 14:07:31 2015	(r388534)
@@ -165,6 +165,7 @@ backuppc:*:300:300::0:0:BackupPC pseudo-
 _sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin
 dkfilter:*:325:325::0:0:DK Filter Owner:/nonexistent:/usr/sbin/nologin
 smfs:*:326:326::0:0:SMFSAV Owner:/nonexistent:/usr/sbin/nologin
+orthanc:*:330:330::0:0:Orthanc Daemon:/nonexistent:/usr/sbin/nologin
 _pma:*:336:80::0:0:phpMyAdmin Owner:/nonexistent:/usr/sbin/nologin
 daapd:*:337:337::0:0:daapd User:/nonexistent:/usr/sbin/nologin
 murmur:*:338:338::0:0:& User:/nonexistent:/usr/sbin/nologin

Modified: head/science/Makefile
==============================================================================
--- head/science/Makefile	Thu Jun  4 13:29:44 2015	(r388533)
+++ head/science/Makefile	Thu Jun  4 14:07:31 2015	(r388534)
@@ -97,6 +97,7 @@
     SUBDIR += nifticlib
     SUBDIR += openbabel
     SUBDIR += openkim
+    SUBDIR += orthanc
     SUBDIR += p5-Algorithm-SVMLight
     SUBDIR += p5-Chemistry-3DBuilder
     SUBDIR += p5-Chemistry-Bond-Find

Added: head/science/orthanc/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/Makefile	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,63 @@
+# Created by: mp39590@gmail.com
+# $FreeBSD$
+
+PORTNAME=	orthanc
+PORTVERSION=	0.8.6
+CATEGORIES=	science graphics net
+MASTER_SITES=	SF/orthancserver/:main \
+		http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/:mongoose
+DISTFILES=	Orthanc-${PORTVERSION}.tar.gz:main \
+		mongoose-3.8.tgz:mongoose
+DIST_SUBDIR=	${PORTNAME}
+
+MAINTAINER=	mp39590@gmail.com
+COMMENT=	RESTful DICOM server for healthcare and medical research
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
+		libjsoncpp.so:${PORTSDIR}/devel/jsoncpp \
+		libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid \
+		libglog.so:${PORTSDIR}/devel/glog \
+		libboost_filesystem.so:${PORTSDIR}/devel/boost-libs \
+		libdcmimage.so:${PORTSDIR}/devel/dcmtk \
+		libsqlite3.so:${PORTSDIR}/databases/sqlite3 \
+		libpugixml.so:${PORTSDIR}/textproc/pugixml
+
+CMAKE_ARGS=	-DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \
+		-DDCMTK_DICTIONARY_DIR="${LOCALBASE}/share/dcmtk" \
+		-DUSE_SYSTEM_MONGOOSE=OFF \
+		-DBUILD_UNIT_TESTS=OFF
+
+USES=		cmake:outsource python:build lua:51 dos2unix
+DOS2UNIX_FILES=	CMakeLists.txt
+CFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/jsoncpp
+LDFLAGS+=	-L${LOCALBASE}/lib
+USE_LDCONFIG=	yes
+USE_OPENSSL=	yes
+USE_RC_SUBR=	orthanc
+WRKSRC=		${WRKDIR}/Orthanc-${PORTVERSION}
+USERS=		orthanc
+GROUPS=		orthanc
+
+# This is mongoose sources, downloaded from Orthanc author homepage.  Orthanc
+# requires mongoose webserver, but after version 3.8, mongoose developers has
+# changed the license from MIT to GPLv2 only. This action made illegal to
+# combine new mongoose versions with GPLv3 only Orthanc.
+# We download sources manually and pass USE_SYSTEM_MONGOOSE=OFF to Orthanc
+# cmake variables to tell that mongoose is not presented on the host OS and
+# should be build together with the software instead.
+# https://www.mail-archive.com/mongoose-users@googlegroups.com/msg00625.html
+post-extract:
+	${MKDIR} ${WRKSRC}/ThirdPartyDownloads
+	${CP} ${DISTDIR}/${DIST_SUBDIR}/mongoose-3.8.tgz ${WRKSRC}/ThirdPartyDownloads
+
+post-install:
+	${MKDIR} ${STAGEDIR}/var/db/orthanc/db/db-v5
+	${MKDIR} ${STAGEDIR}${DATADIR}/plugins
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+	${WRKSRC}/Resources/Configuration.json > ${STAGEDIR}${ETCDIR}/orthanc.json.sample
+
+.include <bsd.port.mk>

Added: head/science/orthanc/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/distinfo	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,4 @@
+SHA256 (orthanc/Orthanc-0.8.6.tar.gz) = 0668e23dbdf4aa12bf417cf22bfb7b50379797fc6b1132a582789289d1728e69
+SIZE (orthanc/Orthanc-0.8.6.tar.gz) = 716036
+SHA256 (orthanc/mongoose-3.8.tgz) = 6afc2c377614a01a24b78560a62d1316b29372afe08eae3715b56c877be71c6e
+SIZE (orthanc/mongoose-3.8.tgz) = 1577314

Added: head/science/orthanc/files/orthanc.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/orthanc.in	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: orthanc
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# orthanc_enable (bool):	Set to NO by default.
+#				Set it to YES to enable Orthanc.
+# orthanc_flags (str):		Set to %%ETCDIR%%/orthanc.json
+#				by default.
+
+. /etc/rc.subr
+
+name=orthanc
+rcvar=orthanc_enable
+desc="RESTful DICOM server for healthcare and medical research"
+
+load_rc_config $name
+
+: ${orthanc_enable:=NO}
+: ${orthanc_flags="%%ETCDIR%%/orthanc.json"}
+
+start_precmd=orthanc_prestart
+pidfile=/var/run/orthanc.pid
+procname=%%PREFIX%%/sbin/Orthanc
+command=/usr/sbin/daemon
+command_args=" -f -p ${pidfile} -u orthanc ${procname} ${orthanc_flags}"
+
+orthanc_prestart()
+{
+	# Have to empty rc_flags so they don't get passed to daemon(8)
+	rc_flags=""
+}
+
+run_rc_command "$1"

Added: head/science/orthanc/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-CMakeLists.txt	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,61 @@
+--- CMakeLists.txt.orig	2015-02-12 13:47:38 UTC
++++ CMakeLists.txt
+@@ -20,6 +20,7 @@ SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allo
+ SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
+ SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression")
+ SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression")
++SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build UnitTests binary")
+ 
+ # Advanced parameters to fine-tune linking against system libraries
+ SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
+@@ -359,22 +360,24 @@ install(
+ ## Build the unit tests
+ #####################################################################
+ 
+-if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
+-  add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
+-else()
+-  add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0)
+-endif()
+-
+-add_definitions(-DORTHANC_BUILD_UNIT_TESTS=1)
+-include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
+-add_executable(UnitTests
+-  ${GTEST_SOURCES}
+-  ${ORTHANC_UNIT_TESTS_SOURCES}
+-  )
+-target_link_libraries(UnitTests ServerLibrary CoreLibrary ${STATIC_LUA} ${STATIC_GOOGLE_LOG})
+-
+-if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
+-  target_link_libraries(UnitTests OpenSSL)
++if (BUILD_UNIT_TESTS)
++  if (UNIT_TESTS_WITH_HTTP_CONNEXIONS)
++    add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=1)
++  else()
++    add_definitions(-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=0)
++  endif()
++  
++  add_definitions(-DORTHANC_BUILD_UNIT_TESTS=1)
++  include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
++  add_executable(UnitTests
++    ${GTEST_SOURCES}
++    ${ORTHANC_UNIT_TESTS_SOURCES}
++    )
++  target_link_libraries(UnitTests ServerLibrary CoreLibrary ${STATIC_LUA} ${STATIC_GOOGLE_LOG})
++  
++  if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
++    target_link_libraries(UnitTests OpenSSL)
++  endif()
+ endif()
+ 
+ 
+@@ -443,7 +446,8 @@ if (BUILD_CLIENT_LIBRARY)
+         )
+     endif()
+ 
+-  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
++  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
++          ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+     # TODO
+     target_link_libraries(OrthancClient pthread)
+ 

Added: head/science/orthanc/files/patch-Core_Compression_HierarchicalZipWriter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Core_Compression_HierarchicalZipWriter.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,11 @@
+--- Core/Compression/HierarchicalZipWriter.cpp.orig	2015-02-12 13:47:38 UTC
++++ Core/Compression/HierarchicalZipWriter.cpp
+@@ -53,7 +53,7 @@ namespace Orthanc
+       if (c == '^')
+         c = ' ';
+ 
+-      if (c < 128 && 
++      if (c <= 127 &&
+           c >= 0)
+       {
+         if (isspace(c)) 

Added: head/science/orthanc/files/patch-Core_ImageFormats_ImageProcessing.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Core_ImageFormats_ImageProcessing.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,11 @@
+--- Core/ImageFormats/ImageProcessing.cpp.orig	2015-02-12 13:47:38 UTC
++++ Core/ImageFormats/ImageProcessing.cpp
+@@ -209,7 +209,7 @@ namespace Orthanc
+   void MultiplyConstantInternal(ImageAccessor& image,
+                                 float factor)
+   {
+-    if (abs(factor - 1.0f) <= std::numeric_limits<float>::epsilon())
++    if (std::abs(factor - 1.0f) <= std::numeric_limits<float>::epsilon())
+     {
+       return;
+     }

Added: head/science/orthanc/files/patch-Core_MultiThreading_Mutex.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Core_MultiThreading_Mutex.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,20 @@
+--- Core/MultiThreading/Mutex.cpp.orig	2015-02-12 13:47:38 UTC
++++ Core/MultiThreading/Mutex.cpp
+@@ -37,7 +37,7 @@
+ 
+ #if defined(_WIN32)
+ #include <windows.h>
+-#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
++#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__FreeBSD__)
+ #include <pthread.h>
+ #else
+ #error Support your platform here
+@@ -75,7 +75,7 @@ namespace Orthanc
+   }
+ 
+ 
+-#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
++#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__FreeBSD__)
+ 
+   struct Mutex::PImpl
+   {

Added: head/science/orthanc/files/patch-Core_MultiThreading_ThreadedCommandProcessor.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Core_MultiThreading_ThreadedCommandProcessor.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,11 @@
+--- Core/MultiThreading/ThreadedCommandProcessor.cpp.orig	2015-02-12 13:47:38 UTC
++++ Core/MultiThreading/ThreadedCommandProcessor.cpp
+@@ -175,7 +175,7 @@ namespace Orthanc
+   {
+     boost::mutex::scoped_lock lock(mutex_);
+ 
+-    while (!remainingCommands_ == 0)
++    while (remainingCommands_ != 0)
+     {
+       processedCommand_.wait(lock);
+     }

Added: head/science/orthanc/files/patch-Core_Toolbox.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Core_Toolbox.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,38 @@
+--- Core/Toolbox.cpp.orig	2015-02-12 13:47:38 UTC
++++ Core/Toolbox.cpp
+@@ -59,7 +59,7 @@
+ #include <limits.h>      /* PATH_MAX */
+ #endif
+ 
+-#if defined(__linux) || defined(__FreeBSD_kernel__)
++#if defined(__linux) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+ #include <limits.h>      /* PATH_MAX */
+ #include <signal.h>
+ #include <unistd.h>
+@@ -116,7 +116,7 @@ namespace Orthanc
+   {
+ #if defined(_WIN32)
+     ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000)));
+-#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+     usleep(microSeconds);
+ #else
+ #error Support your platform here
+@@ -503,7 +503,7 @@ namespace Orthanc
+     return std::string(&buffer[0]);
+   }
+ 
+-#elif defined(__linux) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+   static std::string GetPathToExecutableInternal()
+   {
+     std::vector<char> buffer(PATH_MAX + 1);
+@@ -633,7 +633,7 @@ namespace Orthanc
+     result.reserve(source.size() + 1);
+     for (size_t i = 0; i < source.size(); i++)
+     {
+-      if (source[i] < 128 && source[i] >= 0 && !iscntrl(source[i]))
++      if (source[i] <= 127 && source[i] >= 0 && !iscntrl(source[i]))
+       {
+         result.push_back(source[i]);
+       }

Added: head/science/orthanc/files/patch-OrthancServer_Internals_StoreScp.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-OrthancServer_Internals_StoreScp.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,11 @@
+--- OrthancServer/Internals/StoreScp.cpp.orig	2015-02-12 13:47:38 UTC
++++ OrthancServer/Internals/StoreScp.cpp
+@@ -182,7 +182,7 @@ namespace Orthanc
+ 
+           // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond
+           // to those mentioned in the request. If not, set the status in the response message variable.
+-          if ((rsp->DimseStatus == STATUS_Success))
++          if (rsp->DimseStatus == STATUS_Success)
+           {
+             // which SOP class and SOP instance ?
+             if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse))

Added: head/science/orthanc/files/patch-Plugins_Engine_PluginsManager.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Plugins_Engine_PluginsManager.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,11 @@
+--- Plugins/Engine/PluginsManager.cpp.orig	2015-02-12 13:47:38 UTC
++++ Plugins/Engine/PluginsManager.cpp
+@@ -42,7 +42,7 @@
+ 
+ #ifdef WIN32
+ #define PLUGIN_EXTENSION ".dll"
+-#elif defined(__linux) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+ #define PLUGIN_EXTENSION ".so"
+ #elif defined(__APPLE__) && defined(__MACH__)
+ #define PLUGIN_EXTENSION ".dylib"

Added: head/science/orthanc/files/patch-Plugins_Engine_SharedLibrary.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Plugins_Engine_SharedLibrary.cpp	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,38 @@
+--- Plugins/Engine/SharedLibrary.cpp.orig	2015-02-12 13:47:38 UTC
++++ Plugins/Engine/SharedLibrary.cpp
+@@ -36,7 +36,7 @@
+ 
+ #if defined(_WIN32)
+ #include <windows.h>
+-#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+ #include <dlfcn.h>
+ #else
+ #error Support your platform here
+@@ -58,7 +58,7 @@ namespace Orthanc
+       throw OrthancException(ErrorCode_SharedLibrary);
+     }
+ 
+-#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+     handle_ = ::dlopen(path.c_str(), RTLD_NOW);
+     if (handle_ == NULL) 
+     {
+@@ -84,7 +84,7 @@ namespace Orthanc
+     {
+ #if defined(_WIN32)
+       ::FreeLibrary((HMODULE)handle_);
+-#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+       ::dlclose(handle_);
+ #else
+ #error Support your platform here
+@@ -102,7 +102,7 @@ namespace Orthanc
+ 
+ #if defined(_WIN32)
+     return ::GetProcAddress((HMODULE)handle_, name.c_str());
+-#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__)
++#elif defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+     return ::dlsym(handle_, name.c_str());
+ #else
+ #error Support your platform here

Added: head/science/orthanc/files/patch-Resources_CMake_AutoGeneratedCode.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Resources_CMake_AutoGeneratedCode.cmake	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,19 @@
+--- Resources/CMake/AutoGeneratedCode.cmake.orig	2015-02-12 13:47:38 UTC
++++ Resources/CMake/AutoGeneratedCode.cmake
+@@ -3,6 +3,7 @@ set(AUTOGENERATED_SOURCES)
+ 
+ file(MAKE_DIRECTORY ${AUTOGENERATED_DIR})
+ include_directories(${AUTOGENERATED_DIR})
++include(FindPythonInterp)
+ 
+ macro(EmbedResources)
+   # Convert a semicolon separated list to a whitespace separated string
+@@ -26,7 +27,7 @@ macro(EmbedResources)
+     "${TARGET_BASE}.h"
+     "${TARGET_BASE}.cpp"
+     COMMAND 
+-    python
++    ${PYTHON_EXECUTABLE}
+     "${CMAKE_CURRENT_SOURCE_DIR}/Resources/EmbedResources.py"
+     "${AUTOGENERATED_DIR}/EmbeddedResources"
+     ${SCRIPT_ARGUMENTS}

Added: head/science/orthanc/files/patch-Resources_CMake_BoostConfiguration.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Resources_CMake_BoostConfiguration.cmake	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,10 @@
+--- Resources/CMake/BoostConfiguration.cmake.orig	2015-02-12 13:47:38 UTC
++++ Resources/CMake/BoostConfiguration.cmake
+@@ -56,6 +56,7 @@ if (BOOST_STATIC)
+ 
+   if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
+       ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
++      ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
+       ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
+     list(APPEND BOOST_SOURCES
+       ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp

Added: head/science/orthanc/files/patch-Resources_CMake_Compiler.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Resources_CMake_Compiler.cmake	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,21 @@
+--- Resources/CMake/Compiler.cmake.orig	2015-02-12 13:47:38 UTC
++++ Resources/CMake/Compiler.cmake
+@@ -4,7 +4,8 @@ if (${CMAKE_COMPILER_IS_GNUCXX})
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-long-long -Wno-implicit-function-declaration")  
+   # --std=c99 makes libcurl not to compile
+   # -pedantic gives a lot of warnings on OpenSSL 
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-long-long -Wno-variadic-macros")
++  # with -pedantic we failing to build headers from boost, which have comma at the end of enum's
++  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wno-variadic-macros")
+ 
+   if (CMAKE_CROSSCOMPILING)
+     # http://stackoverflow.com/a/3543845/881731
+@@ -79,6 +80,8 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "D
+     )
+   link_libraries(iconv)
+ 
++elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
++  link_libraries(uuid pthread)
+ endif()
+ 
+ 

Added: head/science/orthanc/files/patch-Resources_CMake_SQLiteConfiguration.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Resources_CMake_SQLiteConfiguration.cmake	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,15 @@
+--- Resources/CMake/SQLiteConfiguration.cmake.orig	2015-02-12 13:47:38 UTC
++++ Resources/CMake/SQLiteConfiguration.cmake
+@@ -28,8 +28,11 @@ else()
+     message(FATAL_ERROR "Please install the libsqlite3-dev package")
+   endif()
+ 
++  find_path(SQLITE_INCLUDE_DIR sqlite3.h)
++  message("SQLite include dir: ${SQLITE_INCLUDE_DIR}")
++
+   # Autodetection of the version of SQLite
+-  file(STRINGS "/usr/include/sqlite3.h" SQLITE_VERSION_NUMBER1 REGEX "#define SQLITE_VERSION_NUMBER.*$")    
++  file(STRINGS "${SQLITE_INCLUDE_DIR}/sqlite3.h" SQLITE_VERSION_NUMBER1 REGEX "#define SQLITE_VERSION_NUMBER.*$")
+   string(REGEX REPLACE "#define SQLITE_VERSION_NUMBER(.*)$" "\\1" SQLITE_VERSION_NUMBER ${SQLITE_VERSION_NUMBER1})
+ 
+   message("Detected version of SQLite: ${SQLITE_VERSION_NUMBER}")

Added: head/science/orthanc/files/patch-Resources_Configuration.json
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/files/patch-Resources_Configuration.json	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,25 @@
+--- Resources/Configuration.json.orig	2015-02-12 13:47:38 UTC
++++ Resources/Configuration.json
+@@ -9,12 +9,12 @@
+ 
+   // Path to the directory that holds the heavyweight files
+   // (i.e. the raw DICOM instances)
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/db/orthanc/db-v5",
+ 
+   // Path to the directory that holds the SQLite index (if unset,
+   // the value of StorageDirectory is used). This index could be
+   // stored on a RAM-drive or a SSD device for performance reasons.
+-  "IndexDirectory" : "OrthancStorage",
++  "IndexDirectory" : "/var/db/orthanc/db-v5",
+ 
+   // Enable the transparent compression of the DICOM instances
+   "StorageCompression" : false,
+@@ -39,6 +39,7 @@
+   // folders, in which case they will be scanned non-recursively to
+   // find shared libraries.
+   "Plugins" : [
++    "%%PREFIX%%/share/orthanc/plugins/"
+   ],
+ 
+ 

Added: head/science/orthanc/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/pkg-descr	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,20 @@
+Orthanc aims at providing a simple, yet powerful standalone DICOM
+server. It is designed to improve the DICOM flows in hospitals and to
+support research about the automated analysis of medical images.
+
+Orthanc can turn any computer running Windows, Linux, FreeBSD or OS X
+into a DICOM store (in other words, a mini-PACS system). Its
+architecture is lightweight and standalone, meaning that no complex
+database administration is required, nor the installation of third-party
+dependencies.
+
+What makes Orthanc unique is the fact that it provides a RESTful API.
+Thanks to this major feature, it is possible to drive Orthanc from any
+computer language. The DICOM tags of the stored medical images can be
+downloaded in the JSON file format. Furthermore, standard PNG images can
+be generated on-the-fly from the DICOM instances by Orthanc.
+
+Orthanc lets its users focus on the content of the DICOM files, hiding
+the complexity of the DICOM format and of the DICOM protocol. 
+
+WWW: http://www.orthanc-server.com/

Added: head/science/orthanc/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/orthanc/pkg-plist	Thu Jun  4 14:07:31 2015	(r388534)
@@ -0,0 +1,12 @@
+@dir(orthanc,orthanc,700) %%DATADIR%%/plugins
+@dir(orthanc,orthanc,700) /var/db/orthanc/db/db-v5
+@dir(orthanc,orthanc,700) /var/db/orthanc/db
+@dir(orthanc,orthanc,700) /var/db/orthanc
+@sample(orthanc,orthanc,600) %%ETCDIR%%/orthanc.json.sample
+include/orthanc/OrthancCDatabasePlugin.h
+include/orthanc/OrthancCPlugin.h
+include/orthanc/OrthancCppClient.h
+include/orthanc/OrthancCppDatabasePlugin.h
+lib/libOrthancClient.so
+lib/libOrthancClient.so.0.8
+sbin/Orthanc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506041407.t54E7WZu094033>