Unverified Commit 0eb2aae7 authored by Ricardo Wurmus's avatar Ricardo Wurmus
Browse files

Add (past packages boost).

* modules/past/packages/boost.scm: New file.
parent 743993ae
;;; Guix Past --- Packages from the past for GNU Guix.
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;; This file is part of Guix Past.
;;; Guix Past is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; Guix Past is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with Guix Past. If not, see <http://www.gnu.org/licenses/>.
(define-module (past packages boost)
#:use-module (guix)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages))
(define S specification->package)
(define-public boost-1.58
(name "boost")
(version "1.58.0")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/boost/boost/" version "/boost_"
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
(build-system gnu-build-system)
`(#:tests? #f ; TODO
(list "threading=multi" "link=shared"
;; Set the RUNPATH to $libdir so that the libs find each other.
(string-append "linkflags=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib")
;; Boost's 'context' library is not yet supported on mips64, so
;; we disable it. The 'coroutine' library depends on 'context',
;; so we disable that too.
,@(if (string-prefix? "mips64" (or (%current-target-system)
"--without-coroutine" "--without-coroutine2")
(modify-phases %standard-phases
(delete 'bootstrap)
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* '("libs/config/configure"
(("/bin/sh") (which "sh")))
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
(invoke "./bootstrap.sh"
(string-append "--prefix=" out)
(replace 'build
(lambda* (#:key outputs make-flags #:allow-other-keys)
(apply invoke "./b2"
(format #f "-j~a" (parallel-job-count))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(apply invoke "./b2" "install" make-flags))))))
`(("perl" ,(S "perl"))
("python" ,(S "python@2"))
("tcsh" ,(S "tcsh"))))
(inputs `(("zlib" ,(S "zlib"))))
(home-page "http://boost.org")
(synopsis "Peer-reviewed portable C++ source libraries")
"A collection of libraries intended to be widely useful, and
usable across a broad spectrum of applications.")
(license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt"
"Some components have other similar licences."))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment