gnu: nftables: Update to 0.8.
[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>
2a72eeee
JD
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages boost)
b5b73a82 25 #:use-module ((guix licenses) #:prefix license:)
2a72eeee
JD
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages)
c28ba7aa 30 #:use-module (gnu packages compression)
bd590b96
LF
31 #:use-module (gnu packages icu4c)
32 #:use-module (gnu packages perl)
2a72eeee 33 #:use-module (gnu packages python)
bd590b96 34 #:use-module (gnu packages shells))
2a72eeee
JD
35
36(define-public boost
37 (package
38 (name "boost")
4a4e60f4 39 (version "1.64.0")
2a72eeee
JD
40 (source (origin
41 (method url-fetch)
42 (uri (string-append
de67e922 43 "mirror://sourceforge/boost/boost/" version "/boost_"
2a72eeee
JD
44 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
45 ".tar.bz2"))
46 (sha256
47 (base32
4a4e60f4 48 "0cikd35xfkpg9nnl76yqqnqxnf3hyfjjww8xjd4akflprsm5rk3v"))))
2a72eeee 49 (build-system gnu-build-system)
bd590b96
LF
50 (inputs `(("icu4c" ,icu4c)
51 ("zlib" ,zlib)))
2a72eeee
JD
52 (native-inputs
53 `(("perl" ,perl)
54 ("python" ,python-2)
55 ("tcsh" ,tcsh)))
56 (arguments
f828ff5b
DT
57 `(#:tests? #f
58 #:make-flags
59 (list "threading=multi" "link=shared"
53a53be9 60
f828ff5b
DT
61 ;; Set the RUNPATH to $libdir so that the libs find each other.
62 (string-append "linkflags=-Wl,-rpath="
63 (assoc-ref %outputs "out") "/lib")
53a53be9 64
f828ff5b
DT
65 ;; Boost's 'context' library is not yet supported on mips64, so
66 ;; we disable it. The 'coroutine' library depends on 'context',
67 ;; so we disable that too.
68 ,@(if (string-prefix? "mips64" (or (%current-target-system)
69 (%current-system)))
70 '("--without-context"
71 "--without-coroutine" "--without-coroutine2")
72 '()))
73 #:phases
74 (modify-phases %standard-phases
75 (replace
76 'configure
77 (lambda* (#:key outputs #:allow-other-keys)
78 (let ((out (assoc-ref outputs "out")))
79 (substitute* '("libs/config/configure"
80 "libs/spirit/classic/phoenix/test/runtest.sh"
81 "tools/build/doc/bjam.qbk"
82 "tools/build/src/engine/execunix.c"
83 "tools/build/src/engine/Jambase"
84 "tools/build/src/engine/jambase.c")
85 (("/bin/sh") (which "sh")))
aaf77acc 86
f828ff5b
DT
87 (setenv "SHELL" (which "sh"))
88 (setenv "CONFIG_SHELL" (which "sh"))
aaf77acc 89
f828ff5b
DT
90 (zero? (system* "./bootstrap.sh"
91 (string-append "--prefix=" out)
92 "--with-toolset=gcc")))))
93 (replace
94 'build
95 (lambda* (#:key outputs make-flags #:allow-other-keys)
1a0ae573
EB
96 (zero? (apply system* "./b2"
97 (format #f "-j~a" (parallel-job-count))
98 make-flags))))
f828ff5b
DT
99 (replace
100 'install
101 (lambda* (#:key outputs make-flags #:allow-other-keys)
102 (zero? (apply system* "./b2" "install" make-flags)))))))
2a72eeee
JD
103
104 (home-page "http://boost.org")
105 (synopsis "Peer-reviewed portable C++ source libraries")
106 (description
107 "A collection of libraries intended to be widely useful, and usable
108across a broad spectrum of applications.")
109 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt"
110 "Some components have other similar licences."))))
f763eaaa
AE
111
112(define-public mdds
113 (package
114 (name "mdds")
57144094 115 (version "1.2.2")
f763eaaa
AE
116 (source (origin
117 (method url-fetch)
118 (uri (string-append
57144094 119 "http://kohei.us/files/mdds/src/mdds-" version ".tar.bz2"))
f763eaaa
AE
120 (sha256
121 (base32
57144094 122 "17fcjhsq3bzqm7ba9sgp6my3y4226jnwai6q5jq3810i745p67hl"))))
f763eaaa
AE
123 (build-system gnu-build-system)
124 (propagated-inputs
125 `(("boost" ,boost))) ; inclusion of header files
62d652a7 126 (home-page "https://gitlab.com/mdds/mdds")
f763eaaa
AE
127 (synopsis "Multi-dimensional C++ data structures and indexing algorithms")
128 (description "Mdds (multi-dimensional data structure) provides a
129collection of multi-dimensional data structures and indexing algorithms
130for C++. It includes flat segment trees, segment trees, rectangle sets,
131point quad trees, multi-type vectors and multi-type matrices.")
132 (license license:expat)))