Commit | Line | Data |
---|---|---|
33619c3a DC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 David Craven <david@craven.ch> | |
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 | ||
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 | ||
30 | (define-public sdcc | |
31 | (package | |
32 | (name "sdcc") | |
33 | (version "3.6.0") | |
34 | (source (origin | |
35 | (method url-fetch) | |
36 | (uri (string-append | |
37 | "mirror://sourceforge/sdcc/sdcc" | |
38 | "/" version "/sdcc-src-" version ".tar.bz2")) | |
39 | (sha256 | |
40 | (base32 | |
41 | "0x53gh5yrrfjvlnkk29mjn8hq4v52alrsf7c8nsyzzq13sqwwpg8")))) | |
42 | (build-system gnu-build-system) | |
43 | (native-inputs | |
44 | `(("bison" ,bison) | |
45 | ("boost" ,boost) | |
46 | ("flex" ,flex) | |
47 | ("python-2" ,python-2) | |
48 | ("texinfo" ,texinfo))) | |
49 | (arguments | |
50 | `(;; gputils is required for PIC ports | |
51 | #:configure-flags | |
225d6c04 | 52 | '("--disable-pic14-port" "--disable-pic16-port" "--enable-ucsim") |
33619c3a DC |
53 | #:phases |
54 | (modify-phases %standard-phases | |
55 | (add-after 'unpack 'patch-makefile | |
56 | (lambda _ | |
57 | (substitute* (find-files "." "(\\.mk$|\\.in$)") | |
58 | (("/bin/sh") (which "sh"))) | |
59 | #t))))) | |
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+))) |