gnu: automake: Adjust test to ignore new gzip warnings.
[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
JD
30 #:use-module (gnu packages python)
31 #:use-module (gnu packages tcsh)
32 #:use-module (gnu packages perl))
33
34(define-public boost
35 (package
36 (name "boost")
c91d3fb7 37 (version "1.60.0")
2a72eeee
JD
38 (source (origin
39 (method url-fetch)
40 (uri (string-append
41 "mirror://sourceforge/boost/boost_"
42 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
43 ".tar.bz2"))
44 (sha256
45 (base32
c91d3fb7 46 "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8"))))
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
aaf77acc
MW
54 (let ((build-flags
55 `("threading=multi" "link=shared"
53a53be9
LC
56
57 ;; Set the RUNPATH to $libdir so that the libs find each other.
58 (string-append "linkflags=-Wl,-rpath="
59 (assoc-ref outputs "out") "/lib")
60
aaf77acc
MW
61 ;; Boost's 'context' library is not yet supported on mips64, so
62 ;; we disable it. The 'coroutine' library depends on 'context',
63 ;; so we disable that too.
7cd802f3 64 ,@(if (string-prefix? "mips64" (or (%current-target-system)
aaf77acc 65 (%current-system)))
c91d3fb7
EB
66 '("--without-context"
67 "--without-coroutine" "--without-coroutine2")
aaf77acc 68 '()))))
53a53be9
LC
69 `(#:tests? #f
70 #:phases
3abe8136
EB
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
3abe8136
EB
84 (setenv "SHELL" (which "sh"))
85 (setenv "CONFIG_SHELL" (which "sh"))
aaf77acc 86
3abe8136
EB
87 (zero? (system* "./bootstrap.sh"
88 (string-append "--prefix=" out)
89 "--with-toolset=gcc")))))
90 (replace
91 'build
92 (lambda* (#:key outputs #:allow-other-keys)
93 (zero? (system* "./b2" ,@build-flags))))
94 (replace
53a53be9
LC
95 'install
96 (lambda* (#:key outputs #:allow-other-keys)
3abe8136 97 (zero? (system* "./b2" "install" ,@build-flags))))))))
2a72eeee
JD
98
99 (home-page "http://boost.org")
100 (synopsis "Peer-reviewed portable C++ source libraries")
101 (description
102 "A collection of libraries intended to be widely useful, and usable
103across a broad spectrum of applications.")
104 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt"
105 "Some components have other similar licences."))))
f763eaaa
AE
106
107(define-public mdds
108 (package
109 (name "mdds")
694bbb4d 110 (version "0.12.1")
f763eaaa
AE
111 (source (origin
112 (method url-fetch)
113 (uri (string-append
114 "http://kohei.us/files/mdds/src/mdds_" version ".tar.bz2"))
115 (sha256
116 (base32
694bbb4d 117 "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3"))))
f763eaaa
AE
118 (build-system gnu-build-system)
119 (propagated-inputs
120 `(("boost" ,boost))) ; inclusion of header files
121 (home-page "https://code.google.com/p/multidimalgorithm/")
122 (synopsis "Multi-dimensional C++ data structures and indexing algorithms")
123 (description "Mdds (multi-dimensional data structure) provides a
124collection of multi-dimensional data structures and indexing algorithms
125for C++. It includes flat segment trees, segment trees, rectangle sets,
126point quad trees, multi-type vectors and multi-type matrices.")
127 (license license:expat)))