Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: Orthanc-1.11.1
@ 2022-08-08 17:30 bingulo
  2022-08-08 18:23 ` abenson
                   ` (62 more replies)
  0 siblings, 63 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 17:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

There is a new pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 55767 bytes --]

From f28284968d1429927e4be5a727a17918d3254723 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Sun, 7 Aug 2022 13:53:37 -0300
Subject: [PATCH] New package: Orthanc-1.11.1

---
 common/shlibs                              |  38 +
 srcpkgs/Orthanc-DicomWeb/template          |  22 +
 srcpkgs/Orthanc-PostgreSQL/template        |  23 +
 srcpkgs/Orthanc-Python/template            |  23 +
 srcpkgs/Orthanc-devel                      |   1 +
 srcpkgs/Orthanc-plugins                    |   1 +
 srcpkgs/Orthanc/files/Configuration.json   | 915 +++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run          |  32 +
 srcpkgs/Orthanc/template                   |  57 ++
 srcpkgs/civetweb/patches/install-fix.patch |  16 +
 srcpkgs/civetweb/template                  |  39 +
 srcpkgs/dcmtk-doc                          |   1 +
 srcpkgs/dcmtk/template                     |  49 ++
 srcpkgs/libcivetweb                        |   1 +
 srcpkgs/libcivetweb-devel                  |   1 +
 srcpkgs/libdcmtk                           |   1 +
 srcpkgs/libdcmtk-devel                     |   1 +
 17 files changed, 1221 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template
 create mode 100644 srcpkgs/Orthanc-Python/template
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..2838aceed069 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,41 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
+libDelayedDeletion.so.1.11.1 Orthanc-plugins-1.11.1_1
+libModalityWorklists.so.1.11.1 Orthanc-plugins-1.11.1_1
+libServeFolders.so.1.11.1 Orthanc-plugins-1.11.1_1
+libConnectivityChecks.so.1.11.1 Orthanc-plugins-1.11.1_1
+libHousekeeper.so.1.11.1 Orthanc-plugins-1.11.1_1
+libOrthancPostgreSQLStorage.so.4.0 Orthanc-PostgreSQL-4.0_1
+libOrthancPostgreSQLIndex.so.4.0 Orthanc-PostgreSQL-4.0_1
+libOrthancDicomWeb.so.1.9 Orthanc-DicomWeb-1.9_1
+libOrthancPython.so.4.0 Orthanc-Python-4.0_1
diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}
diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}
diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}
diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..e049f44cae23
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
@ 2022-08-08 18:23 ` abenson
  2022-08-08 18:30 ` [PR REVIEW] " ahesford
                   ` (61 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: abenson @ 2022-08-08 18:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1208459868

Comment:
One commit per template

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (2 preceding siblings ...)
  2022-08-08 18:30 ` ahesford
@ 2022-08-08 18:30 ` ahesford
  2022-08-08 18:30 ` Chocimier
                   ` (58 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: ahesford @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940537441

Comment:
Just do
```suggestion
exec chpst -u ${USER}:${USER} Orthanc ${OPTS} "${CONFIGFILE}"
```

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
  2022-08-08 18:23 ` abenson
@ 2022-08-08 18:30 ` ahesford
  2022-08-08 18:30 ` ahesford
                   ` (60 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: ahesford @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940536933

Comment:
This weird trailing space behavior is likely to fail if somebody modifies `$OPTS` in `conf`. Better to do
```sh
OPTS="${OPTS} --logdir=$LOGDIR"
```
Even if `$OPTS` is empty, there's no harm in a leading space.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
  2022-08-08 18:23 ` abenson
  2022-08-08 18:30 ` [PR REVIEW] " ahesford
@ 2022-08-08 18:30 ` ahesford
  2022-08-08 18:30 ` ahesford
                   ` (59 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: ahesford @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940538091

Comment:
You should be quoting your use of these variables. Users might modify the `conf` file and specify spaces in the paths.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (3 preceding siblings ...)
  2022-08-08 18:30 ` ahesford
@ 2022-08-08 18:30 ` Chocimier
  2022-08-08 18:30 ` Chocimier
                   ` (57 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940534929

Comment:
typo

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (5 preceding siblings ...)
  2022-08-08 18:30 ` Chocimier
@ 2022-08-08 18:30 ` Chocimier
  2022-08-08 18:30 ` Chocimier
                   ` (55 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940537796

Comment:
adding to distfiles will prevent this from going out of sync

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (7 preceding siblings ...)
  2022-08-08 18:30 ` Chocimier
@ 2022-08-08 18:30 ` Chocimier
  2022-08-08 18:55 ` [PR PATCH] [Updated] " bingulo
                   ` (53 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940536617

Comment:
Drop patterns from build deps, they break build and are not restricting anyway.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (4 preceding siblings ...)
  2022-08-08 18:30 ` Chocimier
@ 2022-08-08 18:30 ` Chocimier
  2022-08-08 18:30 ` Chocimier
                   ` (56 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940535512

Comment:
common/shlibs is meant to only contain solibs used by otehr packages - are plugins like that?

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (6 preceding siblings ...)
  2022-08-08 18:30 ` Chocimier
@ 2022-08-08 18:30 ` Chocimier
  2022-08-08 18:30 ` Chocimier
                   ` (54 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940540596

Comment:
${version//./}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (8 preceding siblings ...)
  2022-08-08 18:30 ` Chocimier
@ 2022-08-08 18:55 ` bingulo
  2022-08-08 19:03 ` [PR REVIEW] " bingulo
                   ` (52 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 18:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 56787 bytes --]

From 924f0529c1ad54fb0513cbb4ea113a3fd5da1b2e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:41:58 -0300
Subject: [PATCH 1/6] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 481e0c64773be35996f90ecbb345abc0c3881419 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:44:01 -0300
Subject: [PATCH 2/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 27 +++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 79 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,30 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..e049f44cae23
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From ab13b569459346dafb66eccfbecbd04af50c7edc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:45:46 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 75277ba01a43119cc651d2b3b20da9c5bf8d6600 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:53:25 -0300
Subject: [PATCH 4/6] New package: Orthanc-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 4b36d40181689058dd76f8486977b86dde7dcee2 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:54:05 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From b3ada014d9784a7a250c63316e1cd9bf83020ba7 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:54:45 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (9 preceding siblings ...)
  2022-08-08 18:55 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-08 19:03 ` bingulo
  2022-08-08 19:10 ` [PR PATCH] [Updated] " bingulo
                   ` (51 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940568023

Comment:
these plugins will probably never be used by other pkgs, I removed its from shlibs

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (10 preceding siblings ...)
  2022-08-08 19:03 ` [PR REVIEW] " bingulo
@ 2022-08-08 19:10 ` bingulo
  2022-08-08 19:16 ` bingulo
                   ` (50 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 57720 bytes --]

From 924f0529c1ad54fb0513cbb4ea113a3fd5da1b2e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:41:58 -0300
Subject: [PATCH 1/7] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 481e0c64773be35996f90ecbb345abc0c3881419 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:44:01 -0300
Subject: [PATCH 2/7] New package: dcmtk-3.6.7

---
 common/shlibs          | 27 +++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 79 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,30 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..e049f44cae23
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From ab13b569459346dafb66eccfbecbd04af50c7edc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:45:46 -0300
Subject: [PATCH 3/7] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 75277ba01a43119cc651d2b3b20da9c5bf8d6600 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:53:25 -0300
Subject: [PATCH 4/7] New package: Orthanc-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 4b36d40181689058dd76f8486977b86dde7dcee2 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:54:05 -0300
Subject: [PATCH 5/7] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From b3ada014d9784a7a250c63316e1cd9bf83020ba7 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:54:45 -0300
Subject: [PATCH 6/7] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 1523baf8949db160a96fb44c34e22d960992eee5 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:44:01 -0300
Subject: [PATCH 7/7] New package: dcmtk-3.6.7

---
 srcpkgs/dcmtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
index e049f44cae23..63c28bc3c376 100644
--- a/srcpkgs/dcmtk/template
+++ b/srcpkgs/dcmtk/template
@@ -10,7 +10,7 @@ short_desc="Libraries and tools that implements DICOM standard"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="custom: see /usr/share/licenses/${pkgname}"
 homepage="https://dcmtk.org/dcmtk.php.en"
-distfiles="https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-${version}.tar.gz"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
 checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
 
 pre_build() {

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (11 preceding siblings ...)
  2022-08-08 19:10 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-08 19:16 ` bingulo
  2022-08-08 19:25 ` bingulo
                   ` (49 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 7218 bytes --]

From 924f0529c1ad54fb0513cbb4ea113a3fd5da1b2e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:41:58 -0300
Subject: [PATCH 1/2] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From f948af16acf91aefb916eccd160e5aaf589924fe Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 15:44:01 -0300
Subject: [PATCH 2/2] New package: dcmtk-3.6.7

---
 common/shlibs          | 27 +++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 79 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,30 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (12 preceding siblings ...)
  2022-08-08 19:16 ` bingulo
@ 2022-08-08 19:25 ` bingulo
  2022-08-08 19:29 ` bingulo
                   ` (48 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 56816 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 1/6] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 2/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (13 preceding siblings ...)
  2022-08-08 19:25 ` bingulo
@ 2022-08-08 19:29 ` bingulo
  2022-08-08 19:48 ` bingulo
                   ` (47 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 57461 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 1/7] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 2/7] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 3/7] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 4/7] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 5/7] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 6/7] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 7/7] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (14 preceding siblings ...)
  2022-08-08 19:29 ` bingulo
@ 2022-08-08 19:48 ` bingulo
  2022-08-08 20:07 ` bingulo
                   ` (46 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 19:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 60639 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/10] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/10] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/10] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/10] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/10] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/10] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/10] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/10] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/10] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/10] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (15 preceding siblings ...)
  2022-08-08 19:48 ` bingulo
@ 2022-08-08 20:07 ` bingulo
  2022-08-08 20:10 ` Chocimier
                   ` (45 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1208558630

Comment:
@ahesford
>     * Are all of these shared libs really necessary for linking by other packages? If not, leave them out of `common/shlibs`.

Done.

>     * One commit per package, one package per commit. Split each of these into a separate commit in the same PR.

Done.

>     * Remove version restrictions in `hostmakedepends` and `makedepends`. Version enforcement makes no sense here because the repository specifies a single version of the package; whatever is current. It either builds with that version or it's broken.

Done.

>     * What is the purpose of the `Orthanc-{DicomWeb,PostgreSQL,Python}` packages? They aren't reference by any other templates.

These are some plugins i decided to package, it isn't requiered by the main package (Orthanc), but as these makedepends of Orthanc I added them into this PR.
      
>       * If `Orthanc-Python` really doesn't work with py3.11, that's a problem, because we'll be moving to py3.11 soon and I'd like to minimize potential breakage caused by the addition of new specialty packages in the meantime.

It works, you just need to pass a flag with the major python version. As I passed python 3.10, i decided to restrict it on the template, but I understand now that it doesn't make sense and I've removed it. Now I need to get the python version from the upstream repo and pass it to configure_args. I'll try some way to do it.

>       * If `Orthanc-Python` is a Python package, it should depend on `python3`.

It isn't, it's mostly like a binding instead. 


^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (16 preceding siblings ...)
  2022-08-08 20:07 ` bingulo
@ 2022-08-08 20:10 ` Chocimier
  2022-08-08 20:33 ` [PR PATCH] [Updated] " bingulo
                   ` (44 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-08 20:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1208561485

Comment:
> I need to get the python version from the upstream repo and pass it to configure_args 

see https://github.com/void-linux/void-packages/blob/master/Manual.md#python-packages

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (17 preceding siblings ...)
  2022-08-08 20:10 ` Chocimier
@ 2022-08-08 20:33 ` bingulo
  2022-08-08 20:34 ` [PR REVIEW] " bingulo
                   ` (43 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 20:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 62173 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/11] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/11] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/11] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/11] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/11] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/11] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/11] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/11] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/11] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/11] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/11] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (18 preceding siblings ...)
  2022-08-08 20:33 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-08 20:34 ` bingulo
  2022-08-08 20:35 ` bingulo
                   ` (42 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 20:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940640624

Comment:
I replaced to `OPTS="${OPTS} --logdir=\"$LOGDIR\""` instead.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (19 preceding siblings ...)
  2022-08-08 20:34 ` [PR REVIEW] " bingulo
@ 2022-08-08 20:35 ` bingulo
  2022-08-08 20:39 ` bingulo
                   ` (41 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 20:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940641428

Comment:
Done

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (20 preceding siblings ...)
  2022-08-08 20:35 ` bingulo
@ 2022-08-08 20:39 ` bingulo
  2022-08-08 21:52 ` classabbyamp
                   ` (40 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-08 20:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940644559

Comment:
It's already distributed on distfile, I just changed some default settings (specifically to match $ORTHANCSTORAGE on service). I think I'll run a sed on it instead.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (21 preceding siblings ...)
  2022-08-08 20:39 ` bingulo
@ 2022-08-08 21:52 ` classabbyamp
  2022-08-09  1:37 ` [PR PATCH] [Updated] " bingulo
                   ` (39 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: classabbyamp @ 2022-08-08 21:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940696119

Comment:
a patch would probably be better

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (22 preceding siblings ...)
  2022-08-08 21:52 ` classabbyamp
@ 2022-08-09  1:37 ` bingulo
  2022-08-09  1:37 ` [PR REVIEW] " bingulo
                   ` (38 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09  1:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 105956 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/12] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/12] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/12] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/12] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/12] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/12] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/12] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/12] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/12] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/12] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/12] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

From 28295cf4013a38911719d903831794b127478322 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 12/12] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/Configuration.json | 915 -----------------------
 srcpkgs/Orthanc/patches/config.patch     |  28 +
 srcpkgs/Orthanc/template                 |   9 +-
 3 files changed, 33 insertions(+), 919 deletions(-)
 delete mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100644 srcpkgs/Orthanc/patches/config.patch

diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
deleted file mode 100644
index e0e594bb4647..000000000000
--- a/srcpkgs/Orthanc/files/Configuration.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
-  /**
-   * General configuration of Orthanc
-   **/
-
-  // The logical name of this instance of Orthanc. This one is
-  // displayed in Orthanc Explorer and at the URI "/system".
-  "Name" : "MyOrthanc",
-
-  // Path to the directory that holds the heavyweight files (i.e. the
-  // raw DICOM instances). Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "StorageDirectory" : "/var/lib/OrthancStorage",
-
-  // 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" : "/var/lib/OrthancStorage",
-
-  // Path to the directory where Orthanc stores its large temporary
-  // files. The content of this folder can be safely deleted once
-  // Orthanc is stopped. The folder must exist. The corresponding
-  // filesystem must be properly sized, given that for instance a ZIP
-  // archive of DICOM images created by a job can weight several GBs,
-  // and that there might be up to "min(JobsHistorySize,
-  // MediaArchiveSize)" archives to be stored simultaneously. If not
-  // set, Orthanc will use the default temporary folder of the
-  // operating system (such as "/tmp/" on UNIX-like systems, or
-  // "C:/Temp" on Microsoft Windows).
-  // "TemporaryDirectory" : "/tmp/Orthanc/",
-
-  // Enable the transparent compression of the DICOM instances
-  "StorageCompression" : false,
-
-  // Maximum size of the storage in MB (a value of "0" indicates no
-  // limit on the storage size)
-  "MaximumStorageSize" : 0,
-
-  // Maximum number of patients that can be stored at a given time
-  // in the storage (a value of "0" indicates no limit on the number
-  // of patients)
-  "MaximumPatientCount" : 0,
-
-  // Maximum size of the storage cache in MB.  The storage cache
-  // is stored in RAM and contains a copy of recently accessed
-  // files (written or read).  A value of "0" indicates the cache
-  // is disabled.  (new in Orthanc 1.10.0)
-  "MaximumStorageCacheSize" : 128,
-
-  // List of paths to the custom Lua scripts that are to be loaded
-  // into this instance of Orthanc
-  "LuaScripts" : [
-  ],
-
-  // The period (in seconds) between 2 calls of the "OnHeartBeat"
-  // lua callback.  O means the heart beat is disabled.
-  // TODO: text below for Orthanc book:
-  // Note: that the period is not actually the delay between
-  // the end of an execution and the triggering of the next one.
-  // Since there is only one lua context, if other lua code is being
-  // executed, the heart beat might be delayed even more.
-  "LuaHeartBeatPeriod" : 0,
-
-  // List of paths to the plugins that are to be loaded into this
-  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
-  // "./PluginTest.dll" for Windows). These paths can refer to
-  // folders, in which case they will be scanned non-recursively to
-  // find shared libraries. Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "Plugins" : [
-  ],
-
-  // Maximum number of processing jobs that are simultaneously running
-  // at any given time. A value of "0" indicates to use all the
-  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
-  // this value to "1".
-  "ConcurrentJobs" : 2,
-
-
-  /**
-   * Configuration of the HTTP server
-   **/
-
-  // Enable the HTTP server. If this parameter is set to "false",
-  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
-  // Explorer will not be available.
-  "HttpServerEnabled" : true,
-
-  // Enable/disable the Orthanc Explorer Web user interface. This
-  // option is only meaningful if the "HttpServerEnabled" option is
-  // set to "true" (new in Orthanc 1.8.2).
-  "OrthancExplorerEnabled" : true,
-
-  // HTTP port for the REST services and for the GUI
-  "HttpPort" : 8042,
-
-  // When the following option is "true", if an error is encountered
-  // while calling the REST API, a JSON message describing the error
-  // is put in the HTTP answer. This feature can be disabled if the
-  // HTTP client does not properly handles such answers.
-  "HttpDescribeErrors" : true,
-
-  // Enable HTTP compression to improve network bandwidth utilization,
-  // at the expense of more computations on the server. Orthanc
-  // supports the "gzip" and "deflate" HTTP encodings.
-  "HttpCompressionEnabled" : true,
-
-  // Enable the publication of the content of the Orthanc server as a
-  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
-  // share is mapped as "http://localhost:8042/webdav/".
-  "WebDavEnabled" : true,
-
-  // Whether to allow deletions through the WebDAV share. This is
-  // disabled by default to avoid accidental loss of DICOM instances.
-  "WebDavDeleteAllowed" : false,
-
-  // Whether to allow uploads through the WebDAV share.
-  "WebDavUploadAllowed" : true,
-
-
-
-  /**
-   * Configuration of the DICOM server
-   **/
-
-  // Enable the DICOM server. If this parameter is set to "false",
-  // Orthanc acts as a pure REST server. It will not be possible to
-  // receive files or to do query/retrieve through the DICOM protocol.
-  "DicomServerEnabled" : true,
-
-  // The DICOM Application Entity Title (cannot be longer than 16
-  // characters)
-  "DicomAet" : "ORTHANC",
-
-  // Check whether the called AET corresponds to the AET of Orthanc
-  // during an incoming DICOM SCU request
-  "DicomCheckCalledAet" : false,
-
-  // The DICOM port
-  "DicomPort" : 4242,
-
-  // The default encoding that is assumed for DICOM files without
-  // "SpecificCharacterSet" DICOM tag, and that is used when answering
-  // C-FIND requests (including worklists). The allowed values are
-  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
-  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
-  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
-  // "SimplifiedChinese".
-  "DefaultEncoding" : "Latin1",
-
-  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
-  // This is an array listing the accepted transfer syntax UIDs. Each
-  // entry can contain wildcards ("?" or "*"). By default, all the
-  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
-  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
-
-  // User-friendly groups of transfer syntaxes that can be enabled or
-  // disabled at once. These options are applied after the main
-  // "AcceptedTransferSyntaxes" option has been applied (if present).
-  /**
-     "DeflatedTransferSyntaxAccepted"     : true,
-     "JpegTransferSyntaxAccepted"         : true,
-     "Jpeg2000TransferSyntaxAccepted"     : true,
-     "JpegLosslessTransferSyntaxAccepted" : true,
-     "JpipTransferSyntaxAccepted"         : true,
-     "Mpeg2TransferSyntaxAccepted"        : true,
-     "RleTransferSyntaxAccepted"          : true,
-     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
-     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
-  **/
-  
-  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
-  // SOP classes (aka. "promiscuous mode")
-  "UnknownSopClassAccepted" : false,
-
-  // Set the timeout (in seconds) after which the DICOM associations
-  // are closed by the Orthanc SCP (server) if no further DIMSE
-  // command is received from the SCU (client).
-  "DicomScpTimeout" : 30,
-
-
-
-  /**
-   * Security-related options for the HTTP server
-   **/
-
-  // Whether remote hosts can connect to the HTTP server
-  "RemoteAccessAllowed" : false,
-
-  // Whether or not SSL is enabled
-  "SslEnabled" : false,
-
-  // Path to the SSL certificate used by the HTTP server. The file
-  // must be stored in the PEM format, and must contain both the
-  // certificate and the private key. This option is only meaningful
-  // if "SslEnabled" is true.
-  "SslCertificate" : "certificate.pem",
-
-  // Sets the minimum accepted SSL protocol version
-  // (cf. "ssl_protocol_version" option of civetweb). By default,
-  // require SSL 1.2. This option is only meaningful if "SslEnabled"
-  // is true. (new in Orthanc 1.8.2)
-  //
-  // Value => Protocols
-  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   2      TLS1.0+TLS1.1+TLS1.2
-  //   3      TLS1.1+TLS1.2
-  //   4      TLS1.2
-  "SslMinimumProtocolVersion" : 4,
-
-  // Set the accepted ciphers for SSL connections. The ciphers must be
-  // provided as a list of strings. If not set, this will default to
-  // FIPS 140-2 ciphers. This option is only meaningful if
-  // "SslEnabled" is true. (new in Orthanc 1.8.2)
-  /**
-    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
-  **/
-
-  // Whether or not peer client certificates shall be checked. This
-  // option is only meaningful if "SslEnabled" is true.
-  "SslVerifyPeers" : false,
-
-  // Path to a file containing the concatenation of the client SSL
-  // certificate(s) that are trusted to verify the identify of remote
-  // HTTP clients. The individual certificate(s) must be stored in the
-  // PEM format. This option is only meaningful if "SslVerifyPeers"
-  // is true.
-  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
-  
-  // Whether or not the password protection is enabled (using HTTP
-  // basic access authentication). Starting with Orthanc 1.5.8, if
-  // "AuthenticationEnabled" is not explicitly set, authentication is
-  // enabled iff. remote access is allowed (i.e. the default value of
-  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
-  /**
-     "AuthenticationEnabled" : false,
-   **/
-
-  // The list of the registered users. Because Orthanc uses HTTP
-  // Basic Authentication, the passwords are stored as plain text.
-  "RegisteredUsers" : {
-    // "alice" : "alicePassword"
-  },
-
-
-
-  /**
-   * Security-related options for the DICOM connections (SCU/SCP)
-   **/
-
-  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
-  "DicomTlsEnabled" : false,
-
-  // Path to the TLS certificate file (in PEM format) to be used for
-  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
-  // (outgoing DICOM connections). Note that contrarily to the
-  // "SslCertificate" option, the certificate and its private key must
-  // be split into two separate files. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsCertificate" : "orthanc.crt",
-  **/
-
-  // Path to the file containing the private key (in PEM format) that
-  // corresponds to the TLS certificate specified in option
-  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsPrivateKey" : "orthanc.key",
-  **/
-
-  // Path to a file containing all the TLS certificates that Orthanc
-  // can trust, both for its SCP (incoming DICOM connections) and SCU
-  // (outgoing DICOM connections). This file must contain a sequence
-  // of PEM certificates. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsTrustedCertificates" : "trusted.crt",
-  **/
-  
-  // Whether Orthanc rejects DICOM TLS connections to/from remote
-  // modalities that do not provide a certificate. Setting this option
-  // to "true" (resp. "false") corresponds to "--require-peer-cert"
-  // (resp. "--verify-peer-cert") in the DCMTK command-line
-  // tools. (new in Orthanc 1.9.3)
-  "DicomTlsRemoteCertificateRequired" : true,
-
-  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Orthanc 1.3.0
-  // is the only version to behave as if this argument were set to "false".
-  "DicomAlwaysAllowEcho" : true,
-
-  // Whether the Orthanc SCP allows incoming C-STORE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above)
-  "DicomAlwaysAllowStore" : true,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
-  // requests for patients/studies/series/instances. Use option
-  // "DicomAlwaysAllowFindWorklist" for worklists.
-  "DicomAlwaysAllowFind" : false,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
-  // even from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.10.0)
-  "DicomAlwaysAllowFindWorklist" : false,
-
-  // Whether the Orthanc SCP allows incoming C-GET requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  "DicomAlwaysAllowGet" : false,
-
-  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.7)
-  "DicomAlwaysAllowMove" : false,
-
-  // Whether Orthanc checks the IP/hostname address of the remote
-  // modality initiating a DICOM connection (as listed in the
-  // "DicomModalities" option above). If this option is set to
-  // "false", Orthanc only checks the AET of the remote modality.
-  "DicomCheckModalityHost" : false,
-
-
-
-  /**
-   * Network topology
-   **/
-
-  // The list of the known DICOM modalities. This option is ignored if
-  // "DicomModalitiesInDatabase" is set to "true", in which case you
-  // must use the REST API to define modalities.
-  "DicomModalities" : {
-    /**
-     * Uncommenting the following line would enable Orthanc to
-     * connect to an instance of the "storescp" open-source DICOM
-     * store (shipped in the DCMTK distribution), as started by the
-     * command line "storescp 2000". The first parameter is the
-     * AET of the remote modality (cannot be longer than 16 
-     * characters), the second one is the remote network address,
-     * and the third one is the TCP port number corresponding
-     * to the DICOM protocol on the remote modality (usually 104).
-     **/
-    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
-
-    /**
-     * A fourth parameter is available to enable patches for
-     * specific PACS manufacturers. The allowed values are currently:
-     * - "Generic" (default value),
-     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
-     *   in outgoing C-FIND requests originating from Orthanc),
-     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
-     *   in outgoing C-FIND SCU requests originating from Orthanc),
-     * - "Vitrea",
-     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
-     *   from GE Healthcare).
-     *
-     * This parameter is case-sensitive.
-     **/
-    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
-
-    /**
-     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
-     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
-     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
-     * it is possible to specify which DICOM commands are allowed,
-     * separately for each remote modality, using the syntax
-     * below.
-     *
-     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
-     * respectively if global option "DicomAlwaysAllowEcho"
-     * (resp. "DicomAlwaysAllowStore") is set to "false".
-     *
-     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
-     * disable the transcoding to uncompressed transfer syntaxes if
-     * this remote modality doesn't support compressed transfer
-     * syntaxes. This option currently applies to Orthanc C-GET SCP
-     * and to Orthanc C-STORE SCU. This option only has an effect if
-     * the global option "EnableTranscoding" is set to "true".
-     *
-     * By default, all "Allow*" options are true.
-     * "AllowStorageCommitment" is actually an alias for 
-     * "AllowNAction" & "AllowEventReport".
-     * 
-     * The "UseDicomTls" option specifies whether DICOM TLS should be
-     * used when opening a SCU connection from Orthanc to this remote
-     * modality. By default, DICOM TLS is not enabled.
-     *
-     * The "LocalAet" option allows one to overwrite the global
-     * "DicomAet" configuration option in order to specify another AET
-     * for Orthanc when initiating an SCU to this very specific
-     * modality. Similarly, "Timeout" allows one to overwrite the
-     * global value "DicomScuTimeout" on a per-modality basis.
-     **/
-    //"untrusted" : {
-    //  "AET" : "ORTHANC",
-    //  "Port" : 104,
-    //  "Host" : "127.0.0.1",
-    //  "Manufacturer" : "Generic",
-    //  "AllowEcho" : false,
-    //  "AllowFind" : false,
-    //  "AllowFindWorklist" : false,       // new in 1.10.0
-    //  "AllowGet"  : false,
-    //  "AllowMove" : false,
-    //  "AllowStore" : true,
-    //  "AllowStorageCommitment" : false,  // new in 1.6.0
-    //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
-    //  "Timeout" : 60                     // new in 1.9.1
-    //}
-  },
-
-  // Whether to store the DICOM modalities in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "DicomModalitiesInDatabase" : false,
-
-  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
-  // while testing the connectivity from Orthanc to a remote DICOM
-  // modality. This allows one to check that the remote modality does
-  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
-  "DicomEchoChecksFind" : false,
-
-  // The timeout (in seconds) after which the DICOM associations are
-  // considered as closed by the Orthanc SCU (client) if the remote
-  // DICOM SCP (server) does not answer.
-  "DicomScuTimeout" : 10,
-
-  // During a C-STORE SCU request initiated by Orthanc, if the remote
-  // modality doesn't support the original transfer syntax of some
-  // DICOM instance, specify which transfer syntax should be preferred
-  // to transcode this instance (provided the remote modality accepts
-  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
-  // was implicitly set to "Little Endian Implicit"
-  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
-  // this parameter is by default set to "Little Endian Explicit"
-  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
-  // a compressed transfer syntax. (new in Orthanc 1.9.0)
-  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
-
-  // Number of threads that are used by the embedded DICOM server.
-  // This defines the number of concurrent DICOM operations that can
-  // be run. Note: This is not limiting the number of concurrent
-  // connections. With a single thread, if a C-Find is received during
-  // e.g the transcoding of an incoming C-Store, it will have to wait
-  // until the end of the C-Store before being processed. (new in
-  // Orthanc 1.10.0, before this version, the value was fixed to 4)
-  "DicomThreadsCount" : 4,
-
-  // The list of the known Orthanc peers. This option is ignored if
-  // "OrthancPeersInDatabase" is set to "true", in which case you must
-  // use the REST API to define Orthanc peers.
-  "OrthancPeers" : {
-    /**
-     * Each line gives the base URL of an Orthanc peer, possibly
-     * followed by the username/password pair (if the password
-     * protection is enabled on the peer).
-     **/
-    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
-    // "peer2" : [ "http://127.0.0.1:8044/" ]
-
-    /**
-     * This is another, more advanced format to define Orthanc
-     * peers. It notably allows one to specify HTTP headers, a HTTPS
-     * client certificate in the PEM format (as in the "--cert" option
-     * of curl), or to enable PKCS#11 authentication for smart cards.
-     *
-     * The "Timeout" option allows one to overwrite the global value
-     * "HttpTimeout" on a per-peer basis.
-     **/
-    // "peer" : {
-    //   "Url" : "http://127.0.0.1:8043/",
-    //   "Username" : "alice",
-    //   "Password" : "alicePassword",
-    //   "HttpHeaders" : { "Token" : "Hello world" },
-    //   "CertificateFile" : "client.crt",
-    //   "CertificateKeyFile" : "client.key",
-    //   "CertificateKeyPassword" : "certpass",
-    //   "Pkcs11" : false,
-    //   "Timeout" : 42            // New in Orthanc 1.9.1
-    // }
-  },
-
-  // Whether to store the Orthanc peers in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "OrthancPeersInDatabase" : false,
-
-  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
-  // empty string, no HTTP proxy is used. For instance:
-  //   "HttpProxy" : "192.168.0.1:3128"
-  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
-  "HttpProxy" : "",
-
-  // If set to "true", debug messages from libcurl will be issued
-  // whenever Orthanc makes an outgoing HTTP request. This is notably
-  // useful to debug HTTPS-related problems.
-  "HttpVerbose" : false,
-
-  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
-  "HttpTimeout" : 60,
-
-  // Enable the verification of the peers during HTTPS requests. This
-  // option must be set to "false" if using self-signed certificates.
-  // Pay attention that setting this option to "false" results in
-  // security risks!
-  // Reference: http://curl.haxx.se/docs/sslcerts.html
-  "HttpsVerifyPeers" : true,
-
-  // Path to the CA (certification authority) certificates to validate
-  // peers in HTTPS requests. From curl documentation ("--cacert"
-  // option): "Tells curl to use the specified certificate file to
-  // verify the peers. The file may contain multiple CA
-  // certificates. The certificate(s) must be in PEM format." On
-  // Debian-based systems, this option can be set to
-  // "/etc/ssl/certs/ca-certificates.crt"
-  "HttpsCACertificates" : "",
-
-
-
-  /**
-   * Advanced options
-   **/
-
-  // Dictionary of symbolic names for the user-defined metadata. Each
-  // entry must map an unique string to an unique number between 1024
-  // and 65535. Reserved values:
-  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
-  "UserMetadata" : {
-    // "Sample" : 1024
-  },
-
-  // Dictionary of symbolic names for the user-defined types of
-  // attached files. Each entry must map an unique string to an unique
-  // number between 1024 and 65535. Optionally, a second argument can
-  // provided to specify a MIME content type for the attachment.
-  "UserContentType" : {
-    // "sample" : 1024
-    // "sample2" : [ 1025, "application/pdf" ]
-  },
-
-  // Number of seconds without receiving any instance before a
-  // patient, a study or a series is considered as stable.
-  "StableAge" : 60,
-
-  // By default, Orthanc compares AET (Application Entity Titles) in a
-  // case-insensitive way. Setting this option to "true" will enable
-  // case-sensitive matching.
-  "StrictAetComparison" : false,
-
-  // When the following option is "true", the MD5 of the DICOM files
-  // will be computed and stored in the Orthanc database. This
-  // information can be used to detect disk corruption, at the price
-  // of a small performance overhead.
-  "StoreMD5ForAttachments" : true,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Patient, Study or Series level. Setting this option to "0" means
-  // no limit.
-  "LimitFindResults" : 0,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Instance level. Setting this option to "0" means no limit.
-  "LimitFindInstances" : 0,
-
-  // If this option is set to "true" (default behavior until Orthanc
-  // 1.3.2), Orthanc will log the resources that are exported to other
-  // DICOM modalities or Orthanc peers, inside the URI
-  // "/exports". Setting this option to "false" is useful to prevent
-  // the index to grow indefinitely in auto-routing tasks (this is the
-  // default behavior since Orthanc 1.4.0).
-  "LogExportedResources" : false,
-
-  // Enable or disable HTTP Keep-Alive (persistent HTTP
-  // connections). Setting this option to "true" prevents Orthanc
-  // issue #32 ("HttpServer does not support multiple HTTP requests in
-  // the same TCP stream"), but can possibly slow down HTTP clients
-  // that do not support persistent connections. The default behavior
-  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
-  // "false" is also recommended if Orthanc is compiled against
-  // Mongoose.
-  "KeepAlive" : true,
-
-  // Enable or disable Nagle's algorithm. Only taken into
-  // consideration if Orthanc is compiled to use CivetWeb. Experiments
-  // show that best performance can be obtained by setting both
-  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
-  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
-  "TcpNoDelay" : true,
-
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
-
-  // If this option is set to "false", Orthanc will run in index-only
-  // mode. The DICOM files will not be stored on the drive: Orthanc
-  // only indexes the small subset of the so-called "main DICOM tags"
-  // in its SQL database. Note that this option might prevent the
-  // upgrade to newer versions of Orthanc. Also note that this
-  // behavior might not be available with the storage area plugins.
-  "StoreDicom" : true,
-
-  // DICOM associations initiated by Lua scripts are kept open as long
-  // as new DICOM commands are issued. This option sets the number of
-  // seconds of inactivity to wait before automatically closing a
-  // DICOM association used by Lua. If set to 0, the connection is
-  // closed immediately. This option is only used in Lua scripts.
-  "DicomAssociationCloseDelay" : 5,
-
-  // Maximum number of query/retrieve DICOM requests that are
-  // maintained by Orthanc. The least recently used requests get
-  // deleted as new requests are issued.
-  "QueryRetrieveSize" : 100,
-
-  // When handling a C-FIND SCP request, setting this flag to "true"
-  // will enable case-sensitive match for PN value representation
-  // (such as PatientName). By default, the search is
-  // case-insensitive, which does not follow the DICOM standard.
-  "CaseSensitivePN" : false,
-
-  // Configure PKCS#11 to use hardware security modules (HSM) and
-  // smart cards when carrying on HTTPS client authentication.
-  /**
-     "Pkcs11" : {
-       "Module" : "/usr/local/lib/libbeidpkcs11.so",
-       "Module" : "C:/Windows/System32/beidpkcs11.dll",
-       "Pin" : "1234",
-       "Verbose" : true
-     }
-   **/
-  
-  // If set to "false", Orthanc will not load its default dictionary
-  // of private tags. This might be necessary if you cannot import a
-  // DICOM file encoded using the Implicit VR Endian transfer syntax,
-  // and containing private tags: Such an import error might stem from
-  // a bad dictionary. You can still list your private tags of
-  // interest in the "Dictionary" configuration option below.
-  "LoadPrivateDictionary" : true,
-
-  // Locale to be used by Orthanc. Currently, only used if comparing
-  // strings in a case-insensitive way. It should be safe to keep this
-  // value undefined, which lets Orthanc autodetect the suitable locale.
-  // "Locale" : "en_US.UTF-8",
-
-  // Register a new tag in the dictionary of DICOM tags that are known
-  // to Orthanc. Each line must contain the tag (formatted as 2
-  // hexadecimal numbers), the value representation (2 upcase
-  // characters), a nickname for the tag, possibly the minimum
-  // multiplicity (> 0 with defaults to 1), possibly the maximum
-  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
-  // possibly the Private Creator (for private tags).
-  // Note: For private tags, you should only declare the lower 8 bits
-  // of the element since the higher 8 bits may vary from one file to
-  // the other.
-  "Dictionary" : {
-    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
-    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
-    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
-    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
-  },
-
-  // Load a set of external DICOM dictionaries in order to replace the
-  // default dictionaries. This option must contain a set of files in
-  // the DCMTK format. The order of the dictionaries *is*
-  // important. This option can be used to turn Orthanc into a DICONDE
-  // server. (new in Orthanc 1.9.4)
-  /**
-     "ExternalDictionaries" : [
-     "/usr/share/dcmtk/dicom.dic",
-     "/usr/share/dcmtk/diconde.dic"
-     ]
-  **/
-
-  // Whether to run DICOM C-MOVE operations synchronously. If set to
-  // "false" (asynchronous mode), each incoming C-MOVE request results
-  // in the creation of a new background job. Up to Orthanc 1.3.2, the
-  // implicit behavior was to use synchronous C-MOVE ("true"). Between
-  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
-  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
-  // behavior is back to synchronous C-MOVE ("true", which ensures
-  // backward compatibility with Orthanc <= 1.3.2).
-  "SynchronousCMove" : true,
-
-  // Maximum number of completed jobs that are kept in memory. A
-  // processing job is considered as complete once it is tagged as
-  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
-  // indicates to keep no job in memory (i.e. jobs are removed from
-  // the history as soon as they are completed), which prevents the
-  // use of some features of Orthanc (typically, synchronous mode in
-  // REST API) and should be avoided for non-developers.
-  "JobsHistorySize" : 10,
-
-  // Whether to save the jobs into the Orthanc database. If this
-  // option is set to "true", the pending/running/completed jobs are
-  // automatically reloaded from the database if Orthanc is stopped
-  // then restarted (except if the "--no-jobs" command-line argument
-  // is specified). This option should be set to "false" if multiple
-  // Orthanc servers are using the same database (e.g. if PostgreSQL
-  // or MariaDB/MySQL is used).
-  "SaveJobs" : true,
-
-  // Specifies how Orthanc reacts when it receives a DICOM instance
-  // whose SOPInstanceUID is already stored. If set to "true", the new
-  // instance replaces the old one. If set to "false", the new
-  // instance is discarded and the old one is kept. Up to Orthanc
-  // 1.4.1, the implicit behavior corresponded to "false".
-  "OverwriteInstances" : false,
-
-  // Maximum number of ZIP/media archives that are maintained by
-  // Orthanc, as a response to the asynchronous creation of archives.
-  // The least recently used archives get deleted as new archives are
-  // generated. This option was introduced in Orthanc 1.5.0, and has
-  // no effect on the synchronous generation of archives.
-  "MediaArchiveSize" : 1,
-
-  // Performance setting to specify how Orthanc accesses the storage
-  // area during find operations (C-FIND, /tools/find API route and
-  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
-  // allows Orthanc to read the storage area as soon as it needs an
-  // information that is not present in its database (slowest mode),
-  // (2) "Never" prevents Orthanc from accessing the storage area, and
-  // makes it uses exclusively its database (fastest mode), and (3)
-  // "Answers" allows Orthanc to read the storage area to generate its
-  // answers, but not to filter the DICOM resources (balance between
-  // the two modes). By default, the mode is "Always", which
-  // corresponds to the behavior of Orthanc <= 1.5.0.
-  "StorageAccessOnFind" : "Always",
-
-  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
-  // set to "true", the metrics can be retrieved at
-  // "/tools/metrics-prometheus" formetted using the Prometheus
-  // text-based exposition format.
-  "MetricsEnabled" : true,
-
-  // Whether calls to URI "/tools/execute-script" is enabled. Starting
-  // with Orthanc 1.5.8, this URI is disabled by default for security.
-  "ExecuteLuaEnabled" : false,
-
-  // Set the timeout while serving HTTP requests by the embedded Web
-  // server, in seconds. This corresponds to option
-  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
-  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
-  "HttpRequestTimeout" : 30,
-
-  // Set the default private creator that is used by Orthanc when it
-  // looks for a private tag in its dictionary (cf. "Dictionary"
-  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
-  "DefaultPrivateCreator" : "",
-
-  // Maximum number of storage commitment reports (i.e. received from
-  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
-  "StorageCommitmentReportsSize" : 100,
-
-  // Whether Orthanc transcodes DICOM files to an uncompressed
-  // transfer syntax over the DICOM protocol, if the remote modality
-  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
-  "TranscodeDicomProtocol" : true,
-
-  // If some plugin to decode/transcode DICOM instances is installed,
-  // this option specifies whether the built-in decoder/transcoder of
-  // Orthanc (that uses DCMTK) is applied before or after the plugins,
-  // or is not applied at all (new in Orthanc 1.7.0). The allowed
-  // values for this option are "After" (default value, corresponding
-  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
-  "BuiltinDecoderTranscoderOrder" : "After",
-
-  // If this option is set, Orthanc will transparently transcode any
-  // incoming DICOM instance to the given transfer syntax before
-  // storing it into its database. Beware that this might result in
-  // high CPU usage (if transcoding to some compressed transfer
-  // syntax), or in higher disk consumption (if transcoding to an
-  // uncompressed syntax). Also, beware that transcoding to a transfer
-  // syntax with lossy compression (notably JPEG) will change the
-  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
-  // the instance level, which might break external workflow.
-  /**
-     "IngestTranscoding" : "1.2.840.10008.1.2",
-  **/
-
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have an uncompressed transfer syntax, i.e. Little Endian
-  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
-  // Orthanc 1.8.2).
-  "IngestTranscodingOfUncompressed" : true,
-  
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
-  "IngestTranscodingOfCompressed" : true,
-  
-  // The compression level that is used when transcoding to one of the
-  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
-  "DicomLossyTranscodingQuality" : 90,
-
-  // Whether "fsync()" is called after each write to the storage area
-  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
-  // will run more slowly, but the DICOM are guaranteed to be
-  // immediately written to the disk. This option only makes sense if
-  // the builtin filesystem storage area is used. It defaults to
-  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
-  "SyncStorageArea" : true,
-
-  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
-  // ...)" while starting Orthanc. This has the same effect at setting
-  // the environment variable "MALLOC_ARENA_MAX". This avoids large
-  // growth in RES memory if the threads of the embedded HTTP server
-  // have to allocate large chunks of memory (typically the case with
-  // large DICOM files). By setting "MallocArenaMax" to "N", these
-  // threads share "N" memory pools (known as "arenas"). Setting this
-  // option to "0" doesn't call mallopt()", which was the behavior of
-  // Orthanc <= 1.8.1.
-  "MallocArenaMax" : 5,
-
-  // Deidentify/anonymize the contents of the logs (notably C-FIND,
-  // C-GET, and C-MOVE queries submitted to Orthanc) according to
-  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
-  "DeidentifyLogs" : true,
-
-  // If "DeidentifyLogs" is true, this sets the DICOM standard to
-  // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
-
-  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
-  // network protocol, expressed in bytes. This value affects both
-  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
-  // range is [4096,131072]. (new in Orthanc 1.9.0)
-  "MaximumPduLength" : 16384,
-
-  // Arbitrary identifier of this Orthanc server when storing its
-  // global properties if a custom index plugin is used. This
-  // identifier is only useful in the case of multiple
-  // readers/writers, in order to avoid collisions between multiple
-  // Orthanc servers. If unset, this identifier is taken as a SHA-1
-  // hash derived from the MAC addresses of the network interfaces,
-  // and from the AET and TCP ports used by Orthanc. Manually setting
-  // this option is needed in Docker/Kubernetes environments. (new in
-  // Orthanc 1.9.2)
-  /**
-     "DatabaseServerIdentifier" : "Orthanc1",
-  **/
-
-  // Whether Orthanc protects the modification of metadata and
-  // attachments using revisions, which is done using the HTTP headers
-  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
-  // API. This is needed to handle collisions between concurrent
-  // modifications in the case of multiple writers. The database
-  // back-end must support this option, which is notably *not* yet the
-  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
-  "CheckRevisions" : false,
-
-  // Whether Orthanc streams ZIP archive/media to the HTTP
-  // client. Setting this option to "false" corresponds to the
-  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
-  // to a temporary file, then sent to the client (which necessitates
-  // disk space and might lead to HTTP timeouts on large archives). If
-  // set to "true", the chunks of the ZIP file are progressively sent
-  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
-  "SynchronousZipStream" : true,
-
-  // Default number of loader threads when generating Zip archive/media.
-  // A value of 0 means reading and writing are performed in sequence
-  // (default behaviour).  A value > 1 is meaningful only if the storage
-  // is a distributed network storage (e.g object storage plugin).
-  // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0,
-
-  // Extra Main Dicom tags that are stored in DB together with all default
-  // Main Dicom tags that are already stored (TODO: see book new page). 
-  // (new in Orthanc 1.11.0)
-  // Sequences tags are not supported.
-  /**
-  "ExtraMainDicomTags" : {
-    "Instance" : [
-      "Rows",
-      "Columns",
-      "ImageType",
-      "SOPClassUID",
-      "ContentDate",
-      "ContentTime",
-      "FrameOfReferenceUID",
-      "PixelSpacing",
-      "SpecificCharacterSet",
-      "BitsAllocated"
-    ],
-    "Series" : [],
-    "Study": [],
-    "Patient": []
-  },
-  */
-
-  // Enables/disables warnings in the logs.
-  // "true" enables a warning.  All warnings are enabled by default
-  // TODO: see book new page
-  // (new in Orthanc 1.11.0)
-  "Warnings" : {
-    // A "RequestedTags" has been read from storage which is slower than
-    // reading it from DB.
-    // You might want to store this tag in ExtraMainDicomTags to build
-    // the response faster.
-    "W001_TagsBeingReadFromStorage": true,
-    
-    // Retrieving a list of Main dicom tags from a resource that has been
-    // saved with another "ExtraMainDicomTags" configuration which means that
-    // your response might be incomplete/inconsistent.
-    // You should call patients|studies|series|instances/../reconstruct to rebuild
-    // the DB.  TODO: also check for "rebuild DB" plugin
-    "W002_InconsistentDicomTagsInDb": true
-  }
-
-}
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index d5cb61514619..96c4bb3115ec 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -23,18 +23,19 @@ python_version=3
 # Create '_orthanc' user for the server
 system_accounts="_orthanc"
 _orthanc_descr="Orthanc server user"
-conf_files="etc/orthanc/Configuration.json"
+
+conf_files="/etc/orthanc/Configuration.json"
 
 post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
 	cd ${DESTDIR}
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
 	# Remove garbage
 	rm -rf builddir
-
-	vsv orthanc
-	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
 }
 
 Orthanc-devel_package() {

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (23 preceding siblings ...)
  2022-08-09  1:37 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-09  1:37 ` bingulo
  2022-08-09  2:50 ` [PR PATCH] [Updated] " bingulo
                   ` (37 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09  1:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r940802210

Comment:
@classabbyamp I done it

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (24 preceding siblings ...)
  2022-08-09  1:37 ` [PR REVIEW] " bingulo
@ 2022-08-09  2:50 ` bingulo
  2022-08-09  2:51 ` bingulo
                   ` (36 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 106993 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/13] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/13] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/13] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/13] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/13] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/13] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/13] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/13] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/13] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/13] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/13] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

