boost.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> |
3 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
4 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
5 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
6 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> |
7 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
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 (more packages boost) |
25 | #:use-module ((guix licenses) #:prefix license:) |
26 | #:use-module (guix packages) |
27 | #:use-module (guix download) |
28 | #:use-module (guix build-system gnu) |
29 | #:use-module (gnu packages) |
30 | #:use-module (gnu packages base) |
31 | #:use-module (gnu packages compression) |
32 | #:use-module (gnu packages icu4c) |
33 | #:use-module (gnu packages python) |
34 | #:use-module (gnu packages shells) |
35 | #:use-module (gnu packages perl)) |
36 | |
37 | (define-public boost |
38 | (package |
39 | (name "boost") |
40 | (version "1.63.0") |
41 | (source (origin |
42 | (method url-fetch) |
43 | (uri (string-append |
44 | "mirror://sourceforge/boost/boost/" version "/boost_" |
45 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) |
46 | ".tar.bz2")) |
47 | (sha256 |
48 | (base32 |
49 | "1c5kzhcqahnic55dxcnw7r80qvwx5sfa2sa97yzv7xjrywljbbmy")))) |
50 | (build-system gnu-build-system) |
51 | (inputs |
52 | `(("zlib" ,zlib) |
53 | ("icu" ,icu4c))) |
54 | (native-inputs |
55 | `(("perl" ,perl) |
56 | ("python" ,python-2) |
57 | ("tcsh" ,tcsh) |
58 | ("which" ,which))) |
59 | (arguments |
60 | `(#:tests? #f |
61 | #:make-flags |
62 | (list "threading=multi" "link=shared" |
63 | |
64 | ;; Set the RUNPATH to $libdir so that the libs find each other. |
65 | (string-append "linkflags=-Wl,-rpath=" |
66 | (assoc-ref %outputs "out") "/lib") |
67 | |
68 | ;; Boost's 'context' library is not yet supported on mips64, so |
69 | ;; we disable it. The 'coroutine' library depends on 'context', |
70 | ;; so we disable that too. |
71 | ,@(if (string-prefix? "mips64" (or (%current-target-system) |
72 | (%current-system))) |
73 | '("--without-context" |
74 | "--without-coroutine" "--without-coroutine2") |
75 | '())) |
76 | #:phases |
77 | (modify-phases %standard-phases |
78 | (replace |
79 | 'configure |
80 | (lambda* (#:key outputs #:allow-other-keys) |
81 | (let ((out (assoc-ref outputs "out"))) |
82 | (substitute* '("libs/config/configure" |
83 | "libs/spirit/classic/phoenix/test/runtest.sh" |
84 | "tools/build/doc/bjam.qbk" |
85 | "tools/build/src/engine/execunix.c" |
86 | "tools/build/src/engine/Jambase" |
87 | "tools/build/src/engine/jambase.c") |
88 | (("/bin/sh") (which "sh"))) |
89 | |
90 | (setenv "SHELL" (which "sh")) |
91 | (setenv "CONFIG_SHELL" (which "sh")) |
92 | |
93 | (zero? (system* "./bootstrap.sh" |
94 | (string-append "--prefix=" out) |
95 | "--with-toolset=gcc" "--with-icu"))))) |
96 | (replace |
97 | 'build |
98 | (lambda* (#:key outputs make-flags #:allow-other-keys) |
99 | (zero? (apply system* "./b2" |
100 | (format #f "-j~a" (parallel-job-count)) |
101 | make-flags)))) |
102 | (replace |
103 | 'install |
104 | (lambda* (#:key outputs make-flags #:allow-other-keys) |
105 | (zero? (apply system* "./b2" "install" make-flags))))))) |
106 | |
107 | (home-page "http://boost.org") |
108 | (synopsis "Peer-reviewed portable C++ source libraries") |
109 | (description |
110 | "A collection of libraries intended to be widely useful, and usable |
111 | across a broad spectrum of applications.") |
112 | (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt" |
113 | "Some components have other similar licences.")))) |
114 |