gnu: squashfuse: Fix cross compiling.

* gnu/packages/file-systems.scm (squashfuse)[arguments]: Use
pkg-config-for-target.
(squashfuse-for-appimage)[arguments]: Use substitute-keyword-arguments
to modify inherited phases instead of %standard-phases.

Change-Id: I6e52a94e46c5a89ba215a7eaceb7f54a80c52429
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Brian Kubisiak 2024-12-03 19:17:55 -08:00 committed by Ludovic Courtès
parent 27a371ff94
commit 6930741eb5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2049,6 +2049,15 @@ (define-public squashfuse
(sha256 (sha256
(base32 "03aw8pw8694jyrzpnbry05rk9718sqw66kiyq878bbb679gl7224")))) (base32 "03aw8pw8694jyrzpnbry05rk9718sqw66kiyq878bbb679gl7224"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-cross-compile
(lambda _
(substitute* "autogen.sh"
(("pkg-config")
#$(pkg-config-for-target))))))))
(native-inputs (list autoconf automake libtool pkg-config)) (native-inputs (list autoconf automake libtool pkg-config))
(inputs (list attr fuse-2 xz zlib `(,zstd "lib"))) (inputs (list attr fuse-2 xz zlib `(,zstd "lib")))
(home-page "https://github.com/vasi/squashfuse") (home-page "https://github.com/vasi/squashfuse")
@ -2063,17 +2072,18 @@ (define-public squashfuse-for-appimage
(package (package
(inherit squashfuse) (inherit squashfuse)
(arguments (arguments
(list (cons*
#:configure-flags #:configure-flags
#~'("CFLAGS=-ffunction-sections -fdata-sections -Os -no-pie" #~'("CFLAGS=-ffunction-sections -fdata-sections -Os -no-pie"
"LDFLAGS=-static") "LDFLAGS=-static")
#:phases (substitute-keyword-arguments (package-arguments squashfuse)
#~(modify-phases %standard-phases ((#:phases phases)
(add-after 'install 'install-private-headers #~(modify-phases #$phases
(lambda _ (add-after 'install 'install-private-headers
(install-file "fuseprivate.h" (lambda _
(string-append #$output (install-file "fuseprivate.h"
"/include/squashfuse/"))))))) (string-append #$output
"/include/squashfuse/")))))))))
(inputs (list fuse-for-appimage (inputs (list fuse-for-appimage
`(,zstd "lib") `(,zstd "lib")
`(,zstd "static") `(,zstd "static")