From 28295cf4013a38911719d903831794b127478322 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 12/13] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/Configuration.json | 915 -----------------------
 srcpkgs/Orthanc/patches/config.patch     |  28 +
 srcpkgs/Orthanc/template                 |   9 +-
 3 files changed, 33 insertions(+), 919 deletions(-)
 delete mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100644 srcpkgs/Orthanc/patches/config.patch

diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
deleted file mode 100644
index e0e594bb4647..000000000000
--- a/srcpkgs/Orthanc/files/Configuration.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
-  /**
-   * General configuration of Orthanc
-   **/
-
-  // The logical name of this instance of Orthanc. This one is
-  // displayed in Orthanc Explorer and at the URI "/system".
-  "Name" : "MyOrthanc",
-
-  // Path to the directory that holds the heavyweight files (i.e. the
-  // raw DICOM instances). Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "StorageDirectory" : "/var/lib/OrthancStorage",
-
-  // 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" : "/var/lib/OrthancStorage",
-
-  // Path to the directory where Orthanc stores its large temporary
-  // files. The content of this folder can be safely deleted once
-  // Orthanc is stopped. The folder must exist. The corresponding
-  // filesystem must be properly sized, given that for instance a ZIP
-  // archive of DICOM images created by a job can weight several GBs,
-  // and that there might be up to "min(JobsHistorySize,
-  // MediaArchiveSize)" archives to be stored simultaneously. If not
-  // set, Orthanc will use the default temporary folder of the
-  // operating system (such as "/tmp/" on UNIX-like systems, or
-  // "C:/Temp" on Microsoft Windows).
-  // "TemporaryDirectory" : "/tmp/Orthanc/",
-
-  // Enable the transparent compression of the DICOM instances
-  "StorageCompression" : false,
-
-  // Maximum size of the storage in MB (a value of "0" indicates no
-  // limit on the storage size)
-  "MaximumStorageSize" : 0,
-
-  // Maximum number of patients that can be stored at a given time
-  // in the storage (a value of "0" indicates no limit on the number
-  // of patients)
-  "MaximumPatientCount" : 0,
-
-  // Maximum size of the storage cache in MB.  The storage cache
-  // is stored in RAM and contains a copy of recently accessed
-  // files (written or read).  A value of "0" indicates the cache
-  // is disabled.  (new in Orthanc 1.10.0)
-  "MaximumStorageCacheSize" : 128,
-
-  // List of paths to the custom Lua scripts that are to be loaded
-  // into this instance of Orthanc
-  "LuaScripts" : [
-  ],
-
-  // The period (in seconds) between 2 calls of the "OnHeartBeat"
-  // lua callback.  O means the heart beat is disabled.
-  // TODO: text below for Orthanc book:
-  // Note: that the period is not actually the delay between
-  // the end of an execution and the triggering of the next one.
-  // Since there is only one lua context, if other lua code is being
-  // executed, the heart beat might be delayed even more.
-  "LuaHeartBeatPeriod" : 0,
-
-  // List of paths to the plugins that are to be loaded into this
-  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
-  // "./PluginTest.dll" for Windows). These paths can refer to
-  // folders, in which case they will be scanned non-recursively to
-  // find shared libraries. Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "Plugins" : [
-  ],
-
-  // Maximum number of processing jobs that are simultaneously running
-  // at any given time. A value of "0" indicates to use all the
-  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
-  // this value to "1".
-  "ConcurrentJobs" : 2,
-
-
-  /**
-   * Configuration of the HTTP server
-   **/
-
-  // Enable the HTTP server. If this parameter is set to "false",
-  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
-  // Explorer will not be available.
-  "HttpServerEnabled" : true,
-
-  // Enable/disable the Orthanc Explorer Web user interface. This
-  // option is only meaningful if the "HttpServerEnabled" option is
-  // set to "true" (new in Orthanc 1.8.2).
-  "OrthancExplorerEnabled" : true,
-
-  // HTTP port for the REST services and for the GUI
-  "HttpPort" : 8042,
-
-  // When the following option is "true", if an error is encountered
-  // while calling the REST API, a JSON message describing the error
-  // is put in the HTTP answer. This feature can be disabled if the
-  // HTTP client does not properly handles such answers.
-  "HttpDescribeErrors" : true,
-
-  // Enable HTTP compression to improve network bandwidth utilization,
-  // at the expense of more computations on the server. Orthanc
-  // supports the "gzip" and "deflate" HTTP encodings.
-  "HttpCompressionEnabled" : true,
-
-  // Enable the publication of the content of the Orthanc server as a
-  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
-  // share is mapped as "http://localhost:8042/webdav/".
-  "WebDavEnabled" : true,
-
-  // Whether to allow deletions through the WebDAV share. This is
-  // disabled by default to avoid accidental loss of DICOM instances.
-  "WebDavDeleteAllowed" : false,
-
-  // Whether to allow uploads through the WebDAV share.
-  "WebDavUploadAllowed" : true,
-
-
-
-  /**
-   * Configuration of the DICOM server
-   **/
-
-  // Enable the DICOM server. If this parameter is set to "false",
-  // Orthanc acts as a pure REST server. It will not be possible to
-  // receive files or to do query/retrieve through the DICOM protocol.
-  "DicomServerEnabled" : true,
-
-  // The DICOM Application Entity Title (cannot be longer than 16
-  // characters)
-  "DicomAet" : "ORTHANC",
-
-  // Check whether the called AET corresponds to the AET of Orthanc
-  // during an incoming DICOM SCU request
-  "DicomCheckCalledAet" : false,
-
-  // The DICOM port
-  "DicomPort" : 4242,
-
-  // The default encoding that is assumed for DICOM files without
-  // "SpecificCharacterSet" DICOM tag, and that is used when answering
-  // C-FIND requests (including worklists). The allowed values are
-  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
-  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
-  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
-  // "SimplifiedChinese".
-  "DefaultEncoding" : "Latin1",
-
-  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
-  // This is an array listing the accepted transfer syntax UIDs. Each
-  // entry can contain wildcards ("?" or "*"). By default, all the
-  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
-  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
-
-  // User-friendly groups of transfer syntaxes that can be enabled or
-  // disabled at once. These options are applied after the main
-  // "AcceptedTransferSyntaxes" option has been applied (if present).
-  /**
-     "DeflatedTransferSyntaxAccepted"     : true,
-     "JpegTransferSyntaxAccepted"         : true,
-     "Jpeg2000TransferSyntaxAccepted"     : true,
-     "JpegLosslessTransferSyntaxAccepted" : true,
-     "JpipTransferSyntaxAccepted"         : true,
-     "Mpeg2TransferSyntaxAccepted"        : true,
-     "RleTransferSyntaxAccepted"          : true,
-     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
-     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
-  **/
-  
-  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
-  // SOP classes (aka. "promiscuous mode")
-  "UnknownSopClassAccepted" : false,
-
-  // Set the timeout (in seconds) after which the DICOM associations
-  // are closed by the Orthanc SCP (server) if no further DIMSE
-  // command is received from the SCU (client).
-  "DicomScpTimeout" : 30,
-
-
-
-  /**
-   * Security-related options for the HTTP server
-   **/
-
-  // Whether remote hosts can connect to the HTTP server
-  "RemoteAccessAllowed" : false,
-
-  // Whether or not SSL is enabled
-  "SslEnabled" : false,
-
-  // Path to the SSL certificate used by the HTTP server. The file
-  // must be stored in the PEM format, and must contain both the
-  // certificate and the private key. This option is only meaningful
-  // if "SslEnabled" is true.
-  "SslCertificate" : "certificate.pem",
-
-  // Sets the minimum accepted SSL protocol version
-  // (cf. "ssl_protocol_version" option of civetweb). By default,
-  // require SSL 1.2. This option is only meaningful if "SslEnabled"
-  // is true. (new in Orthanc 1.8.2)
-  //
-  // Value => Protocols
-  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   2      TLS1.0+TLS1.1+TLS1.2
-  //   3      TLS1.1+TLS1.2
-  //   4      TLS1.2
-  "SslMinimumProtocolVersion" : 4,
-
-  // Set the accepted ciphers for SSL connections. The ciphers must be
-  // provided as a list of strings. If not set, this will default to
-  // FIPS 140-2 ciphers. This option is only meaningful if
-  // "SslEnabled" is true. (new in Orthanc 1.8.2)
-  /**
-    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
-  **/
-
-  // Whether or not peer client certificates shall be checked. This
-  // option is only meaningful if "SslEnabled" is true.
-  "SslVerifyPeers" : false,
-
-  // Path to a file containing the concatenation of the client SSL
-  // certificate(s) that are trusted to verify the identify of remote
-  // HTTP clients. The individual certificate(s) must be stored in the
-  // PEM format. This option is only meaningful if "SslVerifyPeers"
-  // is true.
-  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
-  
-  // Whether or not the password protection is enabled (using HTTP
-  // basic access authentication). Starting with Orthanc 1.5.8, if
-  // "AuthenticationEnabled" is not explicitly set, authentication is
-  // enabled iff. remote access is allowed (i.e. the default value of
-  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
-  /**
-     "AuthenticationEnabled" : false,
-   **/
-
-  // The list of the registered users. Because Orthanc uses HTTP
-  // Basic Authentication, the passwords are stored as plain text.
-  "RegisteredUsers" : {
-    // "alice" : "alicePassword"
-  },
-
-
-
-  /**
-   * Security-related options for the DICOM connections (SCU/SCP)
-   **/
-
-  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
-  "DicomTlsEnabled" : false,
-
-  // Path to the TLS certificate file (in PEM format) to be used for
-  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
-  // (outgoing DICOM connections). Note that contrarily to the
-  // "SslCertificate" option, the certificate and its private key must
-  // be split into two separate files. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsCertificate" : "orthanc.crt",
-  **/
-
-  // Path to the file containing the private key (in PEM format) that
-  // corresponds to the TLS certificate specified in option
-  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsPrivateKey" : "orthanc.key",
-  **/
-
-  // Path to a file containing all the TLS certificates that Orthanc
-  // can trust, both for its SCP (incoming DICOM connections) and SCU
-  // (outgoing DICOM connections). This file must contain a sequence
-  // of PEM certificates. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsTrustedCertificates" : "trusted.crt",
-  **/
-  
-  // Whether Orthanc rejects DICOM TLS connections to/from remote
-  // modalities that do not provide a certificate. Setting this option
-  // to "true" (resp. "false") corresponds to "--require-peer-cert"
-  // (resp. "--verify-peer-cert") in the DCMTK command-line
-  // tools. (new in Orthanc 1.9.3)
-  "DicomTlsRemoteCertificateRequired" : true,
-
-  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Orthanc 1.3.0
-  // is the only version to behave as if this argument were set to "false".
-  "DicomAlwaysAllowEcho" : true,
-
-  // Whether the Orthanc SCP allows incoming C-STORE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above)
-  "DicomAlwaysAllowStore" : true,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
-  // requests for patients/studies/series/instances. Use option
-  // "DicomAlwaysAllowFindWorklist" for worklists.
-  "DicomAlwaysAllowFind" : false,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
-  // even from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.10.0)
-  "DicomAlwaysAllowFindWorklist" : false,
-
-  // Whether the Orthanc SCP allows incoming C-GET requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  "DicomAlwaysAllowGet" : false,
-
-  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.7)
-  "DicomAlwaysAllowMove" : false,
-
-  // Whether Orthanc checks the IP/hostname address of the remote
-  // modality initiating a DICOM connection (as listed in the
-  // "DicomModalities" option above). If this option is set to
-  // "false", Orthanc only checks the AET of the remote modality.
-  "DicomCheckModalityHost" : false,
-
-
-
-  /**
-   * Network topology
-   **/
-
-  // The list of the known DICOM modalities. This option is ignored if
-  // "DicomModalitiesInDatabase" is set to "true", in which case you
-  // must use the REST API to define modalities.
-  "DicomModalities" : {
-    /**
-     * Uncommenting the following line would enable Orthanc to
-     * connect to an instance of the "storescp" open-source DICOM
-     * store (shipped in the DCMTK distribution), as started by the
-     * command line "storescp 2000". The first parameter is the
-     * AET of the remote modality (cannot be longer than 16 
-     * characters), the second one is the remote network address,
-     * and the third one is the TCP port number corresponding
-     * to the DICOM protocol on the remote modality (usually 104).
-     **/
-    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
-
-    /**
-     * A fourth parameter is available to enable patches for
-     * specific PACS manufacturers. The allowed values are currently:
-     * - "Generic" (default value),
-     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
-     *   in outgoing C-FIND requests originating from Orthanc),
-     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
-     *   in outgoing C-FIND SCU requests originating from Orthanc),
-     * - "Vitrea",
-     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
-     *   from GE Healthcare).
-     *
-     * This parameter is case-sensitive.
-     **/
-    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
-
-    /**
-     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
-     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
-     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
-     * it is possible to specify which DICOM commands are allowed,
-     * separately for each remote modality, using the syntax
-     * below.
-     *
-     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
-     * respectively if global option "DicomAlwaysAllowEcho"
-     * (resp. "DicomAlwaysAllowStore") is set to "false".
-     *
-     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
-     * disable the transcoding to uncompressed transfer syntaxes if
-     * this remote modality doesn't support compressed transfer
-     * syntaxes. This option currently applies to Orthanc C-GET SCP
-     * and to Orthanc C-STORE SCU. This option only has an effect if
-     * the global option "EnableTranscoding" is set to "true".
-     *
-     * By default, all "Allow*" options are true.
-     * "AllowStorageCommitment" is actually an alias for 
-     * "AllowNAction" & "AllowEventReport".
-     * 
-     * The "UseDicomTls" option specifies whether DICOM TLS should be
-     * used when opening a SCU connection from Orthanc to this remote
-     * modality. By default, DICOM TLS is not enabled.
-     *
-     * The "LocalAet" option allows one to overwrite the global
-     * "DicomAet" configuration option in order to specify another AET
-     * for Orthanc when initiating an SCU to this very specific
-     * modality. Similarly, "Timeout" allows one to overwrite the
-     * global value "DicomScuTimeout" on a per-modality basis.
-     **/
-    //"untrusted" : {
-    //  "AET" : "ORTHANC",
-    //  "Port" : 104,
-    //  "Host" : "127.0.0.1",
-    //  "Manufacturer" : "Generic",
-    //  "AllowEcho" : false,
-    //  "AllowFind" : false,
-    //  "AllowFindWorklist" : false,       // new in 1.10.0
-    //  "AllowGet"  : false,
-    //  "AllowMove" : false,
-    //  "AllowStore" : true,
-    //  "AllowStorageCommitment" : false,  // new in 1.6.0
-    //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
-    //  "Timeout" : 60                     // new in 1.9.1
-    //}
-  },
-
-  // Whether to store the DICOM modalities in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "DicomModalitiesInDatabase" : false,
-
-  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
-  // while testing the connectivity from Orthanc to a remote DICOM
-  // modality. This allows one to check that the remote modality does
-  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
-  "DicomEchoChecksFind" : false,
-
-  // The timeout (in seconds) after which the DICOM associations are
-  // considered as closed by the Orthanc SCU (client) if the remote
-  // DICOM SCP (server) does not answer.
-  "DicomScuTimeout" : 10,
-
-  // During a C-STORE SCU request initiated by Orthanc, if the remote
-  // modality doesn't support the original transfer syntax of some
-  // DICOM instance, specify which transfer syntax should be preferred
-  // to transcode this instance (provided the remote modality accepts
-  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
-  // was implicitly set to "Little Endian Implicit"
-  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
-  // this parameter is by default set to "Little Endian Explicit"
-  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
-  // a compressed transfer syntax. (new in Orthanc 1.9.0)
-  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
-
-  // Number of threads that are used by the embedded DICOM server.
-  // This defines the number of concurrent DICOM operations that can
-  // be run. Note: This is not limiting the number of concurrent
-  // connections. With a single thread, if a C-Find is received during
-  // e.g the transcoding of an incoming C-Store, it will have to wait
-  // until the end of the C-Store before being processed. (new in
-  // Orthanc 1.10.0, before this version, the value was fixed to 4)
-  "DicomThreadsCount" : 4,
-
-  // The list of the known Orthanc peers. This option is ignored if
-  // "OrthancPeersInDatabase" is set to "true", in which case you must
-  // use the REST API to define Orthanc peers.
-  "OrthancPeers" : {
-    /**
-     * Each line gives the base URL of an Orthanc peer, possibly
-     * followed by the username/password pair (if the password
-     * protection is enabled on the peer).
-     **/
-    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
-    // "peer2" : [ "http://127.0.0.1:8044/" ]
-
-    /**
-     * This is another, more advanced format to define Orthanc
-     * peers. It notably allows one to specify HTTP headers, a HTTPS
-     * client certificate in the PEM format (as in the "--cert" option
-     * of curl), or to enable PKCS#11 authentication for smart cards.
-     *
-     * The "Timeout" option allows one to overwrite the global value
-     * "HttpTimeout" on a per-peer basis.
-     **/
-    // "peer" : {
-    //   "Url" : "http://127.0.0.1:8043/",
-    //   "Username" : "alice",
-    //   "Password" : "alicePassword",
-    //   "HttpHeaders" : { "Token" : "Hello world" },
-    //   "CertificateFile" : "client.crt",
-    //   "CertificateKeyFile" : "client.key",
-    //   "CertificateKeyPassword" : "certpass",
-    //   "Pkcs11" : false,
-    //   "Timeout" : 42            // New in Orthanc 1.9.1
-    // }
-  },
-
-  // Whether to store the Orthanc peers in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "OrthancPeersInDatabase" : false,
-
-  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
-  // empty string, no HTTP proxy is used. For instance:
-  //   "HttpProxy" : "192.168.0.1:3128"
-  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
-  "HttpProxy" : "",
-
-  // If set to "true", debug messages from libcurl will be issued
-  // whenever Orthanc makes an outgoing HTTP request. This is notably
-  // useful to debug HTTPS-related problems.
-  "HttpVerbose" : false,
-
-  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
-  "HttpTimeout" : 60,
-
-  // Enable the verification of the peers during HTTPS requests. This
-  // option must be set to "false" if using self-signed certificates.
-  // Pay attention that setting this option to "false" results in
-  // security risks!
-  // Reference: http://curl.haxx.se/docs/sslcerts.html
-  "HttpsVerifyPeers" : true,
-
-  // Path to the CA (certification authority) certificates to validate
-  // peers in HTTPS requests. From curl documentation ("--cacert"
-  // option): "Tells curl to use the specified certificate file to
-  // verify the peers. The file may contain multiple CA
-  // certificates. The certificate(s) must be in PEM format." On
-  // Debian-based systems, this option can be set to
-  // "/etc/ssl/certs/ca-certificates.crt"
-  "HttpsCACertificates" : "",
-
-
-
-  /**
-   * Advanced options
-   **/
-
-  // Dictionary of symbolic names for the user-defined metadata. Each
-  // entry must map an unique string to an unique number between 1024
-  // and 65535. Reserved values:
-  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
-  "UserMetadata" : {
-    // "Sample" : 1024
-  },
-
-  // Dictionary of symbolic names for the user-defined types of
-  // attached files. Each entry must map an unique string to an unique
-  // number between 1024 and 65535. Optionally, a second argument can
-  // provided to specify a MIME content type for the attachment.
-  "UserContentType" : {
-    // "sample" : 1024
-    // "sample2" : [ 1025, "application/pdf" ]
-  },
-
-  // Number of seconds without receiving any instance before a
-  // patient, a study or a series is considered as stable.
-  "StableAge" : 60,
-
-  // By default, Orthanc compares AET (Application Entity Titles) in a
-  // case-insensitive way. Setting this option to "true" will enable
-  // case-sensitive matching.
-  "StrictAetComparison" : false,
-
-  // When the following option is "true", the MD5 of the DICOM files
-  // will be computed and stored in the Orthanc database. This
-  // information can be used to detect disk corruption, at the price
-  // of a small performance overhead.
-  "StoreMD5ForAttachments" : true,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Patient, Study or Series level. Setting this option to "0" means
-  // no limit.
-  "LimitFindResults" : 0,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Instance level. Setting this option to "0" means no limit.
-  "LimitFindInstances" : 0,
-
-  // If this option is set to "true" (default behavior until Orthanc
-  // 1.3.2), Orthanc will log the resources that are exported to other
-  // DICOM modalities or Orthanc peers, inside the URI
-  // "/exports". Setting this option to "false" is useful to prevent
-  // the index to grow indefinitely in auto-routing tasks (this is the
-  // default behavior since Orthanc 1.4.0).
-  "LogExportedResources" : false,
-
-  // Enable or disable HTTP Keep-Alive (persistent HTTP
-  // connections). Setting this option to "true" prevents Orthanc
-  // issue #32 ("HttpServer does not support multiple HTTP requests in
-  // the same TCP stream"), but can possibly slow down HTTP clients
-  // that do not support persistent connections. The default behavior
-  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
-  // "false" is also recommended if Orthanc is compiled against
-  // Mongoose.
-  "KeepAlive" : true,
-
-  // Enable or disable Nagle's algorithm. Only taken into
-  // consideration if Orthanc is compiled to use CivetWeb. Experiments
-  // show that best performance can be obtained by setting both
-  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
-  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
-  "TcpNoDelay" : true,
-
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
-
-  // If this option is set to "false", Orthanc will run in index-only
-  // mode. The DICOM files will not be stored on the drive: Orthanc
-  // only indexes the small subset of the so-called "main DICOM tags"
-  // in its SQL database. Note that this option might prevent the
-  // upgrade to newer versions of Orthanc. Also note that this
-  // behavior might not be available with the storage area plugins.
-  "StoreDicom" : true,
-
-  // DICOM associations initiated by Lua scripts are kept open as long
-  // as new DICOM commands are issued. This option sets the number of
-  // seconds of inactivity to wait before automatically closing a
-  // DICOM association used by Lua. If set to 0, the connection is
-  // closed immediately. This option is only used in Lua scripts.
-  "DicomAssociationCloseDelay" : 5,
-
-  // Maximum number of query/retrieve DICOM requests that are
-  // maintained by Orthanc. The least recently used requests get
-  // deleted as new requests are issued.
-  "QueryRetrieveSize" : 100,
-
-  // When handling a C-FIND SCP request, setting this flag to "true"
-  // will enable case-sensitive match for PN value representation
-  // (such as PatientName). By default, the search is
-  // case-insensitive, which does not follow the DICOM standard.
-  "CaseSensitivePN" : false,
-
-  // Configure PKCS#11 to use hardware security modules (HSM) and
-  // smart cards when carrying on HTTPS client authentication.
-  /**
-     "Pkcs11" : {
-       "Module" : "/usr/local/lib/libbeidpkcs11.so",
-       "Module" : "C:/Windows/System32/beidpkcs11.dll",
-       "Pin" : "1234",
-       "Verbose" : true
-     }
-   **/
-  
-  // If set to "false", Orthanc will not load its default dictionary
-  // of private tags. This might be necessary if you cannot import a
-  // DICOM file encoded using the Implicit VR Endian transfer syntax,
-  // and containing private tags: Such an import error might stem from
-  // a bad dictionary. You can still list your private tags of
-  // interest in the "Dictionary" configuration option below.
-  "LoadPrivateDictionary" : true,
-
-  // Locale to be used by Orthanc. Currently, only used if comparing
-  // strings in a case-insensitive way. It should be safe to keep this
-  // value undefined, which lets Orthanc autodetect the suitable locale.
-  // "Locale" : "en_US.UTF-8",
-
-  // Register a new tag in the dictionary of DICOM tags that are known
-  // to Orthanc. Each line must contain the tag (formatted as 2
-  // hexadecimal numbers), the value representation (2 upcase
-  // characters), a nickname for the tag, possibly the minimum
-  // multiplicity (> 0 with defaults to 1), possibly the maximum
-  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
-  // possibly the Private Creator (for private tags).
-  // Note: For private tags, you should only declare the lower 8 bits
-  // of the element since the higher 8 bits may vary from one file to
-  // the other.
-  "Dictionary" : {
-    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
-    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
-    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
-    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
-  },
-
-  // Load a set of external DICOM dictionaries in order to replace the
-  // default dictionaries. This option must contain a set of files in
-  // the DCMTK format. The order of the dictionaries *is*
-  // important. This option can be used to turn Orthanc into a DICONDE
-  // server. (new in Orthanc 1.9.4)
-  /**
-     "ExternalDictionaries" : [
-     "/usr/share/dcmtk/dicom.dic",
-     "/usr/share/dcmtk/diconde.dic"
-     ]
-  **/
-
-  // Whether to run DICOM C-MOVE operations synchronously. If set to
-  // "false" (asynchronous mode), each incoming C-MOVE request results
-  // in the creation of a new background job. Up to Orthanc 1.3.2, the
-  // implicit behavior was to use synchronous C-MOVE ("true"). Between
-  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
-  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
-  // behavior is back to synchronous C-MOVE ("true", which ensures
-  // backward compatibility with Orthanc <= 1.3.2).
-  "SynchronousCMove" : true,
-
-  // Maximum number of completed jobs that are kept in memory. A
-  // processing job is considered as complete once it is tagged as
-  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
-  // indicates to keep no job in memory (i.e. jobs are removed from
-  // the history as soon as they are completed), which prevents the
-  // use of some features of Orthanc (typically, synchronous mode in
-  // REST API) and should be avoided for non-developers.
-  "JobsHistorySize" : 10,
-
-  // Whether to save the jobs into the Orthanc database. If this
-  // option is set to "true", the pending/running/completed jobs are
-  // automatically reloaded from the database if Orthanc is stopped
-  // then restarted (except if the "--no-jobs" command-line argument
-  // is specified). This option should be set to "false" if multiple
-  // Orthanc servers are using the same database (e.g. if PostgreSQL
-  // or MariaDB/MySQL is used).
-  "SaveJobs" : true,
-
-  // Specifies how Orthanc reacts when it receives a DICOM instance
-  // whose SOPInstanceUID is already stored. If set to "true", the new
-  // instance replaces the old one. If set to "false", the new
-  // instance is discarded and the old one is kept. Up to Orthanc
-  // 1.4.1, the implicit behavior corresponded to "false".
-  "OverwriteInstances" : false,
-
-  // Maximum number of ZIP/media archives that are maintained by
-  // Orthanc, as a response to the asynchronous creation of archives.
-  // The least recently used archives get deleted as new archives are
-  // generated. This option was introduced in Orthanc 1.5.0, and has
-  // no effect on the synchronous generation of archives.
-  "MediaArchiveSize" : 1,
-
-  // Performance setting to specify how Orthanc accesses the storage
-  // area during find operations (C-FIND, /tools/find API route and
-  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
-  // allows Orthanc to read the storage area as soon as it needs an
-  // information that is not present in its database (slowest mode),
-  // (2) "Never" prevents Orthanc from accessing the storage area, and
-  // makes it uses exclusively its database (fastest mode), and (3)
-  // "Answers" allows Orthanc to read the storage area to generate its
-  // answers, but not to filter the DICOM resources (balance between
-  // the two modes). By default, the mode is "Always", which
-  // corresponds to the behavior of Orthanc <= 1.5.0.
-  "StorageAccessOnFind" : "Always",
-
-  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
-  // set to "true", the metrics can be retrieved at
-  // "/tools/metrics-prometheus" formetted using the Prometheus
-  // text-based exposition format.
-  "MetricsEnabled" : true,
-
-  // Whether calls to URI "/tools/execute-script" is enabled. Starting
-  // with Orthanc 1.5.8, this URI is disabled by default for security.
-  "ExecuteLuaEnabled" : false,
-
-  // Set the timeout while serving HTTP requests by the embedded Web
-  // server, in seconds. This corresponds to option
-  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
-  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
-  "HttpRequestTimeout" : 30,
-
-  // Set the default private creator that is used by Orthanc when it
-  // looks for a private tag in its dictionary (cf. "Dictionary"
-  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
-  "DefaultPrivateCreator" : "",
-
-  // Maximum number of storage commitment reports (i.e. received from
-  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
-  "StorageCommitmentReportsSize" : 100,
-
-  // Whether Orthanc transcodes DICOM files to an uncompressed
-  // transfer syntax over the DICOM protocol, if the remote modality
-  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
-  "TranscodeDicomProtocol" : true,
-
-  // If some plugin to decode/transcode DICOM instances is installed,
-  // this option specifies whether the built-in decoder/transcoder of
-  // Orthanc (that uses DCMTK) is applied before or after the plugins,
-  // or is not applied at all (new in Orthanc 1.7.0). The allowed
-  // values for this option are "After" (default value, corresponding
-  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
-  "BuiltinDecoderTranscoderOrder" : "After",
-
-  // If this option is set, Orthanc will transparently transcode any
-  // incoming DICOM instance to the given transfer syntax before
-  // storing it into its database. Beware that this might result in
-  // high CPU usage (if transcoding to some compressed transfer
-  // syntax), or in higher disk consumption (if transcoding to an
-  // uncompressed syntax). Also, beware that transcoding to a transfer
-  // syntax with lossy compression (notably JPEG) will change the
-  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
-  // the instance level, which might break external workflow.
-  /**
-     "IngestTranscoding" : "1.2.840.10008.1.2",
-  **/
-
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have an uncompressed transfer syntax, i.e. Little Endian
-  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
-  // Orthanc 1.8.2).
-  "IngestTranscodingOfUncompressed" : true,
-  
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
-  "IngestTranscodingOfCompressed" : true,
-  
-  // The compression level that is used when transcoding to one of the
-  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
-  "DicomLossyTranscodingQuality" : 90,
-
-  // Whether "fsync()" is called after each write to the storage area
-  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
-  // will run more slowly, but the DICOM are guaranteed to be
-  // immediately written to the disk. This option only makes sense if
-  // the builtin filesystem storage area is used. It defaults to
-  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
-  "SyncStorageArea" : true,
-
-  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
-  // ...)" while starting Orthanc. This has the same effect at setting
-  // the environment variable "MALLOC_ARENA_MAX". This avoids large
-  // growth in RES memory if the threads of the embedded HTTP server
-  // have to allocate large chunks of memory (typically the case with
-  // large DICOM files). By setting "MallocArenaMax" to "N", these
-  // threads share "N" memory pools (known as "arenas"). Setting this
-  // option to "0" doesn't call mallopt()", which was the behavior of
-  // Orthanc <= 1.8.1.
-  "MallocArenaMax" : 5,
-
-  // Deidentify/anonymize the contents of the logs (notably C-FIND,
-  // C-GET, and C-MOVE queries submitted to Orthanc) according to
-  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
-  "DeidentifyLogs" : true,
-
-  // If "DeidentifyLogs" is true, this sets the DICOM standard to
-  // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
-
-  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
-  // network protocol, expressed in bytes. This value affects both
-  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
-  // range is [4096,131072]. (new in Orthanc 1.9.0)
-  "MaximumPduLength" : 16384,
-
-  // Arbitrary identifier of this Orthanc server when storing its
-  // global properties if a custom index plugin is used. This
-  // identifier is only useful in the case of multiple
-  // readers/writers, in order to avoid collisions between multiple
-  // Orthanc servers. If unset, this identifier is taken as a SHA-1
-  // hash derived from the MAC addresses of the network interfaces,
-  // and from the AET and TCP ports used by Orthanc. Manually setting
-  // this option is needed in Docker/Kubernetes environments. (new in
-  // Orthanc 1.9.2)
-  /**
-     "DatabaseServerIdentifier" : "Orthanc1",
-  **/
-
-  // Whether Orthanc protects the modification of metadata and
-  // attachments using revisions, which is done using the HTTP headers
-  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
-  // API. This is needed to handle collisions between concurrent
-  // modifications in the case of multiple writers. The database
-  // back-end must support this option, which is notably *not* yet the
-  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
-  "CheckRevisions" : false,
-
-  // Whether Orthanc streams ZIP archive/media to the HTTP
-  // client. Setting this option to "false" corresponds to the
-  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
-  // to a temporary file, then sent to the client (which necessitates
-  // disk space and might lead to HTTP timeouts on large archives). If
-  // set to "true", the chunks of the ZIP file are progressively sent
-  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
-  "SynchronousZipStream" : true,
-
-  // Default number of loader threads when generating Zip archive/media.
-  // A value of 0 means reading and writing are performed in sequence
-  // (default behaviour).  A value > 1 is meaningful only if the storage
-  // is a distributed network storage (e.g object storage plugin).
-  // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0,
-
-  // Extra Main Dicom tags that are stored in DB together with all default
-  // Main Dicom tags that are already stored (TODO: see book new page). 
-  // (new in Orthanc 1.11.0)
-  // Sequences tags are not supported.
-  /**
-  "ExtraMainDicomTags" : {
-    "Instance" : [
-      "Rows",
-      "Columns",
-      "ImageType",
-      "SOPClassUID",
-      "ContentDate",
-      "ContentTime",
-      "FrameOfReferenceUID",
-      "PixelSpacing",
-      "SpecificCharacterSet",
-      "BitsAllocated"
-    ],
-    "Series" : [],
-    "Study": [],
-    "Patient": []
-  },
-  */
-
-  // Enables/disables warnings in the logs.
-  // "true" enables a warning.  All warnings are enabled by default
-  // TODO: see book new page
-  // (new in Orthanc 1.11.0)
-  "Warnings" : {
-    // A "RequestedTags" has been read from storage which is slower than
-    // reading it from DB.
-    // You might want to store this tag in ExtraMainDicomTags to build
-    // the response faster.
-    "W001_TagsBeingReadFromStorage": true,
-    
-    // Retrieving a list of Main dicom tags from a resource that has been
-    // saved with another "ExtraMainDicomTags" configuration which means that
-    // your response might be incomplete/inconsistent.
-    // You should call patients|studies|series|instances/../reconstruct to rebuild
-    // the DB.  TODO: also check for "rebuild DB" plugin
-    "W002_InconsistentDicomTagsInDb": true
-  }
-
-}
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index d5cb61514619..96c4bb3115ec 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -23,18 +23,19 @@ python_version=3
 # Create '_orthanc' user for the server
 system_accounts="_orthanc"
 _orthanc_descr="Orthanc server user"
