View | Details | Raw Unified | Return to bug 242546 | Differences between
and this patch

Collapse All | Expand All

(-)b/science/orthanc/Makefile (+57 lines)
Added Link Here
1
# Created by: maintainer.freebsd@xpoundit.com
2
3
PORTNAME=	orthanc
4
DISTVERSION=	1.9.3
5
CATEGORIES=	science
6
MASTER_SITES=	https://www.orthanc-server.com/downloads/get.php?path=/orthanc/
7
DISTNAME=	Orthanc-${PORTVERSION}
8
9
MAINTAINER=	maintainer.freebsd@xpoundit.com
10
COMMENT=	Orthanc is a DICOM server for healthcare and medical research
11
12
LICENSE=	GPLv3
13
LICENSE_FILE=	${WRKSRC}/COPYING
14
15
LIB_DEPENDS=	libboost_atomic.so:devel/boost-libs \
16
		libcivetweb.so:www/civetweb \
17
		libcurl.so:ftp/curl \
18
		libdcmtkcharls.so:graphics/dcmtk \
19
		libgtest.so:devel/googletest \
20
		libicuuc.so:devel/icu \
21
		libjsoncpp.so:devel/jsoncpp \
22
		libpng16.so:graphics/png \
23
		libpugixml.so:textproc/pugixml \
24
		libtiff.so:graphics/tiff \
25
		libuuid.so:misc/e2fsprogs-libuuid
26
27
USES=		cmake gnome iconv jpeg lua python:build sqlite ssl
28
USE_GNOME=	libxml2
29
USE_LDCONFIG=	yes
30
31
WRKSRC=		${WRKDIR}/Orthanc-${PORTVERSION}
32
33
CMAKE_SOURCE_PATH=	${WRKSRC}/OrthancServer
34
CMAKE_OFF=	BUILD_CONNECTIVITY_CHECKS UNIT_TESTS_WITH_HTTP_CONNEXIONS
35
CMAKE_ON=	USE_SYSTEM_BOOST USE_SYSTEM_CIVETWEB USE_SYSTEM_DCMTK \
36
		USE_SYSTEM_GOOGLE_TEST USE_SYSTEM_JSONCPP USE_SYSTEM_LIBICONV \
37
		USE_SYSTEM_LIBJPEG USE_SYSTEM_LIBPNG USE_SYSTEM_LUA \
38
		USE_SYSTEM_OPENSSL USE_SYSTEM_PUGIXML USE_SYSTEM_SQLITE \
39
		USE_SYSTEM_UUID USE_SYSTEM_ZLIB
40
CFLAGS+=	-DNDEBUG
41
CXXFLAGS+=	-DNDEBUG
42
43
USE_RC_SUBR=	orthanc
44
45
USERS=		orthanc
46
GROUPS=		orthanc
47
48
PLIST_SUB+=	PORTVERSION=${PORTVERSION}
49
50
post-install:
51
	${MKDIR} ${STAGEDIR}/var/db/orthanc/db/db-v5
52
	${MKDIR} ${STAGEDIR}${DATADIR}/plugins
53
	${MKDIR} ${STAGEDIR}${ETCDIR}
54
	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${CMAKE_SOURCE_PATH}/Resources/Configuration.json
55
	${CP} ${CMAKE_SOURCE_PATH}/Resources/Configuration.json ${STAGEDIR}${ETCDIR}/orthanc.json.sample
