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