-conf_files="etc/orthanc/Configuration.json"
+
+conf_files="/etc/orthanc/Configuration.json"
 
 post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
 	cd ${DESTDIR}
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
 	# Remove garbage
 	rm -rf builddir
-
-	vsv orthanc
-	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
 }
 
 Orthanc-devel_package() {

From a82a1d61b3cb34d18c00b98c3e79f1ba9f8af843 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 13/13] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 3efa389a99c5..bcd098f272e1 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -4,9 +4,9 @@ version=4.0
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DPYTHON_VERSION=3.10"
+ -DORTHANC_FRAMEWORK_VERSION=1.11.1"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (25 preceding siblings ...)
  2022-08-09  2:50 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-09  2:51 ` bingulo
  2022-08-09 14:36 ` [PR REVIEW] " Chocimier
                   ` (35 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09  2:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1208852370

Comment:
> > I need to get the python version from the upstream repo and pass it to configure_args
> 
> see https://github.com/void-linux/void-packages/blob/master/Manual.md#python-packages

thx, now I'm using the py3_ver var.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (27 preceding siblings ...)
  2022-08-09 14:36 ` [PR REVIEW] " Chocimier
@ 2022-08-09 14:36 ` Chocimier
  2022-08-09 14:36 ` Chocimier
                   ` (33 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-09 14:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941418281

Comment:
ignore_elf_dirs is for emulator artifacts and such. Actual executable code like here need to be moved elsewhere, e.g. /usr/lib/orthanc

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (28 preceding siblings ...)
  2022-08-09 14:36 ` Chocimier
@ 2022-08-09 14:36 ` Chocimier
  2022-08-09 15:39 ` bingulo
                   ` (32 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-09 14:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941419081

Comment:
typo, does not fetch

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (26 preceding siblings ...)
  2022-08-09  2:51 ` bingulo
@ 2022-08-09 14:36 ` Chocimier
  2022-08-09 14:36 ` Chocimier
                   ` (34 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-09 14:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

New review comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941415241

Comment:
typo across templates?

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (29 preceding siblings ...)
  2022-08-09 14:36 ` Chocimier
@ 2022-08-09 15:39 ` bingulo
  2022-08-09 15:40 ` bingulo
                   ` (31 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 15:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941499537

Comment:
yes, I will fix it

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (30 preceding siblings ...)
  2022-08-09 15:39 ` bingulo
@ 2022-08-09 15:40 ` bingulo
  2022-08-09 15:57 ` [PR PATCH] [Updated] " bingulo
                   ` (30 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 15:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941500591

Comment:
okay, I will move it to /usr/l/ib/orthanc/plugins/ dir

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (31 preceding siblings ...)
  2022-08-09 15:40 ` bingulo