56
57
.include <bsd.port.mk>
(-)b/science/orthanc/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1620899601
2
SHA256 (Orthanc-1.9.3.tar.gz) = 41cc35a3d15ecb0d7b834e8e28a740cc4ffa1f333c019a764228d60e96608960
3
SIZE (Orthanc-1.9.3.tar.gz) = 1818313
(-)b/science/orthanc/files/orthanc.in (+40 lines)
Added Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: orthanc
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# to enable this service:
11
#
12
# orthanc_enable (bool):	Set to NO by default.
13
#				Set it to YES to enable Orthanc.
14
# orthanc_flags (str):		Set to %%ETCDIR%%/orthanc.json
15
#				by default.
16
17
. /etc/rc.subr
18
19
name=orthanc
20
rcvar=orthanc_enable
21
desc="RESTful DICOM server for healthcare and medical research"
22
23
load_rc_config $name
24
25
: ${orthanc_enable:=NO}
26
: ${orthanc_flags="%%ETCDIR%%/orthanc.json"}
27
28
start_precmd=orthanc_prestart
29
pidfile=/var/run/orthanc.pid
30
procname=%%PREFIX%%/sbin/Orthanc
31
command=/usr/sbin/daemon
32
command_args=" -f -p ${pidfile} -u orthanc ${procname} ${orthanc_flags}"
33
34
orthanc_prestart()
35
{
36
	# Have to empty rc_flags so they don't get passed to daemon(8)
37
	rc_flags=""
38
}
39
40
run_rc_command "$1"
(-)b/science/orthanc/files/patch-OrthancFramework_Resources_CMake_CivetwebConfiguration.cmake (+64 lines)
Added Link Here
1
--- OrthancFramework/Resources/CMake/CivetwebConfiguration.cmake.orig	2021-05-12 13:54:35 UTC
2
+++ OrthancFramework/Resources/CMake/CivetwebConfiguration.cmake
3
@@ -98,32 +98,38 @@ else()
4
 
5
   cmake_reset_check_state()
6
   set(CMAKE_REQUIRED_LIBRARIES dl pthread)
7
-  CHECK_LIBRARY_EXISTS(civetweb mg_start "" HAVE_CIVETWEB_LIB)
8
-  if (NOT HAVE_CIVETWEB_LIB)
9
-    message(FATAL_ERROR "Please install the libcivetweb-dev package")
10
-  endif()
11
 
12
-  link_libraries(civetweb)
13
+  find_library(CIVETWEB_LIB NAMES civetweb PATHS
14
+    /usr/lib
15
+    /usr/local/lib
16
+  )
17
 
18
-  # Check whether the system distribution of civetweb contains the
19
-  # patch "../Patches/civetweb-1.13.patch" that allows to disable
20
-  # keep-alive on selected HTTP connections. This is useful to speed
21
-  # up multipart transfers, as encountered in DICOMweb.
22
-  CHECK_LIBRARY_EXISTS(civetweb mg_disable_keep_alive "" CIVETWEB_HAS_DISABLE_KEEP_ALIVE_1)  # From "../Patches/civetweb-1.13.patch"
23
-  CHECK_LIBRARY_EXISTS(civetweb mg_disable_connection_keep_alive "" CIVETWEB_HAS_DISABLE_KEEP_ALIVE_2)  # From civetweb >= 1.14
24
-  if (CIVETWEB_HAS_DISABLE_KEEP_ALIVE_1 OR
25
-      CIVETWEB_HAS_DISABLE_KEEP_ALIVE_2)
26
-    add_definitions(
27
-      -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1
28
-      -DCIVETWEB_HAS_WEBDAV_WRITING=1
29
-      )
30
-    message("Performance: Your system-wide distribution of civetweb is configured for best performance")
31
+  if (CIVETWEB_LIB)
32
+    CHECK_LIBRARY_EXISTS(${CIVETWEB_LIB} mg_start "" HAVE_CIVETWEB_LIB)
33
+    if (NOT HAVE_CIVETWEB_LIB)
34
+      message(FATAL_ERROR "Unable to use mg_start from civetweb library")
35
+    endif()
36
+
37
+    CHECK_LIBRARY_EXISTS(${CIVETWEB_LIB} mg_disable_keep_alive "" CIVETWEB_HAS_DISABLE_KEEP_ALIVE)
38
+    if (CIVETWEB_HAS_DISABLE_KEEP_ALIVE)
39
+      add_definitions(
40
+        -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=1
41
+        -DCIVETWEB_HAS_WEBDAV_WRITING=1
42
+        )
43
+      message("Performance: Your system-wide distribution of civetweb is configured for best performance")
44
+    else()
45
+      message(WARNING "Performance: Your system-wide distribution of civetweb does not feature the mg_disable_keep_alive() function, and WebDAV will only be available for read-only access")
46
+      add_definitions(
47
+        -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=0
48
+        -DCIVETWEB_HAS_WEBDAV_WRITING=0
49
+        )
50
+    endif()
51
+
52
+    get_filename_component(CIVETWEB_LIB_PATH ${CIVETWEB_LIB} DIRECTORY)
53
+    link_directories(${CIVETWEB_LIB_PATH})
54
+    link_libraries(civetweb)
55
   else()
