Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / bdw-gc.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages bdw-gc)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages pkg-config))
27
28 (define-public libgc
29 (package
30 (name "libgc")
31 (version "7.6.0")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-"
35 version ".tar.gz"))
36 (sha256
37 (base32
38 "143x7g0d0k6250ai6m2x3l4y352mzizi4wbgrmahxscv2aqjhjm1"))))
39 (build-system gnu-build-system)
40 (arguments
41 '(#:configure-flags '(;; Install gc_cpp.h et al.
42 "--enable-cplusplus")))
43 (native-inputs `(("pkg-config" ,pkg-config)))
44 (inputs `(("libatomic-ops" ,libatomic-ops)))
45 (outputs '("out" "debug"))
46 (synopsis "The Boehm-Demers-Weiser conservative garbage collector
47 for C and C++")
48 (description
49 "The Boehm-Demers-Weiser conservative garbage collector can be used
50 as a garbage collecting replacement for C malloc or C++ new. It allows
51 you to allocate memory basically as you normally would, without
52 explicitly deallocating memory that is no longer useful. The collector
53 automatically recycles memory when it determines that it can no longer
54 be otherwise accessed.
55
56 The collector is also used by a number of programming language
57 implementations that either use C as intermediate code, want to
58 facilitate easier interoperation with C libraries, or just prefer the
59 simple collector interface.
60
61 Alternatively, the garbage collector may be used as a leak detector for
62 C or C++ programs, though that is not its primary goal.")
63 (home-page "http://www.hboehm.info/gc/")
64
65 (license (x11-style (string-append home-page "license.txt")))))
66
67 (define-public libatomic-ops
68 (package
69 (name "libatomic-ops")
70 (version "7.4.4")
71 (source (origin
72 (method url-fetch)
73 (uri (string-append
74 "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-"
75 version ".tar.gz"))
76 (sha256
77 (base32
78 "13vg5fqwil17zpf4hj4h8rh3blzmym693lkdjgvwpgni1mh0l8dz"))))
79 (build-system gnu-build-system)
80 (outputs '("out" "debug"))
81 (synopsis "Accessing hardware atomic memory update operations")
82 (description
83 "This C library provides semi-portable access to hardware-provided atomic
84 memory update operations on a number architectures. These might allow you to
85 write code that does more interesting things in signal handlers, write
86 lock-free code, experiment with thread programming paradigms, etc.")
87 (home-page "https://github.com/ivmai/libatomic_ops/")
88
89 ;; Some source files are X11-style, others are GPLv2+.
90 (license gpl2+)))