gnu: gimp: Update to 2.10.0.
[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>
7624300c 9;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
2a72eeee
JD
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages boost)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
2a72eeee
JD
28 #:use-module (guix packages)
29 #:use-module (guix download)
7624300c
MC
30 #:use-module (guix git-download)
31 #:use-module (guix build utils)
2a72eeee 32 #:use-module (guix build-system gnu)
7624300c 33 #:use-module (guix build-system trivial)
2a72eeee 34 #:use-module (gnu packages)
c28ba7aa 35 #:use-module (gnu packages compression)
bd590b96
LF
36 #:use-module (gnu packages icu4c)
37 #:use-module (gnu packages perl)
2a72eeee 38 #:use-module (gnu packages python)
bd590b96 39 #:use-module (gnu packages shells))
2a72eeee
JD
40
41(define-public boost
42 (package
43 (name "boost")
4a4e60f4 44 (version "1.64.0")
2a72eeee
JD
45 (source (origin
46 (method url-fetch)
47 (uri (string-append
de67e922 48 "mirror://sourceforge/boost/boost/" version "/boost_"
2a72eeee
JD
49 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
50 ".tar.bz2"))
51 (sha256
52 (base32
4a4e60f4 53 "0cikd35xfkpg9nnl76yqqnqxnf3hyfjjww8xjd4akflprsm5rk3v"))))
2a72eeee 54 (build-system gnu-build-system)
bd590b96
LF
55 (inputs `(("icu4c" ,icu4c)
56 ("zlib" ,zlib)))
2a72eeee
JD
57 (native-inputs
58 `(("perl" ,perl)
59 ("python" ,python-2)
60 ("tcsh" ,tcsh)))
61 (arguments
f828ff5b
DT
62 `(#:tests? #f
63 #:make-flags
64 (list "threading=multi" "link=shared"
53a53be9 65
f828ff5b
DT
66 ;; Set the RUNPATH to $libdir so that the libs find each other.
67 (string-append "linkflags=-Wl,-rpath="
68 (assoc-ref %outputs "out") "/lib")
53a53be9 69
f828ff5b
DT
70 ;; Boost's 'context' library is not yet supported on mips64, so
71 ;; we disable it. The 'coroutine' library depends on 'context',
72 ;; so we disable that too.
73 ,@(if (string-prefix? "mips64" (or (%current-target-system)
74 (%current-system)))
75 '("--without-context"
76 "--without-coroutine" "--without-coroutine2")
77 '()))
78 #:phases
79 (modify-phases %standard-phases
80 (replace
81 'configure
82 (lambda* (#:key outputs #:allow-other-keys)
83 (let ((out (assoc-ref outputs "out")))
84 (substitute* '("libs/config/configure"
85 "libs/spirit/classic/phoenix/test/runtest.sh"
86 "tools/build/doc/bjam.qbk"
87 "tools/build/src/engine/execunix.c"
88 "tools/build/src/engine/Jambase"
89 "tools/build/src/engine/jambase.c")
90 (("/bin/sh") (which "sh")))
aaf77acc 91
f828ff5b
DT
92 (setenv "SHELL" (which "sh"))
93 (setenv "CONFIG_SHELL" (which "sh"))
aaf77acc 94
f828ff5b
DT
95 (zero? (system* "./bootstrap.sh"
96 (string-append "--prefix=" out)
97 "--with-toolset=gcc")))))
98 (replace
99 'build
100 (lambda* (#:key outputs make-flags #:allow-other-keys)
1a0ae573
EB
101 (zero? (apply system* "./b2"
102 (format #f "-j~a" (parallel-job-count))
103 make-flags))))
f828ff5b
DT
104 (replace
105 'install
106 (lambda* (#:key outputs make-flags #:allow-other-keys)
107 (zero? (apply system* "./b2" "install" make-flags)))))))
2a72eeee
JD
108
109 (home-page "http://boost.org")
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
bbce53c4
MB
117(define-public boost-1.66
118 (package
119 (inherit boost)
120 (version "1.66.0")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append
124 "mirror://sourceforge/boost/boost/" version "/boost_"
125 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
126 ".tar.bz2"))
127 (sha256
128 (base32
129 "1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))))))
130
7624300c
MC
131(define-public boost-sync
132 (let ((commit "c72891d9b90e2ceb466ec859f640cd012b2d8709")
133 (version "1.55")
134 (revision "1"))
135 (package
136 (name "boost-sync")
137 (version (git-version version revision commit))
138 (source (origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://github.com/boostorg/sync.git")
142 (commit commit)))
143 (file-name (git-file-name name version))
144 (sha256
145 (base32
146 "197mp5z048vz5kv1m4v3jm447l2gqsyv0rbfz11dz0ns343ihbyx"))))
147 (build-system trivial-build-system)
148 (arguments
149 `(#:modules ((guix build utils))
150 #:builder
151 (begin
152 (use-modules (guix build utils))
153 (let ((source (assoc-ref %build-inputs "source")))
154 (copy-recursively (string-append source "/include")
155 (string-append %output "/include"))))))
156 (home-page "https://github.com/boostorg/sync")
157 (synopsis "Boost.Sync library")
158 (description "The Boost.Sync library provides mutexes, semaphores, locks
159and events and other thread related facilities. Boost.Sync originated from
160Boost.Thread.")
161 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt")))))
162
f763eaaa
AE
163(define-public mdds
164 (package
165 (name "mdds")
13de2b70 166 (version "1.3.1")
f763eaaa
AE
167 (source (origin
168 (method url-fetch)
169 (uri (string-append
57144094 170 "http://kohei.us/files/mdds/src/mdds-" version ".tar.bz2"))
f763eaaa
AE
171 (sha256
172 (base32
13de2b70 173 "18g511z1lgfxrga2ld9yr95phmyfbd3ymbv4q5g5lyjn4ljcvf6w"))))
f763eaaa
AE
174 (build-system gnu-build-system)
175 (propagated-inputs
176 `(("boost" ,boost))) ; inclusion of header files
62d652a7 177 (home-page "https://gitlab.com/mdds/mdds")
f763eaaa
AE
178 (synopsis "Multi-dimensional C++ data structures and indexing algorithms")
179 (description "Mdds (multi-dimensional data structure) provides a
180collection of multi-dimensional data structures and indexing algorithms
181for C++. It includes flat segment trees, segment trees, rectangle sets,
182point quad trees, multi-type vectors and multi-type matrices.")
183 (license license:expat)))