science/orthanc: Update to 1.12.9 and unbreak

Fix service start based on:
    https://orthanc.uclouvain.be/bugs/show_bug.cgi?id=227
Improve RC script to allow user flags
Fix mismatched db paths
Release notes:
    https://orthanc.uclouvain.be/hg/orthanc/file/Orthanc-1.12.9/NEWS

PR:             290458 275624 275623 275622
Approved by:    portmgr (blanket, unbreak)
This commit is contained in:
Jason W. Bacon 2025-10-24 19:50:01 -05:00
parent 60cacedb31
commit d2dff49036
6 changed files with 23 additions and 27 deletions

View File

@ -1,6 +1,5 @@
PORTNAME= orthanc
DISTVERSION= 1.12.6
PORTREVISION= 4
DISTVERSION= 1.12.9
CATEGORIES= science
MASTER_SITES= https://orthanc.uclouvain.be/downloads/sources/orthanc/
DISTNAME= Orthanc-${PORTVERSION}
@ -12,24 +11,19 @@ WWW= https://www.orthanc-server.com/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= protoc:devel/protobuf
BUILD_DEPENDS= protoc:devel/protobuf \
googletest>0:devel/googletest
LIB_DEPENDS= libboost_atomic.so:devel/boost-libs \
libcivetweb.so:www/civetweb \
libcurl.so:ftp/curl \
libdcmtkcharls.so:graphics/dcmtk \
libgtest.so:devel/googletest \
libicuuc.so:devel/icu \
libjsoncpp.so:devel/jsoncpp \
libpng16.so:graphics/png \
libprotobuf.so:devel/protobuf \
libpugixml.so:textproc/pugixml \
libtiff.so:graphics/tiff \
libuuid.so:misc/libuuid
USES= cmake gnome iconv jpeg lua python:build sqlite ssl
USE_GNOME= libxml2
USE_LDCONFIG= yes
USE_RC_SUBR= orthanc

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1739138261
SHA256 (Orthanc-1.12.6.tar.gz) = aa5b6d6309965ed360625b5572e79068e6c501b603163e330629f2f0a56a0fe9
SIZE (Orthanc-1.12.6.tar.gz) = 2089779
TIMESTAMP = 1761178767
SHA256 (Orthanc-1.12.9.tar.gz) = 7a7cbc5f3663939fbef31ded021b36fcd52420337911ed43491bb663bcb5a4b2
SIZE (Orthanc-1.12.9.tar.gz) = 2165182

View File

@ -23,13 +23,13 @@ desc="Lightweight DICOM server for healthcare and medical research"
load_rc_config $name
: ${orthanc_enable:=NO}
: ${orthanc_flags="%%ETCDIR%%/orthanc.json"}
: ${orthanc_config="%%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}"
command_args=" --output-file /var/log/orthanc --sighup --child-pidfile ${pidfile} --user orthanc ${procname} ${orthanc_flags} ${orthanc_config}"
orthanc_prestart()
{

View File

@ -1,11 +0,0 @@
--- OrthancFramework/Sources/Images/JpegWriter.cpp.orig 2024-12-17 16:33:40 UTC
+++ OrthancFramework/Sources/Images/JpegWriter.cpp
@@ -187,7 +187,7 @@ namespace Orthanc
**/
unsigned long size;
#else
- size_t size;
+ unsigned long size;
#endif
if (setjmp(jerr.GetJumpBuffer()))

View File

@ -5,13 +5,13 @@
// raw DICOM instances). Backslashes must be either escaped by
// doubling them, or replaced by forward slashes "/".
- "StorageDirectory" : "OrthancStorage",
+ "StorageDirectory" : "/var/db/orthanc/db-v5",
+ "StorageDirectory" : "/var/db/orthanc/db/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",
+ "IndexDirectory" : "/var/db/orthanc/db/db-v5",
// Path to the directory where Orthanc stores its large temporary
// files. The content of this folder can be safely deleted once

View File

@ -0,0 +1,13 @@
--- OrthancServer/Sources/Database/PrepareDatabase.sql.orig 2025-08-11 16:02:50 UTC
+++ OrthancServer/Sources/Database/PrepareDatabase.sql
@@ -160,4 +160,9 @@ -- The "1" corresponds to the "GlobalProperty_Database
-- Set the version of the database schema
-- The "1" corresponds to the "GlobalProperty_DatabaseSchemaVersion" enumeration
-INSERT INTO GlobalProperties VALUES (1, "6");
+-- Upstream code has (1, "6"), which causes startup to fail on FreeBSD
+-- E1023 08:43:05.328003 MAIN Connection.cpp:169] SQLite execute error: no such column: "6" - should this be a string literal in single-quotes? (1)
+-- Apparently due to sqlite 3.41+ being stricter about string literals
+-- Debian packages currently uses 3.34
+-- https://orthanc.uclouvain.be/bugs/show_bug.cgi?id=227
+INSERT INTO GlobalProperties VALUES (1, 6);