pth.scm 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2015 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages pth)
  22. #:use-module (gnu packages autotools)
  23. #:use-module (guix licenses)
  24. #:use-module (guix packages)
  25. #:use-module (guix download)
  26. #:use-module (guix build-system gnu))
  27. (define-public pth
  28. (package
  29. (name "pth")
  30. (version "2.0.7")
  31. (source
  32. (origin
  33. (method url-fetch)
  34. (uri (string-append "mirror://gnu/pth/pth-" version
  35. ".tar.gz"))
  36. (sha256
  37. (base32
  38. "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"))))
  39. (build-system gnu-build-system)
  40. (arguments
  41. '(#:parallel-build? #f
  42. #:phases
  43. (modify-phases %standard-phases
  44. (add-after 'unpack 'update-config-scripts
  45. (lambda* (#:key inputs native-inputs #:allow-other-keys)
  46. ;; Replace outdated config.guess and config.sub.
  47. (for-each (lambda (file)
  48. (install-file
  49. (search-input-file
  50. (or native-inputs inputs)
  51. (string-append "/bin/" file)) "."))
  52. '("config.guess" "config.sub")))))))
  53. (native-inputs
  54. (list config))
  55. (home-page "https://www.gnu.org/software/pth/")
  56. (synopsis "Portable thread library")
  57. (description
  58. "GNU Pth is a portable library providing non-preemptive, priority-based
  59. scheduling for multiple execution threads. Each thread has its own
  60. program-counter, run-time stack, signal mask and errno variable. Threads are
  61. scheduled in a cooperative way, rather than in the standard preemptive way,
  62. such that they are managed according to priority and events. However, Pth
  63. also features emulation of POSIX.1c threads (\"pthreads\") for backwards
  64. compatibility.")
  65. (license lgpl2.1+)))