aboutsummaryrefslogtreecommitdiff
path: root/science/orthanc-mysql
diff options
context:
space:
mode:
Diffstat (limited to 'science/orthanc-mysql')
-rw-r--r--science/orthanc-mysql/Makefile34
-rw-r--r--science/orthanc-mysql/distinfo10
-rw-r--r--science/orthanc-mysql/files/patch-MySQL_Plugins_IndexPlugin.cpp10
-rw-r--r--science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancFramework_Sources_SystemToolbox.cpp11
-rw-r--r--science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Engine_PluginsManager.cpp11
-rw-r--r--science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Samples_ModalityWorklists_Plugin.cpp11
-rw-r--r--science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Sources_OrthancConfiguration.cpp11
-rw-r--r--science/orthanc-mysql/files/patch-OrthancFramework_Resources_CMake_ProtobufConfiguration.cmake47
-rw-r--r--science/orthanc-mysql/files/patch-Resources_Orthanc_Databases_ISqlLookupFormatter.cpp10
9 files changed, 78 insertions, 77 deletions
diff --git a/science/orthanc-mysql/Makefile b/science/orthanc-mysql/Makefile
index c5bbe0d89ec5..37620e7c7b54 100644
--- a/science/orthanc-mysql/Makefile
+++ b/science/orthanc-mysql/Makefile
@@ -1,40 +1,36 @@
PORTNAME= orthanc-mysql
-DISTVERSION= 4.3
-PORTREVISION= 12
+DISTVERSION= 5.2
CATEGORIES= science
-MASTER_SITES= https://www.orthanc-server.com/downloads/get.php?path=/plugin-mysql/:main \
- https://www.orthanc-server.com/downloads/get.php?path=/orthanc/:framework \
- https://orthanc.osimis.io/ThirdPartyDownloads/:thirdparty
-DISTFILES= OrthancMySQL-${PORTVERSION}.tar.gz:main \
- Orthanc-1.9.3.tar.gz:framework \
+MASTER_SITES= https://orthanc.uclouvain.be/downloads/sources/orthanc-mysql/:mysql \
+ https://orthanc.uclouvain.be/downloads/sources/orthanc/:orthanc \
+ https://orthanc.uclouvain.be/downloads/third-party-downloads/:thirdparty
+DISTFILES= OrthancMySQL-${PORTVERSION}.tar.gz:mysql \
+ Orthanc-${ORTHANC_VER}.tar.gz:orthanc \
e2fsprogs-1.44.5.tar.gz:thirdparty
DIST_SUBDIR= orthanc
EXTRACT_ONLY= OrthancMySQL-${PORTVERSION}.tar.gz
-MAINTAINER= maintainer.freebsd@xpoundit.com
+MAINTAINER= jwb@FreeBSD.org
COMMENT= Orthanc plugin to use MySQL/MariaDB for indexing or storage
WWW= https://www.orthanc-server.com/static.php?page=mysql
LICENSE= AGPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN= fails to build with boost-1.86+
-
-BUILD_DEPENDS= ${LOCALBASE}/include/orthanc/OrthancCDatabasePlugin.h:science/orthanc
+BUILD_DEPENDS= ${LOCALBASE}/include/orthanc/OrthancCDatabasePlugin.h:science/orthanc \
+ googletest>0:devel/googletest
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \
libcurl.so:ftp/curl \
- libgdcmCommon.so:devel/gdcm \
libjsoncpp.so:devel/jsoncpp \
- libpugixml.so:textproc/pugixml
+ libprotobuf.so:devel/protobuf
RUN_DEPENDS= Orthanc:science/orthanc
USES= cmake localbase mysql:client python:build ssl
-USE_CXXSTD= c++14 # googletest 1.13
-USE_LDCONFIG= yes
+USE_LDCONFIG= ${DATADIR}/plugins
WRKSRC= ${WRKDIR}/OrthancMySQL-${PORTVERSION}
-CMAKE_ARGS= -DORTHANC_FRAMEWORK_ROOT=${WRKSRC}/MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancFramework/Sources \
+CMAKE_ARGS= -DORTHANC_FRAMEWORK_ROOT=${WRKSRC}/MySQL/ThirdPartyDownloads/Orthanc-${ORTHANC_VER}/OrthancFramework/Sources \
-DORTHANC_FRAMEWORK_SOURCE=path
CMAKE_OFF= DBUILD_UNIT_TESTS USE_SYSTEM_ORTHANC_SDK USE_SYSTEM_UUID
CMAKE_SOURCE_PATH= ${WRKSRC}/MySQL
@@ -44,10 +40,12 @@ CXXFLAGS+= -I${LOCALBASE}/include -DNDEBUG
PLIST_SUB= DISTVERSION=${DISTVERSION}
+ORTHANC_VER= 1.12.9
+
post-extract:
${MKDIR} ${WRKSRC}/MySQL/ThirdPartyDownloads
${CP} ${DISTDIR}/${DIST_SUBDIR}/e2fsprogs-1.44.5.tar.gz ${WRKSRC}/MySQL/ThirdPartyDownloads
- ${CP} ${DISTDIR}/${DIST_SUBDIR}/Orthanc-1.9.3.tar.gz ${WRKSRC}/MySQL/ThirdPartyDownloads
- ${TAR} -C ${WRKSRC}/MySQL/ThirdPartyDownloads -xf ${WRKSRC}/MySQL/ThirdPartyDownloads/Orthanc-1.9.3.tar.gz
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/Orthanc-${ORTHANC_VER}.tar.gz ${WRKSRC}/MySQL/ThirdPartyDownloads
+ ${TAR} -C ${WRKSRC}/MySQL/ThirdPartyDownloads -xf ${WRKSRC}/MySQL/ThirdPartyDownloads/Orthanc-${ORTHANC_VER}.tar.gz
.include <bsd.port.mk>
diff --git a/science/orthanc-mysql/distinfo b/science/orthanc-mysql/distinfo
index f73c567cbf40..7b57fb02015e 100644
--- a/science/orthanc-mysql/distinfo
+++ b/science/orthanc-mysql/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1629969268
-SHA256 (orthanc/OrthancMySQL-4.3.tar.gz) = 7a22cbb482809bc1f6732e3e582cbbf4449e9205f297453ad4c7b7792956efba
-SIZE (orthanc/OrthancMySQL-4.3.tar.gz) = 321585
-SHA256 (orthanc/Orthanc-1.9.3.tar.gz) = 41cc35a3d15ecb0d7b834e8e28a740cc4ffa1f333c019a764228d60e96608960
-SIZE (orthanc/Orthanc-1.9.3.tar.gz) = 1818313
+TIMESTAMP = 1761521650
+SHA256 (orthanc/OrthancMySQL-5.2.tar.gz) = 0d446b53c3fdaa66d9f2365864f1ac54d133fe3760d7d3bb52c850ca67ce9fbb
+SIZE (orthanc/OrthancMySQL-5.2.tar.gz) = 603876
+SHA256 (orthanc/Orthanc-1.12.9.tar.gz) = 7a7cbc5f3663939fbef31ded021b36fcd52420337911ed43491bb663bcb5a4b2
+SIZE (orthanc/Orthanc-1.12.9.tar.gz) = 2165182
SHA256 (orthanc/e2fsprogs-1.44.5.tar.gz) = 2e211fae27ef74d5af4a4e40b10b8df7f87c655933bd171aab4889bfc4e6d1cc
SIZE (orthanc/e2fsprogs-1.44.5.tar.gz) = 7619237
diff --git a/science/orthanc-mysql/files/patch-MySQL_Plugins_IndexPlugin.cpp b/science/orthanc-mysql/files/patch-MySQL_Plugins_IndexPlugin.cpp
new file mode 100644
index 000000000000..af34bb427ab3
--- /dev/null
+++ b/science/orthanc-mysql/files/patch-MySQL_Plugins_IndexPlugin.cpp
@@ -0,0 +1,10 @@
+--- MySQL/Plugins/IndexPlugin.cpp.orig 2025-10-27 11:52:57 UTC
++++ MySQL/Plugins/IndexPlugin.cpp
+@@ -30,6 +30,7 @@
+ #include <Toolbox.h>
+
+ #include <google/protobuf/any.h>
++#include <google/protobuf/stubs/common.h>
+
+ #define ORTHANC_PLUGIN_NAME "mysql-index"
+
diff --git a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancFramework_Sources_SystemToolbox.cpp b/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancFramework_Sources_SystemToolbox.cpp
deleted file mode 100644
index 338388756a00..000000000000
--- a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancFramework_Sources_SystemToolbox.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancFramework/Sources/SystemToolbox.cpp.orig 2021-05-07 07:22:38 UTC
-+++ MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancFramework/Sources/SystemToolbox.cpp
-@@ -727,7 +727,7 @@ namespace Orthanc
-
- MimeType SystemToolbox::AutodetectMimeType(const std::string& path)
- {
-- std::string extension = boost::filesystem::extension(path);
-+ std::string extension = boost::filesystem::path(path).extension().string();
- Toolbox::ToLowerCase(extension);
-
- // http://en.wikipedia.org/wiki/Mime_types
diff --git a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Engine_PluginsManager.cpp b/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Engine_PluginsManager.cpp
deleted file mode 100644
index c739fd182701..000000000000
--- a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Engine_PluginsManager.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Plugins/Engine/PluginsManager.cpp.orig 2021-05-07 07:22:38 UTC
-+++ MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Plugins/Engine/PluginsManager.cpp
-@@ -303,7 +303,7 @@ namespace Orthanc
- }
- else
- {
-- std::string extension = boost::filesystem::extension(it->path());
-+ std::string extension = it->path().extension().string();
- Toolbox::ToLowerCase(extension);
-
- if (extension == PLUGIN_EXTENSION)
diff --git a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Samples_ModalityWorklists_Plugin.cpp b/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Samples_ModalityWorklists_Plugin.cpp
deleted file mode 100644
index 2c45326a9e12..000000000000
--- a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Plugins_Samples_ModalityWorklists_Plugin.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp.orig 2021-05-07 07:22:38 UTC
-+++ MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp
-@@ -162,7 +162,7 @@ OrthancPluginErrorCode Callback(OrthancPluginWorklistA
- if (type == fs::regular_file ||
- type == fs::reparse_file) // cf. BitBucket issue #11
- {
-- std::string extension = fs::extension(it->path());
-+ std::string extension = it->path().extension().string();
- std::transform(extension.begin(), extension.end(), extension.begin(), tolower); // Convert to lowercase
-
- if (extension == ".wl")
diff --git a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Sources_OrthancConfiguration.cpp b/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Sources_OrthancConfiguration.cpp
deleted file mode 100644
index 6ed1b2fd66f7..000000000000
--- a/science/orthanc-mysql/files/patch-MySQL_ThirdPartyDownloads_Orthanc-1.9.3_OrthancServer_Sources_OrthancConfiguration.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Sources/OrthancConfiguration.cpp.orig 2021-05-07 07:22:38 UTC
-+++ MySQL/ThirdPartyDownloads/Orthanc-1.9.3/OrthancServer/Sources/OrthancConfiguration.cpp
-@@ -123,7 +123,7 @@ namespace Orthanc
- {
- if (!is_directory(it->status()))
- {
-- std::string extension = boost::filesystem::extension(it->path());
-+ std::string extension = it->path().extension().string();
- Toolbox::ToLowerCase(extension);
-
- if (extension == ".json")
diff --git a/science/orthanc-mysql/files/patch-OrthancFramework_Resources_CMake_ProtobufConfiguration.cmake b/science/orthanc-mysql/files/patch-OrthancFramework_Resources_CMake_ProtobufConfiguration.cmake
new file mode 100644
index 000000000000..e4826a677166
--- /dev/null
+++ b/science/orthanc-mysql/files/patch-OrthancFramework_Resources_CMake_ProtobufConfiguration.cmake
@@ -0,0 +1,47 @@
+--- MySQL/ThirdPartyDownloads/Orthanc-1.12.9/OrthancFramework/Resources/CMake/ProtobufConfiguration.cmake.orig 2025-08-11 16:02:50 UTC
++++ MySQL/ThirdPartyDownloads/Orthanc-1.12.9/OrthancFramework/Resources/CMake/ProtobufConfiguration.cmake
+@@ -60,27 +60,31 @@ else()
+ add_custom_target(ProtobufCompiler)
+ endif()
+
+- check_include_file_cxx(google/protobuf/any.h HAVE_PROTOBUF_H)
+- if (NOT HAVE_PROTOBUF_H)
+- message(FATAL_ERROR "Please install the libprotobuf-dev package")
+- endif()
++ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
++ find_package(Protobuf REQUIRED)
++ else()
++ check_include_file_cxx(google/protobuf/any.h HAVE_PROTOBUF_H)
++ if (NOT HAVE_PROTOBUF_H)
++ message(FATAL_ERROR "Please install the libprotobuf-dev package")
++ endif()
+
+- set(CMAKE_REQUIRED_LIBRARIES "protobuf")
++ set(CMAKE_REQUIRED_LIBRARIES "protobuf")
+
+- include(CheckCXXSourceCompiles)
+- check_cxx_source_compiles(
+- "
++ include(CheckCXXSourceCompiles)
++ check_cxx_source_compiles(
++ "
+ #include <google/protobuf/descriptor.h>
+ int main()
+ {
+ google::protobuf::FieldDescriptor::TypeName(google::protobuf::FieldDescriptor::TYPE_FLOAT);
+ }
+-" HAVE_PROTOBUF_LIB)
+- if (NOT HAVE_PROTOBUF_LIB)
+- message(FATAL_ERROR "Cannot find the protobuf library")
+- endif()
++ " HAVE_PROTOBUF_LIB)
++ if (NOT HAVE_PROTOBUF_LIB)
++ message(FATAL_ERROR "Cannot find the protobuf library")
++ endif()
+
+- unset(CMAKE_REQUIRED_LIBRARIES)
++ unset(CMAKE_REQUIRED_LIBRARIES)
++ endif()
+
+ link_libraries(protobuf)
+ endif()
diff --git a/science/orthanc-mysql/files/patch-Resources_Orthanc_Databases_ISqlLookupFormatter.cpp b/science/orthanc-mysql/files/patch-Resources_Orthanc_Databases_ISqlLookupFormatter.cpp
deleted file mode 100644
index e48c152f1165..000000000000
--- a/science/orthanc-mysql/files/patch-Resources_Orthanc_Databases_ISqlLookupFormatter.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- Resources/Orthanc/Databases/ISqlLookupFormatter.cpp.orig 2021-07-22 18:16:30 UTC
-+++ Resources/Orthanc/Databases/ISqlLookupFormatter.cpp
-@@ -37,6 +37,7 @@
-
- #include "DatabaseConstraint.h"
-
-+#include <cassert>
- #include <boost/lexical_cast.hpp>
-
-