[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v3 13/48] gnu: icu4c: Fix cross-compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v3 13/48] gnu: icu4c: Fix cross-compilation. |
Date: |
Mon, 2 Sep 2019 17:32:58 +0200 |
* gnu/packages/icu4c.scm (icu4c-build-root): New variable.
(icu4c)[native-inputs]: Add it.
[arguments]: Pass it as a configure-flag.
---
gnu/packages/icu4c.scm | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 922dfbd348..c70871f7e7 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Clément Lassieur <address@hidden>
;;; Copyright © 2017 Ricardo Wurmus <address@hidden>
;;; Copyright © 2019 Marius Bakke <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (gnu packages python)
#:use-module (guix licenses)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu))
@@ -70,13 +72,23 @@
(sha256
(base32 "0v0xsf14xwlj125y9fd8lrhsaych4d8liv8gr746zng6g225szb2"))))
(build-system gnu-build-system)
+ ;; When cross-compiling, this package needs a source directory of a
+ ;; native-build of itself.
(native-inputs
- `(("python" ,python-minimal)))
+ `(("python" ,python-minimal)
+ ,@(if (%current-target-system)
+ `(("icu4c-build-root" ,icu4c-build-root))
+ '())))
(inputs
`(("perl" ,perl)))
(arguments
`(#:configure-flags
- '("--enable-rpath")
+ (list
+ "--enable-rpath"
+ ,@(if (%current-target-system)
+ '((string-append "--with-cross-build="
+ (assoc-ref %build-inputs "icu4c-build-root")))
+ '()))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'chdir-to-source
@@ -105,6 +117,25 @@ C/C++ part.")
(license x11)
(home-page "http://site.icu-project.org/")))
+(define-public icu4c-build-root
+ (package
+ (inherit icu4c)
+ (name "icu4c-build-root")
+ (arguments
+ (substitute-keyword-arguments (package-arguments icu4c)
+ ((#:tests? _ '())
+ #f)
+ ((#:out-of-source? _ '())
+ #t)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "../build" out)
+ #t)))))))
+ (native-inputs '())))
+
(define-public java-icu4j
(package
(name "java-icu4j")
--
2.20.1
- [bug#36477] [PATCH v3 02/48] gnu: openssl: Fix cross-compilation., (continued)
- [bug#36477] [PATCH v3 02/48] gnu: openssl: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 07/48] gnu: texinfo-5: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 06/48] gnu: groff: Fix cross compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 04/48] gnu: cmake: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 14/48] gnu: glibc-utf8-locales: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 11/48] gnu: cyrus-sasl: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 13/48] gnu: icu4c: Fix cross-compilation.,
Mathieu Othacehe <=
- [bug#36477] [PATCH v3 16/48] gnu: eudev: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 19/48] gnu: bdb: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 17/48] gnu: lvm2: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 20/48] gnu: openldap: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 08/48] gnu: bc: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 18/48] gnu: nghttp2: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 21/48] gnu: swig: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 25/48] gnu: doxygen: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 15/48] gnu: boost: Fix cross-compilation., Mathieu Othacehe, 2019/09/02