gnu: eudev: Really update to 1.10.
[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>
aaf77acc 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
2a72eeee
JD
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages boost)
b5b73a82 21 #:use-module ((guix licenses) #:prefix license:)
2a72eeee
JD
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages python)
27 #:use-module (gnu packages tcsh)
28 #:use-module (gnu packages perl))
29
30(define-public boost
31 (package
32 (name "boost")
33 (version "1.55.0")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append
37 "mirror://sourceforge/boost/boost_"
38 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
39 ".tar.bz2"))
40 (sha256
41 (base32
42 "0lkv5dzssbl5fmh2nkaszi8x9qbj80pr4acf9i26sj3rvlih1w7z"))))
43 (build-system gnu-build-system)
44 (native-inputs
45 `(("perl" ,perl)
46 ("python" ,python-2)
47 ("tcsh" ,tcsh)))
48 (arguments
aaf77acc
MW
49 (let ((build-flags
50 `("threading=multi" "link=shared"
51 ;; Boost's 'context' library is not yet supported on mips64, so
52 ;; we disable it. The 'coroutine' library depends on 'context',
53 ;; so we disable that too.
54 ,@(if (equal? "mips64el-linux" (or (%current-target-system)
55 (%current-system)))
56 '("--without-context" "--without-coroutine")
57 '()))))
58 `(#:phases
2a72eeee 59 (alist-replace
aaf77acc
MW
60 'configure
61 (lambda* (#:key outputs #:allow-other-keys)
62 (let ((out (assoc-ref outputs "out")))
63 (substitute* '("libs/config/configure"
64 "libs/spirit/classic/phoenix/test/runtest.sh"
65 "tools/build/v2/doc/bjam.qbk"
66 "tools/build/v2/engine/execunix.c"
67 "tools/build/v2/engine/Jambase"
68 "tools/build/v2/engine/jambase.c")
69 (("/bin/sh") (which "sh")))
2a72eeee 70
aaf77acc
MW
71 (setenv "SHELL" (which "sh"))
72 (setenv "CONFIG_SHELL" (which "sh"))
73
74 (zero? (system* "./bootstrap.sh"
75 (string-append "--prefix=" out)
76 "--with-toolset=gcc"))))
2a72eeee 77 (alist-replace
aaf77acc 78 'build
2a72eeee 79 (lambda _
aaf77acc
MW
80 (zero? (system* "./b2" ,@build-flags)))
81
82 (alist-replace
83 'check
84 (lambda _ #t)
85
86 (alist-replace
87 'install
88 (lambda _
89 (zero? (system* "./b2" "install" ,@build-flags)))
90 %standard-phases)))))))
2a72eeee
JD
91
92 (home-page "http://boost.org")
93 (synopsis "Peer-reviewed portable C++ source libraries")
94 (description
95 "A collection of libraries intended to be widely useful, and usable
96across a broad spectrum of applications.")
97 (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt"
98 "Some components have other similar licences."))))