ti-calc-tools.scm 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
  2. ;;;
  3. ;;; This program is free software; you can redistribute it and/or modify it
  4. ;;; under the terms of the GNU General Public License as published by
  5. ;;; the Free Software Foundation; either version 3 of the License, or (at
  6. ;;; your option) any later version.
  7. ;;;
  8. ;;; This program is distributed in the hope that it will be useful, but
  9. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ;;; GNU General Public License for more details.
  12. ;;;
  13. ;;; You should have received a copy of the GNU General Public License
  14. ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. (define-module (ti-calc-tools)
  16. #:use-module (guix packages)
  17. #:use-module (gnu packages)
  18. #:use-module ((guix licenses) #:prefix license:)
  19. #:use-module (guix download)
  20. #:use-module (guix gexp)
  21. #:use-module (guix utils)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages autotools)
  24. #:use-module (gnu packages backup)
  25. #:use-module (gnu packages compression)
  26. #:use-module (gnu packages gettext)
  27. #:use-module (gnu packages glib)
  28. #:use-module (gnu packages gnome)
  29. #:use-module (gnu packages gtk)
  30. #:use-module (gnu packages libusb)
  31. #:use-module (gnu packages multiprecision)
  32. #:use-module (gnu packages nettle)
  33. #:use-module (gnu packages pkg-config)
  34. #:use-module (gnu packages python)
  35. #:use-module (gnu packages tls))
  36. (define %patch-dir
  37. (string-append (if (current-filename)
  38. (dirname (current-filename))
  39. ".")
  40. "/patches"))
  41. (define tilp-version "1.18")
  42. (define-public libticables
  43. (package
  44. (name "libticables")
  45. (version "1.3.5")
  46. (source (origin
  47. (method url-fetch)
  48. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  49. "tilp2-" tilp-version "/"
  50. name "2-" version ".tar.bz2"))
  51. (sha256
  52. (base32
  53. "08j5di0cgix9vcpdv7b8xhxdjkk9zz7fqfnv3l4apk3jdr8vcvqc"))))
  54. (build-system gnu-build-system)
  55. (propagated-inputs
  56. ;; Located in Requires.private of ticables2.pc.
  57. `(("glib" ,glib)))
  58. (native-inputs
  59. `(("autoconf" ,autoconf)
  60. ("automake" ,automake)
  61. ("gettext" ,gettext-minimal)
  62. ("libtool" ,libtool)
  63. ("pkg-config" ,pkg-config)))
  64. (inputs
  65. `(("libusb" ,libusb)))
  66. (arguments
  67. `(#:configure-flags '("--enable-libusb10") ; Build against libusb 1.0.
  68. #:phases
  69. (modify-phases %standard-phases
  70. (add-after 'install 'install-documentation
  71. (lambda* (#:key outputs #:allow-other-keys)
  72. (let* ((out (assoc-ref outputs "out"))
  73. (doc (string-append out "/share/doc/"
  74. ,name "-" ,version)))
  75. (for-each (lambda (file)
  76. (install-file file doc))
  77. (find-files "docs/html")))
  78. #t)))))
  79. (home-page "http://lpg.ticalc.org/prj_tilp/")
  80. (synopsis "TI link cable library")
  81. (description
  82. "@code{libticables} is a library providing support for operations on Texas
  83. Instruments calculators' link cables. All link cables are supported
  84. read/write.")
  85. (license license:gpl2+)))
  86. (define-public libticonv
  87. (package
  88. (name "libticonv")
  89. (version "1.1.5")
  90. (source (origin
  91. (method url-fetch)
  92. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  93. "tilp2-" tilp-version "/"
  94. name "-" version ".tar.bz2"))
  95. (sha256
  96. (base32
  97. "0y080v12bm81wgjm6fnw7q0yg7scphm8hhrls9njcszj7fkscv9i"))))
  98. (build-system gnu-build-system)
  99. (propagated-inputs
  100. ;; Located in Requires.private of ticonv.pc.
  101. `(("glib" ,glib)))
  102. (native-inputs
  103. `(("autoconf" ,autoconf)
  104. ("automake" ,automake)
  105. ("libtool" ,libtool)
  106. ("pkg-config" ,pkg-config)))
  107. (arguments
  108. `(#:configure-flags '("--enable-iconv")
  109. #:phases
  110. (modify-phases %standard-phases
  111. (add-after 'install 'install-documentation
  112. (lambda* (#:key outputs #:allow-other-keys)
  113. (let* ((out (assoc-ref outputs "out"))
  114. (doc (string-append out "/share/doc/"
  115. ,name "-" ,version)))
  116. (substitute* "docs/html/info.html"
  117. (("\\.\\./charsets/") "")
  118. (("<a href=\"\\.\\./charsets\">folder</a>") "folder"))
  119. (for-each (lambda (file)
  120. (install-file file doc))
  121. (append (find-files "docs/charsets")
  122. (find-files "docs/html"))))
  123. #t)))))
  124. (home-page "http://lpg.ticalc.org/prj_tilp/")
  125. (synopsis "TI character set conversion library")
  126. (description
  127. "@code{libticonv} is a library providing support for operations on Texas
  128. Instruments calculators' charsets. All charsets for all calculators are
  129. supported; the library is also able to convert from/to UTF-8/UTF-16.")
  130. (license license:gpl2+)))
  131. (define-public libtifiles
  132. (package
  133. (name "libtifiles")
  134. (version "1.1.7")
  135. (source (origin
  136. (method url-fetch)
  137. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  138. "tilp2-" tilp-version "/"
  139. name "2-" version ".tar.bz2"))
  140. (sha256
  141. (base32
  142. "10n9mhlabmaw3ha5ckllxfy6fygs2pmlmj5v6w5v62bvx54kpils"))))
  143. (build-system gnu-build-system)
  144. (propagated-inputs
  145. ;; Located in Requires.private of tifiles2.pc.
  146. `(("libarchive" ,libarchive)
  147. ("libticonv" ,libticonv)
  148. ;; Nettle and zlib just seem to be needed by everything that depends on
  149. ;; libtifiles.
  150. ("nettle" ,nettle)
  151. ("zlib" ,zlib)))
  152. (native-inputs
  153. `(("autoconf" ,autoconf)
  154. ("automake" ,automake)
  155. ("gettext" ,gettext-minimal)
  156. ("libtool" ,libtool)
  157. ("pkg-config" ,pkg-config)))
  158. (arguments
  159. `(#:phases
  160. (modify-phases %standard-phases
  161. (add-after 'install 'install-documentation
  162. (lambda* (#:key outputs #:allow-other-keys)
  163. (let* ((out (assoc-ref outputs "out"))
  164. (doc (string-append out "/share/doc/"
  165. ,name "-" ,version)))
  166. (for-each (lambda (file)
  167. (install-file file doc))
  168. (find-files "docs/html")))
  169. #t)))))
  170. (home-page "http://lpg.ticalc.org/prj_tilp/")
  171. (synopsis "TI file format library")
  172. (description
  173. "@code{libtifiles} is a library providing support for operations on Texas
  174. Instruments calculators' files. All formats for all calculators are supported
  175. read/write; the library is also able to manipulate the group files, which means
  176. it is able to group and ungroup variables into such group files.")
  177. (license license:gpl2+)))
  178. (define-public libticalcs
  179. (package
  180. (name "libticalcs")
  181. (version "1.1.9")
  182. (source (origin
  183. (method url-fetch)
  184. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  185. "tilp2-" tilp-version "/"
  186. name "2-" version ".tar.bz2"))
  187. (sha256
  188. (base32
  189. "08c9wgrdnyqcs45mx1bjb8riqq81bzfkhgaijxzn96rhpj40fy3n"))))
  190. (build-system gnu-build-system)
  191. (propagated-inputs
  192. ;; Located in Requires or Requires.private of ticalcs2.pc.
  193. `(("libticables" ,libticables)
  194. ("libtifiles" ,libtifiles)))
  195. (native-inputs
  196. `(("autoconf" ,autoconf)
  197. ("automake" ,automake)
  198. ("gettext" ,gettext-minimal)
  199. ("libtool" ,libtool)
  200. ("pkg-config" ,pkg-config)))
  201. (arguments
  202. `(#:phases
  203. (modify-phases %standard-phases
  204. (add-after 'install 'install-documentation
  205. (lambda* (#:key outputs #:allow-other-keys)
  206. (let* ((out (assoc-ref outputs "out"))
  207. (doc (string-append out "/share/doc/"
  208. ,name "-" ,version)))
  209. (for-each (lambda (file)
  210. (install-file file doc))
  211. (cons "docs/romdump.txt" (find-files "docs/html"))))
  212. #t)))))
  213. (home-page "http://lpg.ticalc.org/prj_tilp/")
  214. (synopsis "TI calculator communication library")
  215. (description
  216. "@code{libticalcs} is a library providing support for communication with
  217. Texas Instruments calculators. It implements the TI protocol for each type of
  218. calculator, independently of the link cable used to establish the link. All
  219. graphing calculators from Texas Instruments are supported.")
  220. (license license:gpl2+)))
  221. (define-public gfm
  222. (package
  223. (name "gfm")
  224. (version "1.08")
  225. (source (origin
  226. (method url-fetch)
  227. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  228. "tilp2-" tilp-version "/"
  229. name "-" version ".tar.bz2"))
  230. (sha256
  231. (base32
  232. "0zq1a9mm54zr18dz2mqh79w1a126xwqz6dcrpjlbd1pnmg01l0q9"))
  233. (patches
  234. (list
  235. (local-file
  236. (string-append %patch-dir
  237. "/gfm-remove-broken-kde-support.patch"))))))
  238. (build-system gnu-build-system)
  239. (native-inputs
  240. `(("autoconf" ,autoconf)
  241. ("automake" ,automake)
  242. ("gettext" ,gettext-minimal)
  243. ("libtool" ,libtool)
  244. ("pkg-config" ,pkg-config)))
  245. (inputs
  246. `(("libglade" ,libglade)
  247. ("libticalcs" ,libticalcs)))
  248. (home-page "http://lpg.ticalc.org/prj_tilp/")
  249. (synopsis "Group File Manager for TI handhelds")
  250. (description
  251. "The @code{GFM} is an application allowing to manipulate
  252. single/group/tigroup files of all Texas Instruments handhelds. It can create anew file, open an existing file, save a file, rename variables, remove
  253. variables, create folders, group files into a group/tigroup file and ungroup a
  254. group/tigroup file into single files.")
  255. (license license:gpl2+)))
  256. (define-public tilp2
  257. (package
  258. (name "tilp2")
  259. (version tilp-version)
  260. (source (origin
  261. (method url-fetch)
  262. (uri (string-append "mirror://sourceforge/tilp/tilp2-linux/"
  263. "tilp2-" tilp-version "/"
  264. name "-" version ".tar.bz2"))
  265. (sha256
  266. (base32
  267. "0isf73bjwk06baz2gm3vpdh600gqck9ca4aqxzb089dmxriv6fkv"))
  268. (patches
  269. (list
  270. (local-file
  271. (string-append %patch-dir
  272. "/tilp2-remove-broken-kde-support.patch"))))))
  273. (build-system gnu-build-system)
  274. (native-inputs
  275. `(("autoconf" ,autoconf)
  276. ("automake" ,automake)
  277. ("gettext" ,gettext-minimal)
  278. ("intltool" ,intltool)
  279. ("libtool" ,libtool)
  280. ("pkg-config" ,pkg-config)))
  281. (inputs
  282. `(("gfm" ,gfm)
  283. ("gtk" ,gtk+-2)
  284. ("libticalcs" ,libticalcs)))
  285. (home-page "http://lpg.ticalc.org/prj_tilp/")
  286. (synopsis "TI graphing calculator link/transfer program")
  287. (description
  288. "@code{TILP} is a program allowing a computer to communicate with TI
  289. graphing calculators (TI-Z80, TI-68k and Nspire series).")
  290. (license license:gpl2+)))
  291. (define-public tilem
  292. (package
  293. (name "tilem")
  294. (version "2.0")
  295. (source (origin
  296. (method url-fetch)
  297. (uri (string-append "mirror://sourceforge/tilem/tilem/"
  298. name "-" version ".tar.bz2"))
  299. (sha256
  300. (base32
  301. "1ba38xzhp3yf21ip3cgql6jzy49jc34sfnjsl4syxyrd81d269zw"))))
  302. (build-system gnu-build-system)
  303. (native-inputs
  304. `(("pkg-config" ,pkg-config)))
  305. (inputs
  306. `(("gtk" ,gtk+-2)
  307. ("libticalcs" ,libticalcs)))
  308. (arguments
  309. `(#:tests? #f ; no check target
  310. #:configure-flags '("LDFLAGS=-lm")))
  311. (home-page "http://lpg.ticalc.org/prj_tilem/")
  312. (synopsis "TI Z80 calculator emulator")
  313. (description
  314. "@code{TilEm} is an emulator and debugger for Texas Instruments Z80-based
  315. graphing calculators. It can emulate any of the following calculator models:
  316. @enumerate
  317. @item TI-73 / TI-73 Explorer
  318. @item TI-76.fr
  319. @item TI-81
  320. @item TI-82
  321. @item TI-82 STATS / TI-82 STATS.fr
  322. @item TI-83
  323. @item TI-83 Plus / TI-83 Plus Silver Edition / TI-83 Plus.fr
  324. @item TI-84 Plus / TI-84 Plus Silver Edition / TI-84 pocket.fr
  325. @item TI-85
  326. @item TI-86
  327. @end enumerate
  328. TilEm fully supports all known versions of the above calculators (as of 2012),
  329. and attempts to reproduce the behavior of the original calculator hardware as
  330. faithfully as possible.")
  331. (license license:gpl3+)))
  332. (define-public spasm-ng
  333. (package
  334. (name "spasm-ng")
  335. (version "0.5-beta.3")
  336. (source (origin
  337. (method url-fetch)
  338. (uri (string-append "https://github.com/alberthdev/spasm-ng/archive/v"
  339. version ".tar.gz"))
  340. (sha256
  341. (base32
  342. "0sz8nrjbzmqr1m0am8yhaiis0msm6k89nk6lpqpq0m7bgjbminjk"))
  343. (file-name (string-append name "-" version ".tar.gz"))))
  344. (build-system gnu-build-system)
  345. (native-inputs
  346. `(("python" ,python))) ; The test script is written in Python.
  347. (inputs
  348. `(("gmp" ,gmp)
  349. ("openssl" ,openssl)))
  350. (arguments
  351. `(#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
  352. #:phases
  353. (modify-phases %standard-phases
  354. (delete 'configure) ; no configure script
  355. (add-before 'install 'create-bin-dir
  356. (lambda* (#:key outputs #:allow-other-keys)
  357. (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
  358. #t)))))
  359. (home-page "https://github.com/alberthdev/spasm-ng")
  360. (synopsis "z80/eZ80 assembler")
  361. (description
  362. "@code{SPASM-ng} is a z80/eZ80 assembler with extra features to support
  363. development for TI calculators.")
  364. (license license:gpl2+)))