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> |
4a219a1a LC |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
1ffa7090 | 23 | (define-module (gnu packages tcl) |
4a219a1a LC |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system gnu) | |
de0c3141 | 27 | #:use-module (guix build-system perl) |
f5ea273a | 28 | #:use-module (gnu packages) |
e55354b8 | 29 | #:use-module (gnu packages image) |
c3aeac38 | 30 | #:use-module (gnu packages fontutils) |
de0c3141 EB |
31 | #:use-module (gnu packages perl) |
32 | #:use-module (gnu packages pkg-config) | |
511539ae | 33 | #:use-module (gnu packages xml) |
765904ce | 34 | #:use-module (gnu packages xorg) |
4a219a1a LC |
35 | #:use-module (guix licenses)) |
36 | ||
37 | (define-public tcl | |
38 | (package | |
39 | (name "tcl") | |
9f19f3a0 | 40 | (version "8.6.6") |
f8e7fdc4 LC |
41 | (source (origin |
42 | (method url-fetch) | |
43 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
44 | version "/tcl" version "-src.tar.gz")) | |
45 | (sha256 | |
46 | (base32 | |
9f19f3a0 | 47 | "01zypqhy57wvh1ikk28bg733sk5kf4q568pq9v6fvcz4h6bl0rd2")) |
fc1adab1 | 48 | (patches (search-patches "tcl-mkindex-deterministic.patch")))) |
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 | |
d5529a91 LC |
116 | #:phases (alist-cons-before |
117 | 'configure 'set-path-to-stty | |
118 | (lambda _ | |
119 | (substitute* "configure" | |
120 | (("STTY_BIN=/bin/stty") | |
121 | (string-append "STTY_BIN=" (which "stty"))))) | |
122 | %standard-phases) | |
123 | ||
eb6d676e | 124 | #:test-target "test")) |
4a219a1a | 125 | (home-page "http://expect.nist.gov/") |
9e771e3b | 126 | (synopsis "Tool for automating interactive applications") |
4a219a1a LC |
127 | (description |
128 | "Expect is a tool for automating interactive applications such as | |
129 | telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this | |
35b9e423 EB |
130 | stuff trivial. Expect is also useful for testing these same |
131 | applications. And by adding Tk, you can wrap interactive applications in | |
4a219a1a LC |
132 | X11 GUIs.") |
133 | (license public-domain))) ; as written in `license.terms' | |
765904ce LC |
134 | |
135 | (define-public tk | |
136 | (package | |
137 | (name "tk") | |
539108e1 | 138 | (version "8.6.6") |
765904ce LC |
139 | (source (origin |
140 | (method url-fetch) | |
141 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
142 | version "/tk" version "-src.tar.gz")) | |
143 | (sha256 | |
144 | (base32 | |
539108e1 | 145 | "17diivcfcwdhp4v5zi6j9nkxncccjqkivhp363c4wx5lf4d3fb6n")) |
fc1adab1 | 146 | (patches (search-patches "tk-find-library.patch")))) |
765904ce LC |
147 | (build-system gnu-build-system) |
148 | (arguments | |
c3aeac38 LC |
149 | '(#:phases (modify-phases %standard-phases |
150 | (add-before | |
151 | 'configure 'pre-configure | |
152 | (lambda _ | |
153 | (chdir "unix"))) | |
154 | (add-after | |
155 | 'install 'add-fontconfig-flag | |
156 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
157 | ;; Add the missing -L flag for Fontconfig in 'tk.pc' and | |
158 | ;; 'tkConfig.sh'. | |
159 | (let ((out (assoc-ref outputs "out")) | |
160 | (fontconfig (assoc-ref inputs "fontconfig"))) | |
161 | (substitute* (find-files out | |
162 | "^(tkConfig\\.sh|tk\\.pc)$") | |
163 | (("-lfontconfig") | |
164 | (string-append "-L" fontconfig | |
165 | "/lib -lfontconfig"))) | |
166 | #t)))) | |
765904ce LC |
167 | |
168 | #:configure-flags (list (string-append "--with-tcl=" | |
169 | (assoc-ref %build-inputs "tcl") | |
170 | "/lib")) | |
171 | ||
172 | ;; The tests require a running X server, so we just skip them. | |
173 | #:tests? #f)) | |
8a0263f1 SB |
174 | (native-inputs `(("pkg-config" ,pkg-config))) |
175 | (inputs `(("libxft" ,libxft) | |
c3aeac38 | 176 | ("fontconfig" ,fontconfig) |
8a0263f1 | 177 | ("tcl" ,tcl))) |
765904ce LC |
178 | ;; tk.h refers to X11 headers, hence the propagation. |
179 | (propagated-inputs `(("libx11" ,libx11) | |
180 | ("libxext" ,libxext))) | |
181 | ||
182 | (home-page "http://www.tcl.tk/") | |
183 | (synopsis "Graphical user interface toolkit for Tcl") | |
184 | (description | |
cb150ca3 LC |
185 | "Tk is a graphical toolkit for building graphical user |
186 | interfaces (GUIs) in the Tcl language.") | |
765904ce | 187 | (license (package-license tcl)))) |
de0c3141 EB |
188 | |
189 | (define-public perl-tk | |
190 | (package | |
191 | (name "perl-tk") | |
e5a2edeb | 192 | (version "804.033") |
de0c3141 EB |
193 | (source (origin |
194 | (method url-fetch) | |
195 | (uri (string-append | |
196 | "mirror://cpan/authors/id/S/SR/SREZIC/Tk-" | |
197 | version ".tar.gz")) | |
198 | (sha256 | |
199 | (base32 | |
e5a2edeb | 200 | "1bc8bacsf95598yimrxijymb3advrgan73pqxj75qmd20ydnwxc4")))) |
de0c3141 EB |
201 | (build-system perl-build-system) |
202 | (native-inputs `(("pkg-config" ,pkg-config))) | |
203 | (inputs `(("libx11" ,libx11) | |
204 | ("libpng" ,libpng) | |
205 | ("libjpeg" ,libjpeg))) | |
206 | (arguments | |
207 | `(#:make-maker-flags `(,(string-append | |
cb150ca3 LC |
208 | "X11=" (assoc-ref %build-inputs "libx11"))) |
209 | ||
210 | ;; Fails to build in parallel: <http://bugs.gnu.org/18262>. | |
211 | #:parallel-build? #f)) | |
de0c3141 EB |
212 | (synopsis "Graphical user interface toolkit for Perl") |
213 | (description | |
214 | "Tk is a Graphical User Interface ToolKit.") | |
215 | (home-page (string-append "http://search.cpan.org/~srezic/Tk-" version)) | |
216 | ;; From the package README: "... you can redistribute it and/or modify it | |
217 | ;; under the same terms as Perl itself, with the exception of all the | |
218 | ;; files in the pTk sub-directory which have separate terms derived from | |
219 | ;; those of the orignal Tix4.1.3 or Tk8.4.* sources. See the files | |
220 | ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for | |
221 | ;; details of this license." | |
222 | (license (package-license perl)))) | |
50fe318c JN |
223 | |
224 | (define-public tcllib | |
225 | (package | |
226 | (name "tcllib") | |
227 | (version "1.18") | |
228 | (source (origin | |
229 | (method url-fetch) | |
de67e922 LF |
230 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
231 | version "/" name "-" version ".tar.gz")) | |
50fe318c JN |
232 | (sha256 |
233 | (base32 | |
234 | "05dmrk9qsryah2n17z6z85dj9l9lfyvnsd7faw0p9bs1pp5pwrkj")))) | |
235 | (build-system gnu-build-system) | |
236 | (native-inputs | |
237 | `(("tcl" ,tcl))) | |
238 | (native-search-paths | |
239 | (list (search-path-specification | |
240 | (variable "TCLLIBPATH") | |
241 | (separator " ") | |
242 | (files (list (string-append "lib/tcllib" version)))))) | |
243 | (home-page "https://core.tcl.tk/tcllib/home") | |
244 | (synopsis "Standard Tcl Library") | |
245 | (description "Tcllib, the standard Tcl library, is a collection of common | |
246 | utility functions and modules all written in high-level Tcl.") | |
247 | (license (package-license tcl)))) | |
511539ae JN |
248 | |
249 | (define-public tclxml | |
250 | (package | |
251 | (name "tclxml") | |
252 | (version "3.2") | |
253 | (source (origin | |
254 | (method url-fetch) | |
de67e922 LF |
255 | (uri (string-append "mirror://sourceforge/" name "/TclXML/" |
256 | version "/" name "-" version ".tar.gz")) | |
511539ae JN |
257 | (sha256 |
258 | (base32 | |
259 | "0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl")) | |
fc1adab1 | 260 | (patches (search-patches "tclxml-3.2-install.patch")))) |
511539ae JN |
261 | (build-system gnu-build-system) |
262 | (native-inputs | |
263 | `(("tcl" ,tcl) | |
264 | ("tcllib" ,tcllib) | |
265 | ("libxml2" ,libxml2) | |
266 | ("libxslt" ,libxslt))) | |
267 | (native-search-paths | |
268 | (list (search-path-specification | |
269 | (variable "TCLLIBPATH") | |
270 | (separator " ") | |
271 | (files (list (string-append "lib/Tclxml" version)))))) | |
272 | (arguments | |
273 | `(#:configure-flags | |
274 | (list (string-append "--exec-prefix=" (assoc-ref %outputs "out")) | |
275 | (string-append "--with-tclconfig=" | |
276 | (assoc-ref %build-inputs "tcl") "/lib") | |
277 | (string-append "--with-xml2-config=" | |
278 | (assoc-ref %build-inputs "libxml2") | |
279 | "/bin/xml2-config") | |
280 | (string-append "--with-xslt-config=" | |
281 | (assoc-ref %build-inputs "libxslt") | |
282 | "/bin/xslt-config")) | |
283 | #:test-target "test")) | |
284 | (home-page "http://tclxml.sourceforge.net/") | |
285 | (synopsis "Tcl library for XML parsing") | |
286 | (description "TclXML provides event-based parsing of XML documents. The | |
287 | application may register callback scripts for certain document features, and | |
288 | when the parser encounters those features while parsing the document the | |
289 | callback is evaluated.") | |
290 | (license (non-copyleft | |
291 | "file://LICENCE" | |
292 | "See LICENCE in the distribution.")))) |