Commit | Line | Data |
---|---|---|
2a72eeee JD |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> | |
713c975a | 3 | ;;; Copyright © 2014, 2015, 2018 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> |
13de2b70 | 8 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
baef70bb | 9 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
df216847 | 10 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
7624300c | 11 | ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
2a72eeee JD |
12 | ;;; |
13 | ;;; This file is part of GNU Guix. | |
14 | ;;; | |
15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
16 | ;;; under the terms of the GNU General Public License as published by | |
17 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
18 | ;;; your option) any later version. | |
19 | ;;; | |
20 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;;; GNU General Public License for more details. | |
24 | ;;; | |
25 | ;;; You should have received a copy of the GNU General Public License | |
26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
27 | ||
28 | (define-module (gnu packages boost) | |
b5b73a82 | 29 | #:use-module ((guix licenses) #:prefix license:) |
2a72eeee JD |
30 | #:use-module (guix packages) |
31 | #:use-module (guix download) | |
7624300c MC |
32 | #:use-module (guix git-download) |
33 | #:use-module (guix build utils) | |
2a72eeee | 34 | #:use-module (guix build-system gnu) |
7624300c | 35 | #:use-module (guix build-system trivial) |
2a72eeee | 36 | #:use-module (gnu packages) |
c28ba7aa | 37 | #:use-module (gnu packages compression) |
bd590b96 LF |
38 | #:use-module (gnu packages icu4c) |
39 | #:use-module (gnu packages perl) | |
2a72eeee | 40 | #:use-module (gnu packages python) |
bd590b96 | 41 | #:use-module (gnu packages shells)) |
2a72eeee JD |
42 | |
43 | (define-public boost | |
44 | (package | |
45 | (name "boost") | |
baef70bb | 46 | (version "1.66.0") |
2a72eeee JD |
47 | (source (origin |
48 | (method url-fetch) | |
49 | (uri (string-append | |
de67e922 | 50 | "mirror://sourceforge/boost/boost/" version "/boost_" |
2a72eeee JD |
51 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) |
52 | ".tar.bz2")) | |
53 | (sha256 | |
54 | (base32 | |
713c975a MW |
55 | "1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap")) |
56 | (patches (search-patches "boost-fix-icu-build.patch")))) | |
2a72eeee | 57 | (build-system gnu-build-system) |
bd590b96 LF |
58 | (inputs `(("icu4c" ,icu4c) |
59 | ("zlib" ,zlib))) | |
2a72eeee JD |
60 | (native-inputs |
61 | `(("perl" ,perl) | |
62 | ("python" ,python-2) | |
63 | ("tcsh" ,tcsh))) | |
64 | (arguments | |
f828ff5b DT |
65 | `(#:tests? #f |
66 | #:make-flags | |
67 | (list "threading=multi" "link=shared" | |
53a53be9 | 68 | |
f828ff5b DT |
69 | ;; Set the RUNPATH to $libdir so that the libs find each other. |
70 | (string-append "linkflags=-Wl,-rpath=" | |
0ff4e49a | 71 | (assoc-ref %outputs "out") "/lib")) |
f828ff5b DT |
72 | #:phases |
73 | (modify-phases %standard-phases | |
df216847 | 74 | (delete 'bootstrap) |
baef70bb | 75 | (replace 'configure |
713c975a MW |
76 | (lambda* (#:key inputs outputs #:allow-other-keys) |
77 | (let ((icu (assoc-ref inputs "icu4c")) | |
78 | (out (assoc-ref outputs "out"))) | |
f828ff5b DT |
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 | |
baef70bb AI |
90 | (invoke "./bootstrap.sh" |
91 | (string-append "--prefix=" out) | |
713c975a MW |
92 | ;; Auto-detection looks for ICU only in traditional |
93 | ;; install locations. | |
94 | (string-append "--with-icu=" icu) | |
196fb12c | 95 | "--with-toolset=gcc")))) |
baef70bb | 96 | (replace 'build |
196fb12c | 97 | (lambda* (#:key make-flags #:allow-other-keys) |
baef70bb AI |
98 | (apply invoke "./b2" |
99 | (format #f "-j~a" (parallel-job-count)) | |
196fb12c | 100 | make-flags))) |
baef70bb | 101 | (replace 'install |
196fb12c MW |
102 | (lambda* (#:key make-flags #:allow-other-keys) |
103 | (apply invoke "./b2" "install" make-flags)))))) | |
2a72eeee | 104 | |
a2cfe190 | 105 | (home-page "https://www.boost.org") |
2a72eeee JD |
106 | (synopsis "Peer-reviewed portable C++ source libraries") |
107 | (description | |
108 | "A collection of libraries intended to be widely useful, and usable | |
109 | across a broad spectrum of applications.") | |
a2cfe190 | 110 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" |
2a72eeee | 111 | "Some components have other similar licences.")))) |
f763eaaa | 112 | |
7624300c MC |
113 | (define-public boost-sync |
114 | (let ((commit "c72891d9b90e2ceb466ec859f640cd012b2d8709") | |
115 | (version "1.55") | |
116 | (revision "1")) | |
117 | (package | |
118 | (name "boost-sync") | |
119 | (version (git-version version revision commit)) | |
120 | (source (origin | |
121 | (method git-fetch) | |
122 | (uri (git-reference | |
123 | (url "https://github.com/boostorg/sync.git") | |
124 | (commit commit))) | |
125 | (file-name (git-file-name name version)) | |
126 | (sha256 | |
127 | (base32 | |
128 | "197mp5z048vz5kv1m4v3jm447l2gqsyv0rbfz11dz0ns343ihbyx")))) | |
129 | (build-system trivial-build-system) | |
130 | (arguments | |
131 | `(#:modules ((guix build utils)) | |
132 | #:builder | |
133 | (begin | |
134 | (use-modules (guix build utils)) | |
135 | (let ((source (assoc-ref %build-inputs "source"))) | |
136 | (copy-recursively (string-append source "/include") | |
137 | (string-append %output "/include")))))) | |
138 | (home-page "https://github.com/boostorg/sync") | |
139 | (synopsis "Boost.Sync library") | |
140 | (description "The Boost.Sync library provides mutexes, semaphores, locks | |
141 | and events and other thread related facilities. Boost.Sync originated from | |
142 | Boost.Thread.") | |
a2cfe190 | 143 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"))))) |
7624300c | 144 | |
f763eaaa AE |
145 | (define-public mdds |
146 | (package | |
147 | (name "mdds") | |
13de2b70 | 148 | (version "1.3.1") |
f763eaaa AE |
149 | (source (origin |
150 | (method url-fetch) | |
151 | (uri (string-append | |
57144094 | 152 | "http://kohei.us/files/mdds/src/mdds-" version ".tar.bz2")) |
f763eaaa AE |
153 | (sha256 |
154 | (base32 | |
13de2b70 | 155 | "18g511z1lgfxrga2ld9yr95phmyfbd3ymbv4q5g5lyjn4ljcvf6w")))) |
f763eaaa AE |
156 | (build-system gnu-build-system) |
157 | (propagated-inputs | |
158 | `(("boost" ,boost))) ; inclusion of header files | |
62d652a7 | 159 | (home-page "https://gitlab.com/mdds/mdds") |
f763eaaa AE |
160 | (synopsis "Multi-dimensional C++ data structures and indexing algorithms") |
161 | (description "Mdds (multi-dimensional data structure) provides a | |
162 | collection of multi-dimensional data structures and indexing algorithms | |
163 | for C++. It includes flat segment trees, segment trees, rectangle sets, | |
164 | point quad trees, multi-type vectors and multi-type matrices.") | |
165 | (license license:expat))) |