projects/guix·blob javascript-team · refs

70 lines · 2.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2015 Ludovic Courtès <[email protected]>
3;;; Copyright © 2014 Mark H Weaver <[email protected]>
4;;; Copyright © 2017 Efraim Flashner <[email protected]>
5;;; Copyright © 2021 Thiago Jung Bauermann <[email protected]>
6;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
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;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
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
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages pth)
24 #:use-module (gnu packages autotools)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu))
29
30(define-public pth
31 (package
32 (name "pth")
33 (version "2.0.7")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append "mirror://gnu/pth/pth-" version
38 ".tar.gz"))
39 (sha256
40 (base32
41 "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"))))
42 (build-system gnu-build-system)
43 (arguments
44 '(#:configure-flags
45 '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types")
46 #:parallel-build? #f
47 #:phases
48 (modify-phases %standard-phases
49 (add-after 'unpack 'update-config-scripts
50 (lambda* (#:key inputs native-inputs #:allow-other-keys)
51 ;; Replace outdated config.guess and config.sub.
52 (for-each (lambda (file)
53 (install-file
54 (search-input-file
55 (or native-inputs inputs)
56 (string-append "/bin/" file)) "."))
57 '("config.guess" "config.sub")))))))
58 (native-inputs
59 (list config))
60 (home-page "https://www.gnu.org/software/pth/")
61 (synopsis "Portable thread library")
62 (description
63 "GNU Pth is a portable library providing non-preemptive, priority-based
64scheduling for multiple execution threads. Each thread has its own
65program-counter, run-time stack, signal mask and errno variable. Threads are
66scheduled in a cooperative way, rather than in the standard preemptive way,
67such that they are managed according to priority and events. However, Pth
68also features emulation of POSIX.1c threads (\"pthreads\") for backwards
69compatibility.")
70 (license lgpl2.1+)))