@ 2022-08-09 15:57 ` bingulo
  2022-08-09 15:58 ` [PR REVIEW] " bingulo
                   ` (29 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 15:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 107938 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/14] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/14] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/14] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/14] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/14] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/14] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/14] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/14] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/14] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/14] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/14] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

From 28295cf4013a38911719d903831794b127478322 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 12/14] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/Configuration.json | 915 -----------------------
 srcpkgs/Orthanc/patches/config.patch     |  28 +
 srcpkgs/Orthanc/template                 |   9 +-
 3 files changed, 33 insertions(+), 919 deletions(-)
 delete mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100644 srcpkgs/Orthanc/patches/config.patch

diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
deleted file mode 100644
index e0e594bb4647..000000000000
--- a/srcpkgs/Orthanc/files/Configuration.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
-  /**
-   * General configuration of Orthanc
-   **/
-
-  // The logical name of this instance of Orthanc. This one is
-  // displayed in Orthanc Explorer and at the URI "/system".
-  "Name" : "MyOrthanc",
-
-  // Path to the directory that holds the heavyweight files (i.e. the
-  // raw DICOM instances). Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "StorageDirectory" : "/var/lib/OrthancStorage",
-
-  // 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" : "/var/lib/OrthancStorage",
-
-  // Path to the directory where Orthanc stores its large temporary
-  // files. The content of this folder can be safely deleted once
-  // Orthanc is stopped. The folder must exist. The corresponding
-  // filesystem must be properly sized, given that for instance a ZIP
-  // archive of DICOM images created by a job can weight several GBs,
-  // and that there might be up to "min(JobsHistorySize,
-  // MediaArchiveSize)" archives to be stored simultaneously. If not
-  // set, Orthanc will use the default temporary folder of the
-  // operating system (such as "/tmp/" on UNIX-like systems, or
-  // "C:/Temp" on Microsoft Windows).
-  // "TemporaryDirectory" : "/tmp/Orthanc/",
-
-  // Enable the transparent compression of the DICOM instances
-  "StorageCompression" : false,
-
-  // Maximum size of the storage in MB (a value of "0" indicates no
-  // limit on the storage size)
-  "MaximumStorageSize" : 0,
-
-  // Maximum number of patients that can be stored at a given time
-  // in the storage (a value of "0" indicates no limit on the number
-  // of patients)
-  "MaximumPatientCount" : 0,
-
-  // Maximum size of the storage cache in MB.  The storage cache
-  // is stored in RAM and contains a copy of recently accessed
-  // files (written or read).  A value of "0" indicates the cache
-  // is disabled.  (new in Orthanc 1.10.0)
-  "MaximumStorageCacheSize" : 128,
-
-  // List of paths to the custom Lua scripts that are to be loaded
-  // into this instance of Orthanc
-  "LuaScripts" : [
-  ],
-
-  // The period (in seconds) between 2 calls of the "OnHeartBeat"
-  // lua callback.  O means the heart beat is disabled.
-  // TODO: text below for Orthanc book:
-  // Note: that the period is not actually the delay between
-  // the end of an execution and the triggering of the next one.
-  // Since there is only one lua context, if other lua code is being
-  // executed, the heart beat might be delayed even more.
-  "LuaHeartBeatPeriod" : 0,
-
-  // List of paths to the plugins that are to be loaded into this
-  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
-  // "./PluginTest.dll" for Windows). These paths can refer to
-  // folders, in which case they will be scanned non-recursively to
-  // find shared libraries. Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "Plugins" : [
-  ],
-
-  // Maximum number of processing jobs that are simultaneously running
-  // at any given time. A value of "0" indicates to use all the
-  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
-  // this value to "1".
-  "ConcurrentJobs" : 2,
-
-
-  /**
-   * Configuration of the HTTP server
-   **/
-
-  // Enable the HTTP server. If this parameter is set to "false",
-  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
-  // Explorer will not be available.
-  "HttpServerEnabled" : true,
-
-  // Enable/disable the Orthanc Explorer Web user interface. This
-  // option is only meaningful if the "HttpServerEnabled" option is
-  // set to "true" (new in Orthanc 1.8.2).
-  "OrthancExplorerEnabled" : true,
-
-  // HTTP port for the REST services and for the GUI
-  "HttpPort" : 8042,
-
-  // When the following option is "true", if an error is encountered
-  // while calling the REST API, a JSON message describing the error
-  // is put in the HTTP answer. This feature can be disabled if the
-  // HTTP client does not properly handles such answers.
-  "HttpDescribeErrors" : true,
-
-  // Enable HTTP compression to improve network bandwidth utilization,
-  // at the expense of more computations on the server. Orthanc
-  // supports the "gzip" and "deflate" HTTP encodings.
-  "HttpCompressionEnabled" : true,
-
-  // Enable the publication of the content of the Orthanc server as a
-  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
-  // share is mapped as "http://localhost:8042/webdav/".
-  "WebDavEnabled" : true,
-
-  // Whether to allow deletions through the WebDAV share. This is
-  // disabled by default to avoid accidental loss of DICOM instances.
-  "WebDavDeleteAllowed" : false,
-
-  // Whether to allow uploads through the WebDAV share.
-  "WebDavUploadAllowed" : true,
-
-
-
-  /**
-   * Configuration of the DICOM server
-   **/
-
-  // Enable the DICOM server. If this parameter is set to "false",
-  // Orthanc acts as a pure REST server. It will not be possible to
-  // receive files or to do query/retrieve through the DICOM protocol.
-  "DicomServerEnabled" : true,
-
-  // The DICOM Application Entity Title (cannot be longer than 16
-  // characters)
-  "DicomAet" : "ORTHANC",
-
-  // Check whether the called AET corresponds to the AET of Orthanc
-  // during an incoming DICOM SCU request
-  "DicomCheckCalledAet" : false,
-
-  // The DICOM port
-  "DicomPort" : 4242,
-
-  // The default encoding that is assumed for DICOM files without
-  // "SpecificCharacterSet" DICOM tag, and that is used when answering
-  // C-FIND requests (including worklists). The allowed values are
-  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
-  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
-  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
-  // "SimplifiedChinese".
-  "DefaultEncoding" : "Latin1",
-
-  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
-  // This is an array listing the accepted transfer syntax UIDs. Each
-  // entry can contain wildcards ("?" or "*"). By default, all the
-  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
-  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
-
-  // User-friendly groups of transfer syntaxes that can be enabled or
-  // disabled at once. These options are applied after the main
-  // "AcceptedTransferSyntaxes" option has been applied (if present).
-  /**
-     "DeflatedTransferSyntaxAccepted"     : true,
-     "JpegTransferSyntaxAccepted"         : true,
-     "Jpeg2000TransferSyntaxAccepted"     : true,
-     "JpegLosslessTransferSyntaxAccepted" : true,
-     "JpipTransferSyntaxAccepted"         : true,
-     "Mpeg2TransferSyntaxAccepted"        : true,
-     "RleTransferSyntaxAccepted"          : true,
-     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
-     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
-  **/
-  
-  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
-  // SOP classes (aka. "promiscuous mode")
-  "UnknownSopClassAccepted" : false,
-
-  // Set the timeout (in seconds) after which the DICOM associations
-  // are closed by the Orthanc SCP (server) if no further DIMSE
-  // command is received from the SCU (client).
-  "DicomScpTimeout" : 30,
-
-
-
-  /**
-   * Security-related options for the HTTP server
-   **/
-
-  // Whether remote hosts can connect to the HTTP server
-  "RemoteAccessAllowed" : false,
-
-  // Whether or not SSL is enabled
-  "SslEnabled" : false,
-
-  // Path to the SSL certificate used by the HTTP server. The file
-  // must be stored in the PEM format, and must contain both the
-  // certificate and the private key. This option is only meaningful
-  // if "SslEnabled" is true.
-  "SslCertificate" : "certificate.pem",
-
-  // Sets the minimum accepted SSL protocol version
-  // (cf. "ssl_protocol_version" option of civetweb). By default,
-  // require SSL 1.2. This option is only meaningful if "SslEnabled"
-  // is true. (new in Orthanc 1.8.2)
-  //
-  // Value => Protocols
-  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   2      TLS1.0+TLS1.1+TLS1.2
-  //   3      TLS1.1+TLS1.2
-  //   4      TLS1.2
-  "SslMinimumProtocolVersion" : 4,
-
-  // Set the accepted ciphers for SSL connections. The ciphers must be
-  // provided as a list of strings. If not set, this will default to
-  // FIPS 140-2 ciphers. This option is only meaningful if
-  // "SslEnabled" is true. (new in Orthanc 1.8.2)
-  /**
-    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
-  **/
-
-  // Whether or not peer client certificates shall be checked. This
-  // option is only meaningful if "SslEnabled" is true.
-  "SslVerifyPeers" : false,
-
-  // Path to a file containing the concatenation of the client SSL
-  // certificate(s) that are trusted to verify the identify of remote
-  // HTTP clients. The individual certificate(s) must be stored in the
-  // PEM format. This option is only meaningful if "SslVerifyPeers"
-  // is true.
-  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
-  
-  // Whether or not the password protection is enabled (using HTTP
-  // basic access authentication). Starting with Orthanc 1.5.8, if
-  // "AuthenticationEnabled" is not explicitly set, authentication is
-  // enabled iff. remote access is allowed (i.e. the default value of
-  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
-  /**
-     "AuthenticationEnabled" : false,
-   **/
-
-  // The list of the registered users. Because Orthanc uses HTTP
-  // Basic Authentication, the passwords are stored as plain text.
-  "RegisteredUsers" : {
-    // "alice" : "alicePassword"
-  },
-
-
-
-  /**
-   * Security-related options for the DICOM connections (SCU/SCP)
-   **/
-
-  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
-  "DicomTlsEnabled" : false,
-
-  // Path to the TLS certificate file (in PEM format) to be used for
-  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
-  // (outgoing DICOM connections). Note that contrarily to the
-  // "SslCertificate" option, the certificate and its private key must
-  // be split into two separate files. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsCertificate" : "orthanc.crt",
-  **/
-
-  // Path to the file containing the private key (in PEM format) that
-  // corresponds to the TLS certificate specified in option
-  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsPrivateKey" : "orthanc.key",
-  **/
-
-  // Path to a file containing all the TLS certificates that Orthanc
-  // can trust, both for its SCP (incoming DICOM connections) and SCU
-  // (outgoing DICOM connections). This file must contain a sequence
-  // of PEM certificates. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsTrustedCertificates" : "trusted.crt",
-  **/
-  
-  // Whether Orthanc rejects DICOM TLS connections to/from remote
-  // modalities that do not provide a certificate. Setting this option
-  // to "true" (resp. "false") corresponds to "--require-peer-cert"
-  // (resp. "--verify-peer-cert") in the DCMTK command-line
-  // tools. (new in Orthanc 1.9.3)
-  "DicomTlsRemoteCertificateRequired" : true,
-
-  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Orthanc 1.3.0
-  // is the only version to behave as if this argument were set to "false".
-  "DicomAlwaysAllowEcho" : true,
-
-  // Whether the Orthanc SCP allows incoming C-STORE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above)
-  "DicomAlwaysAllowStore" : true,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
-  // requests for patients/studies/series/instances. Use option
-  // "DicomAlwaysAllowFindWorklist" for worklists.
-  "DicomAlwaysAllowFind" : false,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
-  // even from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.10.0)
-  "DicomAlwaysAllowFindWorklist" : false,
-
-  // Whether the Orthanc SCP allows incoming C-GET requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  "DicomAlwaysAllowGet" : false,
-
-  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.7)
-  "DicomAlwaysAllowMove" : false,
-
-  // Whether Orthanc checks the IP/hostname address of the remote
-  // modality initiating a DICOM connection (as listed in the
-  // "DicomModalities" option above). If this option is set to
-  // "false", Orthanc only checks the AET of the remote modality.
-  "DicomCheckModalityHost" : false,
-
-
-
-  /**
-   * Network topology
-   **/
-
-  // The list of the known DICOM modalities. This option is ignored if
-  // "DicomModalitiesInDatabase" is set to "true", in which case you
-  // must use the REST API to define modalities.
-  "DicomModalities" : {
-    /**
-     * Uncommenting the following line would enable Orthanc to
-     * connect to an instance of the "storescp" open-source DICOM
-     * store (shipped in the DCMTK distribution), as started by the
-     * command line "storescp 2000". The first parameter is the
-     * AET of the remote modality (cannot be longer than 16 
-     * characters), the second one is the remote network address,
-     * and the third one is the TCP port number corresponding
-     * to the DICOM protocol on the remote modality (usually 104).
-     **/
-    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
-
-    /**
-     * A fourth parameter is available to enable patches for
-     * specific PACS manufacturers. The allowed values are currently:
-     * - "Generic" (default value),
-     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
-     *   in outgoing C-FIND requests originating from Orthanc),
-     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
-     *   in outgoing C-FIND SCU requests originating from Orthanc),
-     * - "Vitrea",
-     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
-     *   from GE Healthcare).
-     *
-     * This parameter is case-sensitive.
-     **/
-    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
-
-    /**
-     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
-     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
-     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
-     * it is possible to specify which DICOM commands are allowed,
-     * separately for each remote modality, using the syntax
-     * below.
-     *
-     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
-     * respectively if global option "DicomAlwaysAllowEcho"
-     * (resp. "DicomAlwaysAllowStore") is set to "false".
-     *
-     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
-     * disable the transcoding to uncompressed transfer syntaxes if
-     * this remote modality doesn't support compressed transfer
-     * syntaxes. This option currently applies to Orthanc C-GET SCP
-     * and to Orthanc C-STORE SCU. This option only has an effect if
-     * the global option "EnableTranscoding" is set to "true".
-     *
-     * By default, all "Allow*" options are true.
-     * "AllowStorageCommitment" is actually an alias for 
-     * "AllowNAction" & "AllowEventReport".
-     * 
-     * The "UseDicomTls" option specifies whether DICOM TLS should be
-     * used when opening a SCU connection from Orthanc to this remote
-     * modality. By default, DICOM TLS is not enabled.
-     *
-     * The "LocalAet" option allows one to overwrite the global
-     * "DicomAet" configuration option in order to specify another AET
-     * for Orthanc when initiating an SCU to this very specific
-     * modality. Similarly, "Timeout" allows one to overwrite the
-     * global value "DicomScuTimeout" on a per-modality basis.
-     **/
-    //"untrusted" : {
-    //  "AET" : "ORTHANC",
-    //  "Port" : 104,
-    //  "Host" : "127.0.0.1",
-    //  "Manufacturer" : "Generic",
-    //  "AllowEcho" : false,
-    //  "AllowFind" : false,
-    //  "AllowFindWorklist" : false,       // new in 1.10.0
-    //  "AllowGet"  : false,
-    //  "AllowMove" : false,
-    //  "AllowStore" : true,
-    //  "AllowStorageCommitment" : false,  // new in 1.6.0
-    //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
-    //  "Timeout" : 60                     // new in 1.9.1
-    //}
-  },
-
-  // Whether to store the DICOM modalities in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "DicomModalitiesInDatabase" : false,
-
-  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
-  // while testing the connectivity from Orthanc to a remote DICOM
-  // modality. This allows one to check that the remote modality does
-  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
-  "DicomEchoChecksFind" : false,
-
-  // The timeout (in seconds) after which the DICOM associations are
-  // considered as closed by the Orthanc SCU (client) if the remote
-  // DICOM SCP (server) does not answer.
-  "DicomScuTimeout" : 10,
-
-  // During a C-STORE SCU request initiated by Orthanc, if the remote
-  // modality doesn't support the original transfer syntax of some
-  // DICOM instance, specify which transfer syntax should be preferred
-  // to transcode this instance (provided the remote modality accepts
-  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
-  // was implicitly set to "Little Endian Implicit"
-  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
-  // this parameter is by default set to "Little Endian Explicit"
-  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
-  // a compressed transfer syntax. (new in Orthanc 1.9.0)
-  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
-
-  // Number of threads that are used by the embedded DICOM server.
-  // This defines the number of concurrent DICOM operations that can
-  // be run. Note: This is not limiting the number of concurrent
-  // connections. With a single thread, if a C-Find is received during
-  // e.g the transcoding of an incoming C-Store, it will have to wait
-  // until the end of the C-Store before being processed. (new in
-  // Orthanc 1.10.0, before this version, the value was fixed to 4)
-  "DicomThreadsCount" : 4,
-
-  // The list of the known Orthanc peers. This option is ignored if
-  // "OrthancPeersInDatabase" is set to "true", in which case you must
-  // use the REST API to define Orthanc peers.
-  "OrthancPeers" : {
-    /**
-     * Each line gives the base URL of an Orthanc peer, possibly
-     * followed by the username/password pair (if the password
-     * protection is enabled on the peer).
-     **/
-    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
-    // "peer2" : [ "http://127.0.0.1:8044/" ]
-
-    /**
-     * This is another, more advanced format to define Orthanc
-     * peers. It notably allows one to specify HTTP headers, a HTTPS
-     * client certificate in the PEM format (as in the "--cert" option
-     * of curl), or to enable PKCS#11 authentication for smart cards.
-     *
-     * The "Timeout" option allows one to overwrite the global value
-     * "HttpTimeout" on a per-peer basis.
-     **/
-    // "peer" : {
-    //   "Url" : "http://127.0.0.1:8043/",
-    //   "Username" : "alice",
-    //   "Password" : "alicePassword",
-    //   "HttpHeaders" : { "Token" : "Hello world" },
-    //   "CertificateFile" : "client.crt",
-    //   "CertificateKeyFile" : "client.key",
-    //   "CertificateKeyPassword" : "certpass",
-    //   "Pkcs11" : false,
-    //   "Timeout" : 42            // New in Orthanc 1.9.1
-    // }
-  },
-
-  // Whether to store the Orthanc peers in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "OrthancPeersInDatabase" : false,
-
-  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
-  // empty string, no HTTP proxy is used. For instance:
-  //   "HttpProxy" : "192.168.0.1:3128"
-  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
-  "HttpProxy" : "",
-
-  // If set to "true", debug messages from libcurl will be issued
-  // whenever Orthanc makes an outgoing HTTP request. This is notably
-  // useful to debug HTTPS-related problems.
-  "HttpVerbose" : false,
-
-  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
-  "HttpTimeout" : 60,
-
-  // Enable the verification of the peers during HTTPS requests. This
-  // option must be set to "false" if using self-signed certificates.
-  // Pay attention that setting this option to "false" results in
-  // security risks!
-  // Reference: http://curl.haxx.se/docs/sslcerts.html
-  "HttpsVerifyPeers" : true,
-
-  // Path to the CA (certification authority) certificates to validate
-  // peers in HTTPS requests. From curl documentation ("--cacert"
-  // option): "Tells curl to use the specified certificate file to
-  // verify the peers. The file may contain multiple CA
-  // certificates. The certificate(s) must be in PEM format." On
-  // Debian-based systems, this option can be set to
-  // "/etc/ssl/certs/ca-certificates.crt"
-  "HttpsCACertificates" : "",
-
-
-
-  /**
-   * Advanced options
-   **/
-
-  // Dictionary of symbolic names for the user-defined metadata. Each
-  // entry must map an unique string to an unique number between 1024
-  // and 65535. Reserved values:
-  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
-  "UserMetadata" : {
-    // "Sample" : 1024
-  },
-
-  // Dictionary of symbolic names for the user-defined types of
-  // attached files. Each entry must map an unique string to an unique
-  // number between 1024 and 65535. Optionally, a second argument can
-  // provided to specify a MIME content type for the attachment.
-  "UserContentType" : {
-    // "sample" : 1024
-    // "sample2" : [ 1025, "application/pdf" ]
-  },
-
-  // Number of seconds without receiving any instance before a
-  // patient, a study or a series is considered as stable.
-  "StableAge" : 60,
-
-  // By default, Orthanc compares AET (Application Entity Titles) in a
-  // case-insensitive way. Setting this option to "true" will enable
-  // case-sensitive matching.
-  "StrictAetComparison" : false,
-
-  // When the following option is "true", the MD5 of the DICOM files
-  // will be computed and stored in the Orthanc database. This
-  // information can be used to detect disk corruption, at the price
-  // of a small performance overhead.
-  "StoreMD5ForAttachments" : true,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Patient, Study or Series level. Setting this option to "0" means
-  // no limit.
-  "LimitFindResults" : 0,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Instance level. Setting this option to "0" means no limit.
-  "LimitFindInstances" : 0,
-
-  // If this option is set to "true" (default behavior until Orthanc
-  // 1.3.2), Orthanc will log the resources that are exported to other
-  // DICOM modalities or Orthanc peers, inside the URI
-  // "/exports". Setting this option to "false" is useful to prevent
-  // the index to grow indefinitely in auto-routing tasks (this is the
-  // default behavior since Orthanc 1.4.0).
-  "LogExportedResources" : false,
-
-  // Enable or disable HTTP Keep-Alive (persistent HTTP
-  // connections). Setting this option to "true" prevents Orthanc
-  // issue #32 ("HttpServer does not support multiple HTTP requests in
-  // the same TCP stream"), but can possibly slow down HTTP clients
-  // that do not support persistent connections. The default behavior
-  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
-  // "false" is also recommended if Orthanc is compiled against
-  // Mongoose.
-  "KeepAlive" : true,
-
-  // Enable or disable Nagle's algorithm. Only taken into
-  // consideration if Orthanc is compiled to use CivetWeb. Experiments
-  // show that best performance can be obtained by setting both
-  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
-  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
-  "TcpNoDelay" : true,
-
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
-
-  // If this option is set to "false", Orthanc will run in index-only
-  // mode. The DICOM files will not be stored on the drive: Orthanc
-  // only indexes the small subset of the so-called "main DICOM tags"
-  // in its SQL database. Note that this option might prevent the
-  // upgrade to newer versions of Orthanc. Also note that this
-  // behavior might not be available with the storage area plugins.
-  "StoreDicom" : true,
-
-  // DICOM associations initiated by Lua scripts are kept open as long
-  // as new DICOM commands are issued. This option sets the number of
-  // seconds of inactivity to wait before automatically closing a
-  // DICOM association used by Lua. If set to 0, the connection is
-  // closed immediately. This option is only used in Lua scripts.
-  "DicomAssociationCloseDelay" : 5,
-
-  // Maximum number of query/retrieve DICOM requests that are
-  // maintained by Orthanc. The least recently used requests get
-  // deleted as new requests are issued.
-  "QueryRetrieveSize" : 100,
-
-  // When handling a C-FIND SCP request, setting this flag to "true"
-  // will enable case-sensitive match for PN value representation
-  // (such as PatientName). By default, the search is
-  // case-insensitive, which does not follow the DICOM standard.
-  "CaseSensitivePN" : false,
-
-  // Configure PKCS#11 to use hardware security modules (HSM) and
-  // smart cards when carrying on HTTPS client authentication.
-  /**
-     "Pkcs11" : {
-       "Module" : "/usr/local/lib/libbeidpkcs11.so",
-       "Module" : "C:/Windows/System32/beidpkcs11.dll",
-       "Pin" : "1234",
-       "Verbose" : true
-     }
-   **/
-  
-  // If set to "false", Orthanc will not load its default dictionary
-  // of private tags. This might be necessary if you cannot import a
-  // DICOM file encoded using the Implicit VR Endian transfer syntax,
-  // and containing private tags: Such an import error might stem from
-  // a bad dictionary. You can still list your private tags of
-  // interest in the "Dictionary" configuration option below.
-  "LoadPrivateDictionary" : true,
-
-  // Locale to be used by Orthanc. Currently, only used if comparing
-  // strings in a case-insensitive way. It should be safe to keep this
-  // value undefined, which lets Orthanc autodetect the suitable locale.
-  // "Locale" : "en_US.UTF-8",
-
-  // Register a new tag in the dictionary of DICOM tags that are known
-  // to Orthanc. Each line must contain the tag (formatted as 2
-  // hexadecimal numbers), the value representation (2 upcase
-  // characters), a nickname for the tag, possibly the minimum
-  // multiplicity (> 0 with defaults to 1), possibly the maximum
-  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
-  // possibly the Private Creator (for private tags).
-  // Note: For private tags, you should only declare the lower 8 bits
-  // of the element since the higher 8 bits may vary from one file to
-  // the other.
-  "Dictionary" : {
-    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
-    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
-    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
-    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
-  },
-
-  // Load a set of external DICOM dictionaries in order to replace the
-  // default dictionaries. This option must contain a set of files in
-  // the DCMTK format. The order of the dictionaries *is*
-  // important. This option can be used to turn Orthanc into a DICONDE
-  // server. (new in Orthanc 1.9.4)
-  /**
-     "ExternalDictionaries" : [
-     "/usr/share/dcmtk/dicom.dic",
-     "/usr/share/dcmtk/diconde.dic"
-     ]
-  **/
-
-  // Whether to run DICOM C-MOVE operations synchronously. If set to
-  // "false" (asynchronous mode), each incoming C-MOVE request results
-  // in the creation of a new background job. Up to Orthanc 1.3.2, the
-  // implicit behavior was to use synchronous C-MOVE ("true"). Between
-  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
-  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
-  // behavior is back to synchronous C-MOVE ("true", which ensures
-  // backward compatibility with Orthanc <= 1.3.2).
-  "SynchronousCMove" : true,
-
-  // Maximum number of completed jobs that are kept in memory. A
-  // processing job is considered as complete once it is tagged as
-  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
-  // indicates to keep no job in memory (i.e. jobs are removed from
-  // the history as soon as they are completed), which prevents the
-  // use of some features of Orthanc (typically, synchronous mode in
-  // REST API) and should be avoided for non-developers.
-  "JobsHistorySize" : 10,
-
-  // Whether to save the jobs into the Orthanc database. If this
-  // option is set to "true", the pending/running/completed jobs are
-  // automatically reloaded from the database if Orthanc is stopped
-  // then restarted (except if the "--no-jobs" command-line argument
-  // is specified). This option should be set to "false" if multiple
-  // Orthanc servers are using the same database (e.g. if PostgreSQL
-  // or MariaDB/MySQL is used).
-  "SaveJobs" : true,
-
-  // Specifies how Orthanc reacts when it receives a DICOM instance
-  // whose SOPInstanceUID is already stored. If set to "true", the new
-  // instance replaces the old one. If set to "false", the new
-  // instance is discarded and the old one is kept. Up to Orthanc
-  // 1.4.1, the implicit behavior corresponded to "false".
-  "OverwriteInstances" : false,
-
-  // Maximum number of ZIP/media archives that are maintained by
-  // Orthanc, as a response to the asynchronous creation of archives.
-  // The least recently used archives get deleted as new archives are
-  // generated. This option was introduced in Orthanc 1.5.0, and has
-  // no effect on the synchronous generation of archives.
-  "MediaArchiveSize" : 1,
-
-  // Performance setting to specify how Orthanc accesses the storage
-  // area during find operations (C-FIND, /tools/find API route and
-  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
-  // allows Orthanc to read the storage area as soon as it needs an
-  // information that is not present in its database (slowest mode),
-  // (2) "Never" prevents Orthanc from accessing the storage area, and
-  // makes it uses exclusively its database (fastest mode), and (3)
-  // "Answers" allows Orthanc to read the storage area to generate its
-  // answers, but not to filter the DICOM resources (balance between
-  // the two modes). By default, the mode is "Always", which
-  // corresponds to the behavior of Orthanc <= 1.5.0.
-  "StorageAccessOnFind" : "Always",
-
-  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
-  // set to "true", the metrics can be retrieved at
-  // "/tools/metrics-prometheus" formetted using the Prometheus
-  // text-based exposition format.
-  "MetricsEnabled" : true,
-
-  // Whether calls to URI "/tools/execute-script" is enabled. Starting
-  // with Orthanc 1.5.8, this URI is disabled by default for security.
-  "ExecuteLuaEnabled" : false,
-
-  // Set the timeout while serving HTTP requests by the embedded Web
-  // server, in seconds. This corresponds to option
-  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
-  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
-  "HttpRequestTimeout" : 30,
-
-  // Set the default private creator that is used by Orthanc when it
-  // looks for a private tag in its dictionary (cf. "Dictionary"
-  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
-  "DefaultPrivateCreator" : "",
-
-  // Maximum number of storage commitment reports (i.e. received from
-  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
-  "StorageCommitmentReportsSize" : 100,
-
-  // Whether Orthanc transcodes DICOM files to an uncompressed
-  // transfer syntax over the DICOM protocol, if the remote modality
-  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
-  "TranscodeDicomProtocol" : true,
-
-  // If some plugin to decode/transcode DICOM instances is installed,
-  // this option specifies whether the built-in decoder/transcoder of
-  // Orthanc (that uses DCMTK) is applied before or after the plugins,
-  // or is not applied at all (new in Orthanc 1.7.0). The allowed
-  // values for this option are "After" (default value, corresponding
-  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
-  "BuiltinDecoderTranscoderOrder" : "After",
-
-  // If this option is set, Orthanc will transparently transcode any
-  // incoming DICOM instance to the given transfer syntax before
-  // storing it into its database. Beware that this might result in
-  // high CPU usage (if transcoding to some compressed transfer
-  // syntax), or in higher disk consumption (if transcoding to an
-  // uncompressed syntax). Also, beware that transcoding to a transfer
-  // syntax with lossy compression (notably JPEG) will change the
-  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
-  // the instance level, which might break external workflow.
-  /**
-     "IngestTranscoding" : "1.2.840.10008.1.2",
-  **/
-
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have an uncompressed transfer syntax, i.e. Little Endian
-  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
-  // Orthanc 1.8.2).
-  "IngestTranscodingOfUncompressed" : true,
-  
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
-  "IngestTranscodingOfCompressed" : true,
-  
-  // The compression level that is used when transcoding to one of the
-  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
-  "DicomLossyTranscodingQuality" : 90,
-
-  // Whether "fsync()" is called after each write to the storage area
-  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
-  // will run more slowly, but the DICOM are guaranteed to be
-  // immediately written to the disk. This option only makes sense if
-  // the builtin filesystem storage area is used. It defaults to
-  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
-  "SyncStorageArea" : true,
-
-  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
-  // ...)" while starting Orthanc. This has the same effect at setting
-  // the environment variable "MALLOC_ARENA_MAX". This avoids large
-  // growth in RES memory if the threads of the embedded HTTP server
-  // have to allocate large chunks of memory (typically the case with
-  // large DICOM files). By setting "MallocArenaMax" to "N", these
-  // threads share "N" memory pools (known as "arenas"). Setting this
-  // option to "0" doesn't call mallopt()", which was the behavior of
-  // Orthanc <= 1.8.1.
-  "MallocArenaMax" : 5,
-
-  // Deidentify/anonymize the contents of the logs (notably C-FIND,
-  // C-GET, and C-MOVE queries submitted to Orthanc) according to
-  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
-  "DeidentifyLogs" : true,
-
-  // If "DeidentifyLogs" is true, this sets the DICOM standard to
-  // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
-
-  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
-  // network protocol, expressed in bytes. This value affects both
-  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
-  // range is [4096,131072]. (new in Orthanc 1.9.0)
-  "MaximumPduLength" : 16384,
-
-  // Arbitrary identifier of this Orthanc server when storing its
-  // global properties if a custom index plugin is used. This
-  // identifier is only useful in the case of multiple
-  // readers/writers, in order to avoid collisions between multiple
-  // Orthanc servers. If unset, this identifier is taken as a SHA-1
-  // hash derived from the MAC addresses of the network interfaces,
-  // and from the AET and TCP ports used by Orthanc. Manually setting
-  // this option is needed in Docker/Kubernetes environments. (new in
-  // Orthanc 1.9.2)
-  /**
-     "DatabaseServerIdentifier" : "Orthanc1",
-  **/
-
-  // Whether Orthanc protects the modification of metadata and
-  // attachments using revisions, which is done using the HTTP headers
-  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
-  // API. This is needed to handle collisions between concurrent
-  // modifications in the case of multiple writers. The database
-  // back-end must support this option, which is notably *not* yet the
-  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
-  "CheckRevisions" : false,
-
-  // Whether Orthanc streams ZIP archive/media to the HTTP
-  // client. Setting this option to "false" corresponds to the
-  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
-  // to a temporary file, then sent to the client (which necessitates
-  // disk space and might lead to HTTP timeouts on large archives). If
-  // set to "true", the chunks of the ZIP file are progressively sent
-  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
-  "SynchronousZipStream" : true,
-
-  // Default number of loader threads when generating Zip archive/media.
-  // A value of 0 means reading and writing are performed in sequence
-  // (default behaviour).  A value > 1 is meaningful only if the storage
-  // is a distributed network storage (e.g object storage plugin).
-  // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0,
-
-  // Extra Main Dicom tags that are stored in DB together with all default
-  // Main Dicom tags that are already stored (TODO: see book new page). 
-  // (new in Orthanc 1.11.0)
-  // Sequences tags are not supported.
-  /**
-  "ExtraMainDicomTags" : {
-    "Instance" : [
-      "Rows",
-      "Columns",
-      "ImageType",
-      "SOPClassUID",
-      "ContentDate",
-      "ContentTime",
-      "FrameOfReferenceUID",
-      "PixelSpacing",
-      "SpecificCharacterSet",
-      "BitsAllocated"
-    ],
-    "Series" : [],
-    "Study": [],
-    "Patient": []
-  },
-  */
-
-  // Enables/disables warnings in the logs.
-  // "true" enables a warning.  All warnings are enabled by default
-  // TODO: see book new page
-  // (new in Orthanc 1.11.0)
-  "Warnings" : {
-    // A "RequestedTags" has been read from storage which is slower than
-    // reading it from DB.
-    // You might want to store this tag in ExtraMainDicomTags to build
-    // the response faster.
-    "W001_TagsBeingReadFromStorage": true,
-    
-    // Retrieving a list of Main dicom tags from a resource that has been
-    // saved with another "ExtraMainDicomTags" configuration which means that
-    // your response might be incomplete/inconsistent.
-    // You should call patients|studies|series|instances/../reconstruct to rebuild
-    // the DB.  TODO: also check for "rebuild DB" plugin
-    "W002_InconsistentDicomTagsInDb": true
-  }
-
-}
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index d5cb61514619..96c4bb3115ec 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -23,18 +23,19 @@ python_version=3
 # Create '_orthanc' user for the server
 system_accounts="_orthanc"
 _orthanc_descr="Orthanc server user"
-conf_files="etc/orthanc/Configuration.json"
+
+conf_files="/etc/orthanc/Configuration.json"
 
 post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
 	cd ${DESTDIR}
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
 	# Remove garbage
 	rm -rf builddir
-
-	vsv orthanc
-	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
 }
 
 Orthanc-devel_package() {

From a82a1d61b3cb34d18c00b98c3e79f1ba9f8af843 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 13/14] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 3efa389a99c5..bcd098f272e1 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -4,9 +4,9 @@ version=4.0
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DPYTHON_VERSION=3.10"
+ -DORTHANC_FRAMEWORK_VERSION=1.11.1"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"

From 0722158dc5f4273db82d1e6886f45d4f0be984e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 14/14] New package: dcmtk-3.6.7

---
 srcpkgs/dcmtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
index 63c28bc3c376..2efd9cc7850b 100644
--- a/srcpkgs/dcmtk/template
+++ b/srcpkgs/dcmtk/template
@@ -10,7 +10,7 @@ short_desc="Libraries and tools that implements DICOM standard"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="custom: see /usr/share/licenses/${pkgname}"
 homepage="https://dcmtk.org/dcmtk.php.en"
-distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
 checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
 
 pre_build() {

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR REVIEW] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (32 preceding siblings ...)
  2022-08-09 15:57 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-09 15:58 ` bingulo
  2022-08-09 16:45 ` bingulo
                   ` (28 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 15:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New review comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#discussion_r941500591

Comment:
okay, I will move it to /usr/lib/orthanc/plugins/ dir

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (33 preceding siblings ...)
  2022-08-09 15:58 ` [PR REVIEW] " bingulo
@ 2022-08-09 16:45 ` bingulo
  2022-08-09 16:48 ` ahesford
                   ` (27 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 16:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209622698

Comment:
Should I specify python3 on depends of Orthanc-Python? It don't explicity depends, but if it's compiled with python 3.10, as example, you cannot use it with python 3.11, as you need to compile with the specific python version flag. I'm thinking in put something like `depends="python3>=${py3_ver}<$(( ${py3_ver} + 1 ))"` (probably it shell expansion don't work, it's just to illustrate my idea)

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (34 preceding siblings ...)
  2022-08-09 16:45 ` bingulo
@ 2022-08-09 16:48 ` ahesford
  2022-08-09 16:51 ` bingulo
                   ` (26 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: ahesford @ 2022-08-09 16:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209625527

Comment:
No, just depend on `python3`. We only support one version of py3 in the repository and I bump *every* Python package when we do a minor version jump.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (35 preceding siblings ...)
  2022-08-09 16:48 ` ahesford
@ 2022-08-09 16:51 ` bingulo
  2022-08-09 16:56 ` [PR PATCH] [Updated] " bingulo
                   ` (25 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 16:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209628403

Comment:
> No, just depend on `python3`. We only support one version of py3 in the repository and I bump _every_ Python package when we do a minor version jump.

Of course, but I'm thinking on some case as version hold by user. In that example, the xbps shouldn't allow to upgrade python to 3.11 if the user holds Orthanc-Python on a version wich depends on 3.10.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (36 preceding siblings ...)
  2022-08-09 16:51 ` bingulo
@ 2022-08-09 16:56 ` bingulo
  2022-08-09 17:01 ` bingulo
                   ` (24 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 113682 bytes --]

From d2868b2ff35b7c893e6d789b65d2c7e53d5a796d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/18] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c458f6f54470034e011d0feeb16362a487ac911a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/18] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 199c66b6aedbaf2dc3351a423f9d5b9a99e7b382 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 637d5f15e8a4e3930bd86b023ba6faa0c635b28f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 6fac0c00a7f62deea5b29b869ef4b872ca37d8bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From 19da37678b2bbac9b049263d83956f63c45ac872 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 72983a4f0807ec87e8d03688106d8899bcdfd814 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/18] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From 7d0d7559d3d19a24d2f77bc9712e60524e46ccfd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 1937bf3deace1540c11d828899869bd218d0e5e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 27727f5fceee71b30d0bab95dd0e0f0764ba6315 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From 672fef8a46fb48b00a67a29ab6c19d6f50650dd4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

From 28295cf4013a38911719d903831794b127478322 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 12/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/Configuration.json | 915 -----------------------
 srcpkgs/Orthanc/patches/config.patch     |  28 +
 srcpkgs/Orthanc/template                 |   9 +-
 3 files changed, 33 insertions(+), 919 deletions(-)
 delete mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100644 srcpkgs/Orthanc/patches/config.patch

diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
deleted file mode 100644
index e0e594bb4647..000000000000
--- a/srcpkgs/Orthanc/files/Configuration.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
-  /**
-   * General configuration of Orthanc
-   **/
-
-  // The logical name of this instance of Orthanc. This one is
-  // displayed in Orthanc Explorer and at the URI "/system".
-  "Name" : "MyOrthanc",
-
-  // Path to the directory that holds the heavyweight files (i.e. the
-  // raw DICOM instances). Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "StorageDirectory" : "/var/lib/OrthancStorage",
-
-  // 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" : "/var/lib/OrthancStorage",
-
-  // Path to the directory where Orthanc stores its large temporary
-  // files. The content of this folder can be safely deleted once
-  // Orthanc is stopped. The folder must exist. The corresponding
-  // filesystem must be properly sized, given that for instance a ZIP
-  // archive of DICOM images created by a job can weight several GBs,
-  // and that there might be up to "min(JobsHistorySize,
-  // MediaArchiveSize)" archives to be stored simultaneously. If not
-  // set, Orthanc will use the default temporary folder of the
-  // operating system (such as "/tmp/" on UNIX-like systems, or
-  // "C:/Temp" on Microsoft Windows).
-  // "TemporaryDirectory" : "/tmp/Orthanc/",
-
-  // Enable the transparent compression of the DICOM instances
-  "StorageCompression" : false,
-
-  // Maximum size of the storage in MB (a value of "0" indicates no
-  // limit on the storage size)
-  "MaximumStorageSize" : 0,
-
-  // Maximum number of patients that can be stored at a given time
-  // in the storage (a value of "0" indicates no limit on the number
-  // of patients)
-  "MaximumPatientCount" : 0,
-
-  // Maximum size of the storage cache in MB.  The storage cache
-  // is stored in RAM and contains a copy of recently accessed
-  // files (written or read).  A value of "0" indicates the cache
-  // is disabled.  (new in Orthanc 1.10.0)
-  "MaximumStorageCacheSize" : 128,
-
-  // List of paths to the custom Lua scripts that are to be loaded
-  // into this instance of Orthanc
-  "LuaScripts" : [
-  ],
-
-  // The period (in seconds) between 2 calls of the "OnHeartBeat"
-  // lua callback.  O means the heart beat is disabled.
-  // TODO: text below for Orthanc book:
-  // Note: that the period is not actually the delay between
-  // the end of an execution and the triggering of the next one.
-  // Since there is only one lua context, if other lua code is being
-  // executed, the heart beat might be delayed even more.
-  "LuaHeartBeatPeriod" : 0,
-
-  // List of paths to the plugins that are to be loaded into this
-  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
-  // "./PluginTest.dll" for Windows). These paths can refer to
-  // folders, in which case they will be scanned non-recursively to
-  // find shared libraries. Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "Plugins" : [
-  ],
-
-  // Maximum number of processing jobs that are simultaneously running
-  // at any given time. A value of "0" indicates to use all the
-  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
-  // this value to "1".
-  "ConcurrentJobs" : 2,
-
-
-  /**
-   * Configuration of the HTTP server
-   **/
-
-  // Enable the HTTP server. If this parameter is set to "false",
-  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
-  // Explorer will not be available.
-  "HttpServerEnabled" : true,
-
-  // Enable/disable the Orthanc Explorer Web user interface. This
-  // option is only meaningful if the "HttpServerEnabled" option is
-  // set to "true" (new in Orthanc 1.8.2).
-  "OrthancExplorerEnabled" : true,
-
-  // HTTP port for the REST services and for the GUI
-  "HttpPort" : 8042,
-
-  // When the following option is "true", if an error is encountered
-  // while calling the REST API, a JSON message describing the error
-  // is put in the HTTP answer. This feature can be disabled if the
-  // HTTP client does not properly handles such answers.
-  "HttpDescribeErrors" : true,
-
-  // Enable HTTP compression to improve network bandwidth utilization,
-  // at the expense of more computations on the server. Orthanc
-  // supports the "gzip" and "deflate" HTTP encodings.
-  "HttpCompressionEnabled" : true,
-
-  // Enable the publication of the content of the Orthanc server as a
-  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
-  // share is mapped as "http://localhost:8042/webdav/".
-  "WebDavEnabled" : true,
-
-  // Whether to allow deletions through the WebDAV share. This is
-  // disabled by default to avoid accidental loss of DICOM instances.
-  "WebDavDeleteAllowed" : false,
-
-  // Whether to allow uploads through the WebDAV share.
-  "WebDavUploadAllowed" : true,
-
-
-
-  /**
-   * Configuration of the DICOM server
-   **/
-
-  // Enable the DICOM server. If this parameter is set to "false",
-  // Orthanc acts as a pure REST server. It will not be possible to
-  // receive files or to do query/retrieve through the DICOM protocol.
-  "DicomServerEnabled" : true,
-
-  // The DICOM Application Entity Title (cannot be longer than 16
-  // characters)
-  "DicomAet" : "ORTHANC",
-
-  // Check whether the called AET corresponds to the AET of Orthanc
-  // during an incoming DICOM SCU request
-  "DicomCheckCalledAet" : false,
-
-  // The DICOM port
-  "DicomPort" : 4242,
-
-  // The default encoding that is assumed for DICOM files without
-  // "SpecificCharacterSet" DICOM tag, and that is used when answering
-  // C-FIND requests (including worklists). The allowed values are
-  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
-  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
-  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
-  // "SimplifiedChinese".
-  "DefaultEncoding" : "Latin1",
-
-  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
-  // This is an array listing the accepted transfer syntax UIDs. Each
-  // entry can contain wildcards ("?" or "*"). By default, all the
-  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
-  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
-
-  // User-friendly groups of transfer syntaxes that can be enabled or
-  // disabled at once. These options are applied after the main
-  // "AcceptedTransferSyntaxes" option has been applied (if present).
-  /**
-     "DeflatedTransferSyntaxAccepted"     : true,
-     "JpegTransferSyntaxAccepted"         : true,
-     "Jpeg2000TransferSyntaxAccepted"     : true,
-     "JpegLosslessTransferSyntaxAccepted" : true,
-     "JpipTransferSyntaxAccepted"         : true,
-     "Mpeg2TransferSyntaxAccepted"        : true,
-     "RleTransferSyntaxAccepted"          : true,
-     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
-     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
-  **/
-  
-  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
-  // SOP classes (aka. "promiscuous mode")
-  "UnknownSopClassAccepted" : false,
-
-  // Set the timeout (in seconds) after which the DICOM associations
-  // are closed by the Orthanc SCP (server) if no further DIMSE
-  // command is received from the SCU (client).
-  "DicomScpTimeout" : 30,
-
-
-
-  /**
-   * Security-related options for the HTTP server
-   **/
-
-  // Whether remote hosts can connect to the HTTP server
-  "RemoteAccessAllowed" : false,
-
-  // Whether or not SSL is enabled
-  "SslEnabled" : false,
-
-  // Path to the SSL certificate used by the HTTP server. The file
-  // must be stored in the PEM format, and must contain both the
-  // certificate and the private key. This option is only meaningful
-  // if "SslEnabled" is true.
-  "SslCertificate" : "certificate.pem",
-
-  // Sets the minimum accepted SSL protocol version
-  // (cf. "ssl_protocol_version" option of civetweb). By default,
-  // require SSL 1.2. This option is only meaningful if "SslEnabled"
-  // is true. (new in Orthanc 1.8.2)
-  //
-  // Value => Protocols
-  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   2      TLS1.0+TLS1.1+TLS1.2
-  //   3      TLS1.1+TLS1.2
-  //   4      TLS1.2
-  "SslMinimumProtocolVersion" : 4,
-
-  // Set the accepted ciphers for SSL connections. The ciphers must be
-  // provided as a list of strings. If not set, this will default to
-  // FIPS 140-2 ciphers. This option is only meaningful if
-  // "SslEnabled" is true. (new in Orthanc 1.8.2)
-  /**
-    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
-  **/
-
-  // Whether or not peer client certificates shall be checked. This
-  // option is only meaningful if "SslEnabled" is true.
-  "SslVerifyPeers" : false,
-
-  // Path to a file containing the concatenation of the client SSL
-  // certificate(s) that are trusted to verify the identify of remote
-  // HTTP clients. The individual certificate(s) must be stored in the
-  // PEM format. This option is only meaningful if "SslVerifyPeers"
-  // is true.
-  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
-  
-  // Whether or not the password protection is enabled (using HTTP
-  // basic access authentication). Starting with Orthanc 1.5.8, if
-  // "AuthenticationEnabled" is not explicitly set, authentication is
-  // enabled iff. remote access is allowed (i.e. the default value of
-  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
-  /**
-     "AuthenticationEnabled" : false,
-   **/
-
-  // The list of the registered users. Because Orthanc uses HTTP
-  // Basic Authentication, the passwords are stored as plain text.
-  "RegisteredUsers" : {
-    // "alice" : "alicePassword"
-  },
-
-
-
-  /**
-   * Security-related options for the DICOM connections (SCU/SCP)
-   **/
-
-  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
-  "DicomTlsEnabled" : false,
-
-  // Path to the TLS certificate file (in PEM format) to be used for
-  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
-  // (outgoing DICOM connections). Note that contrarily to the
-  // "SslCertificate" option, the certificate and its private key must
-  // be split into two separate files. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsCertificate" : "orthanc.crt",
-  **/
-
-  // Path to the file containing the private key (in PEM format) that
-  // corresponds to the TLS certificate specified in option
-  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsPrivateKey" : "orthanc.key",
-  **/
-
-  // Path to a file containing all the TLS certificates that Orthanc
-  // can trust, both for its SCP (incoming DICOM connections) and SCU
-  // (outgoing DICOM connections). This file must contain a sequence
-  // of PEM certificates. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsTrustedCertificates" : "trusted.crt",
-  **/
-  
-  // Whether Orthanc rejects DICOM TLS connections to/from remote
-  // modalities that do not provide a certificate. Setting this option
-  // to "true" (resp. "false") corresponds to "--require-peer-cert"
-  // (resp. "--verify-peer-cert") in the DCMTK command-line
-  // tools. (new in Orthanc 1.9.3)
-  "DicomTlsRemoteCertificateRequired" : true,
-
-  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Orthanc 1.3.0
-  // is the only version to behave as if this argument were set to "false".
-  "DicomAlwaysAllowEcho" : true,
-
-  // Whether the Orthanc SCP allows incoming C-STORE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above)
-  "DicomAlwaysAllowStore" : true,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
-  // requests for patients/studies/series/instances. Use option
-  // "DicomAlwaysAllowFindWorklist" for worklists.
-  "DicomAlwaysAllowFind" : false,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
-  // even from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.10.0)
-  "DicomAlwaysAllowFindWorklist" : false,
-
-  // Whether the Orthanc SCP allows incoming C-GET requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  "DicomAlwaysAllowGet" : false,
-
-  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.7)
-  "DicomAlwaysAllowMove" : false,
-
-  // Whether Orthanc checks the IP/hostname address of the remote
-  // modality initiating a DICOM connection (as listed in the
-  // "DicomModalities" option above). If this option is set to
-  // "false", Orthanc only checks the AET of the remote modality.
-  "DicomCheckModalityHost" : false,
-
-
-
-  /**
-   * Network topology
-   **/
-
-  // The list of the known DICOM modalities. This option is ignored if
-  // "DicomModalitiesInDatabase" is set to "true", in which case you
-  // must use the REST API to define modalities.
-  "DicomModalities" : {
-    /**
-     * Uncommenting the following line would enable Orthanc to
-     * connect to an instance of the "storescp" open-source DICOM
-     * store (shipped in the DCMTK distribution), as started by the
-     * command line "storescp 2000". The first parameter is the
-     * AET of the remote modality (cannot be longer than 16 
-     * characters), the second one is the remote network address,
-     * and the third one is the TCP port number corresponding
-     * to the DICOM protocol on the remote modality (usually 104).
-     **/
-    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
-
-    /**
-     * A fourth parameter is available to enable patches for
-     * specific PACS manufacturers. The allowed values are currently:
-     * - "Generic" (default value),
-     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
-     *   in outgoing C-FIND requests originating from Orthanc),
-     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
-     *   in outgoing C-FIND SCU requests originating from Orthanc),
-     * - "Vitrea",
-     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
-     *   from GE Healthcare).
-     *
-     * This parameter is case-sensitive.
-     **/
-    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
-
-    /**
-     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
-     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
-     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
-     * it is possible to specify which DICOM commands are allowed,
-     * separately for each remote modality, using the syntax
-     * below.
-     *
-     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
-     * respectively if global option "DicomAlwaysAllowEcho"
-     * (resp. "DicomAlwaysAllowStore") is set to "false".
-     *
-     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
-     * disable the transcoding to uncompressed transfer syntaxes if
-     * this remote modality doesn't support compressed transfer
-     * syntaxes. This option currently applies to Orthanc C-GET SCP
-     * and to Orthanc C-STORE SCU. This option only has an effect if
-     * the global option "EnableTranscoding" is set to "true".
-     *
-     * By default, all "Allow*" options are true.
-     * "AllowStorageCommitment" is actually an alias for 
-     * "AllowNAction" & "AllowEventReport".
-     * 
-     * The "UseDicomTls" option specifies whether DICOM TLS should be
-     * used when opening a SCU connection from Orthanc to this remote
-     * modality. By default, DICOM TLS is not enabled.
-     *
-     * The "LocalAet" option allows one to overwrite the global
-     * "DicomAet" configuration option in order to specify another AET
-     * for Orthanc when initiating an SCU to this very specific
-     * modality. Similarly, "Timeout" allows one to overwrite the
-     * global value "DicomScuTimeout" on a per-modality basis.
-     **/
-    //"untrusted" : {
-    //  "AET" : "ORTHANC",
-    //  "Port" : 104,
-    //  "Host" : "127.0.0.1",
-    //  "Manufacturer" : "Generic",
-    //  "AllowEcho" : false,
-    //  "AllowFind" : false,
-    //  "AllowFindWorklist" : false,       // new in 1.10.0
-    //  "AllowGet"  : false,
-    //  "AllowMove" : false,
-    //  "AllowStore" : true,
-    //  "AllowStorageCommitment" : false,  // new in 1.6.0
-    //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
-    //  "Timeout" : 60                     // new in 1.9.1
-    //}
-  },
-
-  // Whether to store the DICOM modalities in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "DicomModalitiesInDatabase" : false,
-
-  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
-  // while testing the connectivity from Orthanc to a remote DICOM
-  // modality. This allows one to check that the remote modality does
-  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
-  "DicomEchoChecksFind" : false,
-
-  // The timeout (in seconds) after which the DICOM associations are
-  // considered as closed by the Orthanc SCU (client) if the remote
-  // DICOM SCP (server) does not answer.
-  "DicomScuTimeout" : 10,
-
-  // During a C-STORE SCU request initiated by Orthanc, if the remote
-  // modality doesn't support the original transfer syntax of some
-  // DICOM instance, specify which transfer syntax should be preferred
-  // to transcode this instance (provided the remote modality accepts
-  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
-  // was implicitly set to "Little Endian Implicit"
-  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
-  // this parameter is by default set to "Little Endian Explicit"
-  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
-  // a compressed transfer syntax. (new in Orthanc 1.9.0)
-  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
-
-  // Number of threads that are used by the embedded DICOM server.
-  // This defines the number of concurrent DICOM operations that can
-  // be run. Note: This is not limiting the number of concurrent
-  // connections. With a single thread, if a C-Find is received during
-  // e.g the transcoding of an incoming C-Store, it will have to wait
-  // until the end of the C-Store before being processed. (new in
-  // Orthanc 1.10.0, before this version, the value was fixed to 4)
-  "DicomThreadsCount" : 4,
-
-  // The list of the known Orthanc peers. This option is ignored if
-  // "OrthancPeersInDatabase" is set to "true", in which case you must
-  // use the REST API to define Orthanc peers.
-  "OrthancPeers" : {
-    /**
-     * Each line gives the base URL of an Orthanc peer, possibly
-     * followed by the username/password pair (if the password
-     * protection is enabled on the peer).
-     **/
-    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
-    // "peer2" : [ "http://127.0.0.1:8044/" ]
-
-    /**
-     * This is another, more advanced format to define Orthanc
-     * peers. It notably allows one to specify HTTP headers, a HTTPS
-     * client certificate in the PEM format (as in the "--cert" option
-     * of curl), or to enable PKCS#11 authentication for smart cards.
-     *
-     * The "Timeout" option allows one to overwrite the global value
-     * "HttpTimeout" on a per-peer basis.
-     **/
-    // "peer" : {
-    //   "Url" : "http://127.0.0.1:8043/",
-    //   "Username" : "alice",
-    //   "Password" : "alicePassword",
-    //   "HttpHeaders" : { "Token" : "Hello world" },
-    //   "CertificateFile" : "client.crt",
-    //   "CertificateKeyFile" : "client.key",
-    //   "CertificateKeyPassword" : "certpass",
-    //   "Pkcs11" : false,
-    //   "Timeout" : 42            // New in Orthanc 1.9.1
-    // }
-  },
-
-  // Whether to store the Orthanc peers in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "OrthancPeersInDatabase" : false,
-
-  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
-  // empty string, no HTTP proxy is used. For instance:
-  //   "HttpProxy" : "192.168.0.1:3128"
-  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
-  "HttpProxy" : "",
-
-  // If set to "true", debug messages from libcurl will be issued
-  // whenever Orthanc makes an outgoing HTTP request. This is notably
-  // useful to debug HTTPS-related problems.
-  "HttpVerbose" : false,
-
-  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
-  "HttpTimeout" : 60,
-
-  // Enable the verification of the peers during HTTPS requests. This
-  // option must be set to "false" if using self-signed certificates.
-  // Pay attention that setting this option to "false" results in
-  // security risks!
-  // Reference: http://curl.haxx.se/docs/sslcerts.html
-  "HttpsVerifyPeers" : true,
-
-  // Path to the CA (certification authority) certificates to validate
-  // peers in HTTPS requests. From curl documentation ("--cacert"
-  // option): "Tells curl to use the specified certificate file to
-  // verify the peers. The file may contain multiple CA
-  // certificates. The certificate(s) must be in PEM format." On
-  // Debian-based systems, this option can be set to
-  // "/etc/ssl/certs/ca-certificates.crt"
-  "HttpsCACertificates" : "",
-
-
-
-  /**
-   * Advanced options
-   **/
-
-  // Dictionary of symbolic names for the user-defined metadata. Each
-  // entry must map an unique string to an unique number between 1024
-  // and 65535. Reserved values:
-  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
-  "UserMetadata" : {
-    // "Sample" : 1024
-  },
-
-  // Dictionary of symbolic names for the user-defined types of
-  // attached files. Each entry must map an unique string to an unique
-  // number between 1024 and 65535. Optionally, a second argument can
-  // provided to specify a MIME content type for the attachment.
-  "UserContentType" : {
-    // "sample" : 1024
-    // "sample2" : [ 1025, "application/pdf" ]
-  },
-
-  // Number of seconds without receiving any instance before a
-  // patient, a study or a series is considered as stable.
-  "StableAge" : 60,
-
-  // By default, Orthanc compares AET (Application Entity Titles) in a
-  // case-insensitive way. Setting this option to "true" will enable
-  // case-sensitive matching.
-  "StrictAetComparison" : false,
-
-  // When the following option is "true", the MD5 of the DICOM files
-  // will be computed and stored in the Orthanc database. This
-  // information can be used to detect disk corruption, at the price
-  // of a small performance overhead.
-  "StoreMD5ForAttachments" : true,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Patient, Study or Series level. Setting this option to "0" means
-  // no limit.
-  "LimitFindResults" : 0,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Instance level. Setting this option to "0" means no limit.
-  "LimitFindInstances" : 0,
-
-  // If this option is set to "true" (default behavior until Orthanc
-  // 1.3.2), Orthanc will log the resources that are exported to other
-  // DICOM modalities or Orthanc peers, inside the URI
-  // "/exports". Setting this option to "false" is useful to prevent
-  // the index to grow indefinitely in auto-routing tasks (this is the
-  // default behavior since Orthanc 1.4.0).
-  "LogExportedResources" : false,
-
-  // Enable or disable HTTP Keep-Alive (persistent HTTP
-  // connections). Setting this option to "true" prevents Orthanc
-  // issue #32 ("HttpServer does not support multiple HTTP requests in
-  // the same TCP stream"), but can possibly slow down HTTP clients
-  // that do not support persistent connections. The default behavior
-  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
-  // "false" is also recommended if Orthanc is compiled against
-  // Mongoose.
-  "KeepAlive" : true,
-
-  // Enable or disable Nagle's algorithm. Only taken into
-  // consideration if Orthanc is compiled to use CivetWeb. Experiments
-  // show that best performance can be obtained by setting both
-  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
-  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
-  "TcpNoDelay" : true,
-
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
-
-  // If this option is set to "false", Orthanc will run in index-only
-  // mode. The DICOM files will not be stored on the drive: Orthanc
-  // only indexes the small subset of the so-called "main DICOM tags"
-  // in its SQL database. Note that this option might prevent the
-  // upgrade to newer versions of Orthanc. Also note that this
-  // behavior might not be available with the storage area plugins.
-  "StoreDicom" : true,
-
-  // DICOM associations initiated by Lua scripts are kept open as long
-  // as new DICOM commands are issued. This option sets the number of
-  // seconds of inactivity to wait before automatically closing a
-  // DICOM association used by Lua. If set to 0, the connection is
-  // closed immediately. This option is only used in Lua scripts.
-  "DicomAssociationCloseDelay" : 5,
-
-  // Maximum number of query/retrieve DICOM requests that are
-  // maintained by Orthanc. The least recently used requests get
-  // deleted as new requests are issued.
-  "QueryRetrieveSize" : 100,
-
-  // When handling a C-FIND SCP request, setting this flag to "true"
-  // will enable case-sensitive match for PN value representation
-  // (such as PatientName). By default, the search is
-  // case-insensitive, which does not follow the DICOM standard.
-  "CaseSensitivePN" : false,
-
-  // Configure PKCS#11 to use hardware security modules (HSM) and
-  // smart cards when carrying on HTTPS client authentication.
-  /**
-     "Pkcs11" : {
-       "Module" : "/usr/local/lib/libbeidpkcs11.so",
-       "Module" : "C:/Windows/System32/beidpkcs11.dll",
-       "Pin" : "1234",
-       "Verbose" : true
-     }
-   **/
-  
-  // If set to "false", Orthanc will not load its default dictionary
-  // of private tags. This might be necessary if you cannot import a
-  // DICOM file encoded using the Implicit VR Endian transfer syntax,
-  // and containing private tags: Such an import error might stem from
-  // a bad dictionary. You can still list your private tags of
-  // interest in the "Dictionary" configuration option below.
-  "LoadPrivateDictionary" : true,
-
-  // Locale to be used by Orthanc. Currently, only used if comparing
-  // strings in a case-insensitive way. It should be safe to keep this
-  // value undefined, which lets Orthanc autodetect the suitable locale.
-  // "Locale" : "en_US.UTF-8",
-
-  // Register a new tag in the dictionary of DICOM tags that are known
-  // to Orthanc. Each line must contain the tag (formatted as 2
-  // hexadecimal numbers), the value representation (2 upcase
-  // characters), a nickname for the tag, possibly the minimum
-  // multiplicity (> 0 with defaults to 1), possibly the maximum
-  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
-  // possibly the Private Creator (for private tags).
-  // Note: For private tags, you should only declare the lower 8 bits
-  // of the element since the higher 8 bits may vary from one file to
-  // the other.
-  "Dictionary" : {
-    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
-    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
-    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
-    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
-  },
-
-  // Load a set of external DICOM dictionaries in order to replace the
-  // default dictionaries. This option must contain a set of files in
-  // the DCMTK format. The order of the dictionaries *is*
-  // important. This option can be used to turn Orthanc into a DICONDE
-  // server. (new in Orthanc 1.9.4)
-  /**
-     "ExternalDictionaries" : [
-     "/usr/share/dcmtk/dicom.dic",
-     "/usr/share/dcmtk/diconde.dic"
-     ]
-  **/
-
-  // Whether to run DICOM C-MOVE operations synchronously. If set to
-  // "false" (asynchronous mode), each incoming C-MOVE request results
-  // in the creation of a new background job. Up to Orthanc 1.3.2, the
-  // implicit behavior was to use synchronous C-MOVE ("true"). Between
-  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
-  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
-  // behavior is back to synchronous C-MOVE ("true", which ensures
-  // backward compatibility with Orthanc <= 1.3.2).
-  "SynchronousCMove" : true,
-
-  // Maximum number of completed jobs that are kept in memory. A
-  // processing job is considered as complete once it is tagged as
-  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
-  // indicates to keep no job in memory (i.e. jobs are removed from
-  // the history as soon as they are completed), which prevents the
-  // use of some features of Orthanc (typically, synchronous mode in
-  // REST API) and should be avoided for non-developers.
-  "JobsHistorySize" : 10,
-
-  // Whether to save the jobs into the Orthanc database. If this
-  // option is set to "true", the pending/running/completed jobs are
-  // automatically reloaded from the database if Orthanc is stopped
-  // then restarted (except if the "--no-jobs" command-line argument
-  // is specified). This option should be set to "false" if multiple
-  // Orthanc servers are using the same database (e.g. if PostgreSQL
-  // or MariaDB/MySQL is used).
-  "SaveJobs" : true,
-
-  // Specifies how Orthanc reacts when it receives a DICOM instance
-  // whose SOPInstanceUID is already stored. If set to "true", the new
-  // instance replaces the old one. If set to "false", the new
-  // instance is discarded and the old one is kept. Up to Orthanc
-  // 1.4.1, the implicit behavior corresponded to "false".
-  "OverwriteInstances" : false,
-
-  // Maximum number of ZIP/media archives that are maintained by
-  // Orthanc, as a response to the asynchronous creation of archives.
-  // The least recently used archives get deleted as new archives are
-  // generated. This option was introduced in Orthanc 1.5.0, and has
-  // no effect on the synchronous generation of archives.
-  "MediaArchiveSize" : 1,
-
-  // Performance setting to specify how Orthanc accesses the storage
-  // area during find operations (C-FIND, /tools/find API route and
-  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
-  // allows Orthanc to read the storage area as soon as it needs an
-  // information that is not present in its database (slowest mode),
-  // (2) "Never" prevents Orthanc from accessing the storage area, and
-  // makes it uses exclusively its database (fastest mode), and (3)
-  // "Answers" allows Orthanc to read the storage area to generate its
-  // answers, but not to filter the DICOM resources (balance between
-  // the two modes). By default, the mode is "Always", which
-  // corresponds to the behavior of Orthanc <= 1.5.0.
-  "StorageAccessOnFind" : "Always",
-
-  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
-  // set to "true", the metrics can be retrieved at
-  // "/tools/metrics-prometheus" formetted using the Prometheus
-  // text-based exposition format.
-  "MetricsEnabled" : true,
-
-  // Whether calls to URI "/tools/execute-script" is enabled. Starting
-  // with Orthanc 1.5.8, this URI is disabled by default for security.
-  "ExecuteLuaEnabled" : false,
-
-  // Set the timeout while serving HTTP requests by the embedded Web
-  // server, in seconds. This corresponds to option
-  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
-  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
-  "HttpRequestTimeout" : 30,
-
-  // Set the default private creator that is used by Orthanc when it
-  // looks for a private tag in its dictionary (cf. "Dictionary"
-  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
-  "DefaultPrivateCreator" : "",
-
-  // Maximum number of storage commitment reports (i.e. received from
-  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
-  "StorageCommitmentReportsSize" : 100,
-
-  // Whether Orthanc transcodes DICOM files to an uncompressed
-  // transfer syntax over the DICOM protocol, if the remote modality
-  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
-  "TranscodeDicomProtocol" : true,
-
-  // If some plugin to decode/transcode DICOM instances is installed,
-  // this option specifies whether the built-in decoder/transcoder of
-  // Orthanc (that uses DCMTK) is applied before or after the plugins,
-  // or is not applied at all (new in Orthanc 1.7.0). The allowed
-  // values for this option are "After" (default value, corresponding
-  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
-  "BuiltinDecoderTranscoderOrder" : "After",
-
-  // If this option is set, Orthanc will transparently transcode any
-  // incoming DICOM instance to the given transfer syntax before
-  // storing it into its database. Beware that this might result in
-  // high CPU usage (if transcoding to some compressed transfer
-  // syntax), or in higher disk consumption (if transcoding to an
-  // uncompressed syntax). Also, beware that transcoding to a transfer
-  // syntax with lossy compression (notably JPEG) will change the
-  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
-  // the instance level, which might break external workflow.
-  /**
-     "IngestTranscoding" : "1.2.840.10008.1.2",
-  **/
-
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have an uncompressed transfer syntax, i.e. Little Endian
-  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
-  // Orthanc 1.8.2).
-  "IngestTranscodingOfUncompressed" : true,
-  
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
-  "IngestTranscodingOfCompressed" : true,
-  
-  // The compression level that is used when transcoding to one of the
-  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
-  "DicomLossyTranscodingQuality" : 90,
-
-  // Whether "fsync()" is called after each write to the storage area
-  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
-  // will run more slowly, but the DICOM are guaranteed to be
-  // immediately written to the disk. This option only makes sense if
-  // the builtin filesystem storage area is used. It defaults to
-  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
-  "SyncStorageArea" : true,
-
-  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
-  // ...)" while starting Orthanc. This has the same effect at setting
-  // the environment variable "MALLOC_ARENA_MAX". This avoids large
-  // growth in RES memory if the threads of the embedded HTTP server
-  // have to allocate large chunks of memory (typically the case with
-  // large DICOM files). By setting "MallocArenaMax" to "N", these
-  // threads share "N" memory pools (known as "arenas"). Setting this
-  // option to "0" doesn't call mallopt()", which was the behavior of
-  // Orthanc <= 1.8.1.
-  "MallocArenaMax" : 5,
-
-  // Deidentify/anonymize the contents of the logs (notably C-FIND,
-  // C-GET, and C-MOVE queries submitted to Orthanc) according to
-  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
-  "DeidentifyLogs" : true,
-
-  // If "DeidentifyLogs" is true, this sets the DICOM standard to
-  // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
-
-  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
-  // network protocol, expressed in bytes. This value affects both
-  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
-  // range is [4096,131072]. (new in Orthanc 1.9.0)
-  "MaximumPduLength" : 16384,
-
-  // Arbitrary identifier of this Orthanc server when storing its
-  // global properties if a custom index plugin is used. This
-  // identifier is only useful in the case of multiple
-  // readers/writers, in order to avoid collisions between multiple
-  // Orthanc servers. If unset, this identifier is taken as a SHA-1
-  // hash derived from the MAC addresses of the network interfaces,
-  // and from the AET and TCP ports used by Orthanc. Manually setting
-  // this option is needed in Docker/Kubernetes environments. (new in
-  // Orthanc 1.9.2)
-  /**
-     "DatabaseServerIdentifier" : "Orthanc1",
-  **/
-
-  // Whether Orthanc protects the modification of metadata and
-  // attachments using revisions, which is done using the HTTP headers
-  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
-  // API. This is needed to handle collisions between concurrent
-  // modifications in the case of multiple writers. The database
-  // back-end must support this option, which is notably *not* yet the
-  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
-  "CheckRevisions" : false,
-
-  // Whether Orthanc streams ZIP archive/media to the HTTP
-  // client. Setting this option to "false" corresponds to the
-  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
-  // to a temporary file, then sent to the client (which necessitates
-  // disk space and might lead to HTTP timeouts on large archives). If
-  // set to "true", the chunks of the ZIP file are progressively sent
-  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
-  "SynchronousZipStream" : true,
-
-  // Default number of loader threads when generating Zip archive/media.
-  // A value of 0 means reading and writing are performed in sequence
-  // (default behaviour).  A value > 1 is meaningful only if the storage
-  // is a distributed network storage (e.g object storage plugin).
-  // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0,
-
-  // Extra Main Dicom tags that are stored in DB together with all default
-  // Main Dicom tags that are already stored (TODO: see book new page). 
-  // (new in Orthanc 1.11.0)
-  // Sequences tags are not supported.
-  /**
-  "ExtraMainDicomTags" : {
-    "Instance" : [
-      "Rows",
-      "Columns",
-      "ImageType",
-      "SOPClassUID",
-      "ContentDate",
-      "ContentTime",
-      "FrameOfReferenceUID",
-      "PixelSpacing",
-      "SpecificCharacterSet",
-      "BitsAllocated"
-    ],
-    "Series" : [],
-    "Study": [],
-    "Patient": []
-  },
-  */
-
-  // Enables/disables warnings in the logs.
-  // "true" enables a warning.  All warnings are enabled by default
-  // TODO: see book new page
-  // (new in Orthanc 1.11.0)
-  "Warnings" : {
-    // A "RequestedTags" has been read from storage which is slower than
-    // reading it from DB.
-    // You might want to store this tag in ExtraMainDicomTags to build
-    // the response faster.
-    "W001_TagsBeingReadFromStorage": true,
-    
-    // Retrieving a list of Main dicom tags from a resource that has been
-    // saved with another "ExtraMainDicomTags" configuration which means that
-    // your response might be incomplete/inconsistent.
-    // You should call patients|studies|series|instances/../reconstruct to rebuild
-    // the DB.  TODO: also check for "rebuild DB" plugin
-    "W002_InconsistentDicomTagsInDb": true
-  }
-
-}
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index d5cb61514619..96c4bb3115ec 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -23,18 +23,19 @@ python_version=3
 # Create '_orthanc' user for the server
 system_accounts="_orthanc"
 _orthanc_descr="Orthanc server user"
