[PATCH core-updates] gnu: icu4c: Update packaging style.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 30 Dec 2022 17:09
[PATCH] gnu: icu4c: Update packaging style.
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20221230160900.28075-1-ngraves@ngraves.fr
* gnu/packages/icu4c.scm (icu4c): Update packaging style.
---
gnu/packages/icu4c.scm | 66 ++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 34 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 1e4f66d956..1338c8f525 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -63,41 +63,39 @@ (define-public icu4c
(inputs
(list perl))
(arguments
- `(#:configure-flags
- (list
+ (list
+ #: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))))))
+ ,@(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")))
+ (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
--
2.38.1
M
M
Maxim Cournoyer wrote on 21 Mar 2023 16:19
(name . Nicolas Graves)(address . ngraves@ngraves.fr)
87jzzap1wy.fsf@gmail.com
retitle 60430 [PATCH core-updates] gnu: icu4c: Update packaging style.
quit

Hello!

Nicolas Graves <ngraves@ngraves.fr> writes:

Toggle quote (84 lines)
> * gnu/packages/icu4c.scm (icu4c): Update packaging style.
> ---
> gnu/packages/icu4c.scm | 66 ++++++++++++++++++++----------------------
> 1 file changed, 32 insertions(+), 34 deletions(-)
>
> diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
> index 1e4f66d956..1338c8f525 100644
> --- a/gnu/packages/icu4c.scm
> +++ b/gnu/packages/icu4c.scm
> @@ -63,41 +63,39 @@ (define-public icu4c
> (inputs
> (list perl))
> (arguments
> - `(#:configure-flags
> - (list
> + (list
> + #: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))))))
> + ,@(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")))
> + (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

This looks good, but it's a core-updates change: guix refresh -l
icu4c@69 says 12433 packages would be rebuilt.

Also, you should update all the variants which inherits this one to also
use gexp expressions, as it may cause problems otherwise.

I'm adding 'core-updates' to the title to avoid merge mistakes.

Thanks for working on it!

--
Maxim
M
M
Maxim Cournoyer wrote on 20 Jan 21:04 +0100
Re: bug#60430: [PATCH core-updates] gnu: icu4c: Update packaging style.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 60430-done@debbugs.gnu.org)
8734urg4a0.fsf@gmail.com
Hi,

Nicolas Graves <ngraves@ngraves.fr> writes:

Toggle quote (2 lines)
> * gnu/packages/icu4c.scm (icu4c): Update packaging style.

That's now already been done on core-updates.

--
Thanks,
Maxim
Closed
?