summary refs log tree commit diff
path: root/gnu/packages/embedded.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-10-10 17:32:24 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2019-10-10 17:32:24 +0200
commit4d14902b9402a83db444d8d6818d0a4f438ce8c4 (patch)
tree85f05a0540ebcd4a1f192096c36271a287eb9fe8 /gnu/packages/embedded.scm
parent647cfcf68184e8558fcea751ef6d95b6e5d86ae1 (diff)
parent6c50e1dc0625f89884cff40b22627091efa37708 (diff)
downloadguix-4d14902b9402a83db444d8d6818d0a4f438ce8c4.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/embedded.scm')
-rw-r--r--gnu/packages/embedded.scm107
1 files changed, 64 insertions, 43 deletions
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 1e4c4a0da8..429eac37c5 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -875,30 +875,31 @@ the Raspberry Pi chip.")
       (description "This package provides @code{gcc} for VideoCore IV,
 the Raspberry Pi chip."))))
 
-(define-public python2-libmpsse
+(define-public python-libmpsse
   (package
-    (name "python2-libmpsse")
-    (version "1.3")
+    (name "python-libmpsse")
+    (version "1.4")
     (source
       (origin
-        (method url-fetch)
-        (uri (string-append "https://storage.googleapis.com/"
-                            "google-code-archive-downloads/v2/"
-                            "code.google.com/libmpsse/"
-                            "libmpsse-" version ".tar.gz"))
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/daym/libmpsse.git")
+              (commit (string-append "v" version))))
+        (file-name "libmpsse-checkout")
         (sha256
           (base32
-            "0jq7nhqq3na8675jnpfcar3pd3dp3adhhc4lw900swkla01a1wh8"))))
+            "14f1kiiia4kfd9mzwx4h63aa8bpz9aknbrrr7mychnsp3arw0z25"))))
     (build-system gnu-build-system)
     (inputs
      `(("libftdi" ,libftdi)
-       ("python" ,python-2)))
+       ("python" ,python)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("swig" ,swig)
        ("which" ,base:which)))
     (arguments
      `(#:tests? #f ; No tests exist.
+       #:parallel-build? #f  ; Would be buggy.
        #:make-flags
        (list (string-append "CFLAGS=-Wall -fPIC -fno-strict-aliasing -g -O2 "
                             "$(shell pkg-config --cflags libftdi1)"))
@@ -906,28 +907,20 @@ the Raspberry Pi chip."))))
        (modify-phases %standard-phases
          (add-after 'unpack 'set-environment-up
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (chdir "src")
-             (setenv "PYDEV" (string-append (assoc-ref inputs "python")
-                             "/include/python2.7"))
-             #t))
-         (add-after 'unpack 'patch-global-variable
-           (lambda _
-             ;; fast_rw_buf was defined in a header file which was making
-             ;; the build not reproducible.
-             (substitute* "src/fast.c"
-               (("^int fast_build_block_buffer") "
-
-unsigned char fast_rw_buf[SPI_RW_SIZE + CMD_SIZE];
-int fast_build_block_buffer"))
-             (substitute* "src/mpsse.h"
-               (("unsigned char fast_rw_buf.*") "
-"))
-             #t))
+             (let ((python (assoc-ref inputs "python")))
+               (chdir "src")
+               (setenv "PYDEV" (string-append python
+                               "/include/python"
+                               ,(version-major+minor (package-version python))
+                               "m"))
+               #t)))
          (replace 'install
-           (lambda* (#:key outputs make-flags #:allow-other-keys #:rest args)
+           (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
              (let* ((out (assoc-ref outputs "out"))
                     (out-python (string-append out
-                                               "/lib/python2.7/site-packages"))
+                                               "/lib/python"
+                                               ,(version-major+minor (package-version python))
+                                               "/site-packages"))
                     (install (assoc-ref %standard-phases 'install)))
                (install #:make-flags (cons (string-append "PYLIB=" out-python)
                                            make-flags))))))))
@@ -938,6 +931,36 @@ MPSSE (Multi-Protocol Synchronous Serial Engine) adapter by FTDI that can do
 SPI, I2C, JTAG.")
     (license license:gpl2+)))
 
+(define-public python2-libmpsse
+  (package
+    (inherit python-libmpsse)
+    (name "python2-libmpsse")
+    (arguments
+     (substitute-keyword-arguments (package-arguments python-libmpsse)
+      ((#:phases phases)
+       `(modify-phases ,phases
+         (replace 'set-environment-up
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((python (assoc-ref inputs "python")))
+               (chdir "src")
+               (setenv "PYDEV" (string-append python
+                               "/include/python"
+                               ,(version-major+minor (package-version python-2))))
+               #t)))
+         (replace 'install
+           (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
+             (let* ((out (assoc-ref outputs "out"))
+                    (out-python (string-append out
+                                               "/lib/python"
+                                               ,(version-major+minor (package-version python-2))
+                                               "/site-packages"))
+                    (install (assoc-ref %standard-phases 'install)))
+               (install #:make-flags (cons (string-append "PYLIB=" out-python)
+                                           make-flags)))))))))
+    (inputs
+     (alist-replace "python" (list python-2)
+                    (package-inputs python-libmpsse)))))
+
 (define-public picprog
   (package
     (name "picprog")
@@ -978,14 +1001,14 @@ SPI, I2C, JTAG.")
 (define-public fc-host-tools
   (package
     (name "fc-host-tools")
-    (version "10")
+    (version "11")
     (source (origin
               (method url-fetch)
               (uri (string-append "ftp://ftp.freecalypso.org/pub/GSM/"
                                   "FreeCalypso/fc-host-tools-r" version ".tar.bz2"))
               (sha256
                (base32
-                "0ybjqkz1cpnxni66p3valv1bva39vpwzdcc4040lqzx6py9h7h8b"))))
+                "0s87lp6gd8i8ivrdd7mnnalysr65035nambcm992rgla7sk76sj1"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; No tests exist.
@@ -994,12 +1017,7 @@ SPI, I2C, JTAG.")
              (string-append "INCLUDE_INSTALL_DIR=" %output "include/rvinterf"))
        #:phases
        (modify-phases %standard-phases
-         (delete 'configure)
-         (add-after 'unpack 'handle-tarbomb
-           (lambda _
-             (chdir "..") ; url-fetch/tarbomb doesn't work for some reason.
-             #t))
-         (add-after 'handle-tarbomb 'patch-installation-paths
+         (add-after 'unpack 'patch-installation-paths
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* '("Makefile"
                             "rvinterf/etmsync/fsiomain.c"
@@ -1016,13 +1034,16 @@ SPI, I2C, JTAG.")
                 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
                (("\\$\\{INSTALL_PREFIX\\}/loadtools")
                 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
+               (("\\$\\{INSTALL_PREFIX\\}/target-bin")
+                (string-append (assoc-ref outputs "out") "/lib/freecalypso/target-bin"))
                (("/opt/freecalypso")
                 (assoc-ref outputs "out")))
-             #t)))))
+             #t))
+         (delete 'configure))))
     (inputs
      `(("libx11" ,libx11)))
     (synopsis "Freecalypso host tools")
-    (description "This package provides some tools for debugging Freecalypso phones.
+    (description "This package provides some tools for debugging FreeCalypso phones and the FreeCalypso FCDEV3B dev board.
 
 @enumerate
 @item fc-e1decode: Decodes a binary Melody E1 file into an ASCII source file.
@@ -1097,10 +1118,10 @@ feeding melodies to be played to it.
 that can be issued through the RVTMUX (debug trace) serial channel.
 This program is our test mode shell for sending Test Mode commands to targets
 and displaying decoded target responses.
-@item fcup-smsend Send a short message via SMS
-@item fcup-smsendmult Send multiple short messages via SMS in one go
-@item fcup-smsendpdu Send multiple short messages given in PDU format via SMS
-@item sms-pdu-decode Decode PDU format messages
+@item fcup-smsend: Send a short message via SMS
+@item fcup-smsendmult: Send multiple short messages via SMS in one go
+@item fcup-smsendpdu: Send multiple short messages given in PDU format via SMS
+@item sms-pdu-decode: Decode PDU format messages
 @end enumerate")
     (home-page "https://www.freecalypso.org/")
     (license license:public-domain)))