guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: libxslt: Allow cross-compilation.


From: guix-commits
Subject: 01/03: gnu: libxslt: Allow cross-compilation.
Date: Thu, 9 Mar 2023 17:29:58 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit ef893df92ae40b9572a2be093c75762fa752fbbb
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Mar 9 22:20:47 2023 +0100

    gnu: libxslt: Allow cross-compilation.
    
    * gnu/packages/xml.scm (libxslt)[arguments]: Rewrite using gexps.
    Add #:configure-flags.
---
 gnu/packages/xml.scm | 40 ++++++++++++++++++++++++++--------------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index e0de8d52cf..a132f58097 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -335,20 +335,32 @@ formulas and hyperlinks to multiple worksheets in an 
Excel 2007+ XLSX file.")
              (patches (search-patches "libxslt-generated-ids.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'disable-fuzz-tests
-                    (lambda _
-                      ;; Disable libFuzzer tests, because they require
-                      ;; instrumentation builds of libxml2 and libxslt.
-                      (substitute* "tests/Makefile"
-                        (("exslt plugins fuzz")
-                         "exslt plugins"))
-                      ;; Also disable Python tests since they require
-                      ;; python-libxml2 which would introduce a
-                      ;; circular dependency.
-                      (substitute* "python/Makefile"
-                        (("cd tests && \\$\\(MAKE\\) tests")
-                         "$(info Python tests are disabled by Guix.)")))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'disable-fuzz-tests
+                 (lambda _
+                   ;; Disable libFuzzer tests, because they require
+                   ;; instrumentation builds of libxml2 and libxslt.
+                   (substitute* "tests/Makefile"
+                     (("exslt plugins fuzz")
+                      "exslt plugins"))
+                   ;; Also disable Python tests since they require
+                   ;; python-libxml2 which would introduce a
+                   ;; circular dependency.
+                   (substitute* "python/Makefile"
+                     (("cd tests && \\$\\(MAKE\\) tests")
+                      "$(info Python tests are disabled by Guix.)")))))
+           #:configure-flags
+           (if (%current-target-system)
+               ;; 'configure.ac' uses 'AM_PATH_PYTHON', which looks for
+               ;; 'python' in $PATH, even though it's only used in the shebang
+               ;; of examples.  Thus, when cross-compiling, set 'PYTHON' so
+               ;; that 'configure' doesn't search $PATH.
+               #~(list (string-append "PYTHON="
+                                      #$(this-package-input
+                                         "python-minimal-wrapper")
+                                      "/bin/python"))
+               #~'())))
     (home-page "http://xmlsoft.org/XSLT/index.html";)
     (synopsis "C library for applying XSLT stylesheets to XML documents")
     (inputs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]