[bug#77682,1/2] gnu: liblouis: Fix library path for python extension.

Message ID a34371d78c4f8c38ce0c75ceade97a80d866052e.1744233847.git.noelopez@free.fr
State New
Headers
Series Restore the Orca screen reader. |

Commit Message

Noé Lopez April 9, 2025, 9:49 p.m. UTC
  This changes the extension to load the library from its absolute path instead
of just with its name, which wouldn’t work.

Fixes <https://issues.guix.gnu.org/77669>.

* gnu/packages/language.scm (liblouis): Add fix-python-lib-path phase.

Change-Id: Icdd476eed5a77ddb93c437ec4d92c79bf2db7bce
---
 gnu/packages/language.scm | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index a6011bfce2..13957e12a0 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -351,6 +351,12 @@  (define-public liblouis
       #:configure-flags #~(list "--disable-static" "--enable-ucs4")
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-python-lib-path
+            (lambda _
+              (with-directory-excursion "python"
+                (substitute* "louis/__init__.py.in"
+                  (("###LIBLOUIS_SONAME###")
+                   (string-append #$output "/lib/###LIBLOUIS_SONAME###"))))))
           (add-after 'install 'install-python-extension
             (lambda _
               (with-directory-excursion "python"