From e3d1a015eaf86e71a322ee74124f8a64d60af05d3ec19134eecabc1c2f19ff08 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Fri, 28 Oct 2022 13:10:29 +0000 Subject: [PATCH] Accepting request 1031114 from home:DocB:Orthanc - Build fixed for new plugins cmake.diff added install_cmd.diff added OBS-URL: https://build.opensuse.org/request/show/1031114 OBS-URL: https://build.opensuse.org/package/show/graphics/orthanc?expand=0&rev=51 --- cmake.diff | 32 ++++++++++++++++++++++++++++++++ install_cmd.diff | 20 ++++++++++++++++++++ orthanc.changes | 7 +++++++ orthanc.spec | 20 +++++++++++++------- 4 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 cmake.diff create mode 100644 install_cmd.diff diff --git a/cmake.diff b/cmake.diff new file mode 100644 index 0000000..2df3880 --- /dev/null +++ b/cmake.diff @@ -0,0 +1,32 @@ +# HG changeset patch +# User Alain Mazy +# Date 1665994164 -7200 +# Node ID 3b1ae7a81d9b25136e21bced48410b7ebeb5c2df +# Parent c94c1e08340e0a6c7c51a9928a263eb7a314ed4b +fix install steps for ConnectivityChecks and DelayedDeletion plugins + +diff -r c94c1e08340e -r 3b1ae7a81d9b OrthancServer/CMakeLists.txt +--- a/OrthancServer/CMakeLists.txt Mon Oct 10 10:27:09 2022 +0200 ++++ b/OrthancServer/CMakeLists.txt Mon Oct 17 10:09:24 2022 +0200 +@@ -609,8 +609,8 @@ + list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) + list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) + install(FILES +- ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks${Suffix} +- ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks${Suffix}.${ORTHANC_VERSION} ++ ${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build/${Prefix}ConnectivityChecks${Suffix} ++ ${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build/${Prefix}ConnectivityChecks${Suffix}.${ORTHANC_VERSION} + DESTINATION "share/orthanc/plugins") + endif() + endif() +@@ -682,8 +682,8 @@ + list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) + list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) + install(FILES +- ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion${Suffix} +- ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion${Suffix}.${ORTHANC_VERSION} ++ ${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build/${Prefix}DelayedDeletion${Suffix} ++ ${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build/${Prefix}DelayedDeletion${Suffix}.${ORTHANC_VERSION} + DESTINATION "share/orthanc/plugins") + endif() + endif() diff --git a/install_cmd.diff b/install_cmd.diff new file mode 100644 index 0000000..f060332 --- /dev/null +++ b/install_cmd.diff @@ -0,0 +1,20 @@ +--- a/OrthancServer/CMakeLists.txt Wed Aug 31 10:21:35 2022 +0200 ++++ b/OrthancServer/CMakeLists.txt Mon Oct 03 09:52:04 2022 +0200 +@@ -591,6 +591,8 @@ + -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} ++ ++ INSTALL_COMMAND "" + ) + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +@@ -662,6 +664,8 @@ + -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} ++ ++ INSTALL_COMMAND "" + ) + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") diff --git a/orthanc.changes b/orthanc.changes index 1e6c986..63d4e1d 100644 --- a/orthanc.changes +++ b/orthanc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 25 10:13:39 UTC 2022 - Axel Braun + +- Build fixed for new plugins + cmake.diff added + install_cmd.diff added + ------------------------------------------------------------------- Tue Sep 27 10:52:42 UTC 2022 - Axel Braun diff --git a/orthanc.spec b/orthanc.spec index 1828c7c..001b84c 100644 --- a/orthanc.spec +++ b/orthanc.spec @@ -37,6 +37,8 @@ Source10: https://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/bootstra Source11: https://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/axios-0.19.0.tar.gz Source12: https://orthanc.osimis.io/ThirdPartyDownloads/jquery-3.4.1.min.js Source13: https://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/vuejs-2.6.10.tar.gz +Patch0: install_cmd.diff +Patch1: cmake.diff BuildRequires: civetweb-devel BuildRequires: cmake >= 2.8.0 @@ -123,6 +125,7 @@ This package includes the source files for Orthanc. Use it in conjunction with t %prep %setup -q -n Orthanc-%{version} +%autopatch -p1 cp %{S:1} %{S:2} . @@ -203,6 +206,10 @@ install -m 755 -d %{buildroot}%{_sharedstatedir}/%{name}/db-v6 # remove the symbolic links generated by CMake mkdir -p %{buildroot}%{_libdir}/%{name} mv build/*.so.%{version} %{buildroot}%{_libdir}/%{name} +# libs since version 1.11.1 dont install in /usr/lib anymore, we need a workaround: +cp %{buildroot}%{_prefix}/share/%{name}/plugins/libConnectivityChecks.so.%{version} %{buildroot}%{_libdir}/%{name} +cp %{buildroot}%{_prefix}/share/%{name}/plugins/libDelayedDeletion.so.%{version} %{buildroot}%{_libdir}/%{name} + rm build/*.so # move the executables to stay consistent @@ -214,23 +221,22 @@ mv %{buildroot}%{_sbindir}/Orthanc %{buildroot}%{_sbindir}/orthanc rm %{buildroot}%{_prefix}/share/%{name}/plugins/*.so* -ln -s ../../../..%{_libdir}/%{name}/libServeFolders.so.%{version} \ - %{buildroot}%{_prefix}/share/%{name}/plugins/libServeFolders.so -ln -s ../../../..%{_libdir}/%{name}/libModalityWorklists.so.%{version} \ - %{buildroot}%{_prefix}/share/%{name}/plugins/libModalityWorklists.so ln -s ../../../..%{_libdir}/%{name}/libConnectivityChecks.so.%{version} \ %{buildroot}%{_prefix}/share/%{name}/plugins/libConnectivityChecks.so ln -s ../../../..%{_libdir}/%{name}/libDelayedDeletion.so.%{version} \ %{buildroot}%{_prefix}/share/%{name}/plugins/libDelayedDeletion.so + +ln -s ../../../..%{_libdir}/%{name}/libServeFolders.so.%{version} \ + %{buildroot}%{_prefix}/share/%{name}/plugins/libServeFolders.so +ln -s ../../../..%{_libdir}/%{name}/libModalityWorklists.so.%{version} \ + %{buildroot}%{_prefix}/share/%{name}/plugins/libModalityWorklists.so + # Prepare documentation: "index.html", Doxygen of plugin SDK, and sample codes cp -r %{S:5} %{buildroot}%{_docdir}/%{name}/ cp -r OrthancServer/Resources/Samples/ %{buildroot}%{_docdir}/%{name}/Samples cp -r OrthancServer/Plugins/Samples/ %{buildroot}%{_docdir}/%{name}/OrthancPluginSamples -# some libs appear under buildroot/home...for whatever reason... -rm -rf %{buildroot}/home* - echo 'ldconfig -v | grep libcrypto.so' %pre