gnu: libdvdcss: Update to 1.4.3.
[jackhill/guix/guix.git] / gnu / packages / bdw-gc.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
69961ac3 2;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
8174e9b7 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
58f58cb4 4;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
ed788c31 5;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
2bd9410e 6;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
c44899a2 7;;;
233e7676 8;;; This file is part of GNU Guix.
c44899a2 9;;;
233e7676 10;;; GNU Guix is free software; you can redistribute it and/or modify it
c44899a2
LC
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
233e7676 15;;; GNU Guix is distributed in the hope that it will be useful, but
c44899a2
LC
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
233e7676 21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
c44899a2 22
1ffa7090 23(define-module (gnu packages bdw-gc)
4a44e743 24 #:use-module (guix licenses)
c44899a2 25 #:use-module (guix packages)
87f5d366 26 #:use-module (guix download)
aebcbb27 27 #:use-module (guix utils)
ad7583f6 28 #:use-module (guix build-system gnu)
ed788c31
RS
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages hurd))
c44899a2 31
c8d1e7a1 32(define-public libgc
c44899a2
LC
33 (package
34 (name "libgc")
2bd9410e 35 (version "8.0.4")
c44899a2 36 (source (origin
87f5d366 37 (method url-fetch)
1d3de979
MB
38 (uri (string-append "https://github.com/ivmai/bdwgc/releases"
39 "/download/v" version "/gc-" version ".tar.gz"))
c44899a2
LC
40 (sha256
41 (base32
2bd9410e 42 "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3"))))
c44899a2 43 (build-system gnu-build-system)
4db00e42 44 (arguments
ed788c31
RS
45 `(#:configure-flags
46 (list
47 ;; Install gc_cpp.h et al.
48 "--enable-cplusplus"
49 ;; In GNU/Hurd systems during the 'Check' phase,
50 ;; there is a deadlock caused by the 'gctest' test.
51 ;; To disable the error set "--disable-gcj-support"
52 ;; to configure script. See bug report and discussion:
53 ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
54 ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
55 ,@(if (hurd-triplet? (or (%current-system)
56 (%current-target-system)))
57 '("--disable-gcj-support")
2bd9410e 58 '()))))
c8d1e7a1 59 (native-inputs `(("pkg-config" ,pkg-config)))
a5cfb444
MB
60 (propagated-inputs
61 (if (%current-target-system)
62 ;; The build system refuses to check for compiler intrinsics when
63 ;; cross-compiling, and demands using libatomic-ops instead.
64 `(("libatomic-ops" ,libatomic-ops))
65 '()))
9bf62d9b 66 (outputs '("out" "debug"))
c44899a2
LC
67 (synopsis "The Boehm-Demers-Weiser conservative garbage collector
68for C and C++")
69 (description
70 "The Boehm-Demers-Weiser conservative garbage collector can be used
71as a garbage collecting replacement for C malloc or C++ new. It allows
72you to allocate memory basically as you normally would, without
73explicitly deallocating memory that is no longer useful. The collector
74automatically recycles memory when it determines that it can no longer
75be otherwise accessed.
76
77The collector is also used by a number of programming language
78implementations that either use C as intermediate code, want to
79facilitate easier interoperation with C libraries, or just prefer the
80simple collector interface.
81
82Alternatively, the garbage collector may be used as a leak detector for
83C or C++ programs, though that is not its primary goal.")
f4eee79d 84 (home-page "https://www.hboehm.info/gc/")
c44899a2 85
62b76320 86 (license (x11-style (string-append home-page "license.txt")))))
ad7583f6 87
aebcbb27
MB
88;; TODO: Add a static output in libgc in the next rebuild cycle.
89(define-public libgc/static-libs
90 (package/inherit
91 libgc
92 (arguments (substitute-keyword-arguments (package-arguments libgc)
93 ((#:configure-flags flags ''())
709ca6c9
CB
94 `(cons "--enable-static" ,flags))))
95 (properties '((hidden? . #t)))))
aebcbb27 96
2bd9410e 97(define-public libgc-7
1f8838d1
MB
98 (package
99 (inherit libgc)
2bd9410e 100 (version "7.6.12")
69961ac3
LC
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "https://github.com/ivmai/bdwgc/releases"
104 "/download/v" version "/gc-" version ".tar.gz"))
105 (sha256
106 (base32
2bd9410e
MB
107 "10jhhi79d5brwlsyhwgpnrmc8nhlf7aan2lk9xhgihk5jc6srbvc"))))
108 (propagated-inputs `(("libatomic-ops" ,libatomic-ops)))))
69961ac3 109
4cb87d63 110(define-public libgc/back-pointers
1f8838d1
MB
111 (package/inherit
112 libgc
4cb87d63
LC
113 (name "libgc-back-pointers")
114 (arguments
115 `(#:make-flags
116 (list "CPPFLAGS=-DKEEP_BACK_PTRS=1")
117 ,@(package-arguments libgc)))
118 (synopsis "The BDW garbage collector, with back-pointer tracking")))
119
ad7583f6
LC
120(define-public libatomic-ops
121 (package
122 (name "libatomic-ops")
b9cb3104 123 (version "7.6.10")
ad7583f6
LC
124 (source (origin
125 (method url-fetch)
126 (uri (string-append
1be8a432
MB
127 "https://github.com/ivmai/libatomic_ops/releases/download/v"
128 version "/libatomic_ops-" version ".tar.gz"))
ad7583f6
LC
129 (sha256
130 (base32
b9cb3104 131 "1bwry043f62pc4mgdd37zx3fif19qyrs8f5bw7qxlmkzh5hdyzjq"))))
ad7583f6
LC
132 (build-system gnu-build-system)
133 (outputs '("out" "debug"))
134 (synopsis "Accessing hardware atomic memory update operations")
135 (description
136 "This C library provides semi-portable access to hardware-provided atomic
7b8acffd 137memory update operations on a number of architectures. These might allow you to
ad7583f6
LC
138write code that does more interesting things in signal handlers, write
139lock-free code, experiment with thread programming paradigms, etc.")
62b76320 140 (home-page "https://github.com/ivmai/libatomic_ops/")
ad7583f6
LC
141
142 ;; Some source files are X11-style, others are GPLv2+.
143 (license gpl2+)))