gnu: upower: Enable GObject introspection.
[jackhill/guix/guix.git] / gnu / packages / tbb.scm
CommitLineData
8c6c91fe
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages tbb)
20 #:use-module (guix packages)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix utils)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages))
26
27(define-public tbb
28 (package
29 (name "tbb")
30 (version "4.3.2")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append
34 "https://www.threadingbuildingblocks.org/sites/default"
35 "/files/software_releases/source/"
36 "tbb43_20141204oss_src.tgz"))
37 (sha256
38 (base32
39 "0jsczl99jfgj47kj7c4sd4fk7v3rbaiax1ng9ypykz1hh0lrrsws"))
40 (modules '((guix build utils)))
41 (snippet
42 '(substitute* "build/common.inc"
43 (("export tbb_build_prefix.+$")
44 "export tbb_build_prefix?=guix\n")))))
45 (outputs '("out" "doc"))
46 (build-system gnu-build-system)
47 (arguments
48 `(#:test-target "test"
02ed8be3
RW
49 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
50 (assoc-ref %outputs "out") "/lib"))
4f2bde44 51 #:phases (alist-replace
8c6c91fe 52 'configure
4f2bde44
RW
53 (lambda* (#:key outputs #:allow-other-keys)
54 (substitute* "build/linux.gcc.inc"
55 (("LIB_LINK_FLAGS =")
56 (string-append "LIB_LINK_FLAGS = -Wl,-rpath="
57 (assoc-ref outputs "out") "/lib"))))
8c6c91fe
RW
58 (alist-replace
59 'install
60 (lambda* (#:key outputs #:allow-other-keys)
61 (let* ((doc (string-append
62 (assoc-ref outputs "doc") "/doc"))
63 (examples (string-append doc "/examples"))
64 (lib (string-append
65 (assoc-ref outputs "out") "/lib"))
66 (include (string-append
67 (assoc-ref outputs "out") "/include")))
68 (mkdir-p lib)
69 (for-each
70 (lambda (f)
71 (copy-file f
72 (string-append lib "/"
73 (basename f))))
74 (find-files "build/guix_release" "\\.so"))
75 (copy-recursively "doc" doc)
76 (copy-recursively "examples" examples)
77 (copy-recursively "include" include)
78 #t))
79 %standard-phases))))
80 (home-page "https://www.threadingbuildingblocks.org")
81 (synopsis "C++ library for parallel programming")
82 (description
83 "Threading Building Blocks (TBB) is a C++ runtime library that abstracts
84the low-level threading details necessary for optimal multi-core performance.
85It uses common C++ templates and coding style to eliminate tedious threading
86implementation work. It provides parallel loop constructs, asynchronous
87tasks, synchronization primitives, atomic operations, and more.")
88 ;; GPLv2 with run-time exception:
89 ;; <https://www.threadingbuildingblocks.org/licensing#runtime-exception>
90 (license gpl2)))