gnu: curl: Ungraft.

* gnu/packages/curl.scm (curl): Update to 8.4.0 from graft, preserving...
[arguments]<#:phases>: ... check phase to skip failing test on Hurd.
[replacement]: Remove.
(curl/fixed): Remove variable.

Change-Id: I9243d6b3a9084d9c24884e755f2f42ffafca4205
This commit is contained in:
John Kehayias 2023-11-05 16:30:38 -05:00
parent b5915131ae
commit 00442f15d4
No known key found for this signature in database
GPG key ID: 499097AE5EA815D9

View file

@ -15,6 +15,7 @@
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -64,15 +65,14 @@ (define-module (gnu packages curl)
(define-public curl
(package
(name "curl")
(version "7.85.0")
(replacement curl/fixed)
(version "8.4.0")
(source (origin
(method url-fetch)
(uri (string-append "https://curl.se/download/curl-"
version ".tar.xz"))
(sha256
(base32
"1rjbn0h5rddclhvxb8p5gddxszcrpbf5cw1whx6wnj4s9dnlmdc8"))
"0bd8y8v66biyqvg70ka1sdd0aixs6yzpnvfsig907xzh9af2mihn"))
(patches (search-patches "curl-use-ssl-cert-env.patch"))))
(build-system gnu-build-system)
(outputs '("out"
@ -118,15 +118,19 @@ (define-public curl
(rename-file (string-append #$output "/share/man/man3")
(string-append #$output:doc "/share/man/man3"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(lambda* (#:key tests? make-flags #:allow-other-keys)
(substitute* "tests/runtests.pl"
(("/bin/sh") (which "sh")))
(when tests?
;; The top-level "make check" does "make -C tests quiet-test", which
;; is too quiet. Use the "test" target instead, which is more
;; verbose.
(invoke "make" "-C" "tests" "test"))))
(let ((arguments `("-C" "tests" "test"
,@(if #$(system-hurd?)
;; protocol FAIL
(list make-flags "TFLAGS=~1474")
make-flags))))
;; The top-level "make check" does "make -C tests quiet-test", which
;; is too quiet. Use the "test" target instead, which is more
;; verbose.
(apply invoke "make" arguments)))))
#$@(if (system-hurd?)
#~((add-after 'unpack 'skip-tests
(lambda _
@ -155,39 +159,6 @@ (define-public curl
"See COPYING in the distribution."))
(home-page "https://curl.haxx.se/")))
(define curl/fixed
(let ((%version "8.4.0"))
(package
(inherit curl)
(version "8.4.0a") ; add lowercase 'a' for grafting
(source (origin
(method url-fetch)
(uri (string-append "https://curl.se/download/curl-"
%version ".tar.xz"))
(sha256
(base32
"0bd8y8v66biyqvg70ka1sdd0aixs6yzpnvfsig907xzh9af2mihn"))
(patches (search-patches "curl-use-ssl-cert-env.patch"))))
(arguments
(if (system-hurd?)
(substitute-keyword-arguments (package-arguments curl)
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
;; We cannot simply set #:make-flags because they are
;; ignored by curl's custom check phase.
(replace 'check
(lambda* (#:key tests? make-flags #:allow-other-keys)
(substitute* "tests/runtests.pl"
(("/bin/sh") (which "sh")))
;; See comment in curl about check/test.
(let ((arguments `("-C" "tests" "test"
,@make-flags
;; protocol FAIL
"TFLAGS=~1474")))
(when tests?
(apply invoke "make" arguments))))))))
(package-arguments curl))))))
(define-public curl-ssh
(package/inherit curl
(arguments