summaryrefslogtreecommitdiff
path: root/gnu/packages/icu4c.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/icu4c.scm')
-rw-r--r--gnu/packages/icu4c.scm163
1 files changed, 80 insertions, 83 deletions
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 94a72fac15..2e00b6ba26 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2017, 2020, 2022 Efraim Flashner <[email protected]>
;;; Copyright © 2017 Clément Lassieur <[email protected]>
;;; Copyright © 2017 Ricardo Wurmus <[email protected]>
-;;; Copyright © 2019, 2020 Marius Bakke <[email protected]>
+;;; Copyright © 2019, 2020, 2022 Marius Bakke <[email protected]>
;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
;;; Copyright © 2020 Björn Höfling <[email protected]>
;;; Copyright © 2020 Julien Lepiller <[email protected]>
@@ -40,75 +40,7 @@
(define-public icu4c
(package
- (name "icu4c")
- (version "69.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/unicode-org/icu/releases/download/release-"
- (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
- "/icu4c-"
- (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
- "-src.tgz"))
- (sha256
- (base32 "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))
- (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)
- ,@(if (%current-target-system)
- `(("icu4c-build-root" ,icu4c-build-root))
- '())))
- (inputs
- (list perl))
- (arguments
- `(#:configure-flags
- (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
- (lambda _ (chdir "source") #t))
- (add-after 'chdir-to-source 'update-LDFLAGS
- (lambda _
- ;; Do not create a "data-only" libicudata.so because it causes
- ;; problems on some architectures (notably armhf and MIPS).
- (substitute* "config/mh-linux"
- (("LDFLAGSICUDT=-nodefaultlibs -nostdlib")
- "LDFLAGSICUDT="))
- #t))
- ,@(if (target-riscv64?)
- `((add-after 'unpack 'disable-failing-test
- ;; It is unknown why this test is failing.
- (lambda _
- (substitute* "source/test/intltest/numbertest_api.cpp"
- (("(TESTCASE_AUTO\\(unitUsage\\));" all)
- (string-append "//" all))))))
- '())
- (add-after 'install 'avoid-coreutils-reference
- ;; Don't keep a reference to the build tools.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (find-files (string-append out "/lib/icu")
- "\\.inc$")
- (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install"))
- #t))))))
- (synopsis "International Components for Unicode")
- (description
- "ICU is a set of C/C++ and Java libraries providing Unicode and
-globalisation support for software applications. This package contains the
-C/C++ part.")
- (license x11)
- (home-page "http://site.icu-project.org/")))
-
-(define-public icu4c-71
- (package
- (inherit icu4c)
+ (name "icu4c")
(version "71.1")
(source (origin
(method url-fetch)
@@ -119,8 +51,59 @@ C/C++ part.")
(string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
"-src.tgz"))
(sha256
- (base32
- "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7"))))))
+ (base32 "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (append (list python-minimal)
+ (if (%current-target-system)
+ ;; When cross-compiling, this package needs a source directory
+ ;; of a native-build of itself.
+ (list icu4c-build-root)
+ '())))
+ (inputs
+ (list perl))
+ (arguments
+ (list
+ #:configure-flags
+ #~(list
+ "--enable-rpath"
+ #$@(if (%current-target-system)
+ #~((string-append "--with-cross-build="
+ #+(this-package-native-input
+ "icu4c-build-root")))
+ #~()))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir-to-source
+ (lambda _ (chdir "source")))
+ (add-after 'chdir-to-source 'update-LDFLAGS
+ (lambda _
+ ;; Do not create a "data-only" libicudata.so because it causes
+ ;; problems on some architectures (notably armhf and MIPS).
+ (substitute* "config/mh-linux"
+ (("LDFLAGSICUDT=-nodefaultlibs -nostdlib")
+ "LDFLAGSICUDT="))))
+ #$@(if (target-riscv64?)
+ #~((add-after 'unpack 'disable-failing-test
+ ;; It is unknown why this test is failing.
+ (lambda _
+ (substitute* "source/test/intltest/numbertest_api.cpp"
+ (("(TESTCASE_AUTO\\(unitUsage\\));" all)
+ (string-append "//" all))))))
+ #~())
+ (add-after 'install 'avoid-coreutils-reference
+ ;; Don't keep a reference to the build tools.
+ (lambda _
+ (substitute* (find-files (string-append #$output "/lib/icu")
+ "\\.inc$")
+ (("INSTALL_CMD=.*/bin/install") "INSTALL_CMD=install")))))))
+ (synopsis "International Components for Unicode")
+ (description
+ "ICU is a set of C/C++ and Java libraries providing Unicode and
+globalisation support for software applications. This package contains the
+C/C++ part.")
+ (license x11)
+ (home-page "http://site.icu-project.org/")))
(define-public icu4c-70
(package
@@ -152,6 +135,22 @@ C/C++ part.")
(string-append "//" all))))))))
(package-arguments icu4c)))))
+(define-public icu4c-69
+ (package
+ (inherit icu4c)
+ (version "69.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/unicode-org/icu/releases/download/release-"
+ (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
+ "/icu4c-"
+ (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
+ "-src.tgz"))
+ (sha256
+ (base32
+ "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))))
+
(define-public icu4c-67
(package
(inherit icu4c)
@@ -190,17 +189,15 @@ C/C++ part.")
(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)))))))
+ ((#:tests? _ #f)
+ #f)
+ ((#:out-of-source? _ #t)
+ #t)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'install
+ (lambda _
+ (copy-recursively "../build" #$output)))))))
(native-inputs '())))
(define-public java-icu4j