-conf_files="etc/orthanc/Configuration.json"
+
+conf_files="/etc/orthanc/Configuration.json"
 
 post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
 	cd ${DESTDIR}
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
 	# Remove garbage
 	rm -rf builddir
-
-	vsv orthanc
-	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
 }
 
 Orthanc-devel_package() {

From a82a1d61b3cb34d18c00b98c3e79f1ba9f8af843 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 13/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 3efa389a99c5..bcd098f272e1 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -4,9 +4,9 @@ version=4.0
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DPYTHON_VERSION=3.10"
+ -DORTHANC_FRAMEWORK_VERSION=1.11.1"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"

From 0722158dc5f4273db82d1e6886f45d4f0be984e1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 14/18] New package: dcmtk-3.6.7

---
 srcpkgs/dcmtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
index 63c28bc3c376..2efd9cc7850b 100644
--- a/srcpkgs/dcmtk/template
+++ b/srcpkgs/dcmtk/template
@@ -10,7 +10,7 @@ short_desc="Libraries and tools that implements DICOM standard"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="custom: see /usr/share/licenses/${pkgname}"
 homepage="https://dcmtk.org/dcmtk.php.en"
-distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
 checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
 
 pre_build() {

From 6274d56f580abed9e9a6626ba009868b1e152749 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 15/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index ce68fbd8038a..827b53a54a1f 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -4,7 +4,7 @@ version=1.9
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
 makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
@@ -15,8 +15,12 @@ license="AGPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
 checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

From e6b2ba532806b3a81ac8fec7410179ecae45aa3e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 16/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index 96c4bb3115ec..74a83e19f8d2 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -17,7 +17,6 @@ license="GPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/index.php"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
 checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
-ignore_elf_dirs="/usr/share/orthanc"
 python_version=3
 
 # Create '_orthanc' user for the server
@@ -34,6 +33,10 @@ post_install() {
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
 	# Remove garbage
 	rm -rf builddir
 }
@@ -53,6 +56,6 @@ Orthanc-plugins_package() {
 	depends+=" ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - official plugins"
 	pkg_install() {
-		vmove usr/share/orthanc/plugins
+		vmove usr/lib/orthanc/plugins
 	}
 }

From 3b11996ea0c3cb2420d91a1f4b7fec0c133bd212 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 17/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 360fe0c56796..30a34fcff22d 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc="${pkgname/-}-${version}"
 build_wrksrc="PostgreSQL"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
 makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
@@ -16,8 +16,12 @@ license="AGPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
 checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

From 55023aa0e824f437e46924935b5e7100a5334396 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 18/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index bcd098f272e1..1d108f0513d5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
 configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
- -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DORTHANC_FRAMEWORK_VERSION=1.11.1"
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
@@ -15,8 +14,12 @@ license="AGPL-3.0-or-later"
 homepage="https://book.orthanc-server.com/plugins/python.html"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
 checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (37 preceding siblings ...)
  2022-08-09 16:56 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-09 17:01 ` bingulo
  2022-08-09 17:04 ` [PR PATCH] [Updated] " bingulo
                   ` (23 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 17:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209638539

Comment:
Now all the packages are building successfully on my local.

I'll try to cross build to the others archs now.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (38 preceding siblings ...)
  2022-08-09 17:01 ` bingulo
@ 2022-08-09 17:04 ` bingulo
  2022-08-09 17:47 ` Chocimier
                   ` (22 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 113682 bytes --]

From 244df9676ba9112285260f0c3f2231a0b4847702 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 01/18] New package: civetweb-1.15

---
 common/shlibs                              |  1 +
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 5 files changed, 58 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..a941669934ef 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 36cfae8e58b1952a05cdab9fff1b4dd25fa3c9f5 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 02/18] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index a941669934ef..39dd712edb27 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,3 +4186,31 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..63c28bc3c376
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From e9edadaf4cc49096eeb1d5790f02bd47e3c42a87 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 03/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                    |   1 +
 srcpkgs/Orthanc-plugins                  |   1 +
 srcpkgs/Orthanc/files/Configuration.json | 915 +++++++++++++++++++++++
 srcpkgs/Orthanc/files/orthanc/run        |  32 +
 srcpkgs/Orthanc/template                 |  57 ++
 5 files changed, 1006 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
new file mode 100644
index 000000000000..e0e594bb4647
--- /dev/null
+++ b/srcpkgs/Orthanc/files/Configuration.json
@@ -0,0 +1,915 @@
+{
+  /**
+   * General configuration of Orthanc
+   **/
+
+  // The logical name of this instance of Orthanc. This one is
+  // displayed in Orthanc Explorer and at the URI "/system".
+  "Name" : "MyOrthanc",
+
+  // Path to the directory that holds the heavyweight files (i.e. the
+  // raw DICOM instances). Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "StorageDirectory" : "/var/lib/OrthancStorage",
+
+  // 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" : "/var/lib/OrthancStorage",
+
+  // Path to the directory where Orthanc stores its large temporary
+  // files. The content of this folder can be safely deleted once
+  // Orthanc is stopped. The folder must exist. The corresponding
+  // filesystem must be properly sized, given that for instance a ZIP
+  // archive of DICOM images created by a job can weight several GBs,
+  // and that there might be up to "min(JobsHistorySize,
+  // MediaArchiveSize)" archives to be stored simultaneously. If not
+  // set, Orthanc will use the default temporary folder of the
+  // operating system (such as "/tmp/" on UNIX-like systems, or
+  // "C:/Temp" on Microsoft Windows).
+  // "TemporaryDirectory" : "/tmp/Orthanc/",
+
+  // Enable the transparent compression of the DICOM instances
+  "StorageCompression" : false,
+
+  // Maximum size of the storage in MB (a value of "0" indicates no
+  // limit on the storage size)
+  "MaximumStorageSize" : 0,
+
+  // Maximum number of patients that can be stored at a given time
+  // in the storage (a value of "0" indicates no limit on the number
+  // of patients)
+  "MaximumPatientCount" : 0,
+
+  // Maximum size of the storage cache in MB.  The storage cache
+  // is stored in RAM and contains a copy of recently accessed
+  // files (written or read).  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.10.0)
+  "MaximumStorageCacheSize" : 128,
+
+  // List of paths to the custom Lua scripts that are to be loaded
+  // into this instance of Orthanc
+  "LuaScripts" : [
+  ],
+
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is not actually the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
+  // List of paths to the plugins that are to be loaded into this
+  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
+  // "./PluginTest.dll" for Windows). These paths can refer to
+  // folders, in which case they will be scanned non-recursively to
+  // find shared libraries. Backslashes must be either escaped by
+  // doubling them, or replaced by forward slashes "/".
+  "Plugins" : [
+  ],
+
+  // Maximum number of processing jobs that are simultaneously running
+  // at any given time. A value of "0" indicates to use all the
+  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
+  // this value to "1".
+  "ConcurrentJobs" : 2,
+
+
+  /**
+   * Configuration of the HTTP server
+   **/
+
+  // Enable the HTTP server. If this parameter is set to "false",
+  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
+  // Explorer will not be available.
+  "HttpServerEnabled" : true,
+
+  // Enable/disable the Orthanc Explorer Web user interface. This
+  // option is only meaningful if the "HttpServerEnabled" option is
+  // set to "true" (new in Orthanc 1.8.2).
+  "OrthancExplorerEnabled" : true,
+
+  // HTTP port for the REST services and for the GUI
+  "HttpPort" : 8042,
+
+  // When the following option is "true", if an error is encountered
+  // while calling the REST API, a JSON message describing the error
+  // is put in the HTTP answer. This feature can be disabled if the
+  // HTTP client does not properly handles such answers.
+  "HttpDescribeErrors" : true,
+
+  // Enable HTTP compression to improve network bandwidth utilization,
+  // at the expense of more computations on the server. Orthanc
+  // supports the "gzip" and "deflate" HTTP encodings.
+  "HttpCompressionEnabled" : true,
+
+  // Enable the publication of the content of the Orthanc server as a
+  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
+  // share is mapped as "http://localhost:8042/webdav/".
+  "WebDavEnabled" : true,
+
+  // Whether to allow deletions through the WebDAV share. This is
+  // disabled by default to avoid accidental loss of DICOM instances.
+  "WebDavDeleteAllowed" : false,
+
+  // Whether to allow uploads through the WebDAV share.
+  "WebDavUploadAllowed" : true,
+
+
+
+  /**
+   * Configuration of the DICOM server
+   **/
+
+  // Enable the DICOM server. If this parameter is set to "false",
+  // Orthanc acts as a pure REST server. It will not be possible to
+  // receive files or to do query/retrieve through the DICOM protocol.
+  "DicomServerEnabled" : true,
+
+  // The DICOM Application Entity Title (cannot be longer than 16
+  // characters)
+  "DicomAet" : "ORTHANC",
+
+  // Check whether the called AET corresponds to the AET of Orthanc
+  // during an incoming DICOM SCU request
+  "DicomCheckCalledAet" : false,
+
+  // The DICOM port
+  "DicomPort" : 4242,
+
+  // The default encoding that is assumed for DICOM files without
+  // "SpecificCharacterSet" DICOM tag, and that is used when answering
+  // C-FIND requests (including worklists). The allowed values are
+  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
+  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
+  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
+  // "SimplifiedChinese".
+  "DefaultEncoding" : "Latin1",
+
+  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
+  // This is an array listing the accepted transfer syntax UIDs. Each
+  // entry can contain wildcards ("?" or "*"). By default, all the
+  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
+  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
+
+  // User-friendly groups of transfer syntaxes that can be enabled or
+  // disabled at once. These options are applied after the main
+  // "AcceptedTransferSyntaxes" option has been applied (if present).
+  /**
+     "DeflatedTransferSyntaxAccepted"     : true,
+     "JpegTransferSyntaxAccepted"         : true,
+     "Jpeg2000TransferSyntaxAccepted"     : true,
+     "JpegLosslessTransferSyntaxAccepted" : true,
+     "JpipTransferSyntaxAccepted"         : true,
+     "Mpeg2TransferSyntaxAccepted"        : true,
+     "RleTransferSyntaxAccepted"          : true,
+     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
+     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
+  **/
+  
+  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
+  // SOP classes (aka. "promiscuous mode")
+  "UnknownSopClassAccepted" : false,
+
+  // Set the timeout (in seconds) after which the DICOM associations
+  // are closed by the Orthanc SCP (server) if no further DIMSE
+  // command is received from the SCU (client).
+  "DicomScpTimeout" : 30,
+
+
+
+  /**
+   * Security-related options for the HTTP server
+   **/
+
+  // Whether remote hosts can connect to the HTTP server
+  "RemoteAccessAllowed" : false,
+
+  // Whether or not SSL is enabled
+  "SslEnabled" : false,
+
+  // Path to the SSL certificate used by the HTTP server. The file
+  // must be stored in the PEM format, and must contain both the
+  // certificate and the private key. This option is only meaningful
+  // if "SslEnabled" is true.
+  "SslCertificate" : "certificate.pem",
+
+  // Sets the minimum accepted SSL protocol version
+  // (cf. "ssl_protocol_version" option of civetweb). By default,
+  // require SSL 1.2. This option is only meaningful if "SslEnabled"
+  // is true. (new in Orthanc 1.8.2)
+  //
+  // Value => Protocols
+  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
+  //   2      TLS1.0+TLS1.1+TLS1.2
+  //   3      TLS1.1+TLS1.2
+  //   4      TLS1.2
+  "SslMinimumProtocolVersion" : 4,
+
+  // Set the accepted ciphers for SSL connections. The ciphers must be
+  // provided as a list of strings. If not set, this will default to
+  // FIPS 140-2 ciphers. This option is only meaningful if
+  // "SslEnabled" is true. (new in Orthanc 1.8.2)
+  /**
+    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
+  **/
+
+  // Whether or not peer client certificates shall be checked. This
+  // option is only meaningful if "SslEnabled" is true.
+  "SslVerifyPeers" : false,
+
+  // Path to a file containing the concatenation of the client SSL
+  // certificate(s) that are trusted to verify the identify of remote
+  // HTTP clients. The individual certificate(s) must be stored in the
+  // PEM format. This option is only meaningful if "SslVerifyPeers"
+  // is true.
+  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
+  
+  // Whether or not the password protection is enabled (using HTTP
+  // basic access authentication). Starting with Orthanc 1.5.8, if
+  // "AuthenticationEnabled" is not explicitly set, authentication is
+  // enabled iff. remote access is allowed (i.e. the default value of
+  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
+  /**
+     "AuthenticationEnabled" : false,
+   **/
+
+  // The list of the registered users. Because Orthanc uses HTTP
+  // Basic Authentication, the passwords are stored as plain text.
+  "RegisteredUsers" : {
+    // "alice" : "alicePassword"
+  },
+
+
+
+  /**
+   * Security-related options for the DICOM connections (SCU/SCP)
+   **/
+
+  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
+  "DicomTlsEnabled" : false,
+
+  // Path to the TLS certificate file (in PEM format) to be used for
+  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
+  // (outgoing DICOM connections). Note that contrarily to the
+  // "SslCertificate" option, the certificate and its private key must
+  // be split into two separate files. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsCertificate" : "orthanc.crt",
+  **/
+
+  // Path to the file containing the private key (in PEM format) that
+  // corresponds to the TLS certificate specified in option
+  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsPrivateKey" : "orthanc.key",
+  **/
+
+  // Path to a file containing all the TLS certificates that Orthanc
+  // can trust, both for its SCP (incoming DICOM connections) and SCU
+  // (outgoing DICOM connections). This file must contain a sequence
+  // of PEM certificates. (new in Orthanc 1.9.0)
+  /**
+     "DicomTlsTrustedCertificates" : "trusted.crt",
+  **/
+  
+  // Whether Orthanc rejects DICOM TLS connections to/from remote
+  // modalities that do not provide a certificate. Setting this option
+  // to "true" (resp. "false") corresponds to "--require-peer-cert"
+  // (resp. "--verify-peer-cert") in the DCMTK command-line
+  // tools. (new in Orthanc 1.9.3)
+  "DicomTlsRemoteCertificateRequired" : true,
+
+  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Orthanc 1.3.0
+  // is the only version to behave as if this argument were set to "false".
+  "DicomAlwaysAllowEcho" : true,
+
+  // Whether the Orthanc SCP allows incoming C-STORE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above)
+  "DicomAlwaysAllowStore" : true,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
+  // requests for patients/studies/series/instances. Use option
+  // "DicomAlwaysAllowFindWorklist" for worklists.
+  "DicomAlwaysAllowFind" : false,
+
+  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
+  // even from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.10.0)
+  "DicomAlwaysAllowFindWorklist" : false,
+
+  // Whether the Orthanc SCP allows incoming C-GET requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.0)
+  "DicomAlwaysAllowGet" : false,
+
+  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
+  // from SCU modalities it does not know about (i.e. that are not
+  // listed in the "DicomModalities" option above). Setting this
+  // option to "true" implies security risks. (new in Orthanc 1.9.7)
+  "DicomAlwaysAllowMove" : false,
+
+  // Whether Orthanc checks the IP/hostname address of the remote
+  // modality initiating a DICOM connection (as listed in the
+  // "DicomModalities" option above). If this option is set to
+  // "false", Orthanc only checks the AET of the remote modality.
+  "DicomCheckModalityHost" : false,
+
+
+
+  /**
+   * Network topology
+   **/
+
+  // The list of the known DICOM modalities. This option is ignored if
+  // "DicomModalitiesInDatabase" is set to "true", in which case you
+  // must use the REST API to define modalities.
+  "DicomModalities" : {
+    /**
+     * Uncommenting the following line would enable Orthanc to
+     * connect to an instance of the "storescp" open-source DICOM
+     * store (shipped in the DCMTK distribution), as started by the
+     * command line "storescp 2000". The first parameter is the
+     * AET of the remote modality (cannot be longer than 16 
+     * characters), the second one is the remote network address,
+     * and the third one is the TCP port number corresponding
+     * to the DICOM protocol on the remote modality (usually 104).
+     **/
+    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
+
+    /**
+     * A fourth parameter is available to enable patches for
+     * specific PACS manufacturers. The allowed values are currently:
+     * - "Generic" (default value),
+     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
+     *   in outgoing C-FIND requests originating from Orthanc),
+     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
+     *   in outgoing C-FIND SCU requests originating from Orthanc),
+     * - "Vitrea",
+     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
+     *   from GE Healthcare).
+     *
+     * This parameter is case-sensitive.
+     **/
+    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
+
+    /**
+     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
+     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
+     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
+     * it is possible to specify which DICOM commands are allowed,
+     * separately for each remote modality, using the syntax
+     * below.
+     *
+     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
+     * respectively if global option "DicomAlwaysAllowEcho"
+     * (resp. "DicomAlwaysAllowStore") is set to "false".
+     *
+     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
+     * disable the transcoding to uncompressed transfer syntaxes if
+     * this remote modality doesn't support compressed transfer
+     * syntaxes. This option currently applies to Orthanc C-GET SCP
+     * and to Orthanc C-STORE SCU. This option only has an effect if
+     * the global option "EnableTranscoding" is set to "true".
+     *
+     * By default, all "Allow*" options are true.
+     * "AllowStorageCommitment" is actually an alias for 
+     * "AllowNAction" & "AllowEventReport".
+     * 
+     * The "UseDicomTls" option specifies whether DICOM TLS should be
+     * used when opening a SCU connection from Orthanc to this remote
+     * modality. By default, DICOM TLS is not enabled.
+     *
+     * The "LocalAet" option allows one to overwrite the global
+     * "DicomAet" configuration option in order to specify another AET
+     * for Orthanc when initiating an SCU to this very specific
+     * modality. Similarly, "Timeout" allows one to overwrite the
+     * global value "DicomScuTimeout" on a per-modality basis.
+     **/
+    //"untrusted" : {
+    //  "AET" : "ORTHANC",
+    //  "Port" : 104,
+    //  "Host" : "127.0.0.1",
+    //  "Manufacturer" : "Generic",
+    //  "AllowEcho" : false,
+    //  "AllowFind" : false,
+    //  "AllowFindWorklist" : false,       // new in 1.10.0
+    //  "AllowGet"  : false,
+    //  "AllowMove" : false,
+    //  "AllowStore" : true,
+    //  "AllowStorageCommitment" : false,  // new in 1.6.0
+    //  "AllowTranscoding" : true,         // new in 1.7.0
+    //  "UseDicomTls" : false              // new in 1.9.0
+    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "Timeout" : 60                     // new in 1.9.1
+    //}
+  },
+
+  // Whether to store the DICOM modalities in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "DicomModalitiesInDatabase" : false,
+
+  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
+  // while testing the connectivity from Orthanc to a remote DICOM
+  // modality. This allows one to check that the remote modality does
+  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
+  "DicomEchoChecksFind" : false,
+
+  // The timeout (in seconds) after which the DICOM associations are
+  // considered as closed by the Orthanc SCU (client) if the remote
+  // DICOM SCP (server) does not answer.
+  "DicomScuTimeout" : 10,
+
+  // During a C-STORE SCU request initiated by Orthanc, if the remote
+  // modality doesn't support the original transfer syntax of some
+  // DICOM instance, specify which transfer syntax should be preferred
+  // to transcode this instance (provided the remote modality accepts
+  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
+  // was implicitly set to "Little Endian Implicit"
+  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
+  // this parameter is by default set to "Little Endian Explicit"
+  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
+  // a compressed transfer syntax. (new in Orthanc 1.9.0)
+  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
+
+  // Number of threads that are used by the embedded DICOM server.
+  // This defines the number of concurrent DICOM operations that can
+  // be run. Note: This is not limiting the number of concurrent
+  // connections. With a single thread, if a C-Find is received during
+  // e.g the transcoding of an incoming C-Store, it will have to wait
+  // until the end of the C-Store before being processed. (new in
+  // Orthanc 1.10.0, before this version, the value was fixed to 4)
+  "DicomThreadsCount" : 4,
+
+  // The list of the known Orthanc peers. This option is ignored if
+  // "OrthancPeersInDatabase" is set to "true", in which case you must
+  // use the REST API to define Orthanc peers.
+  "OrthancPeers" : {
+    /**
+     * Each line gives the base URL of an Orthanc peer, possibly
+     * followed by the username/password pair (if the password
+     * protection is enabled on the peer).
+     **/
+    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
+    // "peer2" : [ "http://127.0.0.1:8044/" ]
+
+    /**
+     * This is another, more advanced format to define Orthanc
+     * peers. It notably allows one to specify HTTP headers, a HTTPS
+     * client certificate in the PEM format (as in the "--cert" option
+     * of curl), or to enable PKCS#11 authentication for smart cards.
+     *
+     * The "Timeout" option allows one to overwrite the global value
+     * "HttpTimeout" on a per-peer basis.
+     **/
+    // "peer" : {
+    //   "Url" : "http://127.0.0.1:8043/",
+    //   "Username" : "alice",
+    //   "Password" : "alicePassword",
+    //   "HttpHeaders" : { "Token" : "Hello world" },
+    //   "CertificateFile" : "client.crt",
+    //   "CertificateKeyFile" : "client.key",
+    //   "CertificateKeyPassword" : "certpass",
+    //   "Pkcs11" : false,
+    //   "Timeout" : 42            // New in Orthanc 1.9.1
+    // }
+  },
+
+  // Whether to store the Orthanc peers in the Orthanc database
+  // instead of in this configuration file (new in Orthanc 1.5.0)
+  "OrthancPeersInDatabase" : false,
+
+  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
+  // empty string, no HTTP proxy is used. For instance:
+  //   "HttpProxy" : "192.168.0.1:3128"
+  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
+  "HttpProxy" : "",
+
+  // If set to "true", debug messages from libcurl will be issued
+  // whenever Orthanc makes an outgoing HTTP request. This is notably
+  // useful to debug HTTPS-related problems.
+  "HttpVerbose" : false,
+
+  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
+  "HttpTimeout" : 60,
+
+  // Enable the verification of the peers during HTTPS requests. This
+  // option must be set to "false" if using self-signed certificates.
+  // Pay attention that setting this option to "false" results in
+  // security risks!
+  // Reference: http://curl.haxx.se/docs/sslcerts.html
+  "HttpsVerifyPeers" : true,
+
+  // Path to the CA (certification authority) certificates to validate
+  // peers in HTTPS requests. From curl documentation ("--cacert"
+  // option): "Tells curl to use the specified certificate file to
+  // verify the peers. The file may contain multiple CA
+  // certificates. The certificate(s) must be in PEM format." On
+  // Debian-based systems, this option can be set to
+  // "/etc/ssl/certs/ca-certificates.crt"
+  "HttpsCACertificates" : "",
+
+
+
+  /**
+   * Advanced options
+   **/
+
+  // Dictionary of symbolic names for the user-defined metadata. Each
+  // entry must map an unique string to an unique number between 1024
+  // and 65535. Reserved values:
+  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
+  "UserMetadata" : {
+    // "Sample" : 1024
+  },
+
+  // Dictionary of symbolic names for the user-defined types of
+  // attached files. Each entry must map an unique string to an unique
+  // number between 1024 and 65535. Optionally, a second argument can
+  // provided to specify a MIME content type for the attachment.
+  "UserContentType" : {
+    // "sample" : 1024
+    // "sample2" : [ 1025, "application/pdf" ]
+  },
+
+  // Number of seconds without receiving any instance before a
+  // patient, a study or a series is considered as stable.
+  "StableAge" : 60,
+
+  // By default, Orthanc compares AET (Application Entity Titles) in a
+  // case-insensitive way. Setting this option to "true" will enable
+  // case-sensitive matching.
+  "StrictAetComparison" : false,
+
+  // When the following option is "true", the MD5 of the DICOM files
+  // will be computed and stored in the Orthanc database. This
+  // information can be used to detect disk corruption, at the price
+  // of a small performance overhead.
+  "StoreMD5ForAttachments" : true,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Patient, Study or Series level. Setting this option to "0" means
+  // no limit.
+  "LimitFindResults" : 0,
+
+  // The maximum number of results for a single C-FIND request at the
+  // Instance level. Setting this option to "0" means no limit.
+  "LimitFindInstances" : 0,
+
+  // If this option is set to "true" (default behavior until Orthanc
+  // 1.3.2), Orthanc will log the resources that are exported to other
+  // DICOM modalities or Orthanc peers, inside the URI
+  // "/exports". Setting this option to "false" is useful to prevent
+  // the index to grow indefinitely in auto-routing tasks (this is the
+  // default behavior since Orthanc 1.4.0).
+  "LogExportedResources" : false,
+
+  // Enable or disable HTTP Keep-Alive (persistent HTTP
+  // connections). Setting this option to "true" prevents Orthanc
+  // issue #32 ("HttpServer does not support multiple HTTP requests in
+  // the same TCP stream"), but can possibly slow down HTTP clients
+  // that do not support persistent connections. The default behavior
+  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
+  // "false" is also recommended if Orthanc is compiled against
+  // Mongoose.
+  "KeepAlive" : true,
+
+  // Enable or disable Nagle's algorithm. Only taken into
+  // consideration if Orthanc is compiled to use CivetWeb. Experiments
+  // show that best performance can be obtained by setting both
+  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
+  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
+  "TcpNoDelay" : true,
+
+  // Number of threads that are used by the embedded HTTP server.
+  "HttpThreadsCount" : 50,
+
+  // If this option is set to "false", Orthanc will run in index-only
+  // mode. The DICOM files will not be stored on the drive: Orthanc
+  // only indexes the small subset of the so-called "main DICOM tags"
+  // in its SQL database. Note that this option might prevent the
+  // upgrade to newer versions of Orthanc. Also note that this
+  // behavior might not be available with the storage area plugins.
+  "StoreDicom" : true,
+
+  // DICOM associations initiated by Lua scripts are kept open as long
+  // as new DICOM commands are issued. This option sets the number of
+  // seconds of inactivity to wait before automatically closing a
+  // DICOM association used by Lua. If set to 0, the connection is
+  // closed immediately. This option is only used in Lua scripts.
+  "DicomAssociationCloseDelay" : 5,
+
+  // Maximum number of query/retrieve DICOM requests that are
+  // maintained by Orthanc. The least recently used requests get
+  // deleted as new requests are issued.
+  "QueryRetrieveSize" : 100,
+
+  // When handling a C-FIND SCP request, setting this flag to "true"
+  // will enable case-sensitive match for PN value representation
+  // (such as PatientName). By default, the search is
+  // case-insensitive, which does not follow the DICOM standard.
+  "CaseSensitivePN" : false,
+
+  // Configure PKCS#11 to use hardware security modules (HSM) and
+  // smart cards when carrying on HTTPS client authentication.
+  /**
+     "Pkcs11" : {
+       "Module" : "/usr/local/lib/libbeidpkcs11.so",
+       "Module" : "C:/Windows/System32/beidpkcs11.dll",
+       "Pin" : "1234",
+       "Verbose" : true
+     }
+   **/
+  
+  // If set to "false", Orthanc will not load its default dictionary
+  // of private tags. This might be necessary if you cannot import a
+  // DICOM file encoded using the Implicit VR Endian transfer syntax,
+  // and containing private tags: Such an import error might stem from
+  // a bad dictionary. You can still list your private tags of
+  // interest in the "Dictionary" configuration option below.
+  "LoadPrivateDictionary" : true,
+
+  // Locale to be used by Orthanc. Currently, only used if comparing
+  // strings in a case-insensitive way. It should be safe to keep this
+  // value undefined, which lets Orthanc autodetect the suitable locale.
+  // "Locale" : "en_US.UTF-8",
+
+  // Register a new tag in the dictionary of DICOM tags that are known
+  // to Orthanc. Each line must contain the tag (formatted as 2
+  // hexadecimal numbers), the value representation (2 upcase
+  // characters), a nickname for the tag, possibly the minimum
+  // multiplicity (> 0 with defaults to 1), possibly the maximum
+  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
+  // possibly the Private Creator (for private tags).
+  // Note: For private tags, you should only declare the lower 8 bits
+  // of the element since the higher 8 bits may vary from one file to
+  // the other.
+  "Dictionary" : {
+    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
+    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
+    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
+    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
+  },
+
+  // Load a set of external DICOM dictionaries in order to replace the
+  // default dictionaries. This option must contain a set of files in
+  // the DCMTK format. The order of the dictionaries *is*
+  // important. This option can be used to turn Orthanc into a DICONDE
+  // server. (new in Orthanc 1.9.4)
+  /**
+     "ExternalDictionaries" : [
+     "/usr/share/dcmtk/dicom.dic",
+     "/usr/share/dcmtk/diconde.dic"
+     ]
+  **/
+
+  // Whether to run DICOM C-MOVE operations synchronously. If set to
+  // "false" (asynchronous mode), each incoming C-MOVE request results
+  // in the creation of a new background job. Up to Orthanc 1.3.2, the
+  // implicit behavior was to use synchronous C-MOVE ("true"). Between
+  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
+  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
+  // behavior is back to synchronous C-MOVE ("true", which ensures
+  // backward compatibility with Orthanc <= 1.3.2).
+  "SynchronousCMove" : true,
+
+  // Maximum number of completed jobs that are kept in memory. A
+  // processing job is considered as complete once it is tagged as
+  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
+  // indicates to keep no job in memory (i.e. jobs are removed from
+  // the history as soon as they are completed), which prevents the
+  // use of some features of Orthanc (typically, synchronous mode in
+  // REST API) and should be avoided for non-developers.
+  "JobsHistorySize" : 10,
+
+  // Whether to save the jobs into the Orthanc database. If this
+  // option is set to "true", the pending/running/completed jobs are
+  // automatically reloaded from the database if Orthanc is stopped
+  // then restarted (except if the "--no-jobs" command-line argument
+  // is specified). This option should be set to "false" if multiple
+  // Orthanc servers are using the same database (e.g. if PostgreSQL
+  // or MariaDB/MySQL is used).
+  "SaveJobs" : true,
+
+  // Specifies how Orthanc reacts when it receives a DICOM instance
+  // whose SOPInstanceUID is already stored. If set to "true", the new
+  // instance replaces the old one. If set to "false", the new
+  // instance is discarded and the old one is kept. Up to Orthanc
+  // 1.4.1, the implicit behavior corresponded to "false".
+  "OverwriteInstances" : false,
+
+  // Maximum number of ZIP/media archives that are maintained by
+  // Orthanc, as a response to the asynchronous creation of archives.
+  // The least recently used archives get deleted as new archives are
+  // generated. This option was introduced in Orthanc 1.5.0, and has
+  // no effect on the synchronous generation of archives.
+  "MediaArchiveSize" : 1,
+
+  // Performance setting to specify how Orthanc accesses the storage
+  // area during find operations (C-FIND, /tools/find API route and
+  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
+  // allows Orthanc to read the storage area as soon as it needs an
+  // information that is not present in its database (slowest mode),
+  // (2) "Never" prevents Orthanc from accessing the storage area, and
+  // makes it uses exclusively its database (fastest mode), and (3)
+  // "Answers" allows Orthanc to read the storage area to generate its
+  // answers, but not to filter the DICOM resources (balance between
+  // the two modes). By default, the mode is "Always", which
+  // corresponds to the behavior of Orthanc <= 1.5.0.
+  "StorageAccessOnFind" : "Always",
+
+  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
+  // set to "true", the metrics can be retrieved at
+  // "/tools/metrics-prometheus" formetted using the Prometheus
+  // text-based exposition format.
+  "MetricsEnabled" : true,
+
+  // Whether calls to URI "/tools/execute-script" is enabled. Starting
+  // with Orthanc 1.5.8, this URI is disabled by default for security.
+  "ExecuteLuaEnabled" : false,
+
+  // Set the timeout while serving HTTP requests by the embedded Web
+  // server, in seconds. This corresponds to option
+  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
+  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
+  "HttpRequestTimeout" : 30,
+
+  // Set the default private creator that is used by Orthanc when it
+  // looks for a private tag in its dictionary (cf. "Dictionary"
+  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
+  "DefaultPrivateCreator" : "",
+
+  // Maximum number of storage commitment reports (i.e. received from
+  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
+  "StorageCommitmentReportsSize" : 100,
+
+  // Whether Orthanc transcodes DICOM files to an uncompressed
+  // transfer syntax over the DICOM protocol, if the remote modality
+  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
+  "TranscodeDicomProtocol" : true,
+
+  // If some plugin to decode/transcode DICOM instances is installed,
+  // this option specifies whether the built-in decoder/transcoder of
+  // Orthanc (that uses DCMTK) is applied before or after the plugins,
+  // or is not applied at all (new in Orthanc 1.7.0). The allowed
+  // values for this option are "After" (default value, corresponding
+  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
+  "BuiltinDecoderTranscoderOrder" : "After",
+
+  // If this option is set, Orthanc will transparently transcode any
+  // incoming DICOM instance to the given transfer syntax before
+  // storing it into its database. Beware that this might result in
+  // high CPU usage (if transcoding to some compressed transfer
+  // syntax), or in higher disk consumption (if transcoding to an
+  // uncompressed syntax). Also, beware that transcoding to a transfer
+  // syntax with lossy compression (notably JPEG) will change the
+  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
+  // the instance level, which might break external workflow.
+  /**
+     "IngestTranscoding" : "1.2.840.10008.1.2",
+  **/
+
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have an uncompressed transfer syntax, i.e. Little Endian
+  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
+  // Orthanc 1.8.2).
+  "IngestTranscodingOfUncompressed" : true,
+  
+  // Whether ingest transcoding is applied to incoming DICOM instances
+  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
+  "IngestTranscodingOfCompressed" : true,
+  
+  // The compression level that is used when transcoding to one of the
+  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
+  "DicomLossyTranscodingQuality" : 90,
+
+  // Whether "fsync()" is called after each write to the storage area
+  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
+  // will run more slowly, but the DICOM are guaranteed to be
+  // immediately written to the disk. This option only makes sense if
+  // the builtin filesystem storage area is used. It defaults to
+  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
+  "SyncStorageArea" : true,
+
+  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
+  // ...)" while starting Orthanc. This has the same effect at setting
+  // the environment variable "MALLOC_ARENA_MAX". This avoids large
+  // growth in RES memory if the threads of the embedded HTTP server
+  // have to allocate large chunks of memory (typically the case with
+  // large DICOM files). By setting "MallocArenaMax" to "N", these
+  // threads share "N" memory pools (known as "arenas"). Setting this
+  // option to "0" doesn't call mallopt()", which was the behavior of
+  // Orthanc <= 1.8.1.
+  "MallocArenaMax" : 5,
+
+  // Deidentify/anonymize the contents of the logs (notably C-FIND,
+  // C-GET, and C-MOVE queries submitted to Orthanc) according to
+  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
+  "DeidentifyLogs" : true,
+
+  // If "DeidentifyLogs" is true, this sets the DICOM standard to
+  // follow for the deidentification/anonymization of the query
+  // contents. Possible values are "2008", "2017c" and "2021b" (new
+  // in Orthanc 1.8.2)
+  "DeidentifyLogsDicomVersion" : "2021b",
+
+  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
+  // network protocol, expressed in bytes. This value affects both
+  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
+  // range is [4096,131072]. (new in Orthanc 1.9.0)
+  "MaximumPduLength" : 16384,
+
+  // Arbitrary identifier of this Orthanc server when storing its
+  // global properties if a custom index plugin is used. This
+  // identifier is only useful in the case of multiple
+  // readers/writers, in order to avoid collisions between multiple
+  // Orthanc servers. If unset, this identifier is taken as a SHA-1
+  // hash derived from the MAC addresses of the network interfaces,
+  // and from the AET and TCP ports used by Orthanc. Manually setting
+  // this option is needed in Docker/Kubernetes environments. (new in
+  // Orthanc 1.9.2)
+  /**
+     "DatabaseServerIdentifier" : "Orthanc1",
+  **/
+
+  // Whether Orthanc protects the modification of metadata and
+  // attachments using revisions, which is done using the HTTP headers
+  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
+  // API. This is needed to handle collisions between concurrent
+  // modifications in the case of multiple writers. The database
+  // back-end must support this option, which is notably *not* yet the
+  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
+  "CheckRevisions" : false,
+
+  // Whether Orthanc streams ZIP archive/media to the HTTP
+  // client. Setting this option to "false" corresponds to the
+  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
+  // to a temporary file, then sent to the client (which necessitates
+  // disk space and might lead to HTTP timeouts on large archives). If
+  // set to "true", the chunks of the ZIP file are progressively sent
+  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
+  "SynchronousZipStream" : true,
+
+  // Default number of loader threads when generating Zip archive/media.
+  // A value of 0 means reading and writing are performed in sequence
+  // (default behaviour).  A value > 1 is meaningful only if the storage
+  // is a distributed network storage (e.g object storage plugin).
+  // (new experimental feature in Orthanc 1.10.0)
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored (TODO: see book new page). 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // TODO: see book new page
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  TODO: also check for "rebuild DB" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
+}
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..32050bf2928c
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,32 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r $CONFIGFILE ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e $ORTHANCSTORAGE ]
+then
+	mkdir -pm 0750 $ORTHANCSTORAGE &&
+	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	exit 1
+fi
+
+# Enable log
+if [ -n $LOG ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS}--logdir=$LOGDIR "
+
+	if [ ! -e $LOGDIR ]; then
+		mkdir -pm 0750 $LOGDIR &&
+		chown ${USER}:${USER} $LOGDIR ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+OPTS="$OPTS$CONFIGFILE"
+exec chpst -u ${USER}:${USER} Orthanc $OPTS
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..d5cb61514619
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,57 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+ignore_elf_dirs="/usr/share/orthanc"
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+conf_files="etc/orthanc/Configuration.json"
+
+post_install() {
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	# Remove garbage
+	rm -rf builddir
+
+	vsv orthanc
+	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/share/orthanc/plugins
+	}
+}

From 2cdc243bf886bc67327d96862634bb4fecf66830 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 04/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..e1300c4d4550
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,22 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From 7ac396ecb51f91104316a3bf5bd024e417fc56d4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 05/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..630a333a62fe
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense ../COPYING
+}

From dcf23ea3755651b9ead8a454a73d988933c91a14 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 06/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..347c622c9eff
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,23 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
+ -DPYTHON_VERSION=3.10"
+hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
+makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
+ python3-devel>=3.10<3.11"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+ignore_elf_dirs="/usr/share/orthanc"
+
+post_install() {
+	vlicense COPYING
+}

From def13e95c80e8233e956bd63fe0612fdd01b9554 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 07/18] New package: dcmtk-3.6.7

---
 common/shlibs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/shlibs b/common/shlibs
index 39dd712edb27..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4186,7 +4186,6 @@ libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
 libcivetweb.so.1 libcivetweb-1.15_1
-libcmr.so.17
 libcmr.so.17 libdcmtk-3.6.7_1
 libdcmrt.so.17 libdcmtk-3.6.7_1
 libdcmdata.so.17 libdcmtk-3.6.7_1

From f885f3a420c5270aad349ed9743973b511969e6a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 08/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index e1300c4d4550..ce68fbd8038a 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -7,7 +7,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 pugixml-devel gtest-devel jsoncpp-devel
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
  libuuid-devel boost-devel"
 short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From b23dec5dd1239fece9506c96a36b64ee5c19c467 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 09/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 630a333a62fe..360fe0c56796 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -8,7 +8,7 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
-makedepends="Orthanc-devel>=1.11.1 openssl-devel gtest-devel zlib-devel
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
  jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
 short_desc="PostgreSQL database plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"

From 2fbd28a314eef3bc8ff405a43e1879cb63e66d05 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 10/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 347c622c9eff..3efa389a99c5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -7,9 +7,8 @@ build_style=cmake
 configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
  -DPYTHON_VERSION=3.10"
-hostmakedepends="tar unzip python3>=3.10<3.11 pkg-config"
-makedepends="Orthanc-devel>=1.11.1 jsoncpp-devel libuuid-devel boost-devel
- python3-devel>=3.10<3.11"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="AGPL-3.0-or-later"

From cbb8d414ca11997d9f05e4cd234e85c452df8a54 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 11/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/orthanc/run | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
index 32050bf2928c..08f727da62c1 100755
--- a/srcpkgs/Orthanc/files/orthanc/run
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -5,28 +5,27 @@ OPTS=""
 : ${USER:="_orthanc"}
 
 : ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
-[ -r $CONFIGFILE ] || exit 1
+[ -r "$CONFIGFILE" ] || exit 1
 
 : ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
-if [ ! -e $ORTHANCSTORAGE ]
+if [ ! -e "$ORTHANCSTORAGE" ]
 then
-	mkdir -pm 0750 $ORTHANCSTORAGE &&
-	chown ${USER}:${USER} $ORTHANCSTORAGE ||
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
 	exit 1
 fi
 
 # Enable log
-if [ -n $LOG ]; then
+if [ -n "$LOG" ]; then
 	: ${LOGDIR:="/log/orthanc"}
-	OPTS="${OPTS}--logdir=$LOGDIR "
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
 
-	if [ ! -e $LOGDIR ]; then
-		mkdir -pm 0750 $LOGDIR &&
-		chown ${USER}:${USER} $LOGDIR ||
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
 		exit 1
 	fi
 fi
 
 # Set OPTS on conf file for aditional parameters
-OPTS="$OPTS$CONFIGFILE"
-exec chpst -u ${USER}:${USER} Orthanc $OPTS
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"

From 03159a3009ef837b9a71ba5b5a2f546f3af0062c Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 12/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/files/Configuration.json | 915 -----------------------
 srcpkgs/Orthanc/patches/config.patch     |  28 +
 srcpkgs/Orthanc/template                 |   9 +-
 3 files changed, 33 insertions(+), 919 deletions(-)
 delete mode 100644 srcpkgs/Orthanc/files/Configuration.json
 create mode 100644 srcpkgs/Orthanc/patches/config.patch

diff --git a/srcpkgs/Orthanc/files/Configuration.json b/srcpkgs/Orthanc/files/Configuration.json
deleted file mode 100644
index e0e594bb4647..000000000000
--- a/srcpkgs/Orthanc/files/Configuration.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
-  /**
-   * General configuration of Orthanc
-   **/
-
-  // The logical name of this instance of Orthanc. This one is
-  // displayed in Orthanc Explorer and at the URI "/system".
-  "Name" : "MyOrthanc",
-
-  // Path to the directory that holds the heavyweight files (i.e. the
-  // raw DICOM instances). Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "StorageDirectory" : "/var/lib/OrthancStorage",
-
-  // 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" : "/var/lib/OrthancStorage",
-
-  // Path to the directory where Orthanc stores its large temporary
-  // files. The content of this folder can be safely deleted once
-  // Orthanc is stopped. The folder must exist. The corresponding
-  // filesystem must be properly sized, given that for instance a ZIP
-  // archive of DICOM images created by a job can weight several GBs,
-  // and that there might be up to "min(JobsHistorySize,
-  // MediaArchiveSize)" archives to be stored simultaneously. If not
-  // set, Orthanc will use the default temporary folder of the
-  // operating system (such as "/tmp/" on UNIX-like systems, or
-  // "C:/Temp" on Microsoft Windows).
-  // "TemporaryDirectory" : "/tmp/Orthanc/",
-
-  // Enable the transparent compression of the DICOM instances
-  "StorageCompression" : false,
-
-  // Maximum size of the storage in MB (a value of "0" indicates no
-  // limit on the storage size)
-  "MaximumStorageSize" : 0,
-
-  // Maximum number of patients that can be stored at a given time
-  // in the storage (a value of "0" indicates no limit on the number
-  // of patients)
-  "MaximumPatientCount" : 0,
-
-  // Maximum size of the storage cache in MB.  The storage cache
-  // is stored in RAM and contains a copy of recently accessed
-  // files (written or read).  A value of "0" indicates the cache
-  // is disabled.  (new in Orthanc 1.10.0)
-  "MaximumStorageCacheSize" : 128,
-
-  // List of paths to the custom Lua scripts that are to be loaded
-  // into this instance of Orthanc
-  "LuaScripts" : [
-  ],
-
-  // The period (in seconds) between 2 calls of the "OnHeartBeat"
-  // lua callback.  O means the heart beat is disabled.
-  // TODO: text below for Orthanc book:
-  // Note: that the period is not actually the delay between
-  // the end of an execution and the triggering of the next one.
-  // Since there is only one lua context, if other lua code is being
-  // executed, the heart beat might be delayed even more.
-  "LuaHeartBeatPeriod" : 0,
-
-  // List of paths to the plugins that are to be loaded into this
-  // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
-  // "./PluginTest.dll" for Windows). These paths can refer to
-  // folders, in which case they will be scanned non-recursively to
-  // find shared libraries. Backslashes must be either escaped by
-  // doubling them, or replaced by forward slashes "/".
-  "Plugins" : [
-  ],
-
-  // Maximum number of processing jobs that are simultaneously running
-  // at any given time. A value of "0" indicates to use all the
-  // available CPU logical cores. To emulate Orthanc <= 1.3.2, set
-  // this value to "1".
-  "ConcurrentJobs" : 2,
-
-
-  /**
-   * Configuration of the HTTP server
-   **/
-
-  // Enable the HTTP server. If this parameter is set to "false",
-  // Orthanc acts as a pure DICOM server. The REST API and Orthanc
-  // Explorer will not be available.
-  "HttpServerEnabled" : true,
-
-  // Enable/disable the Orthanc Explorer Web user interface. This
-  // option is only meaningful if the "HttpServerEnabled" option is
-  // set to "true" (new in Orthanc 1.8.2).
-  "OrthancExplorerEnabled" : true,
-
-  // HTTP port for the REST services and for the GUI
-  "HttpPort" : 8042,
-
-  // When the following option is "true", if an error is encountered
-  // while calling the REST API, a JSON message describing the error
-  // is put in the HTTP answer. This feature can be disabled if the
-  // HTTP client does not properly handles such answers.
-  "HttpDescribeErrors" : true,
-
-  // Enable HTTP compression to improve network bandwidth utilization,
-  // at the expense of more computations on the server. Orthanc
-  // supports the "gzip" and "deflate" HTTP encodings.
-  "HttpCompressionEnabled" : true,
-
-  // Enable the publication of the content of the Orthanc server as a
-  // WebDAV share (new in Orthanc 1.8.0). On the localhost, the WebDAV
-  // share is mapped as "http://localhost:8042/webdav/".
-  "WebDavEnabled" : true,
-
-  // Whether to allow deletions through the WebDAV share. This is
-  // disabled by default to avoid accidental loss of DICOM instances.
-  "WebDavDeleteAllowed" : false,
-
-  // Whether to allow uploads through the WebDAV share.
-  "WebDavUploadAllowed" : true,
-
-
-
-  /**
-   * Configuration of the DICOM server
-   **/
-
-  // Enable the DICOM server. If this parameter is set to "false",
-  // Orthanc acts as a pure REST server. It will not be possible to
-  // receive files or to do query/retrieve through the DICOM protocol.
-  "DicomServerEnabled" : true,
-
-  // The DICOM Application Entity Title (cannot be longer than 16
-  // characters)
-  "DicomAet" : "ORTHANC",
-
-  // Check whether the called AET corresponds to the AET of Orthanc
-  // during an incoming DICOM SCU request
-  "DicomCheckCalledAet" : false,
-
-  // The DICOM port
-  "DicomPort" : 4242,
-
-  // The default encoding that is assumed for DICOM files without
-  // "SpecificCharacterSet" DICOM tag, and that is used when answering
-  // C-FIND requests (including worklists). The allowed values are
-  // "Ascii", "Utf8", "Latin1", "Latin2", "Latin3", "Latin4",
-  // "Latin5", "Cyrillic", "Windows1251", "Arabic", "Greek", "Hebrew",
-  // "Thai", "Japanese", "Chinese", "JapaneseKanji", "Korean", and
-  // "SimplifiedChinese".
-  "DefaultEncoding" : "Latin1",
-
-  // The transfer syntaxes that are accepted by Orthanc C-STORE SCP.
-  // This is an array listing the accepted transfer syntax UIDs. Each
-  // entry can contain wildcards ("?" or "*"). By default, all the
-  // known transfer syntaxes are accepted. (new in Orthanc 1.9.0)
-  "AcceptedTransferSyntaxes" : [ "1.2.840.10008.1.*" ],
-
-  // User-friendly groups of transfer syntaxes that can be enabled or
-  // disabled at once. These options are applied after the main
-  // "AcceptedTransferSyntaxes" option has been applied (if present).
-  /**
-     "DeflatedTransferSyntaxAccepted"     : true,
-     "JpegTransferSyntaxAccepted"         : true,
-     "Jpeg2000TransferSyntaxAccepted"     : true,
-     "JpegLosslessTransferSyntaxAccepted" : true,
-     "JpipTransferSyntaxAccepted"         : true,
-     "Mpeg2TransferSyntaxAccepted"        : true,
-     "RleTransferSyntaxAccepted"          : true,
-     "Mpeg4TransferSyntaxAccepted"        : true,  // New in Orthanc 1.6.0
-     "H265TransferSyntaxAccepted"         : true,  // New in Orthanc 1.9.0
-  **/
-  
-  // Whether Orthanc accepts to act as C-STORE SCP for unknown storage
-  // SOP classes (aka. "promiscuous mode")
-  "UnknownSopClassAccepted" : false,
-
-  // Set the timeout (in seconds) after which the DICOM associations
-  // are closed by the Orthanc SCP (server) if no further DIMSE
-  // command is received from the SCU (client).
-  "DicomScpTimeout" : 30,
-
-
-
-  /**
-   * Security-related options for the HTTP server
-   **/
-
-  // Whether remote hosts can connect to the HTTP server
-  "RemoteAccessAllowed" : false,
-
-  // Whether or not SSL is enabled
-  "SslEnabled" : false,
-
-  // Path to the SSL certificate used by the HTTP server. The file
-  // must be stored in the PEM format, and must contain both the
-  // certificate and the private key. This option is only meaningful
-  // if "SslEnabled" is true.
-  "SslCertificate" : "certificate.pem",
-
-  // Sets the minimum accepted SSL protocol version
-  // (cf. "ssl_protocol_version" option of civetweb). By default,
-  // require SSL 1.2. This option is only meaningful if "SslEnabled"
-  // is true. (new in Orthanc 1.8.2)
-  //
-  // Value => Protocols
-  //   0      SSL2+SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   1      SSL3+TLS1.0+TLS1.1+TLS1.2
-  //   2      TLS1.0+TLS1.1+TLS1.2
-  //   3      TLS1.1+TLS1.2
-  //   4      TLS1.2
-  "SslMinimumProtocolVersion" : 4,
-
-  // Set the accepted ciphers for SSL connections. The ciphers must be
-  // provided as a list of strings. If not set, this will default to
-  // FIPS 140-2 ciphers. This option is only meaningful if
-  // "SslEnabled" is true. (new in Orthanc 1.8.2)
-  /**
-    "SslCiphersAccepted" : [ "AES128-GCM-SHA256" ],
-  **/
-
-  // Whether or not peer client certificates shall be checked. This
-  // option is only meaningful if "SslEnabled" is true.
-  "SslVerifyPeers" : false,
-
-  // Path to a file containing the concatenation of the client SSL
-  // certificate(s) that are trusted to verify the identify of remote
-  // HTTP clients. The individual certificate(s) must be stored in the
-  // PEM format. This option is only meaningful if "SslVerifyPeers"
-  // is true.
-  "SslTrustedClientCertificates" : "trustedClientCertificates.pem",
-  
-  // Whether or not the password protection is enabled (using HTTP
-  // basic access authentication). Starting with Orthanc 1.5.8, if
-  // "AuthenticationEnabled" is not explicitly set, authentication is
-  // enabled iff. remote access is allowed (i.e. the default value of
-  // "AuthenticationEnabled" equals that of "RemoteAccessAllowed").
-  /**
-     "AuthenticationEnabled" : false,
-   **/
-
-  // The list of the registered users. Because Orthanc uses HTTP
-  // Basic Authentication, the passwords are stored as plain text.
-  "RegisteredUsers" : {
-    // "alice" : "alicePassword"
-  },
-
-
-
-  /**
-   * Security-related options for the DICOM connections (SCU/SCP)
-   **/
-
-  // Whether DICOM TLS is enabled in the Orthanc SCP (new in Orthanc 1.9.0)
-  "DicomTlsEnabled" : false,
-
-  // Path to the TLS certificate file (in PEM format) to be used for
-  // both Orthanc SCP (incoming DICOM connections) and Orthanc SCU
-  // (outgoing DICOM connections). Note that contrarily to the
-  // "SslCertificate" option, the certificate and its private key must
-  // be split into two separate files. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsCertificate" : "orthanc.crt",
-  **/
-
-  // Path to the file containing the private key (in PEM format) that
-  // corresponds to the TLS certificate specified in option
-  // "DicomTlsCertificate". (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsPrivateKey" : "orthanc.key",
-  **/
-
-  // Path to a file containing all the TLS certificates that Orthanc
-  // can trust, both for its SCP (incoming DICOM connections) and SCU
-  // (outgoing DICOM connections). This file must contain a sequence
-  // of PEM certificates. (new in Orthanc 1.9.0)
-  /**
-     "DicomTlsTrustedCertificates" : "trusted.crt",
-  **/
-  
-  // Whether Orthanc rejects DICOM TLS connections to/from remote
-  // modalities that do not provide a certificate. Setting this option
-  // to "true" (resp. "false") corresponds to "--require-peer-cert"
-  // (resp. "--verify-peer-cert") in the DCMTK command-line
-  // tools. (new in Orthanc 1.9.3)
-  "DicomTlsRemoteCertificateRequired" : true,
-
-  // Whether the Orthanc SCP allows incoming C-ECHO requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Orthanc 1.3.0
-  // is the only version to behave as if this argument were set to "false".
-  "DicomAlwaysAllowEcho" : true,
-
-  // Whether the Orthanc SCP allows incoming C-STORE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above)
-  "DicomAlwaysAllowStore" : true,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  // Note: From Orthanc 1.10.0, this option only applies to C-FIND
-  // requests for patients/studies/series/instances. Use option
-  // "DicomAlwaysAllowFindWorklist" for worklists.
-  "DicomAlwaysAllowFind" : false,
-
-  // Whether the Orthanc SCP allows incoming C-FIND requests for worklists, 
-  // even from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.10.0)
-  "DicomAlwaysAllowFindWorklist" : false,
-
-  // Whether the Orthanc SCP allows incoming C-GET requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.0)
-  "DicomAlwaysAllowGet" : false,
-
-  // Whether the Orthanc SCP allows incoming C-MOVE requests, even
-  // from SCU modalities it does not know about (i.e. that are not
-  // listed in the "DicomModalities" option above). Setting this
-  // option to "true" implies security risks. (new in Orthanc 1.9.7)
-  "DicomAlwaysAllowMove" : false,
-
-  // Whether Orthanc checks the IP/hostname address of the remote
-  // modality initiating a DICOM connection (as listed in the
-  // "DicomModalities" option above). If this option is set to
-  // "false", Orthanc only checks the AET of the remote modality.
-  "DicomCheckModalityHost" : false,
-
-
-
-  /**
-   * Network topology
-   **/
-
-  // The list of the known DICOM modalities. This option is ignored if
-  // "DicomModalitiesInDatabase" is set to "true", in which case you
-  // must use the REST API to define modalities.
-  "DicomModalities" : {
-    /**
-     * Uncommenting the following line would enable Orthanc to
-     * connect to an instance of the "storescp" open-source DICOM
-     * store (shipped in the DCMTK distribution), as started by the
-     * command line "storescp 2000". The first parameter is the
-     * AET of the remote modality (cannot be longer than 16 
-     * characters), the second one is the remote network address,
-     * and the third one is the TCP port number corresponding
-     * to the DICOM protocol on the remote modality (usually 104).
-     **/
-    // "sample" : [ "STORESCP", "127.0.0.1", 2000 ]
-
-    /**
-     * A fourth parameter is available to enable patches for
-     * specific PACS manufacturers. The allowed values are currently:
-     * - "Generic" (default value),
-     * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
-     *   in outgoing C-FIND requests originating from Orthanc),
-     * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
-     *   in outgoing C-FIND SCU requests originating from Orthanc),
-     * - "Vitrea",
-     * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
-     *   from GE Healthcare).
-     *
-     * This parameter is case-sensitive.
-     **/
-    // "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]
-
-    /**
-     * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
-     * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
-     * registered remote SCU modalities. Starting with Orthanc 1.5.0,
-     * it is possible to specify which DICOM commands are allowed,
-     * separately for each remote modality, using the syntax
-     * below.
-     *
-     * The "AllowEcho" (resp.  "AllowStore") option only has an effect
-     * respectively if global option "DicomAlwaysAllowEcho"
-     * (resp. "DicomAlwaysAllowStore") is set to "false".
-     *
-     * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
-     * disable the transcoding to uncompressed transfer syntaxes if
-     * this remote modality doesn't support compressed transfer
-     * syntaxes. This option currently applies to Orthanc C-GET SCP
-     * and to Orthanc C-STORE SCU. This option only has an effect if
-     * the global option "EnableTranscoding" is set to "true".
-     *
-     * By default, all "Allow*" options are true.
-     * "AllowStorageCommitment" is actually an alias for 
-     * "AllowNAction" & "AllowEventReport".
-     * 
-     * The "UseDicomTls" option specifies whether DICOM TLS should be
-     * used when opening a SCU connection from Orthanc to this remote
-     * modality. By default, DICOM TLS is not enabled.
-     *
-     * The "LocalAet" option allows one to overwrite the global
-     * "DicomAet" configuration option in order to specify another AET
-     * for Orthanc when initiating an SCU to this very specific
-     * modality. Similarly, "Timeout" allows one to overwrite the
-     * global value "DicomScuTimeout" on a per-modality basis.
-     **/
-    //"untrusted" : {
-    //  "AET" : "ORTHANC",
-    //  "Port" : 104,
-    //  "Host" : "127.0.0.1",
-    //  "Manufacturer" : "Generic",
-    //  "AllowEcho" : false,
-    //  "AllowFind" : false,
-    //  "AllowFindWorklist" : false,       // new in 1.10.0
-    //  "AllowGet"  : false,
-    //  "AllowMove" : false,
-    //  "AllowStore" : true,
-    //  "AllowStorageCommitment" : false,  // new in 1.6.0
-    //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
-    //  "Timeout" : 60                     // new in 1.9.1
-    //}
-  },
-
-  // Whether to store the DICOM modalities in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "DicomModalitiesInDatabase" : false,
-
-  // Whether the C-ECHO SCU is automatically followed by a C-FIND SCU,
-  // while testing the connectivity from Orthanc to a remote DICOM
-  // modality. This allows one to check that the remote modality does
-  // accept C-FIND requests from Orthanc (new in Orthanc 1.8.1).
-  "DicomEchoChecksFind" : false,
-
-  // The timeout (in seconds) after which the DICOM associations are
-  // considered as closed by the Orthanc SCU (client) if the remote
-  // DICOM SCP (server) does not answer.
-  "DicomScuTimeout" : 10,
-
-  // During a C-STORE SCU request initiated by Orthanc, if the remote
-  // modality doesn't support the original transfer syntax of some
-  // DICOM instance, specify which transfer syntax should be preferred
-  // to transcode this instance (provided the remote modality accepts
-  // this syntax). In Orthanc between 1.7.0 and 1.8.2, this parameter
-  // was implicitly set to "Little Endian Implicit"
-  // (1.2.840.10008.1.2). In Orthanc <= 1.6.1 and in Orthanc >= 1.9.0,
-  // this parameter is by default set to "Little Endian Explicit"
-  // (1.2.840.10008.1.2.1). This parameter can possibly correspond to
-  // a compressed transfer syntax. (new in Orthanc 1.9.0)
-  "DicomScuPreferredTransferSyntax" : "1.2.840.10008.1.2.1",
-
-  // Number of threads that are used by the embedded DICOM server.
-  // This defines the number of concurrent DICOM operations that can
-  // be run. Note: This is not limiting the number of concurrent
-  // connections. With a single thread, if a C-Find is received during
-  // e.g the transcoding of an incoming C-Store, it will have to wait
-  // until the end of the C-Store before being processed. (new in
-  // Orthanc 1.10.0, before this version, the value was fixed to 4)
-  "DicomThreadsCount" : 4,
-
-  // The list of the known Orthanc peers. This option is ignored if
-  // "OrthancPeersInDatabase" is set to "true", in which case you must
-  // use the REST API to define Orthanc peers.
-  "OrthancPeers" : {
-    /**
-     * Each line gives the base URL of an Orthanc peer, possibly
-     * followed by the username/password pair (if the password
-     * protection is enabled on the peer).
-     **/
-    // "peer"  : [ "http://127.0.0.1:8043/", "alice", "alicePassword" ]
-    // "peer2" : [ "http://127.0.0.1:8044/" ]
-
-    /**
-     * This is another, more advanced format to define Orthanc
-     * peers. It notably allows one to specify HTTP headers, a HTTPS
-     * client certificate in the PEM format (as in the "--cert" option
-     * of curl), or to enable PKCS#11 authentication for smart cards.
-     *
-     * The "Timeout" option allows one to overwrite the global value
-     * "HttpTimeout" on a per-peer basis.
-     **/
-    // "peer" : {
-    //   "Url" : "http://127.0.0.1:8043/",
-    //   "Username" : "alice",
-    //   "Password" : "alicePassword",
-    //   "HttpHeaders" : { "Token" : "Hello world" },
-    //   "CertificateFile" : "client.crt",
-    //   "CertificateKeyFile" : "client.key",
-    //   "CertificateKeyPassword" : "certpass",
-    //   "Pkcs11" : false,
-    //   "Timeout" : 42            // New in Orthanc 1.9.1
-    // }
-  },
-
-  // Whether to store the Orthanc peers in the Orthanc database
-  // instead of in this configuration file (new in Orthanc 1.5.0)
-  "OrthancPeersInDatabase" : false,
-
-  // Parameters of the HTTP proxy to be used by Orthanc. If set to the
-  // empty string, no HTTP proxy is used. For instance:
-  //   "HttpProxy" : "192.168.0.1:3128"
-  //   "HttpProxy" : "proxyUser:proxyPassword@192.168.0.1:3128"
-  "HttpProxy" : "",
-
-  // If set to "true", debug messages from libcurl will be issued
-  // whenever Orthanc makes an outgoing HTTP request. This is notably
-  // useful to debug HTTPS-related problems.
-  "HttpVerbose" : false,
-
-  // Set the timeout for HTTP requests issued by Orthanc (in seconds).
-  "HttpTimeout" : 60,
-
-  // Enable the verification of the peers during HTTPS requests. This
-  // option must be set to "false" if using self-signed certificates.
-  // Pay attention that setting this option to "false" results in
-  // security risks!
-  // Reference: http://curl.haxx.se/docs/sslcerts.html
-  "HttpsVerifyPeers" : true,
-
-  // Path to the CA (certification authority) certificates to validate
-  // peers in HTTPS requests. From curl documentation ("--cacert"
-  // option): "Tells curl to use the specified certificate file to
-  // verify the peers. The file may contain multiple CA
-  // certificates. The certificate(s) must be in PEM format." On
-  // Debian-based systems, this option can be set to
-  // "/etc/ssl/certs/ca-certificates.crt"
-  "HttpsCACertificates" : "",
-
-
-
-  /**
-   * Advanced options
-   **/
-
-  // Dictionary of symbolic names for the user-defined metadata. Each
-  // entry must map an unique string to an unique number between 1024
-  // and 65535. Reserved values:
-  //  - The Orthanc whole-slide imaging plugin uses metadata 4200
-  "UserMetadata" : {
-    // "Sample" : 1024
-  },
-
-  // Dictionary of symbolic names for the user-defined types of
-  // attached files. Each entry must map an unique string to an unique
-  // number between 1024 and 65535. Optionally, a second argument can
-  // provided to specify a MIME content type for the attachment.
-  "UserContentType" : {
-    // "sample" : 1024
-    // "sample2" : [ 1025, "application/pdf" ]
-  },
-
-  // Number of seconds without receiving any instance before a
-  // patient, a study or a series is considered as stable.
-  "StableAge" : 60,
-
-  // By default, Orthanc compares AET (Application Entity Titles) in a
-  // case-insensitive way. Setting this option to "true" will enable
-  // case-sensitive matching.
-  "StrictAetComparison" : false,
-
-  // When the following option is "true", the MD5 of the DICOM files
-  // will be computed and stored in the Orthanc database. This
-  // information can be used to detect disk corruption, at the price
-  // of a small performance overhead.
-  "StoreMD5ForAttachments" : true,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Patient, Study or Series level. Setting this option to "0" means
-  // no limit.
-  "LimitFindResults" : 0,
-
-  // The maximum number of results for a single C-FIND request at the
-  // Instance level. Setting this option to "0" means no limit.
-  "LimitFindInstances" : 0,
-
-  // If this option is set to "true" (default behavior until Orthanc
-  // 1.3.2), Orthanc will log the resources that are exported to other
-  // DICOM modalities or Orthanc peers, inside the URI
-  // "/exports". Setting this option to "false" is useful to prevent
-  // the index to grow indefinitely in auto-routing tasks (this is the
-  // default behavior since Orthanc 1.4.0).
-  "LogExportedResources" : false,
-
-  // Enable or disable HTTP Keep-Alive (persistent HTTP
-  // connections). Setting this option to "true" prevents Orthanc
-  // issue #32 ("HttpServer does not support multiple HTTP requests in
-  // the same TCP stream"), but can possibly slow down HTTP clients
-  // that do not support persistent connections. The default behavior
-  // used to be "false" in Orthanc <= 1.5.1. Setting this option to
-  // "false" is also recommended if Orthanc is compiled against
-  // Mongoose.
-  "KeepAlive" : true,
-
-  // Enable or disable Nagle's algorithm. Only taken into
-  // consideration if Orthanc is compiled to use CivetWeb. Experiments
-  // show that best performance can be obtained by setting both
-  // "KeepAlive" and "TcpNoDelay" to "true". Beware however of
-  // caveats: https://eklitzke.org/the-caveats-of-tcp-nodelay
-  "TcpNoDelay" : true,
-
-  // Number of threads that are used by the embedded HTTP server.
-  "HttpThreadsCount" : 50,
-
-  // If this option is set to "false", Orthanc will run in index-only
-  // mode. The DICOM files will not be stored on the drive: Orthanc
-  // only indexes the small subset of the so-called "main DICOM tags"
-  // in its SQL database. Note that this option might prevent the
-  // upgrade to newer versions of Orthanc. Also note that this
-  // behavior might not be available with the storage area plugins.
-  "StoreDicom" : true,
-
-  // DICOM associations initiated by Lua scripts are kept open as long
-  // as new DICOM commands are issued. This option sets the number of
-  // seconds of inactivity to wait before automatically closing a
-  // DICOM association used by Lua. If set to 0, the connection is
-  // closed immediately. This option is only used in Lua scripts.
-  "DicomAssociationCloseDelay" : 5,
-
-  // Maximum number of query/retrieve DICOM requests that are
-  // maintained by Orthanc. The least recently used requests get
-  // deleted as new requests are issued.
-  "QueryRetrieveSize" : 100,
-
-  // When handling a C-FIND SCP request, setting this flag to "true"
-  // will enable case-sensitive match for PN value representation
-  // (such as PatientName). By default, the search is
-  // case-insensitive, which does not follow the DICOM standard.
-  "CaseSensitivePN" : false,
-
-  // Configure PKCS#11 to use hardware security modules (HSM) and
-  // smart cards when carrying on HTTPS client authentication.
-  /**
-     "Pkcs11" : {
-       "Module" : "/usr/local/lib/libbeidpkcs11.so",
-       "Module" : "C:/Windows/System32/beidpkcs11.dll",
-       "Pin" : "1234",
-       "Verbose" : true
-     }
-   **/
-  
-  // If set to "false", Orthanc will not load its default dictionary
-  // of private tags. This might be necessary if you cannot import a
-  // DICOM file encoded using the Implicit VR Endian transfer syntax,
-  // and containing private tags: Such an import error might stem from
-  // a bad dictionary. You can still list your private tags of
-  // interest in the "Dictionary" configuration option below.
-  "LoadPrivateDictionary" : true,
-
-  // Locale to be used by Orthanc. Currently, only used if comparing
-  // strings in a case-insensitive way. It should be safe to keep this
-  // value undefined, which lets Orthanc autodetect the suitable locale.
-  // "Locale" : "en_US.UTF-8",
-
-  // Register a new tag in the dictionary of DICOM tags that are known
-  // to Orthanc. Each line must contain the tag (formatted as 2
-  // hexadecimal numbers), the value representation (2 upcase
-  // characters), a nickname for the tag, possibly the minimum
-  // multiplicity (> 0 with defaults to 1), possibly the maximum
-  // multiplicity (0 means arbitrary multiplicity, defaults to 1), and
-  // possibly the Private Creator (for private tags).
-  // Note: For private tags, you should only declare the lower 8 bits
-  // of the element since the higher 8 bits may vary from one file to
-  // the other.
-  "Dictionary" : {
-    // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ]
-    // "00e1,c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ]
-    // "7053,03" : [ "ST", "Original Image Filename", 1, 1, "Philips PET Private Group" ]
-    // "2001,5f" : [ "SQ", "StackSequence", 1, 1, "Philips Imaging DD 001" ]
-  },
-
-  // Load a set of external DICOM dictionaries in order to replace the
-  // default dictionaries. This option must contain a set of files in
-  // the DCMTK format. The order of the dictionaries *is*
-  // important. This option can be used to turn Orthanc into a DICONDE
-  // server. (new in Orthanc 1.9.4)
-  /**
-     "ExternalDictionaries" : [
-     "/usr/share/dcmtk/dicom.dic",
-     "/usr/share/dcmtk/diconde.dic"
-     ]
-  **/
-
-  // Whether to run DICOM C-MOVE operations synchronously. If set to
-  // "false" (asynchronous mode), each incoming C-MOVE request results
-  // in the creation of a new background job. Up to Orthanc 1.3.2, the
-  // implicit behavior was to use synchronous C-MOVE ("true"). Between
-  // Orthanc 1.4.0 and 1.4.2, the default behavior was set to
-  // asynchronous C-MOVE ("false"). Since Orthanc 1.5.0, the default
-  // behavior is back to synchronous C-MOVE ("true", which ensures
-  // backward compatibility with Orthanc <= 1.3.2).
-  "SynchronousCMove" : true,
-
-  // Maximum number of completed jobs that are kept in memory. A
-  // processing job is considered as complete once it is tagged as
-  // "Success" or "Failure". Since Orthanc 1.5.0, a value of "0"
-  // indicates to keep no job in memory (i.e. jobs are removed from
-  // the history as soon as they are completed), which prevents the
-  // use of some features of Orthanc (typically, synchronous mode in
-  // REST API) and should be avoided for non-developers.
-  "JobsHistorySize" : 10,
-
-  // Whether to save the jobs into the Orthanc database. If this
-  // option is set to "true", the pending/running/completed jobs are
-  // automatically reloaded from the database if Orthanc is stopped
-  // then restarted (except if the "--no-jobs" command-line argument
-  // is specified). This option should be set to "false" if multiple
-  // Orthanc servers are using the same database (e.g. if PostgreSQL
-  // or MariaDB/MySQL is used).
-  "SaveJobs" : true,
-
-  // Specifies how Orthanc reacts when it receives a DICOM instance
-  // whose SOPInstanceUID is already stored. If set to "true", the new
-  // instance replaces the old one. If set to "false", the new
-  // instance is discarded and the old one is kept. Up to Orthanc
-  // 1.4.1, the implicit behavior corresponded to "false".
-  "OverwriteInstances" : false,
-
-  // Maximum number of ZIP/media archives that are maintained by
-  // Orthanc, as a response to the asynchronous creation of archives.
-  // The least recently used archives get deleted as new archives are
-  // generated. This option was introduced in Orthanc 1.5.0, and has
-  // no effect on the synchronous generation of archives.
-  "MediaArchiveSize" : 1,
-
-  // Performance setting to specify how Orthanc accesses the storage
-  // area during find operations (C-FIND, /tools/find API route and
-  // QIDO-RS in dicom-web). Three modes are available: (1) "Always"
-  // allows Orthanc to read the storage area as soon as it needs an
-  // information that is not present in its database (slowest mode),
-  // (2) "Never" prevents Orthanc from accessing the storage area, and
-  // makes it uses exclusively its database (fastest mode), and (3)
-  // "Answers" allows Orthanc to read the storage area to generate its
-  // answers, but not to filter the DICOM resources (balance between
-  // the two modes). By default, the mode is "Always", which
-  // corresponds to the behavior of Orthanc <= 1.5.0.
-  "StorageAccessOnFind" : "Always",
-
-  // Whether Orthanc monitors its metrics (new in Orthanc 1.5.4). If
-  // set to "true", the metrics can be retrieved at
-  // "/tools/metrics-prometheus" formetted using the Prometheus
-  // text-based exposition format.
-  "MetricsEnabled" : true,
-
-  // Whether calls to URI "/tools/execute-script" is enabled. Starting
-  // with Orthanc 1.5.8, this URI is disabled by default for security.
-  "ExecuteLuaEnabled" : false,
-
-  // Set the timeout while serving HTTP requests by the embedded Web
-  // server, in seconds. This corresponds to option
-  // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
-  // options "SO_RCVTIMEO" and "SO_SNDTIMEO" to the specified value.
-  "HttpRequestTimeout" : 30,
-
-  // Set the default private creator that is used by Orthanc when it
-  // looks for a private tag in its dictionary (cf. "Dictionary"
-  // option), or when it creates/modifies a DICOM file (new in Orthanc 1.6.0).
-  "DefaultPrivateCreator" : "",
-
-  // Maximum number of storage commitment reports (i.e. received from
-  // remote modalities) to be kept in memory (new in Orthanc 1.6.0).
-  "StorageCommitmentReportsSize" : 100,
-
-  // Whether Orthanc transcodes DICOM files to an uncompressed
-  // transfer syntax over the DICOM protocol, if the remote modality
-  // does not support compressed transfer syntaxes (new in Orthanc 1.7.0).
-  "TranscodeDicomProtocol" : true,
-
-  // If some plugin to decode/transcode DICOM instances is installed,
-  // this option specifies whether the built-in decoder/transcoder of
-  // Orthanc (that uses DCMTK) is applied before or after the plugins,
-  // or is not applied at all (new in Orthanc 1.7.0). The allowed
-  // values for this option are "After" (default value, corresponding
-  // to the behavior of Orthanc <= 1.6.1), "Before", or "Disabled".
-  "BuiltinDecoderTranscoderOrder" : "After",
-
-  // If this option is set, Orthanc will transparently transcode any
-  // incoming DICOM instance to the given transfer syntax before
-  // storing it into its database. Beware that this might result in
-  // high CPU usage (if transcoding to some compressed transfer
-  // syntax), or in higher disk consumption (if transcoding to an
-  // uncompressed syntax). Also, beware that transcoding to a transfer
-  // syntax with lossy compression (notably JPEG) will change the
-  // "SOPInstanceUID" DICOM tag, and thus the Orthanc identifier at
-  // the instance level, which might break external workflow.
-  /**
-     "IngestTranscoding" : "1.2.840.10008.1.2",
-  **/
-
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have an uncompressed transfer syntax, i.e. Little Endian
-  // Implicit, Little Endian Explicit or Big Endian Explicit (new in
-  // Orthanc 1.8.2).
-  "IngestTranscodingOfUncompressed" : true,
-  
-  // Whether ingest transcoding is applied to incoming DICOM instances
-  // that have a compressed transfer syntax (new in Orthanc 1.8.2).
-  "IngestTranscodingOfCompressed" : true,
-  
-  // The compression level that is used when transcoding to one of the
-  // lossy/JPEG transfer syntaxes (integer between 1 and 100).
-  "DicomLossyTranscodingQuality" : 90,
-
-  // Whether "fsync()" is called after each write to the storage area
-  // (new in Orthanc 1.7.4). If this option is set to "true", Orthanc
-  // will run more slowly, but the DICOM are guaranteed to be
-  // immediately written to the disk. This option only makes sense if
-  // the builtin filesystem storage area is used. It defaults to
-  // "false" in Orthanc <= 1.7.3, and to "true" in Orthanc >= 1.7.4.
-  "SyncStorageArea" : true,
-
-  // If specified, on compatible systems, call "mallopt(M_ARENA_MAX,
-  // ...)" while starting Orthanc. This has the same effect at setting
-  // the environment variable "MALLOC_ARENA_MAX". This avoids large
-  // growth in RES memory if the threads of the embedded HTTP server
-  // have to allocate large chunks of memory (typically the case with
-  // large DICOM files). By setting "MallocArenaMax" to "N", these
-  // threads share "N" memory pools (known as "arenas"). Setting this
-  // option to "0" doesn't call mallopt()", which was the behavior of
-  // Orthanc <= 1.8.1.
-  "MallocArenaMax" : 5,
-
-  // Deidentify/anonymize the contents of the logs (notably C-FIND,
-  // C-GET, and C-MOVE queries submitted to Orthanc) according to
-  // Table E.1-1 of the DICOM standard (new in Orthanc 1.8.2)
-  "DeidentifyLogs" : true,
-
-  // If "DeidentifyLogs" is true, this sets the DICOM standard to
-  // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
-
-  // Maximum length of the PDU (Protocol Data Unit) in the DICOM
-  // network protocol, expressed in bytes. This value affects both
-  // Orthanc SCU and Orthanc SCP. It defaults to 16KB. The allowed
-  // range is [4096,131072]. (new in Orthanc 1.9.0)
-  "MaximumPduLength" : 16384,
-
-  // Arbitrary identifier of this Orthanc server when storing its
-  // global properties if a custom index plugin is used. This
-  // identifier is only useful in the case of multiple
-  // readers/writers, in order to avoid collisions between multiple
-  // Orthanc servers. If unset, this identifier is taken as a SHA-1
-  // hash derived from the MAC addresses of the network interfaces,
-  // and from the AET and TCP ports used by Orthanc. Manually setting
-  // this option is needed in Docker/Kubernetes environments. (new in
-  // Orthanc 1.9.2)
-  /**
-     "DatabaseServerIdentifier" : "Orthanc1",
-  **/
-
-  // Whether Orthanc protects the modification of metadata and
-  // attachments using revisions, which is done using the HTTP headers
-  // "ETag", "If-Match" and "If-None-Match" in the calls to the REST
-  // API. This is needed to handle collisions between concurrent
-  // modifications in the case of multiple writers. The database
-  // back-end must support this option, which is notably *not* yet the
-  // case of the built-in SQLite index. (new in Orthanc 1.9.2)
-  "CheckRevisions" : false,
-
-  // Whether Orthanc streams ZIP archive/media to the HTTP
-  // client. Setting this option to "false" corresponds to the
-  // behavior of Orthanc <= 1.9.3: The ZIP is first entirely written
-  // to a temporary file, then sent to the client (which necessitates
-  // disk space and might lead to HTTP timeouts on large archives). If
-  // set to "true", the chunks of the ZIP file are progressively sent
-  // as soon as one DICOM file gets compressed (new in Orthanc 1.9.4)
-  "SynchronousZipStream" : true,
-
-  // Default number of loader threads when generating Zip archive/media.
-  // A value of 0 means reading and writing are performed in sequence
-  // (default behaviour).  A value > 1 is meaningful only if the storage
-  // is a distributed network storage (e.g object storage plugin).
-  // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0,
-
-  // Extra Main Dicom tags that are stored in DB together with all default
-  // Main Dicom tags that are already stored (TODO: see book new page). 
-  // (new in Orthanc 1.11.0)
-  // Sequences tags are not supported.
-  /**
-  "ExtraMainDicomTags" : {
-    "Instance" : [
-      "Rows",
-      "Columns",
-      "ImageType",
-      "SOPClassUID",
-      "ContentDate",
-      "ContentTime",
-      "FrameOfReferenceUID",
-      "PixelSpacing",
-      "SpecificCharacterSet",
-      "BitsAllocated"
-    ],
-    "Series" : [],
-    "Study": [],
-    "Patient": []
-  },
-  */
-
-  // Enables/disables warnings in the logs.
-  // "true" enables a warning.  All warnings are enabled by default
-  // TODO: see book new page
-  // (new in Orthanc 1.11.0)
-  "Warnings" : {
-    // A "RequestedTags" has been read from storage which is slower than
-    // reading it from DB.
-    // You might want to store this tag in ExtraMainDicomTags to build
-    // the response faster.
-    "W001_TagsBeingReadFromStorage": true,
-    
-    // Retrieving a list of Main dicom tags from a resource that has been
-    // saved with another "ExtraMainDicomTags" configuration which means that
-    // your response might be incomplete/inconsistent.
-    // You should call patients|studies|series|instances/../reconstruct to rebuild
-    // the DB.  TODO: also check for "rebuild DB" plugin
-    "W002_InconsistentDicomTagsInDb": true
-  }
-
-}
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index d5cb61514619..96c4bb3115ec 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -23,18 +23,19 @@ python_version=3
 # Create '_orthanc' user for the server
 system_accounts="_orthanc"
 _orthanc_descr="Orthanc server user"
-conf_files="etc/orthanc/Configuration.json"
+
+conf_files="/etc/orthanc/Configuration.json"
 
 post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
 	cd ${DESTDIR}
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
 	# Remove garbage
 	rm -rf builddir
-
-	vsv orthanc
-	vinstall ${FILESDIR}/Configuration.json 0644 etc/orthanc
 }
 
 Orthanc-devel_package() {

From e5c78126ba314c9162a7343b9f89f07c2f8327fa Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 13/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index 3efa389a99c5..bcd098f272e1 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -4,9 +4,9 @@ version=4.0
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DPYTHON_VERSION=3.10"
+ -DORTHANC_FRAMEWORK_VERSION=1.11.1"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"

From 74ff74092b7c532b2ec978d924cc3f9501360f27 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 14/18] New package: dcmtk-3.6.7

---
 srcpkgs/dcmtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
index 63c28bc3c376..2efd9cc7850b 100644
--- a/srcpkgs/dcmtk/template
+++ b/srcpkgs/dcmtk/template
@@ -10,7 +10,7 @@ short_desc="Libraries and tools that implements DICOM standard"
 maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
 license="custom: see /usr/share/licenses/${pkgname}"
 homepage="https://dcmtk.org/dcmtk.php.en"
-distfiles="https://dicom.offis.de/download/dcmtk/${version//.}/dcmtk-${version}.tar.gz"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
 checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
 
 pre_build() {

From c1cfd3dbf146b9652d259a67d44f222dfa22a2fc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:59 -0300
Subject: [PATCH 15/18] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
index ce68fbd8038a..827b53a54a1f 100644
--- a/srcpkgs/Orthanc-DicomWeb/template
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -4,7 +4,7 @@ version=1.9
 revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
 makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
@@ -15,8 +15,12 @@ license="AGPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
 checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

From f17bb40734c24522cd8df9d4ab29cb9502ed4187 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:41 -0300
Subject: [PATCH 16/18] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
index 96c4bb3115ec..74a83e19f8d2 100644
--- a/srcpkgs/Orthanc/template
+++ b/srcpkgs/Orthanc/template
@@ -17,7 +17,6 @@ license="GPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/index.php"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
 checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
-ignore_elf_dirs="/usr/share/orthanc"
 python_version=3
 
 # Create '_orthanc' user for the server
@@ -34,6 +33,10 @@ post_install() {
 	mv usr/sbin/* usr/bin/
 	rm -rf usr/sbin
 
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
 	# Remove garbage
 	rm -rf builddir
 }
@@ -53,6 +56,6 @@ Orthanc-plugins_package() {
 	depends+=" ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - official plugins"
 	pkg_install() {
-		vmove usr/share/orthanc/plugins
+		vmove usr/lib/orthanc/plugins
 	}
 }

From 24b1729328d20457cac2048114d3d9347f510ab3 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:15 -0300
Subject: [PATCH 17/18] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
index 360fe0c56796..30a34fcff22d 100644
--- a/srcpkgs/Orthanc-PostgreSQL/template
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc="${pkgname/-}-${version}"
 build_wrksrc="PostgreSQL"
 build_style=cmake
-configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_WOURCE=path
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
  -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3"
 makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
@@ -16,8 +16,12 @@ license="AGPL-3.0-or-later"
 homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
 checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

From 0a36e979427484f753d761ffcecc2aff88705f70 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:25:48 -0300
Subject: [PATCH 18/18] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
index bcd098f272e1..1d108f0513d5 100644
--- a/srcpkgs/Orthanc-Python/template
+++ b/srcpkgs/Orthanc-Python/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc="${pkgname/-}-${version}"
 build_style=cmake
 configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
- -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources
- -DORTHANC_FRAMEWORK_VERSION=1.11.1"
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
 hostmakedepends="tar unzip python3 pkg-config"
 makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
 short_desc="Python plugin for Orthanc"
@@ -15,8 +14,12 @@ license="AGPL-3.0-or-later"
 homepage="https://book.orthanc-server.com/plugins/python.html"
 distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
 checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
-ignore_elf_dirs="/usr/share/orthanc"
 
 post_install() {
 	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
 }

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (39 preceding siblings ...)
  2022-08-09 17:04 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-09 17:47 ` Chocimier
  2022-08-09 17:53 ` bingulo
                   ` (21 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: Chocimier @ 2022-08-09 17:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209688660

Comment:
> version hold by user

This is already covered by dynamic linking tracking, look for `SONAME: libpython3.10.so.1.0 <-> python3>=3.10.0_1` in build log.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (40 preceding siblings ...)
  2022-08-09 17:47 ` Chocimier
@ 2022-08-09 17:53 ` bingulo
  2022-08-09 17:53 ` bingulo
                   ` (20 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 17:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209693989

Comment:
> > version hold by user
> 
> This is already covered by dynamic linking tracking, look for `SONAME: libpython3.10.so.1.0 <-> python3>=3.10.0_1` in build log.

Ahh okay, so I don't need to specify python3 on depends?

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (41 preceding siblings ...)
  2022-08-09 17:53 ` bingulo
@ 2022-08-09 17:53 ` bingulo
  2022-08-09 20:12 ` [PR PATCH] [Updated] " bingulo
                   ` (19 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 17:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1209693989

Comment:
> > version hold by user
> 
> This is already covered by dynamic linking tracking, look for `SONAME: libpython3.10.so.1.0 <-> python3>=3.10.0_1` in build log.

Ahh okay, so don't I need to specify python3 on depends?

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (42 preceding siblings ...)
  2022-08-09 17:53 ` bingulo
@ 2022-08-09 20:12 ` bingulo
  2022-08-10  1:26 ` bingulo
                   ` (18 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-09 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17137 bytes --]

From ad212ca230946a6fb6321c87854ca79db1183e92 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 49 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,31 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..2efd9cc7850b
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,49 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 9f9a502a687869059a3d86b3a3d3d8c406bb258c Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 45714018ad0ed2a8c747bb5ac890fa04afe82e71 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 61 ++++++++++++++++++++++++++++
 5 files changed, 122 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..74a83e19f8d2
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,61 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From bef01e4c8c53c67c44b323dee3f5840cbca44068 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..827b53a54a1f
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 40c31a54a4108c9cae9fc3d85549d5935f38b778 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..30a34fcff22d
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 885b9c1dab78b007faa7ece15fb293b95b8463c3 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..1d108f0513d5
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,25 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (43 preceding siblings ...)
  2022-08-09 20:12 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-10  1:26 ` bingulo
  2022-08-10  2:26 ` bingulo
                   ` (17 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-10  1:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17339 bytes --]

From 53c3c50284c9d6f7cd58a74d2595f5d6bef45354 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,31 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 84dfecca5cbb695fc0f2c9b7f9244d0cdf56560e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 13699ee4545f32fcb6a74d61f9b60ce5837b0ac4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 61 ++++++++++++++++++++++++++++
 5 files changed, 122 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..74a83e19f8d2
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,61 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 72c85d3349356206044142d7aa2765471f32d5ab Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..827b53a54a1f
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 5156bcd7c63ba1e4731ac9267977d520ba48a000 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..30a34fcff22d
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 10e82a1c583fae3b270a13761a153ad461048ec2 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..1d108f0513d5
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,25 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (44 preceding siblings ...)
  2022-08-10  1:26 ` bingulo
@ 2022-08-10  2:26 ` bingulo
  2022-08-10  2:31 ` bingulo
                   ` (16 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-10  2:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17404 bytes --]

From 53c3c50284c9d6f7cd58a74d2595f5d6bef45354 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,31 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 84dfecca5cbb695fc0f2c9b7f9244d0cdf56560e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From ddbeaa24a1cbeff10e94671c037227bf5471537b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 515083c037c61253ab10be63c54e7fcad3951ede Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..827b53a54a1f
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From b118e78ce1be601a1cacf60880ae8dbd8fea7865 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..30a34fcff22d
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 9678dfe3c6c405eeafbbe960ce708cc3785114fa Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..1d108f0513d5
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,25 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (45 preceding siblings ...)
  2022-08-10  2:26 ` bingulo
@ 2022-08-10  2:31 ` bingulo
  2022-08-10  2:37 ` bingulo
                   ` (15 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-10  2:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17626 bytes --]

From 53c3c50284c9d6f7cd58a74d2595f5d6bef45354 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index ea6fde4ffe31..d3fd58874703 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,31 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
 libqtspell-qt5.so.1 qtspell-1.0.1_1
 libopensmtpd.so.0 libopensmtpd-0.7_1
 libiio.so.0 libiio-0.23_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 84dfecca5cbb695fc0f2c9b7f9244d0cdf56560e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From ddbeaa24a1cbeff10e94671c037227bf5471537b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From f41122e9cf857ecb18f1f73631a06e3257901990 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From a1207f3ae183068bf7948aa6df3aa5cc836e8623 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 409ea61e015b03530aedac5640d952d52815c7cd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (46 preceding siblings ...)
  2022-08-10  2:31 ` bingulo
@ 2022-08-10  2:37 ` bingulo
  2022-08-11 16:43 ` [PR PATCH] [Updated] " bingulo
                   ` (14 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-10  2:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

New comment by bingulo on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1210082800

Comment:
I marked all packages (except civetweb) since dcmtk, a dependency of Orthanc, need running some code on target arch to generate a header for crossbuild. It can be done running a compiled test (a single .cc present on distfile) on each arch and providing its generated headers together to package and copying it to desired directory, what seems a little tricky to maintain. 

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (47 preceding siblings ...)
  2022-08-10  2:37 ` bingulo
@ 2022-08-11 16:43 ` bingulo
  2022-08-24 22:36 ` bingulo
                   ` (13 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-11 16:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17676 bytes --]

From b3a726e4f6f10254c78b85b7a6651c0d3e15c766 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 61924610cc52..4d84cb9f8f50 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4190,3 +4190,31 @@ libqtquickforkawesome.so.0.0.4 qtforkawesome-0.0.4_1
 libsyncthingwidgets.so.1.2.2 syncthingtray-1.2.2_1
 libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
 libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From b7d1f1993d9ff1a2a830ffec2bcdf3854f92386b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From b91e5178725fe7c2e7f6981b19fb457fb3bf847c Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 514f76e2b03e12c55067dad36ae37f1a8d1ef7ea Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 676a19934da730e433c91396987e81df984a2329 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 750f3fc1fc2517c0b0f578c273cb656797b177a2 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (48 preceding siblings ...)
  2022-08-11 16:43 ` [PR PATCH] [Updated] " bingulo
@ 2022-08-24 22:36 ` bingulo
  2022-10-13 19:52 ` bingulo
                   ` (12 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-08-24 22:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17646 bytes --]

From 7253df63644f68e8d77a4fe9a219a79e193259a3 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..f5592e5d791f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,31 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
 libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
 libglibutil.so.1 libglibutil-1.0.64_1
 libgbinder.so.1 libgbinder-1.1.20_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From b8c12def47a8d3734183594ff9169019be5851bd Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From ba6fb8106a6ca7402316d87f623807e2ff24c35e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 38efa4b31ff03ffe2e87f729f043e159a6d3d975 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 0423077af66a8a7d43bc10b396ee178fe20eab2a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 1b8bde194825ea78ac7a4b476e5dc658faa376fe Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (49 preceding siblings ...)
  2022-08-24 22:36 ` bingulo
@ 2022-10-13 19:52 ` bingulo
  2022-11-15 22:18 ` anhangah
                   ` (11 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: bingulo @ 2022-10-13 19:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

There is an updated pull request by bingulo against master on the void-packages repository

https://github.com/bingulo/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17693 bytes --]

From 8d7aa15c1847246d3addb845b843d95a53fe3c4b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index fe70a5765f50..f669bb88bd61 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4185,3 +4185,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 02b407b064c763ea1bcd2ee8580cda03eece0ff4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From f1c7443682f25a2a5a8af23c5581be4b21dc5850 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From cf618e1ae2ae8208d07060188e701e2eac9181a3 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 9cd5417a939df79c2dd70b508ddc03388596e1b0 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 44aba4789f420d5ddf0b37ffd9346c3d3ceaf93f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (50 preceding siblings ...)
  2022-10-13 19:52 ` bingulo
@ 2022-11-15 22:18 ` anhangah
  2022-11-17 13:46 ` anhangah
                   ` (10 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-15 22:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17693 bytes --]

From 09d58566a019cf2f60918b301d4dc3a04274fc22 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..481897fd218f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 14cd9682c9e68b07842d3b969bcf50c92f323dfc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 743a5c591f4491099d0e6d951b4964e0b57a0fb2 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.1

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 62 ++++++++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..8e8f4ad5ffde
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,62 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.1
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From e441d6fc8257542eb41dcb46832afcb88a804f34 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From f7c4e15c47386b4619751093fb427e2fb85d019a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From b2e58af4de33791d03968b0c6245b053c23e0243 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (51 preceding siblings ...)
  2022-11-15 22:18 ` anhangah
@ 2022-11-17 13:46 ` anhangah
  2022-11-17 13:54 ` anhangah
                   ` (9 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-17 13:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17721 bytes --]

From 09d58566a019cf2f60918b301d4dc3a04274fc22 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..481897fd218f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 14cd9682c9e68b07842d3b969bcf50c92f323dfc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 36517d6f61a9e479a78302af395a49a868429a0d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From c605d2a28ae660b7d5cb70c6c1dc51a1bbd6b69f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..f4d3a0abb3e1
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.9
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 37b1becf2715b6d272cddaa2f7cf97ac3279cf35 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 23feb3570189a9ef5d8856463ae67865bcaa93af Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (52 preceding siblings ...)
  2022-11-17 13:46 ` anhangah
@ 2022-11-17 13:54 ` anhangah
  2022-11-17 13:59 ` anhangah
                   ` (8 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-17 13:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17723 bytes --]

From 09d58566a019cf2f60918b301d4dc3a04274fc22 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..481897fd218f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 14cd9682c9e68b07842d3b969bcf50c92f323dfc Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 36517d6f61a9e479a78302af395a49a868429a0d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From d5e3d8d9d28e7cdd299be15d85fcbdf0e145a79b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From f1c95325028537abfbe59bc29db23e8a8c28528a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From f20a5e34d4b0b2253b27ba930f0501476cc10456 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.1
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (53 preceding siblings ...)
  2022-11-17 13:54 ` anhangah
@ 2022-11-17 13:59 ` anhangah
  2022-11-17 14:03 ` New package: Orthanc-1.11.2 anhangah
                   ` (7 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-17 13:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17723 bytes --]

From af40979a194f2cc10a3fd2cf95510ddb0a8f8186 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..481897fd218f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4197,3 +4197,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From a262c42e3edbab7df44ebd7ea3e5be7f58954c23 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 63cdcc82edeaf5818567b03075e7b1c6a1f4bf4f Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 5d390a88cc020396ba130927aa69cd4e85d56742 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From bff2846938c876a8040c5b5e9a464700151e6c81 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 861617384222fa8ec9dfca61c9c15600d6657901 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (54 preceding siblings ...)
  2022-11-17 13:59 ` anhangah
@ 2022-11-17 14:03 ` anhangah
  2022-11-22 20:24 ` [PR PATCH] [Updated] " anhangah
                   ` (6 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-17 14:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

New comment by anhangah on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1318685790

Comment:
I just updated Orthanc and Orthanc-DicomWeb to upstream version and made a change o Orthanc template accordingly Orthanc documentation. Also I tested the build on native aarch64 and everything seems fine.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (55 preceding siblings ...)
  2022-11-17 14:03 ` New package: Orthanc-1.11.2 anhangah
@ 2022-11-22 20:24 ` anhangah
  2022-11-22 23:28 ` anhangah
                   ` (5 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-22 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17723 bytes --]

From acfdd53033ff5992fcf8a53666771975c2ef456d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 7764c5c6de8b..077df81ca936 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4199,3 +4199,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 07c72692c985d065fde31f090ea579a34d961836 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 2677356a7b0a55bd15ce0d03f9f6d6a8e32d08f4 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..08f727da62c1
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	OPTS="${OPTS} --logdir=\"$LOGDIR\""
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From b938ad8db4633da2991afc67a6378b034542d297 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 48f1fd6192a6fd04a44eae51dbf914f62f7f77b0 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 3b36685284bab42432666e2c52d2b828990888f0 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (56 preceding siblings ...)
  2022-11-22 20:24 ` [PR PATCH] [Updated] " anhangah
@ 2022-11-22 23:28 ` anhangah
  2022-11-23 20:43 ` anhangah
                   ` (4 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-22 23:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17729 bytes --]

From acfdd53033ff5992fcf8a53666771975c2ef456d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 7764c5c6de8b..077df81ca936 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4199,3 +4199,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 07c72692c985d065fde31f090ea579a34d961836 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 60539abd30d00e38583c468c6520fe891f3f4834 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..2936fc201969
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/log/orthanc"}
+	LOGDIR_OPT="--logdir=$LOGDIR"
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "$LOGDIR_OPT" "$CONFIGFILE"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 031e2ca107dcd8379cb8c0e608dc25af9f23ac23 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From fa42f84b66e3d21f0c3997e1e1c91a10da72493b Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From aa5a8dbfd410cadb42853b246627f8de8415eff6 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (57 preceding siblings ...)
  2022-11-22 23:28 ` anhangah
@ 2022-11-23 20:43 ` anhangah
  2022-12-30  2:10 ` anhangah
                   ` (3 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-11-23 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17733 bytes --]

From acfdd53033ff5992fcf8a53666771975c2ef456d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 7764c5c6de8b..077df81ca936 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4199,3 +4199,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 07c72692c985d065fde31f090ea579a34d961836 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From c6b40573047d969ff14a8e828ca0483fa61d04de Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..8a414082dd0e
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/var/log/orthanc"}
+	LOGDIR_OPT="--logdir=$LOGDIR"
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "$LOGDIR_OPT" "$CONFIGFILE"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 3845ef7500be51e9138f19f90c3f28f4e5dffbfa Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 8a1cd332fc8db8587687b2bf4af0055ff08cc9b1 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 437a64b7437d7f3831ae548cbbfa7e09d8273b7e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (58 preceding siblings ...)
  2022-11-23 20:43 ` anhangah
@ 2022-12-30  2:10 ` anhangah
  2023-02-08 15:23 ` gcarlos64
                   ` (2 subsequent siblings)
  62 siblings, 0 replies; 64+ messages in thread
From: anhangah @ 2022-12-30  2:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

There is an updated pull request by anhangah against master on the void-packages repository

https://github.com/anhangah/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17630 bytes --]

From 55edcc9d4ce67f29ae4a2432db68accce389e886 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 1c852ef3fdff..9877925f6276 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4221,3 +4221,31 @@ libfst.so.25 openfst-1.8.2_1
 libvosk.so vosk-api-0.3.43_1
 libdspy-1.so.1 d-spy-1.4.0_1
 libpanel-1.so.1 libpanel-1.0.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From 78a7d4475b0d01b5cfc0515d854a90c3e824b56e Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 44818fbfdf91f72acd472380a8c48bbc19f52dc9 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..8a414082dd0e
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/var/log/orthanc"}
+	LOGDIR_OPT="--logdir=$LOGDIR"
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "$LOGDIR_OPT" "$CONFIGFILE"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From fd9e8717ac66f9af7bc73dbc9d2ce137f0180aeb Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From b17d332af7e3b48f026e8a32c9c39283335d553d Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From c9fba1ace36d06259fcba670c435c7ebf188d7fe Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Updated] New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (59 preceding siblings ...)
  2022-12-30  2:10 ` anhangah
@ 2023-02-08 15:23 ` gcarlos64
  2023-05-10  1:51 ` github-actions
  2023-05-24  1:56 ` [PR PATCH] [Closed]: " github-actions
  62 siblings, 0 replies; 64+ messages in thread
From: gcarlos64 @ 2023-02-08 15:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

There is an updated pull request by gcarlos64 against master on the void-packages repository

https://github.com/gcarlos64/void-packages orthanc
https://github.com/void-linux/void-packages/pull/38537

New package: Orthanc-1.11.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

A patch file from https://github.com/void-linux/void-packages/pull/38537.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-orthanc-38537.patch --]
[-- Type: text/x-diff, Size: 17674 bytes --]

From ab217f574983f36d5384cd046a61dfc1c61e3453 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:24:16 -0300
Subject: [PATCH 1/6] New package: dcmtk-3.6.7

---
 common/shlibs          | 28 ++++++++++++++++++++++
 srcpkgs/dcmtk-doc      |  1 +
 srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++
 srcpkgs/libdcmtk       |  1 +
 srcpkgs/libdcmtk-devel |  1 +
 5 files changed, 85 insertions(+)
 create mode 120000 srcpkgs/dcmtk-doc
 create mode 100644 srcpkgs/dcmtk/template
 create mode 120000 srcpkgs/libdcmtk
 create mode 120000 srcpkgs/libdcmtk-devel

diff --git a/common/shlibs b/common/shlibs
index 504d29f4cb98..e725ac5f2985 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4225,3 +4225,31 @@ libOpenEXR-3_1.so.30 libopenexr-3.1.5_1
 libOpenEXRCore-3_1.so.30 libopenexr-3.1.5_1
 libOpenEXRUtil-3_1.so.30 libopenexr-3.1.5_1
 libdate-tz.so.3 chrono-date-3.0.1_1
+libcivetweb.so.1 libcivetweb-1.15_1
+libcmr.so.17 libdcmtk-3.6.7_1
+libdcmrt.so.17 libdcmtk-3.6.7_1
+libdcmdata.so.17 libdcmtk-3.6.7_1
+libdcmseg.so.17 libdcmtk-3.6.7_1
+libdcmdsig.so.17 libdcmtk-3.6.7_1
+libdcmsr.so.17 libdcmtk-3.6.7_1
+libdcmect.so.17 libdcmtk-3.6.7_1
+libdcmtkcharls.so.17 libdcmtk-3.6.7_1
+libdcmfg.so.17 libdcmtk-3.6.7_1
+libdcmtls.so.17 libdcmtk-3.6.7_1
+libdcmimage.so.17 libdcmtk-3.6.7_1
+libdcmtract.so.17 libdcmtk-3.6.7_1
+libdcmimgle.so.17 libdcmtk-3.6.7_1
+libdcmwlm.so.17 libdcmtk-3.6.7_1
+libdcmiod.so.17 libdcmtk-3.6.7_1
+libi2d.so.17 libdcmtk-3.6.7_1
+libdcmjpeg.so.17 libdcmtk-3.6.7_1
+libijg12.so.17 libdcmtk-3.6.7_1
+libdcmjpls.so.17 libdcmtk-3.6.7_1
+libijg16.so.17 libdcmtk-3.6.7_1
+libdcmnet.so.17 libdcmtk-3.6.7_1
+libijg8.so.17 libdcmtk-3.6.7_1
+libdcmpmap.so.17 libdcmtk-3.6.7_1
+liboflog.so.17 libdcmtk-3.6.7_1
+libdcmpstat.so.17 libdcmtk-3.6.7_1
+libofstd.so.17 libdcmtk-3.6.7_1
+libdcmqrdb.so.17 libdcmtk-3.6.7_1
diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/dcmtk-doc
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template
new file mode 100644
index 000000000000..8987937f08a6
--- /dev/null
+++ b/srcpkgs/dcmtk/template
@@ -0,0 +1,54 @@
+# Template file for 'dcmtk'
+pkgname=dcmtk
+version=3.6.7
+revision=1
+build_style=cmake
+configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON
+ -DDCMTK_WITH_DOXYGEN=ON"
+hostmakedepends="doxygen"
+makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel
+ icu-devel"
+short_desc="Libraries and tools that implements DICOM standard"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="custom: see /usr/share/licenses/${pkgname}"
+homepage="https://dcmtk.org/dcmtk.php.en"
+distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz"
+checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a
+nocross="It's some tricky to achieve cross building, wich needs to compile and
+ run some tests codes on the target arch.
+ See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling"
+
+pre_build() {
+	ninja -C build DOXYGEN
+}
+
+post_install() {
+	vlicense COPYRIGHT
+}
+
+dcmtk-doc_package() {
+	short_desc+=' - documentation'
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}
+
+# TODO need license here
+libdcmtk_package() {
+	short_desc+=' - runtime libraries'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+		vmove usr/share/dcmtk
+	}
+}
+
+libdcmtk-devel_package() {
+	short_desc+=' - development files'
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/cmake
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file
diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel
new file mode 120000
index 000000000000..69ff54ce2e0c
--- /dev/null
+++ b/srcpkgs/libdcmtk-devel
@@ -0,0 +1 @@
+dcmtk
\ No newline at end of file

From b09970a8c436d9a75922375625b183a502e6d447 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Mon, 8 Aug 2022 16:22:27 -0300
Subject: [PATCH 2/6] New package: civetweb-1.15

---
 srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++
 srcpkgs/civetweb/template                  | 39 ++++++++++++++++++++++
 srcpkgs/libcivetweb                        |  1 +
 srcpkgs/libcivetweb-devel                  |  1 +
 4 files changed, 57 insertions(+)
 create mode 100644 srcpkgs/civetweb/patches/install-fix.patch
 create mode 100644 srcpkgs/civetweb/template
 create mode 120000 srcpkgs/libcivetweb
 create mode 120000 srcpkgs/libcivetweb-devel

diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch
new file mode 100644
index 000000000000..be282dbf613c
--- /dev/null
+++ b/srcpkgs/civetweb/patches/install-fix.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,10 +19,10 @@
+ # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+ PREFIX ?= /usr/local
+ EXEC_PREFIX = $(PREFIX)
+-BINDIR = $(EXEC_PREFIX)/bin
+-DATAROOTDIR = $(PREFIX)/share
++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin
++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share
+ DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
+-SYSCONFDIR ?= $(PREFIX)/etc
++SYSCONFDIR ?= $(DESTDIR)/etc
+ HTMLDIR = $(DOCDIR)
+ INCLUDEDIR = $(DESTDIR)$(PREFIX)/include
+ LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib
diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template
new file mode 100644
index 000000000000..96ff8080508b
--- /dev/null
+++ b/srcpkgs/civetweb/template
@@ -0,0 +1,39 @@
+# Template file for 'civetweb'
+pkgname=civetweb
+version=1.15
+revision=1
+build_style=gnu-makefile
+make_install_target="install install-headers install-lib install-slib"
+make_use_env=yes
+makedepends="openssl-devel"
+short_desc="Embedded C/C++ web server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="MIT"
+homepage="https://civetweb.github.io/civetweb/"
+distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz"
+checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9
+
+pre_install() {
+	vmkdir usr/include
+}
+
+post_install() {
+	vlicense LICENSE.md
+}
+
+libcivetweb_package() {
+	short_desc+=' - library'
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+
+libcivetweb-devel_package() {
+	depends="lib${sourcepkg}>=${version}_${revision}"
+	short_desc+=' - development files'
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file
diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel
new file mode 120000
index 000000000000..f740b5313316
--- /dev/null
+++ b/srcpkgs/libcivetweb-devel
@@ -0,0 +1 @@
+civetweb
\ No newline at end of file

From 90f97f0b2a789b15ae3bdf4d10aacd3aef7efc3c Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:53:53 -0300
Subject: [PATCH 3/6] New package: Orthanc-1.11.2

---
 srcpkgs/Orthanc-devel                |  1 +
 srcpkgs/Orthanc-plugins              |  1 +
 srcpkgs/Orthanc/files/orthanc/run    | 31 ++++++++++++++
 srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++
 srcpkgs/Orthanc/template             | 63 ++++++++++++++++++++++++++++
 5 files changed, 124 insertions(+)
 create mode 120000 srcpkgs/Orthanc-devel
 create mode 120000 srcpkgs/Orthanc-plugins
 create mode 100755 srcpkgs/Orthanc/files/orthanc/run
 create mode 100644 srcpkgs/Orthanc/patches/config.patch
 create mode 100644 srcpkgs/Orthanc/template

diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-devel
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins
new file mode 120000
index 000000000000..6d0405937430
--- /dev/null
+++ b/srcpkgs/Orthanc-plugins
@@ -0,0 +1 @@
+Orthanc
\ No newline at end of file
diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run
new file mode 100755
index 000000000000..8a414082dd0e
--- /dev/null
+++ b/srcpkgs/Orthanc/files/orthanc/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+OPTS=""
+[ -r conf ] && . ./conf
+
+: ${USER:="_orthanc"}
+
+: ${CONFIGFILE:="/etc/orthanc/Configuration.json"}
+[ -r "$CONFIGFILE" ] || exit 1
+
+: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"}
+if [ ! -e "$ORTHANCSTORAGE" ]
+then
+	mkdir -pm 0750 "$ORTHANCSTORAGE" &&
+	chown ${USER}:${USER} "$ORTHANCSTORAGE" ||
+	exit 1
+fi
+
+# Enable log
+if [ -n "$LOG" ]; then
+	: ${LOGDIR:="/var/log/orthanc"}
+	LOGDIR_OPT="--logdir=$LOGDIR"
+
+	if [ ! -e "$LOGDIR" ]; then
+		mkdir -pm 0750 "$LOGDIR" &&
+		chown ${USER}:${USER} "$LOGDIR" ||
+		exit 1
+	fi
+fi
+
+# Set OPTS on conf file for aditional parameters
+exec chpst -u ${USER}:${USER} Orthanc $OPTS "$LOGDIR_OPT" "$CONFIGFILE"
diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch
new file mode 100644
index 000000000000..94db1a0a6c90
--- /dev/null
+++ b/srcpkgs/Orthanc/patches/config.patch
@@ -0,0 +1,28 @@
+--- a/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
++++ b/OrthancServer/Resources/Configuration.json	2022-06-30 08:04:50.000000000 -0300
+@@ -10,12 +10,12 @@
+   // Path to the directory that holds the heavyweight files (i.e. the
+   // raw DICOM instances). Backslashes must be either escaped by
+   // doubling them, or replaced by forward slashes "/".
+-  "StorageDirectory" : "OrthancStorage",
++  "StorageDirectory" : "/var/lib/OrthancStorage",
+ 
+   // 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/lib/OrthancStorage",
+ 
+   // Path to the directory where Orthanc stores its large temporary
+   // files. The content of this folder can be safely deleted once
+@@ -670,8 +670,8 @@
+   // server. (new in Orthanc 1.9.4)
+   /**
+      "ExternalDictionaries" : [
+-     "/usr/share/libdcmtk12/dicom.dic",
+-     "/usr/share/libdcmtk12/diconde.dic"
++     "/usr/share/dcmtk/dicom.dic",
++     "/usr/share/dcmtk/diconde.dic"
+      ]
+   **/
+ 
diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template
new file mode 100644
index 000000000000..61fbc39ed008
--- /dev/null
+++ b/srcpkgs/Orthanc/template
@@ -0,0 +1,63 @@
+# Template file for 'Orthanc'
+pkgname=Orthanc
+version=1.11.2
+revision=1
+build_wrksrc="OrthancServer"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF
+ -DBoost_NO_BOOST_CMAKE=ON -DDCMTK_DIR=/usr/lib/cmake/dcmtk"
+hostmakedepends="python3 unzip tar doxygen dcmtk"
+makedepends="libuuid-devel boost-devel libcurl-devel
+ libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel
+ sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel
+ pugixml-devel"
+depends="dcmtk"
+short_desc="Lightweight RESTful DICOM server"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/index.php"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz"
+checksum=fd3a855f181db25db1baa9f94b2841b611dc623fb01c559f55be88502c6784a7
+python_version=3
+nocross="A package on makedepends (dcmtk) is marked as nocross"
+
+# Create '_orthanc' user for the server
+system_accounts="_orthanc"
+_orthanc_descr="Orthanc server user"
+
+conf_files="/etc/orthanc/Configuration.json"
+
+post_install() {
+	vsv orthanc
+	vinstall Resources/Configuration.json 0644 etc/orthanc
+
+	cd ${DESTDIR}
+	mv usr/sbin/* usr/bin/
+	rm -rf usr/sbin
+
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+
+	# Remove garbage
+	rm -rf builddir
+}
+
+Orthanc-devel_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/share/doc
+		vmkdir usr/share/orthanc/OrthancFramework 0755
+		vcopy ${wrksrc}/OrthancFramework usr/share/orthanc
+	}
+}
+
+Orthanc-plugins_package() {
+	depends+=" ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - official plugins"
+	pkg_install() {
+		vmove usr/lib/orthanc/plugins
+	}
+}

From 6e93897a7052305b7852bceb758187fafaeb7e8a Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:54:34 -0300
Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.10

---
 srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/Orthanc-DicomWeb/template

diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template
new file mode 100644
index 000000000000..079f08d1755c
--- /dev/null
+++ b/srcpkgs/Orthanc-DicomWeb/template
@@ -0,0 +1,27 @@
+# Template file for 'Orthanc-DicomWeb'
+pkgname=Orthanc-DicomWeb
+version=1.10
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel
+ libuuid-devel boost-devel"
+short_desc="Plugin to bring support of the DICOMweb standard into Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz"
+checksum=84d6c290352cdfbbd63101f5462cbe4b67dd8268b55cf06a3363914c926bec73
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From d6745d350a1a7c026f471d6afb34a0d7eb793536 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:35 -0300
Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0

---
 srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/Orthanc-PostgreSQL/template

diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template
new file mode 100644
index 000000000000..9b423c32ac89
--- /dev/null
+++ b/srcpkgs/Orthanc-PostgreSQL/template
@@ -0,0 +1,28 @@
+# Template file for 'Orthanc-PostgreSQL'
+pkgname=Orthanc-PostgreSQL
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_wrksrc="PostgreSQL"
+build_style=cmake
+configure_args="-DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3"
+makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel
+ jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel"
+short_desc="PostgreSQL database plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://www.orthanc-server.com/static.php?page=dicomweb"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz"
+checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense ../COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

From 499d82a0ce243050250f5b9ff965a72e05a23305 Mon Sep 17 00:00:00 2001
From: bingulo <gcarlos@disroot.org>
Date: Tue, 9 Aug 2022 16:55:52 -0300
Subject: [PATCH 6/6] New package: Orthanc-Python-4.0

---
 srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/Orthanc-Python/template

diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template
new file mode 100644
index 000000000000..87df444dfc18
--- /dev/null
+++ b/srcpkgs/Orthanc-Python/template
@@ -0,0 +1,26 @@
+# Template file for 'Orthanc-Python'
+pkgname=Orthanc-Python
+version=4.0
+revision=1
+wrksrc="${pkgname/-}-${version}"
+build_style=cmake
+configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path
+ -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources"
+hostmakedepends="tar unzip python3 pkg-config"
+makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel"
+short_desc="Python plugin for Orthanc"
+maintainer="Carlos E. Gallo F. <gcarlos@disroot.org>"
+license="AGPL-3.0-or-later"
+homepage="https://book.orthanc-server.com/plugins/python.html"
+distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz"
+checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647
+nocross="A package on makedepends (Orthanc-devel) is marked as nocross"
+
+post_install() {
+	vlicense COPYING
+
+	cd ${DESTDIR}
+	mkdir -p usr/lib/orthanc/plugins
+	mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/
+	rm -rf usr/share/orthanc/plugins
+}

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (60 preceding siblings ...)
  2023-02-08 15:23 ` gcarlos64
@ 2023-05-10  1:51 ` github-actions
  2023-05-24  1:56 ` [PR PATCH] [Closed]: " github-actions
  62 siblings, 0 replies; 64+ messages in thread
From: github-actions @ 2023-05-10  1:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/38537#issuecomment-1541174764

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 64+ messages in thread

* Re: [PR PATCH] [Closed]: New package: Orthanc-1.11.2
  2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
                   ` (61 preceding siblings ...)
  2023-05-10  1:51 ` github-actions
@ 2023-05-24  1:56 ` github-actions
  62 siblings, 0 replies; 64+ messages in thread
From: github-actions @ 2023-05-24  1:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

There's a closed pull request on the void-packages repository

New package: Orthanc-1.11.2
https://github.com/void-linux/void-packages/pull/38537

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)

^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2023-05-24  1:56 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 17:30 [PR PATCH] New package: Orthanc-1.11.1 bingulo
2022-08-08 18:23 ` abenson
2022-08-08 18:30 ` [PR REVIEW] " ahesford
2022-08-08 18:30 ` ahesford
2022-08-08 18:30 ` ahesford
2022-08-08 18:30 ` Chocimier
2022-08-08 18:30 ` Chocimier
2022-08-08 18:30 ` Chocimier
2022-08-08 18:30 ` Chocimier
2022-08-08 18:30 ` Chocimier
2022-08-08 18:55 ` [PR PATCH] [Updated] " bingulo
2022-08-08 19:03 ` [PR REVIEW] " bingulo
2022-08-08 19:10 ` [PR PATCH] [Updated] " bingulo
2022-08-08 19:16 ` bingulo
2022-08-08 19:25 ` bingulo
2022-08-08 19:29 ` bingulo
2022-08-08 19:48 ` bingulo
2022-08-08 20:07 ` bingulo
2022-08-08 20:10 ` Chocimier
2022-08-08 20:33 ` [PR PATCH] [Updated] " bingulo
2022-08-08 20:34 ` [PR REVIEW] " bingulo
2022-08-08 20:35 ` bingulo
2022-08-08 20:39 ` bingulo
2022-08-08 21:52 ` classabbyamp
2022-08-09  1:37 ` [PR PATCH] [Updated] " bingulo
2022-08-09  1:37 ` [PR REVIEW] " bingulo
2022-08-09  2:50 ` [PR PATCH] [Updated] " bingulo
2022-08-09  2:51 ` bingulo
2022-08-09 14:36 ` [PR REVIEW] " Chocimier
2022-08-09 14:36 ` Chocimier
2022-08-09 14:36 ` Chocimier
2022-08-09 15:39 ` bingulo
2022-08-09 15:40 ` bingulo
2022-08-09 15:57 ` [PR PATCH] [Updated] " bingulo
2022-08-09 15:58 ` [PR REVIEW] " bingulo
2022-08-09 16:45 ` bingulo
2022-08-09 16:48 ` ahesford
2022-08-09 16:51 ` bingulo
2022-08-09 16:56 ` [PR PATCH] [Updated] " bingulo
2022-08-09 17:01 ` bingulo
2022-08-09 17:04 ` [PR PATCH] [Updated] " bingulo
2022-08-09 17:47 ` Chocimier
2022-08-09 17:53 ` bingulo
2022-08-09 17:53 ` bingulo
2022-08-09 20:12 ` [PR PATCH] [Updated] " bingulo
2022-08-10  1:26 ` bingulo
2022-08-10  2:26 ` bingulo
2022-08-10  2:31 ` bingulo
2022-08-10  2:37 ` bingulo
2022-08-11 16:43 ` [PR PATCH] [Updated] " bingulo
2022-08-24 22:36 ` bingulo
2022-10-13 19:52 ` bingulo
2022-11-15 22:18 ` anhangah
2022-11-17 13:46 ` anhangah
2022-11-17 13:54 ` anhangah
2022-11-17 13:59 ` anhangah
2022-11-17 14:03 ` New package: Orthanc-1.11.2 anhangah
2022-11-22 20:24 ` [PR PATCH] [Updated] " anhangah
2022-11-22 23:28 ` anhangah
2022-11-23 20:43 ` anhangah
2022-12-30  2:10 ` anhangah
2023-02-08 15:23 ` gcarlos64
2023-05-10  1:51 ` github-actions
2023-05-24  1:56 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).