Commit | Line | Data |
---|---|---|
4a219a1a | 1 | ;;; GNU Guix --- Functional package management for GNU |
9b1bf330 | 2 | ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
c9a46555 | 3 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
de0c3141 | 4 | ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> |
e5a2edeb | 5 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
50fe318c | 6 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
3c8ba11a | 7 | ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> |
4a219a1a LC |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
1ffa7090 | 24 | (define-module (gnu packages tcl) |
4a219a1a LC |
25 | #:use-module (guix packages) |
26 | #:use-module (guix download) | |
27 | #:use-module (guix build-system gnu) | |
de0c3141 | 28 | #:use-module (guix build-system perl) |
f5ea273a | 29 | #:use-module (gnu packages) |
e55354b8 | 30 | #:use-module (gnu packages image) |
c3aeac38 | 31 | #:use-module (gnu packages fontutils) |
de0c3141 EB |
32 | #:use-module (gnu packages perl) |
33 | #:use-module (gnu packages pkg-config) | |
511539ae | 34 | #:use-module (gnu packages xml) |
765904ce | 35 | #:use-module (gnu packages xorg) |
4a219a1a LC |
36 | #:use-module (guix licenses)) |
37 | ||
38 | (define-public tcl | |
39 | (package | |
40 | (name "tcl") | |
9f19f3a0 | 41 | (version "8.6.6") |
f8e7fdc4 LC |
42 | (source (origin |
43 | (method url-fetch) | |
44 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
45 | version "/tcl" version "-src.tar.gz")) | |
46 | (sha256 | |
47 | (base32 | |
9f19f3a0 | 48 | "01zypqhy57wvh1ikk28bg733sk5kf4q568pq9v6fvcz4h6bl0rd2")) |
fc1adab1 | 49 | (patches (search-patches "tcl-mkindex-deterministic.patch")))) |
4a219a1a LC |
50 | (build-system gnu-build-system) |
51 | (arguments | |
52 | '(#:phases (alist-cons-before | |
53 | 'configure 'pre-configure | |
54 | (lambda _ | |
55 | (chdir "unix")) | |
56 | (alist-cons-after | |
57 | 'install 'install-private-headers | |
3465eb03 | 58 | (lambda* (#:key outputs #:allow-other-keys) |
4a219a1a | 59 | ;; Private headers are needed by Expect. |
3465eb03 LC |
60 | (and (zero? (system* "make" |
61 | "install-private-headers")) | |
62 | (let ((bin (string-append (assoc-ref outputs "out") | |
63 | "/bin"))) | |
64 | ;; Create a tclsh -> tclsh8.6 symlink. | |
65 | ;; Programs such as Ghostscript rely on it. | |
66 | (with-directory-excursion bin | |
67 | (symlink (car (find-files "." "tclsh")) | |
68 | "tclsh"))))) | |
4a219a1a | 69 | %standard-phases)) |
eb6d676e | 70 | |
c9a46555 MW |
71 | ;; By default, man pages are put in PREFIX/man, but we want them in |
72 | ;; PREFIX/share/man. The 'validate-documentation-location' phase is | |
73 | ;; not able to fix this up because the default install populates both | |
74 | ;; PREFIX/man and PREFIX/share/man. | |
75 | #:configure-flags (list (string-append "--mandir=" | |
76 | (assoc-ref %outputs "out") | |
77 | "/share/man")) | |
78 | ||
eb6d676e LC |
79 | ;; XXX: There are a few test failures (related to HTTP, most |
80 | ;; likely related to name resolution), but that doesn't cause | |
81 | ;; `make' to fail. | |
82 | #:test-target "test")) | |
4a219a1a LC |
83 | (home-page "http://www.tcl.tk/") |
84 | (synopsis "The Tcl scripting language") | |
85 | (description "The Tcl (Tool Command Language) scripting language.") | |
e4c38581 | 86 | (license tcl/tk))) |
4a219a1a LC |
87 | |
88 | ||
89 | (define-public expect | |
90 | (package | |
91 | (name "expect") | |
8e9b3c66 | 92 | (version "5.45.3") |
4a219a1a LC |
93 | (source |
94 | (origin | |
95 | (method url-fetch) | |
96 | (uri (string-append "mirror://sourceforge/expect/Expect/" | |
97 | version "/expect" version ".tar.gz")) | |
98 | (sha256 | |
99 | (base32 | |
8e9b3c66 | 100 | "1s9ba7m0bmg6brn4x030y2xg7hqara1fr4hlrrllm54mf5xp2865")))) |
4a219a1a LC |
101 | (build-system gnu-build-system) |
102 | (inputs | |
103 | `(;; TODO: Add these optional dependencies. | |
104 | ;; ("libX11" ,libX11) | |
105 | ;; ("xproto" ,xproto) | |
106 | ;; ("tk" ,tk) | |
107 | ("tcl" ,tcl))) | |
108 | (arguments | |
109 | '(#:configure-flags | |
988cecfd MW |
110 | (let ((out (assoc-ref %outputs "out")) |
111 | (tcl (assoc-ref %build-inputs "tcl"))) | |
112 | (list (string-append "--with-tcl=" tcl "/lib") | |
113 | (string-append "--with-tclinclude=" tcl "/include") | |
114 | (string-append "--exec-prefix=" out) | |
115 | (string-append "--mandir=" out "/share/man"))) | |
eb6d676e | 116 | |
dc1d3cde KK |
117 | #:phases |
118 | (modify-phases %standard-phases | |
119 | (add-before 'configure 'set-path-to-stty | |
120 | (lambda _ | |
121 | (substitute* "configure" | |
122 | (("STTY_BIN=/bin/stty") | |
123 | (string-append "STTY_BIN=" (which "stty")))) | |
124 | #t))) | |
d5529a91 | 125 | |
eb6d676e | 126 | #:test-target "test")) |
ad549242 | 127 | (home-page "http://expect.sourceforge.net/") |
9e771e3b | 128 | (synopsis "Tool for automating interactive applications") |
4a219a1a LC |
129 | (description |
130 | "Expect is a tool for automating interactive applications such as | |
131 | telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this | |
35b9e423 EB |
132 | stuff trivial. Expect is also useful for testing these same |
133 | applications. And by adding Tk, you can wrap interactive applications in | |
4a219a1a LC |
134 | X11 GUIs.") |
135 | (license public-domain))) ; as written in `license.terms' | |
765904ce LC |
136 | |
137 | (define-public tk | |
138 | (package | |
139 | (name "tk") | |
539108e1 | 140 | (version "8.6.6") |
765904ce LC |
141 | (source (origin |
142 | (method url-fetch) | |
143 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
144 | version "/tk" version "-src.tar.gz")) | |
145 | (sha256 | |
146 | (base32 | |
539108e1 | 147 | "17diivcfcwdhp4v5zi6j9nkxncccjqkivhp363c4wx5lf4d3fb6n")) |
fc1adab1 | 148 | (patches (search-patches "tk-find-library.patch")))) |
765904ce LC |
149 | (build-system gnu-build-system) |
150 | (arguments | |
c3aeac38 LC |
151 | '(#:phases (modify-phases %standard-phases |
152 | (add-before | |
153 | 'configure 'pre-configure | |
154 | (lambda _ | |
155 | (chdir "unix"))) | |
156 | (add-after | |
157 | 'install 'add-fontconfig-flag | |
158 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
159 | ;; Add the missing -L flag for Fontconfig in 'tk.pc' and | |
160 | ;; 'tkConfig.sh'. | |
161 | (let ((out (assoc-ref outputs "out")) | |
162 | (fontconfig (assoc-ref inputs "fontconfig"))) | |
163 | (substitute* (find-files out | |
164 | "^(tkConfig\\.sh|tk\\.pc)$") | |
165 | (("-lfontconfig") | |
166 | (string-append "-L" fontconfig | |
167 | "/lib -lfontconfig"))) | |
168 | #t)))) | |
765904ce LC |
169 | |
170 | #:configure-flags (list (string-append "--with-tcl=" | |
171 | (assoc-ref %build-inputs "tcl") | |
172 | "/lib")) | |
173 | ||
174 | ;; The tests require a running X server, so we just skip them. | |
175 | #:tests? #f)) | |
8a0263f1 SB |
176 | (native-inputs `(("pkg-config" ,pkg-config))) |
177 | (inputs `(("libxft" ,libxft) | |
c3aeac38 | 178 | ("fontconfig" ,fontconfig) |
8a0263f1 | 179 | ("tcl" ,tcl))) |
765904ce LC |
180 | ;; tk.h refers to X11 headers, hence the propagation. |
181 | (propagated-inputs `(("libx11" ,libx11) | |
182 | ("libxext" ,libxext))) | |
183 | ||
184 | (home-page "http://www.tcl.tk/") | |
185 | (synopsis "Graphical user interface toolkit for Tcl") | |
186 | (description | |
cb150ca3 LC |
187 | "Tk is a graphical toolkit for building graphical user |
188 | interfaces (GUIs) in the Tcl language.") | |
765904ce | 189 | (license (package-license tcl)))) |
de0c3141 EB |
190 | |
191 | (define-public perl-tk | |
192 | (package | |
193 | (name "perl-tk") | |
b1c699c4 | 194 | (version "804.034") |
de0c3141 EB |
195 | (source (origin |
196 | (method url-fetch) | |
197 | (uri (string-append | |
198 | "mirror://cpan/authors/id/S/SR/SREZIC/Tk-" | |
199 | version ".tar.gz")) | |
200 | (sha256 | |
201 | (base32 | |
b1c699c4 | 202 | "1qiz55dmw7hm1wgpjdzf2jffwcj0hisr3kf80qi8lli3qx2b39py")))) |
de0c3141 EB |
203 | (build-system perl-build-system) |
204 | (native-inputs `(("pkg-config" ,pkg-config))) | |
205 | (inputs `(("libx11" ,libx11) | |
206 | ("libpng" ,libpng) | |
207 | ("libjpeg" ,libjpeg))) | |
208 | (arguments | |
209 | `(#:make-maker-flags `(,(string-append | |
cb150ca3 LC |
210 | "X11=" (assoc-ref %build-inputs "libx11"))) |
211 | ||
212 | ;; Fails to build in parallel: <http://bugs.gnu.org/18262>. | |
213 | #:parallel-build? #f)) | |
de0c3141 EB |
214 | (synopsis "Graphical user interface toolkit for Perl") |
215 | (description | |
216 | "Tk is a Graphical User Interface ToolKit.") | |
217 | (home-page (string-append "http://search.cpan.org/~srezic/Tk-" version)) | |
218 | ;; From the package README: "... you can redistribute it and/or modify it | |
219 | ;; under the same terms as Perl itself, with the exception of all the | |
220 | ;; files in the pTk sub-directory which have separate terms derived from | |
221 | ;; those of the orignal Tix4.1.3 or Tk8.4.* sources. See the files | |
222 | ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for | |
223 | ;; details of this license." | |
2f3108ad | 224 | (license perl-license))) |
50fe318c JN |
225 | |
226 | (define-public tcllib | |
227 | (package | |
228 | (name "tcllib") | |
229 | (version "1.18") | |
230 | (source (origin | |
231 | (method url-fetch) | |
de67e922 LF |
232 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
233 | version "/" name "-" version ".tar.gz")) | |
50fe318c JN |
234 | (sha256 |
235 | (base32 | |
236 | "05dmrk9qsryah2n17z6z85dj9l9lfyvnsd7faw0p9bs1pp5pwrkj")))) | |
237 | (build-system gnu-build-system) | |
238 | (native-inputs | |
239 | `(("tcl" ,tcl))) | |
240 | (native-search-paths | |
241 | (list (search-path-specification | |
242 | (variable "TCLLIBPATH") | |
243 | (separator " ") | |
244 | (files (list (string-append "lib/tcllib" version)))))) | |
245 | (home-page "https://core.tcl.tk/tcllib/home") | |
246 | (synopsis "Standard Tcl Library") | |
247 | (description "Tcllib, the standard Tcl library, is a collection of common | |
248 | utility functions and modules all written in high-level Tcl.") | |
249 | (license (package-license tcl)))) | |
511539ae | 250 | |
1966481f DM |
251 | (define-public tklib |
252 | (package | |
253 | (name "tklib") | |
254 | (version "0.6") | |
255 | (source (origin | |
256 | (method url-fetch) | |
257 | (uri (string-append "https://core.tcl.tk/tklib/tarball/tklib-" | |
258 | version ".tar.gz?uuid=tklib-0-6")) | |
259 | (sha256 | |
260 | (base32 | |
261 | "03y0bzgwbh7nnyqkh8n00bbkq2fyblq39s3bdb6mawna0bbn0wwg")))) | |
262 | (build-system gnu-build-system) | |
263 | (native-inputs | |
264 | `(("tcl" ,tcl))) | |
265 | (propagated-inputs | |
266 | `(("tcllib" ,tcllib) | |
267 | ("tk" ,tk))) ; for "wish" | |
268 | (native-search-paths | |
269 | (list (search-path-specification | |
270 | (variable "TCLLIBPATH") | |
271 | (separator " ") | |
272 | (files (list (string-append "lib/tklib" version)))))) | |
273 | (home-page "https://www.tcl.tk/software/tklib/") | |
274 | (synopsis "Tk utility modules for Tcl") | |
275 | (description "Tklib is a collection of common utility functions and | |
276 | modules for Tk, all written in high-level Tcl. Examples of provided widgets: | |
277 | @enumerate | |
278 | @item @code{chatwidget} | |
279 | @item @code{datefield} | |
958be7a4 | 280 | @item @code{tooltip} |
1966481f DM |
281 | @item @code{cursor} |
282 | @item @code{ipentry} | |
283 | @item @code{tablelist} | |
284 | @item @code{history} | |
285 | @item @code{tkpiechart} | |
286 | @item @code{ico} | |
287 | @item @code{crosshair} | |
288 | @item @code{ntext} | |
289 | @item @code{plotchart} | |
290 | @item @code{ctext} | |
291 | @item @code{autosscroll} | |
292 | @item @code{canvas} | |
eb52d637 | 293 | @end enumerate") |
1966481f DM |
294 | (license (package-license tcl)))) |
295 | ||
511539ae JN |
296 | (define-public tclxml |
297 | (package | |
298 | (name "tclxml") | |
299 | (version "3.2") | |
300 | (source (origin | |
301 | (method url-fetch) | |
de67e922 LF |
302 | (uri (string-append "mirror://sourceforge/" name "/TclXML/" |
303 | version "/" name "-" version ".tar.gz")) | |
511539ae JN |
304 | (sha256 |
305 | (base32 | |
306 | "0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl")) | |
fc1adab1 | 307 | (patches (search-patches "tclxml-3.2-install.patch")))) |
511539ae JN |
308 | (build-system gnu-build-system) |
309 | (native-inputs | |
310 | `(("tcl" ,tcl) | |
511539ae JN |
311 | ("libxml2" ,libxml2) |
312 | ("libxslt" ,libxslt))) | |
bc01c891 DM |
313 | (propagated-inputs |
314 | `(("tcllib" ,tcllib))) ; uri | |
511539ae JN |
315 | (native-search-paths |
316 | (list (search-path-specification | |
317 | (variable "TCLLIBPATH") | |
318 | (separator " ") | |
319 | (files (list (string-append "lib/Tclxml" version)))))) | |
320 | (arguments | |
321 | `(#:configure-flags | |
322 | (list (string-append "--exec-prefix=" (assoc-ref %outputs "out")) | |
323 | (string-append "--with-tclconfig=" | |
324 | (assoc-ref %build-inputs "tcl") "/lib") | |
325 | (string-append "--with-xml2-config=" | |
326 | (assoc-ref %build-inputs "libxml2") | |
327 | "/bin/xml2-config") | |
328 | (string-append "--with-xslt-config=" | |
329 | (assoc-ref %build-inputs "libxslt") | |
330 | "/bin/xslt-config")) | |
331 | #:test-target "test")) | |
332 | (home-page "http://tclxml.sourceforge.net/") | |
333 | (synopsis "Tcl library for XML parsing") | |
334 | (description "TclXML provides event-based parsing of XML documents. The | |
335 | application may register callback scripts for certain document features, and | |
336 | when the parser encounters those features while parsing the document the | |
337 | callback is evaluated.") | |
338 | (license (non-copyleft | |
339 | "file://LICENCE" | |
340 | "See LICENCE in the distribution.")))) | |
0ef83ec9 KK |
341 | |
342 | (define-public tclx | |
343 | (package | |
344 | (name "tclx") | |
345 | (version "8.4.1") | |
346 | (source (origin | |
347 | (method url-fetch) | |
348 | (uri (string-append "mirror://sourceforge/tclx/TclX/" | |
349 | version "/tclx" version ".tar.bz2")) | |
350 | (sha256 | |
351 | (base32 | |
352 | "1v2qwzzidz0is58fd1p7wfdbscxm3ip2wlbqkj5jdhf6drh1zd59")))) | |
353 | (build-system gnu-build-system) | |
354 | (arguments | |
355 | '(#:tests? #f ; a test named profile.test segfaults | |
356 | #:configure-flags (list (string-append "--with-tcl=" | |
357 | (assoc-ref %build-inputs "tcl") | |
358 | "/lib") | |
359 | (string-append "--libdir=" | |
360 | (assoc-ref %outputs "out") | |
361 | "/lib")))) | |
362 | (inputs | |
363 | `(("tcl" ,tcl) | |
364 | ("tk" ,tk))) | |
365 | (home-page "http://tclx.sourceforge.net/") | |
366 | (synopsis "System programming extensions for Tcl") | |
367 | (description | |
368 | "Extended Tcl is oriented towards system programming tasks and large | |
369 | application development. TclX provides additional interfaces to the operating | |
370 | system, and adds many new programming constructs, text manipulation tools, and | |
371 | debugging tools.") | |
372 | (license tcl/tk))) |