1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Craven <david@craven.ch>
4 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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:))
37 "mirror://sourceforge/sdcc/sdcc"
38 "/" version "/sdcc-src-" version ".tar.bz2"))
41 "0x53gh5yrrfjvlnkk29mjn8hq4v52alrsf7c8nsyzzq13sqwwpg8"))))
42 (build-system gnu-build-system)
47 ("python-2" ,python-2)
48 ("texinfo" ,texinfo)))
50 `(;; gputils is required for PIC ports
52 '("--disable-pic14-port" "--disable-pic16-port" "--enable-ucsim")
54 (modify-phases %standard-phases
55 (add-after 'unpack 'patch-makefile
57 (substitute* (find-files "." "(\\.mk$|\\.in$)")
58 (("/bin/sh") (which "sh")))
60 (home-page "http://sdcc.sourceforge.net")
61 (synopsis "Small devices C compiler")
62 (description "SDCC is a retargettable, optimizing Standard C compiler suite
63 that targets the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, ...),
64 Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
65 HC08 based (hc08, s08), Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit
66 2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8.
67 Work is in progress on supporting the Microchip PIC16 and PIC18 targets.
68 It can be retargeted for other microprocessors.")
69 (license license:gpl2+)))