gnu: boost: Add upstream patch.

* gnu/packages/boost.scm (version-with-underscores, boost-patch): New
procedures.
(boost)[source](uri): Remove LET binding for VERSION-WITH-UNDERSCORES.
[source](patches): New field.
This commit is contained in:
Marius Bakke 2020-01-11 15:25:49 +01:00
parent 691068f08d
commit 5cde458bd5
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -45,17 +45,32 @@ (define-module (gnu packages boost)
#:use-module (gnu packages shells) #:use-module (gnu packages shells)
#:use-module (srfi srfi-1)) #:use-module (srfi srfi-1))
(define (version-with-underscores version)
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version))
(define (boost-patch name version hash)
(origin
(method url-fetch)
(uri (string-append "https://www.boost.org/patches/"
(version-with-underscores version) "/" name))
(file-name (string-append "boost-" name))
(sha256 (base32 hash))))
(define-public boost (define-public boost
(package (package
(name "boost") (name "boost")
(version "1.72.0") (version "1.72.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (let ((version-with-underscores (uri (string-append "https://dl.bintray.com/boostorg/release/"
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version))) version "/source/boost_"
(string-append "https://dl.bintray.com/boostorg/release/" (version-with-underscores version) ".tar.bz2"))
version "/source/boost_" (patches
version-with-underscores ".tar.bz2"))) (list (boost-patch
;; 1.72.0 was released with a faulty coroutine submodule:
;; <https://github.com/boostorg/coroutine/issues/46>.
"0001-revert-cease-dependence-on-range.patch" version
"1zcqxzh56m1s635wqwk15j3zcs2gmjvjy2f0hid7i78s4pgm0yfs")))
(sha256 (sha256
(base32 (base32
"08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar")))) "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar"))))