You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.8 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 David Craven <david@craven.ch>
  3. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages sdcc)
  20. #:use-module (gnu packages bison)
  21. #:use-module (gnu packages boost)
  22. #:use-module (gnu packages flex)
  23. #:use-module (gnu packages python)
  24. #:use-module (gnu packages texinfo)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix download)
  27. #:use-module (guix packages)
  28. #:use-module ((guix licenses) #:prefix license:))
  29. (define-public sdcc
  30. (package
  31. (name "sdcc")
  32. (version "3.7.0")
  33. (source (origin
  34. (method url-fetch)
  35. (uri (string-append
  36. "mirror://sourceforge/sdcc/sdcc"
  37. "/" version "/sdcc-src-" version ".tar.bz2"))
  38. (sha256
  39. (base32
  40. "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5"))))
  41. (build-system gnu-build-system)
  42. (native-inputs
  43. `(("bison" ,bison)
  44. ("boost" ,boost)
  45. ("flex" ,flex)
  46. ("python-2" ,python-2)
  47. ("texinfo" ,texinfo)))
  48. (arguments
  49. `(;; gputils is required for PIC ports
  50. #:configure-flags
  51. '("--disable-pic14-port" "--disable-pic16-port" "--enable-ucsim")
  52. #:phases
  53. (modify-phases %standard-phases
  54. (add-after 'unpack 'patch-makefile
  55. (lambda _
  56. (substitute* (find-files "." "(\\.mk$|\\.in$)")
  57. (("/bin/sh") (which "sh")))
  58. #t)))))
  59. (home-page "http://sdcc.sourceforge.net")
  60. (synopsis "Small devices C compiler")
  61. (description "SDCC is a retargetable, optimizing Standard C compiler suite
  62. that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...),
  63. Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
  64. HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit
  65. 2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8.
  66. Work is in progress on supporting the Microchip PIC16 and PIC18 targets.
  67. It can be retargeted for other microprocessors.")
  68. (license license:gpl2+)))