From a81a9ceb885d8504970b765524baaf012440028f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 30 Jun 2022 13:03:18 +0200 Subject: gnu: zlib: Use G-expression. * gnu/packages/compression.scm (zlib)[arguments]: Convert to gexp. --- gnu/packages/compression.scm | 64 +++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 17a690c0e4..d828191533 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice ;;; Copyright © 2016 David Craven ;;; Copyright © 2016, 2019, 2020 Kei Kebreau -;;; Copyright © 2016, 2018, 2019, 2020, 2021 Marius Bakke +;;; Copyright © 2016, 2018-2022 Marius Bakke ;;; Copyright © 2017 Nikita ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis ;;; Copyright © 2017 Theodoros Foradis @@ -103,42 +103,40 @@ (version "1.2.12") (source (origin - (method url-fetch) - (uri (list (string-append "http://zlib.net/zlib-" + (method url-fetch) + (uri (list (string-append "http://zlib.net/zlib-" version ".tar.gz") - (string-append "mirror://sourceforge/libpng/zlib/" - version "/zlib-" version ".tar.gz"))) - (patches (search-patches "zlib-cc.patch" - "zlib-correct-crc32-inputs.patch")) - (sha256 - (base32 - "1n9na4fq4wagw1nzsfjr6wyly960jfa94460ncbf6p1fac44i14i")))) + (string-append "mirror://sourceforge/libpng/zlib/" + version "/zlib-" version ".tar.gz"))) + (patches (search-patches "zlib-cc.patch" + "zlib-correct-crc32-inputs.patch")) + (sha256 + (base32 + "1n9na4fq4wagw1nzsfjr6wyly960jfa94460ncbf6p1fac44i14i")))) (build-system gnu-build-system) (outputs '("out" "static")) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; Zlib's home-made `configure' fails when passed - ;; extra flags like `--enable-fast-install', so we need to - ;; invoke it with just what it understand. - (let ((out (assoc-ref outputs "out"))) - (setenv "CC" ,(cc-for-target)) - ;; 'configure' doesn't understand '--host'. - ,@(if (%current-target-system) - `((setenv "CHOST" ,(%current-target-system))) - '()) - (invoke "./configure" - (string-append "--prefix=" out))))) - (add-after 'install 'move-static-library - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static"))) - (with-directory-excursion (string-append out "/lib") - (install-file "libz.a" (string-append static "/lib")) - (delete-file "libz.a") - #t))))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + ;; Zlib's home-made `configure' fails when passed + ;; extra flags like `--enable-fast-install', so we need to + ;; invoke it with just what it understand. + (setenv "CC" #$(cc-for-target)) + ;; 'configure' doesn't understand '--host'. + #$@(if (%current-target-system) + #~((setenv "CHOST" #$(%current-target-system))) + #~()) + (invoke "./configure" + (string-append "--prefix=" #$output)))) + (add-after 'install 'move-static-library + (lambda _ + (with-directory-excursion (string-append #$output "/lib") + (install-file "libz.a" (string-append #$output:static + "/lib")) + (delete-file "libz.a"))))))) (home-page "https://zlib.net/") (synopsis "Compression library") (description -- cgit v1.2.3