From c626e281b4c7b522da6962bc045fe6372b18ac10 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 14 Dec 2020 13:06:44 -0500 Subject: gnu: sdcc: Move to embedded.scm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/embedded.scm: Add sdcc from sdcc.scm. * gnu/packages/electronics.scm: Update #:use-module directive. * gnu/packages/sdcc.scm: Delete file. * gnu/local.mk: Remove it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/electronics.scm | 4 +-- gnu/packages/embedded.scm | 51 ++++++++++++++++++++++++++++ gnu/packages/sdcc.scm | 80 -------------------------------------------- 4 files changed, 53 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/sdcc.scm diff --git a/gnu/local.mk b/gnu/local.mk index 541fb596f3..e649594017 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -495,7 +495,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/screen.scm \ %D%/packages/scribus.scm \ %D%/packages/scsi.scm \ - %D%/packages/sdcc.scm \ %D%/packages/sdl.scm \ %D%/packages/search.scm \ %D%/packages/security-token.scm \ diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 3f9ca33ede..01796bb91c 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -32,6 +32,7 @@ (define-module (gnu packages electronics) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) + #:use-module (gnu packages embedded) #:use-module (gnu packages gawk) #:use-module (gnu packages glib) #:use-module (gnu packages graphviz) @@ -39,8 +40,7 @@ (define-module (gnu packages electronics) #:use-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages qt) - #:use-module (gnu packages sdcc)) + #:use-module (gnu packages qt)) (define-public libserialport (package diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index dd48fe317e..2d822cecf3 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -40,6 +40,7 @@ (define-module (gnu packages embedded) #:use-module (gnu packages autotools) #:use-module ((gnu packages base) #:prefix base:) #:use-module (gnu packages bison) + #:use-module (gnu packages boost) #:use-module (gnu packages cross-base) #:use-module (gnu packages dejagnu) #:use-module (gnu packages flex) @@ -1461,3 +1462,53 @@ (define-public ucsim 6809; P1516; Padauk PDK13, PDK14 and PDK15; STMicroelectronics ST7 and STM8; and Zilog Z80 families, plus many of their variants.") (license license:gpl2+))) + +(define-public sdcc + (package + (name "sdcc") + (version "3.7.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/sdcc/sdcc" + "/" version "/sdcc-src-" version ".tar.bz2")) + (sha256 + (base32 + "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove non-free source files + (delete-file-recursively "device/non-free") + ;; Remove bundled μCsim source + (delete-file-recursively "sim") + #t)) + (patches (search-patches "sdcc-disable-non-free-code.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("boost" ,boost) + ("flex" ,flex) + ("python-2" ,python-2) + ("texinfo" ,texinfo))) + (arguments + `(;; gputils is required for PIC ports + #:configure-flags + '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-makefile + (lambda _ + (substitute* (find-files "." "(\\.mk$|\\.in$)") + (("/bin/sh") (which "sh"))) + #t))))) + (home-page "http://sdcc.sourceforge.net") + (synopsis "Small devices C compiler") + (description "SDCC is a retargetable, optimizing Standard C compiler suite +that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...), +Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) +HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit +2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. +Work is in progress on supporting the Microchip PIC16 and PIC18 targets. +It can be retargeted for other microprocessors.") + (license license:gpl2+))) diff --git a/gnu/packages/sdcc.scm b/gnu/packages/sdcc.scm deleted file mode 100644 index 0ce71ed955..0000000000 --- a/gnu/packages/sdcc.scm +++ /dev/null @@ -1,80 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 David Craven -;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu packages sdcc) - #:use-module (gnu packages) - #:use-module (gnu packages bison) - #:use-module (gnu packages boost) - #:use-module (gnu packages flex) - #:use-module (gnu packages python) - #:use-module (gnu packages texinfo) - #:use-module (guix build-system gnu) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module ((guix licenses) #:prefix license:)) - -(define-public sdcc - (package - (name "sdcc") - (version "3.7.0") - (source (origin - (method url-fetch) - (uri (string-append - "mirror://sourceforge/sdcc/sdcc" - "/" version "/sdcc-src-" version ".tar.bz2")) - (sha256 - (base32 - "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Remove non-free source files - (delete-file-recursively "device/non-free") - ;; Remove bundled μCsim source - (delete-file-recursively "sim") - #t)) - (patches (search-patches "sdcc-disable-non-free-code.patch")))) - (build-system gnu-build-system) - (native-inputs - `(("bison" ,bison) - ("boost" ,boost) - ("flex" ,flex) - ("python-2" ,python-2) - ("texinfo" ,texinfo))) - (arguments - `(;; gputils is required for PIC ports - #:configure-flags - '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-makefile - (lambda _ - (substitute* (find-files "." "(\\.mk$|\\.in$)") - (("/bin/sh") (which "sh"))) - #t))))) - (home-page "http://sdcc.sourceforge.net") - (synopsis "Small devices C compiler") - (description "SDCC is a retargetable, optimizing Standard C compiler suite -that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...), -Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) -HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit -2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. -Work is in progress on supporting the Microchip PIC16 and PIC18 targets. -It can be retargeted for other microprocessors.") - (license license:gpl2+))) -- cgit v1.2.3