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