[bug#77590,v5,5/5] gnu: satdump: Fix RUNPATH for a plugin.

Message ID c5996f39473fc6c54dfa691d4b2a81cdad47bd30.1745932076.git.andreas@enge.fr
State New
Headers
Series Small changes |

Commit Message

Andreas Enge April 29, 2025, 1:07 p.m. UTC
  From: David Elsing <david.elsing@posteo.net>

* gnu/packages/radio.scm (satdump)[arguments]: Add 'fix-runpath phase.

Signed-off-by: Andreas Enge <andreas@enge.fr>
---
 gnu/packages/radio.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index 78888dcee5..54b1f0c373 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -3349,7 +3349,22 @@  (define-public satdump
            volk
            (list zstd "lib")))
     (arguments
-     (list #:tests? #f)) ; No test suite
+     (list
+      #:tests? #f ; No test suite
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; The RUNPATH of this shared library is missing the
+          ;; .../lib/satdump/plugins directory, which fails the
+          ;; 'validate-runpath' phase.
+          (add-after 'unpack 'fix-runpath
+            (lambda _
+              (substitute* "plugins/official_products_support/CMakeLists.txt"
+                (("add_library\\(official_products_loader_support.*" orig)
+                 (string-append
+                  orig "\n" "set_target_properties("
+                  "official_products_loader_support"
+                  " PROPERTIES INSTALL_RPATH \""
+                  #$output "/lib:" #$output "/lib/satdump/plugins\")\n"))))))))
     (home-page "https://www.satdump.org/")
     (synopsis "Satellite data processing software")
     (description "SatDump is a generic satellite data processing software.