56
-    message(WARNING "Performance: Your system-wide distribution of civetweb does not feature the mg_disable_keep_alive() function, and WebDAV will only be available for read-only access")
57
-    add_definitions(
58
-      -DCIVETWEB_HAS_DISABLE_KEEP_ALIVE=0
59
-      -DCIVETWEB_HAS_WEBDAV_WRITING=0
60
-      )
61
+    message(FATAL_ERROR "Unable to find the civetweb library")
62
   endif()
63
 
64
   unset(CMAKE_REQUIRED_LIBRARIES)  # This reset must be after "CHECK_LIBRARY_EXISTS"
(-)b/science/orthanc/files/patch-OrthancServer_Resources_Configuration.json (+25 lines)
Added Link Here
1
--- OrthancServer/Resources/Configuration.json.orig	2021-01-29 09:36:16 UTC
2
+++ OrthancServer/Resources/Configuration.json
3
@@ -10,12 +10,12 @@
4
   // Path to the directory that holds the heavyweight files (i.e. the
5
   // raw DICOM instances). Backslashes must be either escaped by
6
   // doubling them, or replaced by forward slashes "/".
7
-  "StorageDirectory" : "OrthancStorage",
8
+  "StorageDirectory" : "/var/db/orthanc/db-v5",
9
 
10
   // Path to the directory that holds the SQLite index (if unset, the
11
   // value of StorageDirectory is used). This index could be stored on
12
   // a RAM-drive or a SSD device for performance reasons.
13
-  "IndexDirectory" : "OrthancStorage",
14
+  "IndexDirectory" : "/var/db/orthanc/db-v5",
15
 
16
   // Path to the directory where Orthanc stores its large temporary
17
   // files. The content of this folder can be safely deleted once
18
@@ -53,6 +53,7 @@
19
   // find shared libraries. Backslashes must be either escaped by
20
   // doubling them, or replaced by forward slashes "/".
21
   "Plugins" : [
22
+    "%%PREFIX%%/share/orthanc/plugins/"
23
   ],
24
 
25
   // Maximum number of processing jobs that are simultaneously running
(-)b/science/orthanc/pkg-descr (+23 lines)
Added Link Here
1
Orthanc aims at providing a simple, yet powerful standalone DICOM server. It
2
is designed to improve the DICOM flows in hospitals and to support research
3
about the automated analysis of medical images. Orthanc lets its users focus
4
on the content of the DICOM files, hiding the complexity of the DICOM format
5
and of the DICOM protocol.
6
7
Orthanc can turn any computer running Windows, Linux, FreeBSD or OS X into a
8
DICOM store (in other words, a mini-PACS system). Its architecture is
9
lightweight and standalone, meaning that no complex database administration
10
is required, nor the installation of third-party dependencies.
11
12
What makes Orthanc unique is the fact that it provides a RESTful API. Thanks
13
to this major feature, it is possible to drive Orthanc from any computer
14
language. The DICOM tags of the stored medical images can be downloaded in
15
the JSON file format. Furthermore, standard PNG images can be generated
16
on-the-fly from the DICOM instances by Orthanc.
17
18
Orthanc also features a plugin mechanism to add new modules that extends the
19
core capabilities of its REST API. A Web viewer, a PostgreSQL database
20
back-end, a MySQL database back-end, and a reference implementation of
21
DICOMweb are currently freely available as plugins.
22
23
WWW: https://www.orthanc-server.com/
(-)b/science/orthanc/pkg-plist (+18 lines)
Added Link Here
1
@owner orthanc
2
@group orthanc
3
@mode 700
4
@dir %%DATADIR%%/plugins
5
@dir /var/db/orthanc/db/db-v5
6
@dir /var/db/orthanc/db
7
@dir /var/db/orthanc
8
@mode 600
9
@sample %%ETCDIR%%/orthanc.json.sample
10
@mode
11
bin/OrthancRecoverCompressedFile
12
include/orthanc/OrthancCDatabasePlugin.h
13
include/orthanc/OrthancCPlugin.h
14
sbin/Orthanc
15
%%DATADIR%%/plugins/libModalityWorklists.so
16
%%DATADIR%%/plugins/libModalityWorklists.so.%%PORTVERSION%%
17
%%DATADIR%%/plugins/libServeFolders.so
18
%%DATADIR%%/plugins/libServeFolders.so.%%PORTVERSION%%

Return to bug 242546