aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-03-26 13:28:49 +0800
committerZheng Junjie <zhengjunjie@iscas.ac.cn>2024-09-09 18:01:42 +0800
commit5875c4b7babfb0f83bd7b219070b1e8fce0e5393 (patch)
tree15e6156098c1b7f80d5ab7cea399d008ef2ac738
parent056910ec864cb7cf3225a0c27679d94405db7dcd (diff)
downloadguix-5875c4b7babfb0f83bd7b219070b1e8fce0e5393.tar
guix-5875c4b7babfb0f83bd7b219070b1e8fce0e5393.tar.gz
gnu: startup-notification: Fix cross-compilation to {riscv,aarch}64-linux-gnu.
* gnu/packages/xdisorg.scm (startup-notification) [arguments]: When cross-compilation to {riscv,aarch}64-linux-gnu, add update-config-scripts phase. Add configure-flags. [native-inputs]: When cross compiling to {riscv,aarch}64-linux-gnu, add config. Change-Id: Iad7220e2a74c7bed706f3cb092e9ead5c94dc5bd
-rw-r--r--gnu/packages/xdisorg.scm28
1 files changed, 27 insertions, 1 deletions
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index c041ab1fc0..30f10c0e7c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -905,7 +905,33 @@ tracking.")
(base32
"0jmyryrpqb35y9hd5sgxqy2z0r1snw7d3ljw0jak0n0cjdz1yf9w"))))
(build-system gnu-build-system)
- (native-inputs (list pkg-config))
+ (arguments
+ (if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ (list
+ #:configure-flags #~(list
+ ;; when cross-compilation, skip realloc checking
+ "lf_cv_sane_realloc=yes"
+ (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '()))
+ (native-inputs (append (if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ (list config)
+ '())
+ (list pkg-config)))
(inputs
(list libx11 xcb-util))
(home-page "https://www.freedesktop.org/wiki/Software/startup-notification/")