gperf.scm 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2017 Ludovic Courtès <ludo@gnu.org>
  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. (define-module (gnu packages gperf)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu))
  23. (define-public gperf
  24. (package
  25. (name "gperf")
  26. (version "3.1")
  27. (source
  28. (origin
  29. (method url-fetch)
  30. (uri (string-append "mirror://gnu/gperf/gperf-"
  31. version ".tar.gz"))
  32. (sha256
  33. (base32
  34. "1qispg6i508rq8pkajh26cznwimbnj06wq9sd85vg95v8nwld1aq"))))
  35. (build-system gnu-build-system)
  36. (arguments '(#:parallel-tests? #f))
  37. (home-page "https://www.gnu.org/software/gperf/")
  38. (synopsis "Perfect hash function generator")
  39. (description
  40. "gperf is a perfect hash function generator. For a given list of
  41. strings, it produces a hash function and hash table in C or C++ code. That
  42. the hash function is perfect means that no collisions can exist and that
  43. look-ups can be made by single string comparisons.")
  44. (license gpl3+)))
  45. (define-public gperf-3.0
  46. ;; This older version would use 'unsigned int' in its generated lookup
  47. ;; functions whereas 3.1 uses 'size_t', which causes breakage such as
  48. ;; <https://github.com/wingo/elogind/issues/8>.
  49. (package
  50. (inherit gperf)
  51. (version "3.0.4")
  52. (source (origin
  53. (method url-fetch)
  54. (uri (string-append "mirror://gnu/gperf/gperf-"
  55. version ".tar.gz"))
  56. (sha256
  57. (base32
  58. "0gnnm8iqcl52m8iha3sxrzrl9mcyhg7lfrhhqgdn4zj00ji14wbn"))))))