[PATCH 0/2] μCsim: Extract from SDCC into separate package

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Simon South
Owner
unassigned
Submitted by
Simon South
Severity
normal
S
S
Simon South wrote on 14 Dec 2020 18:58
(address . guix-patches@gnu.org)(name . Simon South)(address . simon@simonsouth.net)
cover.1607965706.git.simon@simonsouth.net
Currently the package for SDCC, a C compiler suite for 8-bit microcontrollers,
builds and installs its own copy of μCsim, a collection of microcontroller
simulators.

This patch series adds a separate package for μCsim and removes the bundled
copy from SDCC.

Note that despite the name, "0.6-pre67" does appear to be the latest stable
version; the last "formal" release, 0.5.3, was made in 2004, and 0.6 has
apparently been in a pre-release state for four years now (see

--
Simon South
simon@simonsouth.net


Simon South (2):
gnu: Add μCsim.
gnu: sdcc: Remove bundled μCsim.

gnu/packages/embedded.scm | 43 ++++++++++++++++++++++++++++++++++++++-
gnu/packages/sdcc.scm | 4 +++-
2 files changed, 45 insertions(+), 2 deletions(-)

--
2.29.2
S
S
Simon South wrote on 14 Dec 2020 19:00
[PATCH 1/2] gnu: Add μCsim.
(address . 45240@debbugs.gnu.org)(name . Simon South)(address . simon@simonsouth.net)
dfb193d0a54cc6edf1fcbfbfcb9ccfac33cc44f7.1607965706.git.simon@simonsouth.net
* gnu/packages/embedded.scm (ucsim): New variable.
---
gnu/packages/embedded.scm | 43 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index f2c7ca5f9f..dd48fe317e 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -34,7 +34,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
- #:use-module ((guix build utils) #:select (alist-replace))
+ #:use-module ((guix build utils) #:select (alist-replace delete-file-recursively))
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
@@ -1420,3 +1420,44 @@ handling communication with eBUS devices connected to a 2-wire bus system
(\"energy bus\" used by numerous heating systems).")
(home-page "https://ebusd.eu/")
(license license:gpl3+)))
+
+(define-public ucsim
+ (package
+ (name "ucsim")
+ (version "0.6-pre67")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://mazsola.iit.uni-miskolc.hu/ucsim/download/unix/"
+ "devel/ucsim-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0aahj9pbfjphjrm4hgs9pfmp6d5aikaq4yvxlrvhywjinnnf0qp1"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("--enable-avr-port"
+ "--enable-m6809-port"
+ "--enable-p1516-port"
+ "--enable-st7-port")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-makefiles
+ (lambda _
+ (substitute* (find-files "." "(\\.mk$|\\.in$)")
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-after 'install 'remove-empty-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/man"))
+ #t)))))
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)))
+ (home-page "http://mazsola.iit.uni-miskolc.hu/ucsim/")
+ (synopsis "Simulators for various microcontroller families")
+ (description "μCsim is a collection of software simulators for
+microcontrollers in the Atmel AVR; Intel MCS-51 (8051); Motorola 68HC08 and
+6809; P1516; Padauk PDK13, PDK14 and PDK15; STMicroelectronics ST7 and STM8;
+and Zilog Z80 families, plus many of their variants.")
+ (license license:gpl2+)))
--
2.29.2
S
S
Simon South wrote on 14 Dec 2020 19:00
[PATCH 2/2] gnu: sdcc: Remove bundled μCsi m.
(address . 45240@debbugs.gnu.org)(name . Simon South)(address . simon@simonsouth.net)
8f082461d047b1eb33ebfcd77b1265a56512e005.1607965706.git.simon@simonsouth.net
* gnu/packages/sdcc.scm (sdcc)[source]: Extend snippet to remove bundled μCsim
source.
[arguments]<#:configure-flags>: Replace "--enable-ucsim" with
"--disable-ucsim".
---
gnu/packages/sdcc.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/sdcc.scm b/gnu/packages/sdcc.scm
index aad2cf9e62..0ce71ed955 100644
--- a/gnu/packages/sdcc.scm
+++ b/gnu/packages/sdcc.scm
@@ -46,6 +46,8 @@
'(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)
@@ -58,7 +60,7 @@
(arguments
`(;; gputils is required for PIC ports
#:configure-flags
- '("--disable-pic14-port" "--disable-pic16-port" "--enable-ucsim")
+ '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-makefile
--
2.29.2
L
L
Ludovic Courtès wrote on 21 Dec 2020 17:38
Re: [bug#45240] [PATCH 0/2] μCsim: Extract from SDCC into separate package
(name . Simon South)(address . simon@simonsouth.net)(address . 45240-done@debbugs.gnu.org)
87k0tb5d3j.fsf@gnu.org
Hi Simon,

Simon South <simon@simonsouth.net> skribis:

Toggle quote (12 lines)
> Currently the package for SDCC, a C compiler suite for 8-bit microcontrollers,
> builds and installs its own copy of μCsim, a collection of microcontroller
> simulators.
>
> This patch series adds a separate package for μCsim and removes the bundled
> copy from SDCC.
>
> Note that despite the name, "0.6-pre67" does appear to be the latest stable
> version; the last "formal" release, 0.5.3, was made in 2004, and 0.6 has
> apparently been in a pre-release state for four years now (see
> http://mazsola.iit.uni-miskolc.hu/ucsim/download/unix/).

[...]

Toggle quote (3 lines)
> gnu: Add μCsim.
> gnu: sdcc: Remove bundled μCsim.

Great, I applied both, thanks!

Ludo’.
Closed
?