Subject: [bug#40709] patch: gnu: adds tilibs2 libraries

From: Christopher Howard <[email-masked]>
Date: Sat, 18 Apr 2020 23:43:21 -0800

Patch for tilibs2 libraries is attached. These are dependencies of
tiemu, a program that emulates Texas Instrument calculators, which I
hope to be packaging soon.

And yes, somebody with sufficient guile-foo could reduce a few lines
I'm sure by stuffing the repeated source object into a variable. I
don't have time for code golf but feel free to make the adjustment
yourself.

Guix lint gives no errors except that the source archive is not in the
software heritage database. I don't know how to fix that.

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social: https://gnusocial.club/librehacker
gpg: ADDEAADE5D607C8D (keys.gnupg.net)
From 240dfe7d4ddb67a4839be7a49b3b418dcfb533fd Mon Sep 17 00:00:00 2001
From: Christopher Howard <[email-masked]>
Date: Sat, 18 Apr 2020 23:31:04 -0800
Subject: [PATCH] gnu: adds tilibs2 libraries

- libticables2
- libticonv
- libtifiles
- libticalcs2
---
 gnu/packages/emulators.scm | 165 +++++++++++++++++++++++++++++++++++++
 1 file changed, 165 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 58d6c73ee2..2c707b7105 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2019 Pierre Neidhardt <[email-masked]>
 ;;; Copyright © 2019 David Wilson <[email-masked]>
 ;;; Copyright © 2020 Jakub Kądziołka <[email-masked]>
+;;; Copyright © 2020 Christopher Howard <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,7 +40,9 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages backup)
@@ -1622,3 +1625,165 @@ derived from Gens.  Project goals include clean source code, combined features
 from various forks of Gens, and improved platform portability.")
     (supported-systems '("i686-linux" "x86_64-linux"))
     (license license:gpl2+)))
+
+(define-public libticables2
+  (package
+    (name "libticables2")
+    (version "1.3.5")
+    (source (origin
+              (method url-fetch)
+              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
+              (sha256
+               (base32
+                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--enable-libusb10")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "tar" "xvkf" source)
+             (invoke "tar" "xvkf"
+                     (string-append "tilibs2/libticables2-"
+                                    ,version ".tar.bz2"))
+             (chdir (string-append "libticables2-" ,version))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("autogen" ,autogen)
+       ("automake" ,automake)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("libusb" ,libusb)))
+    (synopsis "Link cable library for TI calculators:
+A part of the TiLP project")
+    (description
+     "This project aims to develop a multi-platform linking program for
+use with all TI graphing calculators (TI73 to V200PLT).")
+    (home-page "http://lpg.ticalc.org/prj_tilp/")
+    (license license:gpl2+)))
+
+(define-public libticonv
+  (package
+    (name "libticonv")
+    (version "1.1.5")
+    (source (origin
+              (method url-fetch)
+              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
+              (sha256
+               (base32
+                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; build fails with out --enable-iconv (...?)
+     `(#:configure-flags (list "--enable-iconv")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "tar" "xvkf" source)
+             (invoke "tar" "xvkf"
+                     (string-append "tilibs2/libticonv-"
+                                    ,version ".tar.bz2"))
+             (chdir (string-append "libticonv-" ,version))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)))
+    (synopsis "Character conversion library for TI calculators:
+A part of the TiLP project")
+    (description
+     "This project aims to develop a multi-platform linking program for
+use with all TI graphing calculators (TI73 to V200PLT).")
+    (home-page "http://lpg.ticalc.org/prj_tilp/")
+    (license license:gpl2+)))
+
+(define-public libtifiles2
+  (package
+    (name "libtifiles2")
+    (version "1.1.7")
+    (source (origin
+              (method url-fetch)
+              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
+              (sha256
+               (base32
+                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "tar" "xvkf" source)
+             (invoke "tar" "xvkf"
+                     (string-append "tilibs2/libtifiles2-"
+                                    ,version ".tar.bz2"))
+             (chdir (string-append "libtifiles2-" ,version))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("libarchive" ,libarchive)
+       ("libticonv" ,libticonv)))
+    (synopsis "File functions library for TI calculators:
+A part of the TiLP project")
+    (description
+     "This project aims to develop a multi-platform linking program for
+use with all TI graphing calculators (TI73 to V200PLT).")
+    (home-page "http://lpg.ticalc.org/prj_tilp/")
+    (license license:gpl2+)))
+
+(define-public libticalcs2
+  (package
+    (name "libticalcs2")
+    (version "1.1.9")
+    (source (origin
+              (method url-fetch)
+              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
+              (sha256
+               (base32
+                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "tar" "xvkf" source)
+             (invoke "tar" "xvkf"
+                     (string-append "tilibs2/libticalcs2-"
+                                    ,version ".tar.bz2"))
+             (chdir (string-append "libticalcs2-" ,version))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("libarchive" ,libarchive)
+       ("libticables2" ,libticables2)
+       ("libticonv" ,libticonv)
+       ("libtifiles2" ,libtifiles2)))
+    (synopsis "Support library for TI calculators:
+A part of the TiLP project")
+    (description
+     "This project aims to develop a multi-platform linking program for
+use with all TI graphing calculators (TI73 to V200PLT).")
+    (home-page "http://lpg.ticalc.org/prj_tilp/")
+    (license license:gpl2+)))
-- 
2.26.0