gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / sdcc.scm
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
20 (define-module (gnu packages sdcc)
21 #:use-module (gnu packages bison)
22 #:use-module (gnu packages boost)
23 #:use-module (gnu packages flex)
24 #:use-module (gnu packages python)
25 #:use-module (gnu packages texinfo)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix download)
28 #:use-module (guix packages)
29 #:use-module ((guix licenses) #:prefix license:))
30
31 (define-public sdcc
32 (package
33 (name "sdcc")
34 (version "3.7.0")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append
38 "mirror://sourceforge/sdcc/sdcc"
39 "/" version "/sdcc-src-" version ".tar.bz2"))
40 (sha256
41 (base32
42 "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5"))))
43 (build-system gnu-build-system)
44 (native-inputs
45 `(("bison" ,bison)
46 ("boost" ,boost)
47 ("flex" ,flex)
48 ("python-2" ,python-2)
49 ("texinfo" ,texinfo)))
50 (arguments
51 `(;; gputils is required for PIC ports
52 #:configure-flags
53 '("--disable-pic14-port" "--disable-pic16-port" "--enable-ucsim")
54 #:phases
55 (modify-phases %standard-phases
56 (add-after 'unpack 'patch-makefile
57 (lambda _
58 (substitute* (find-files "." "(\\.mk$|\\.in$)")
59 (("/bin/sh") (which "sh")))
60 #t)))))
61 (home-page "http://sdcc.sourceforge.net")
62 (synopsis "Small devices C compiler")
63 (description "SDCC is a retargetable, optimizing Standard C compiler suite
64 that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...),
65 Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
66 HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit
67 2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8.
68 Work is in progress on supporting the Microchip PIC16 and PIC18 targets.
69 It can be retargeted for other microprocessors.")
70 (license license:gpl2+)))