gnu: guile-rsvg: Restore custom bootstrap phase.
[jackhill/guix/guix.git] / gnu / packages / boost.scm
CommitLineData
2a72eeee
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
7cd802f3 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
1842a7cb 4;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
c91d3fb7 5;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
53a53be9 6;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
57144094 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
13de2b70 8;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
baef70bb 9;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
df216847 10;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7624300c 11;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
2a72eeee
JD
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages boost)
b5b73a82 29 #:use-module ((guix licenses) #:prefix license:)
2a72eeee
JD
30 #:use-module (guix packages)
31 #:use-module (guix download)
7624300c
MC
32 #:use-module (guix git-download)
33 #:use-module (guix build utils)
2a72eeee 34 #:use-module (guix build-system gnu)
7624300c 35 #:use-module (guix build-system trivial)
2a72eeee 36 #:use-module (gnu packages)
c28ba7aa 37 #:use-module (gnu packages compression)
bd590b96
LF
38 #:use-module (gnu packages icu4c)
39 #:use-module (gnu packages perl)
2a72eeee 40 #:use-module (gnu packages python)
bd590b96 41 #:use-module (gnu packages shells))
2a72eeee
JD
42
43(define-public boost
44 (package
45 (name "boost")
baef70bb 46 (version "1.66.0")
2a72eeee
JD
47 (source (origin
48 (method url-fetch)
49 (uri (string-append
de67e922 50 "mirror://sourceforge/boost/boost/" version "/boost_"
2a72eeee
JD
51 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
52 ".tar.bz2"))
53 (sha256
54 (base32
baef70bb 55 "1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))))
2a72eeee 56 (build-system gnu-build-system)
bd590b96
LF
57 (inputs `(("icu4c" ,icu4c)
58 ("zlib" ,zlib)))
2a72eeee
JD
59 (native-inputs
60 `(("perl" ,perl)
61 ("python" ,python-2)
62 ("tcsh" ,tcsh)))
63 (arguments
f828ff5b
DT
64 `(#:tests? #f
65 #:make-flags
66 (list "threading=multi" "link=shared"
53a53be9 67
f828ff5b
DT
68 ;; Set the RUNPATH to $libdir so that the libs find each other.
69 (string-append "linkflags=-Wl,-rpath="
70 (assoc-ref %outputs "out") "/lib")
53a53be9 71
f828ff5b
DT
72 ;; Boost's 'context' library is not yet supported on mips64, so
73 ;; we disable it. The 'coroutine' library depends on 'context',
74 ;; so we disable that too.
75 ,@(if (string-prefix? "mips64" (or (%current-target-system)
76 (%current-system)))
77 '("--without-context"
78 "--without-coroutine" "--without-coroutine2")
79 '()))
80 #:phases
81 (modify-phases %standard-phases
df216847 82 (delete 'bootstrap)
baef70bb 83 (replace 'configure
f828ff5b
DT
84 (lambda* (#:key outputs #:allow-other-keys)
85 (let ((out (assoc-ref outputs "out")))
86 (substitute* '("libs/config/configure"
87 "libs/spirit/classic/phoenix/test/runtest.sh"
88 "tools/build/doc/bjam.qbk"
89 "tools/build/src/engine/execunix.c"
90 "tools/build/src/engine/Jambase"
91 "tools/build/src/engine/jambase.c")
92 (("/bin/sh") (which "sh")))
aaf77acc 93
f828ff5b
DT
94 (setenv "SHELL" (which "sh"))
95 (setenv "CONFIG_SHELL" (which "sh"))
aaf77acc 96
baef70bb
AI
97 (invoke "./bootstrap.sh"
98 (string-append "--prefix=" out)
196fb12c 99 "--with-toolset=gcc"))))
baef70bb 100 (replace 'build
196fb12c 101 (lambda* (#:key make-flags #:allow-other-keys)
baef70bb
AI
102 (apply invoke "./b2"
103 (format #f "-j~a" (parallel-job-count))
196fb12c 104 make-flags)))
baef70bb 105 (replace 'install
196fb12c
MW
106 (lambda* (#:key make-flags #:allow-other-keys)
107 (apply invoke "./b2" "install" make-flags))))))
2a72eeee 108
baef70bb 109 (home-page "http://www.boost.org")
2a72eeee
JD
110 (synopsis "Peer-reviewed portable C++ source libraries")
111 (description
112 "A collection of libraries intended to be widely useful, and usable
113across a broad spectrum of applications.")
114 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt"
115 "Some components have other similar licences."))))
f763eaaa 116
7624300c
MC
117(define-public boost-sync
118 (let ((commit "c72891d9b90e2ceb466ec859f640cd012b2d8709")
119 (version "1.55")
120 (revision "1"))
121 (package
122 (name "boost-sync")
123 (version (git-version version revision commit))
124 (source (origin
125 (method git-fetch)
126 (uri (git-reference
127 (url "https://github.com/boostorg/sync.git")
128 (commit commit)))
129 (file-name (git-file-name name version))
130 (sha256
131 (base32
132 "197mp5z048vz5kv1m4v3jm447l2gqsyv0rbfz11dz0ns343ihbyx"))))
133 (build-system trivial-build-system)
134 (arguments
135 `(#:modules ((guix build utils))
136 #:builder
137 (begin
138 (use-modules (guix build utils))
139 (let ((source (assoc-ref %build-inputs "source")))
140 (copy-recursively (string-append source "/include")
141 (string-append %output "/include"))))))
142 (home-page "https://github.com/boostorg/sync")
143 (synopsis "Boost.Sync library")
144 (description "The Boost.Sync library provides mutexes, semaphores, locks
145and events and other thread related facilities. Boost.Sync originated from
146Boost.Thread.")
147 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt")))))
148
f763eaaa
AE
149(define-public mdds
150 (package
151 (name "mdds")
13de2b70 152 (version "1.3.1")
f763eaaa
AE
153 (source (origin
154 (method url-fetch)
155 (uri (string-append
57144094 156 "http://kohei.us/files/mdds/src/mdds-" version ".tar.bz2"))
f763eaaa
AE
157 (sha256
158 (base32
13de2b70 159 "18g511z1lgfxrga2ld9yr95phmyfbd3ymbv4q5g5lyjn4ljcvf6w"))))
f763eaaa
AE
160 (build-system gnu-build-system)
161 (propagated-inputs
162 `(("boost" ,boost))) ; inclusion of header files
62d652a7 163 (home-page "https://gitlab.com/mdds/mdds")
f763eaaa
AE
164 (synopsis "Multi-dimensional C++ data structures and indexing algorithms")
165 (description "Mdds (multi-dimensional data structure) provides a
166collection of multi-dimensional data structures and indexing algorithms
167for C++. It includes flat segment trees, segment trees, rectangle sets,
168point quad trees, multi-type vectors and multi-type matrices.")
169 (license license:expat)))