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> |
6fd5a80d | 6 | ;;; Copyright © 2015, 2019 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> |
71154fe7 | 10 | ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
7624300c | 11 | ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
da39ff58 | 12 | ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> |
2a72eeee JD |
13 | ;;; |
14 | ;;; This file is part of GNU Guix. | |
15 | ;;; | |
16 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
17 | ;;; under the terms of the GNU General Public License as published by | |
18 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
19 | ;;; your option) any later version. | |
20 | ;;; | |
21 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
22 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 | ;;; GNU General Public License for more details. | |
25 | ;;; | |
26 | ;;; You should have received a copy of the GNU General Public License | |
27 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
28 | ||
29 | (define-module (gnu packages boost) | |
b5b73a82 | 30 | #:use-module ((guix licenses) #:prefix license:) |
da39ff58 | 31 | #:use-module (guix utils) |
2a72eeee JD |
32 | #:use-module (guix packages) |
33 | #:use-module (guix download) | |
7624300c | 34 | #:use-module (guix git-download) |
2a72eeee | 35 | #:use-module (guix build-system gnu) |
7624300c | 36 | #:use-module (guix build-system trivial) |
2a72eeee | 37 | #:use-module (gnu packages) |
c28ba7aa | 38 | #:use-module (gnu packages compression) |
bd590b96 LF |
39 | #:use-module (gnu packages icu4c) |
40 | #:use-module (gnu packages perl) | |
2a72eeee | 41 | #:use-module (gnu packages python) |
bd590b96 | 42 | #:use-module (gnu packages shells)) |
2a72eeee JD |
43 | |
44 | (define-public boost | |
45 | (package | |
46 | (name "boost") | |
b8e43e61 | 47 | (version "1.69.0") |
2a72eeee JD |
48 | (source (origin |
49 | (method url-fetch) | |
b8e43e61 MB |
50 | (uri (let ((version-with-underscores |
51 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version))) | |
52 | (list (string-append "mirror://sourceforge/boost/boost/" version | |
53 | "/boost_" version-with-underscores ".tar.bz2") | |
54 | (string-append "https://dl.bintray.com/boostorg/release/" | |
55 | version "/source/boost_" | |
56 | version-with-underscores ".tar.bz2")))) | |
2a72eeee JD |
57 | (sha256 |
58 | (base32 | |
b8e43e61 | 59 | "01j4n142dz20lcgqji8d8hspp04p1nv7m8i6dz8w5lchfdhx8clg")) |
713c975a | 60 | (patches (search-patches "boost-fix-icu-build.patch")))) |
2a72eeee | 61 | (build-system gnu-build-system) |
bd590b96 LF |
62 | (inputs `(("icu4c" ,icu4c) |
63 | ("zlib" ,zlib))) | |
2a72eeee JD |
64 | (native-inputs |
65 | `(("perl" ,perl) | |
66 | ("python" ,python-2) | |
67 | ("tcsh" ,tcsh))) | |
68 | (arguments | |
f828ff5b DT |
69 | `(#:tests? #f |
70 | #:make-flags | |
71 | (list "threading=multi" "link=shared" | |
a7ff6699 | 72 | "cxxflags=-std=c++14" |
53a53be9 | 73 | |
f828ff5b DT |
74 | ;; Set the RUNPATH to $libdir so that the libs find each other. |
75 | (string-append "linkflags=-Wl,-rpath=" | |
0ff4e49a | 76 | (assoc-ref %outputs "out") "/lib")) |
f828ff5b DT |
77 | #:phases |
78 | (modify-phases %standard-phases | |
df216847 | 79 | (delete 'bootstrap) |
baef70bb | 80 | (replace 'configure |
713c975a MW |
81 | (lambda* (#:key inputs outputs #:allow-other-keys) |
82 | (let ((icu (assoc-ref inputs "icu4c")) | |
83 | (out (assoc-ref outputs "out"))) | |
f828ff5b DT |
84 | (substitute* '("libs/config/configure" |
85 | "libs/spirit/classic/phoenix/test/runtest.sh" | |
f828ff5b DT |
86 | "tools/build/src/engine/execunix.c" |
87 | "tools/build/src/engine/Jambase" | |
88 | "tools/build/src/engine/jambase.c") | |
89 | (("/bin/sh") (which "sh"))) | |
aaf77acc | 90 | |
f828ff5b DT |
91 | (setenv "SHELL" (which "sh")) |
92 | (setenv "CONFIG_SHELL" (which "sh")) | |
aaf77acc | 93 | |
baef70bb AI |
94 | (invoke "./bootstrap.sh" |
95 | (string-append "--prefix=" out) | |
713c975a MW |
96 | ;; Auto-detection looks for ICU only in traditional |
97 | ;; install locations. | |
98 | (string-append "--with-icu=" icu) | |
196fb12c | 99 | "--with-toolset=gcc")))) |
baef70bb | 100 | (replace 'build |
196fb12c | 101 | (lambda* (#:key make-flags #:allow-other-keys) |
baef70bb AI |
102 | (apply invoke "./b2" |
103 | (format #f "-j~a" (parallel-job-count)) | |
196fb12c | 104 | make-flags))) |
baef70bb | 105 | (replace 'install |
196fb12c | 106 | (lambda* (#:key make-flags #:allow-other-keys) |
bd65ecf4 MB |
107 | (apply invoke "./b2" "install" make-flags))) |
108 | (add-after 'install 'provide-libboost_python | |
109 | (lambda* (#:key outputs #:allow-other-keys) | |
110 | (let ((out (assoc-ref outputs "out"))) | |
111 | ;; Boost can build support for both Python 2 and Python 3 since | |
112 | ;; version 1.67.0, and suffixes each library with the Python | |
113 | ;; version. Many consumers only check for libboost_python | |
114 | ;; however, so we provide it here as suggested in | |
115 | ;; <https://github.com/boostorg/python/issues/203>. | |
116 | (with-directory-excursion (string-append out "/lib") | |
117 | (symlink "libboost_python27.so" "libboost_python.so")) | |
118 | #t)))))) | |
2a72eeee | 119 | |
a2cfe190 | 120 | (home-page "https://www.boost.org") |
2a72eeee JD |
121 | (synopsis "Peer-reviewed portable C++ source libraries") |
122 | (description | |
123 | "A collection of libraries intended to be widely useful, and usable | |
124 | across a broad spectrum of applications.") | |
a2cfe190 | 125 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" |
2a72eeee | 126 | "Some components have other similar licences.")))) |
f763eaaa | 127 | |
444488fc LC |
128 | (define-public boost-for-mysql |
129 | ;; Older version for MySQL 5.7.23. | |
130 | (package | |
131 | (inherit boost) | |
132 | (version "1.59.0") | |
133 | (source (origin | |
134 | (method url-fetch) | |
135 | (uri (string-append | |
136 | "mirror://sourceforge/boost/boost/" version "/boost_" | |
137 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
138 | ".tar.bz2")) | |
139 | (sha256 | |
140 | (base32 | |
141 | "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj")))) | |
da39ff58 EF |
142 | (arguments (substitute-keyword-arguments (package-arguments boost) |
143 | ((#:phases phases) | |
144 | `(modify-phases ,phases | |
145 | ;; This was removed after boost-1.67. | |
146 | (add-before 'configure 'more-bin-sh-patching | |
147 | (lambda _ | |
148 | (substitute* "tools/build/doc/bjam.qbk" | |
149 | (("/bin/sh") (which "sh"))))) | |
150 | (delete 'provide-libboost_python))))) | |
444488fc LC |
151 | (properties '((hidden? . #t))))) |
152 | ||
7624300c MC |
153 | (define-public boost-sync |
154 | (let ((commit "c72891d9b90e2ceb466ec859f640cd012b2d8709") | |
155 | (version "1.55") | |
156 | (revision "1")) | |
157 | (package | |
158 | (name "boost-sync") | |
159 | (version (git-version version revision commit)) | |
160 | (source (origin | |
161 | (method git-fetch) | |
162 | (uri (git-reference | |
163 | (url "https://github.com/boostorg/sync.git") | |
164 | (commit commit))) | |
165 | (file-name (git-file-name name version)) | |
166 | (sha256 | |
167 | (base32 | |
168 | "197mp5z048vz5kv1m4v3jm447l2gqsyv0rbfz11dz0ns343ihbyx")))) | |
169 | (build-system trivial-build-system) | |
170 | (arguments | |
171 | `(#:modules ((guix build utils)) | |
172 | #:builder | |
173 | (begin | |
174 | (use-modules (guix build utils)) | |
175 | (let ((source (assoc-ref %build-inputs "source"))) | |
176 | (copy-recursively (string-append source "/include") | |
177 | (string-append %output "/include")))))) | |
178 | (home-page "https://github.com/boostorg/sync") | |
179 | (synopsis "Boost.Sync library") | |
180 | (description "The Boost.Sync library provides mutexes, semaphores, locks | |
181 | and events and other thread related facilities. Boost.Sync originated from | |
182 | Boost.Thread.") | |
a2cfe190 | 183 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"))))) |
7624300c | 184 | |
71154fe7 RW |
185 | (define-public boost-signals2 |
186 | (package | |
187 | (name "boost-signals2") | |
188 | (version (package-version boost)) | |
189 | (source (origin | |
190 | (method git-fetch) | |
191 | (uri (git-reference | |
192 | (url "https://github.com/boostorg/signals2.git") | |
193 | (commit (string-append "boost-" version)))) | |
194 | (file-name (git-file-name name version)) | |
195 | (sha256 | |
196 | (base32 | |
197 | "1nayaqshhzr1n6jj43bpvvay36d5gn075h0b95psii5x8ingszdk")))) | |
198 | (build-system trivial-build-system) | |
199 | (arguments | |
200 | `(#:modules ((guix build utils)) | |
201 | #:builder | |
202 | (begin | |
203 | (use-modules (guix build utils)) | |
204 | (let ((source (assoc-ref %build-inputs "source"))) | |
205 | (copy-recursively (string-append source "/include") | |
206 | (string-append %output "/include")))))) | |
207 | (home-page "https://github.com/boostorg/signals2") | |
208 | (synopsis "Boost.Signals2 library") | |
209 | (description "The Boost.Signals2 library is an implementation of a managed | |
210 | signals and slots system.") | |
211 | (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt")))) | |
212 | ||
f763eaaa AE |
213 | (define-public mdds |
214 | (package | |
215 | (name "mdds") | |
07d4200c | 216 | (version "1.4.3") |
f763eaaa AE |
217 | (source (origin |
218 | (method url-fetch) | |
219 | (uri (string-append | |
57144094 | 220 | "http://kohei.us/files/mdds/src/mdds-" version ".tar.bz2")) |
f763eaaa AE |
221 | (sha256 |
222 | (base32 | |
07d4200c | 223 | "10cw6irdm6d15nxnys2v5akp8yz52qijpcjvw0frwq7nz5d3vki5")))) |
f763eaaa AE |
224 | (build-system gnu-build-system) |
225 | (propagated-inputs | |
226 | `(("boost" ,boost))) ; inclusion of header files | |
62d652a7 | 227 | (home-page "https://gitlab.com/mdds/mdds") |
f763eaaa AE |
228 | (synopsis "Multi-dimensional C++ data structures and indexing algorithms") |
229 | (description "Mdds (multi-dimensional data structure) provides a | |
230 | collection of multi-dimensional data structures and indexing algorithms | |
231 | for C++. It includes flat segment trees, segment trees, rectangle sets, | |
232 | point quad trees, multi-type vectors and multi-type matrices.") | |
233 | (license license:expat))) |