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> |
4a219a1a LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
1ffa7090 | 21 | (define-module (gnu packages tcl) |
4a219a1a LC |
22 | #:use-module (guix packages) |
23 | #:use-module (guix download) | |
24 | #:use-module (guix build-system gnu) | |
de0c3141 | 25 | #:use-module (guix build-system perl) |
f5ea273a | 26 | #:use-module (gnu packages) |
e55354b8 | 27 | #:use-module (gnu packages image) |
de0c3141 EB |
28 | #:use-module (gnu packages perl) |
29 | #:use-module (gnu packages pkg-config) | |
765904ce | 30 | #:use-module (gnu packages xorg) |
4a219a1a LC |
31 | #:use-module (guix licenses)) |
32 | ||
33 | (define-public tcl | |
34 | (package | |
35 | (name "tcl") | |
36 | (version "8.6.0") | |
37 | (source | |
38 | (origin | |
39 | (method url-fetch) | |
40 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
41 | version "/tcl" version "-src.tar.gz")) | |
42 | (sha256 | |
43 | (base32 | |
44 | "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m")))) | |
45 | (build-system gnu-build-system) | |
46 | (arguments | |
47 | '(#:phases (alist-cons-before | |
48 | 'configure 'pre-configure | |
49 | (lambda _ | |
50 | (chdir "unix")) | |
51 | (alist-cons-after | |
52 | 'install 'install-private-headers | |
3465eb03 | 53 | (lambda* (#:key outputs #:allow-other-keys) |
4a219a1a | 54 | ;; Private headers are needed by Expect. |
3465eb03 LC |
55 | (and (zero? (system* "make" |
56 | "install-private-headers")) | |
57 | (let ((bin (string-append (assoc-ref outputs "out") | |
58 | "/bin"))) | |
59 | ;; Create a tclsh -> tclsh8.6 symlink. | |
60 | ;; Programs such as Ghostscript rely on it. | |
61 | (with-directory-excursion bin | |
62 | (symlink (car (find-files "." "tclsh")) | |
63 | "tclsh"))))) | |
4a219a1a | 64 | %standard-phases)) |
eb6d676e | 65 | |
c9a46555 MW |
66 | ;; By default, man pages are put in PREFIX/man, but we want them in |
67 | ;; PREFIX/share/man. The 'validate-documentation-location' phase is | |
68 | ;; not able to fix this up because the default install populates both | |
69 | ;; PREFIX/man and PREFIX/share/man. | |
70 | #:configure-flags (list (string-append "--mandir=" | |
71 | (assoc-ref %outputs "out") | |
72 | "/share/man")) | |
73 | ||
eb6d676e LC |
74 | ;; XXX: There are a few test failures (related to HTTP, most |
75 | ;; likely related to name resolution), but that doesn't cause | |
76 | ;; `make' to fail. | |
77 | #:test-target "test")) | |
4a219a1a LC |
78 | (home-page "http://www.tcl.tk/") |
79 | (synopsis "The Tcl scripting language") | |
80 | (description "The Tcl (Tool Command Language) scripting language.") | |
166191b3 | 81 | (license (non-copyleft "http://www.tcl.tk/software/tcltk/license.html" |
4a219a1a LC |
82 | "Tcl/Tk license")))) |
83 | ||
84 | ||
85 | (define-public expect | |
86 | (package | |
87 | (name "expect") | |
88 | (version "5.45") | |
89 | (source | |
90 | (origin | |
91 | (method url-fetch) | |
92 | (uri (string-append "mirror://sourceforge/expect/Expect/" | |
93 | version "/expect" version ".tar.gz")) | |
94 | (sha256 | |
95 | (base32 | |
96 | "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj")))) | |
97 | (build-system gnu-build-system) | |
98 | (inputs | |
99 | `(;; TODO: Add these optional dependencies. | |
100 | ;; ("libX11" ,libX11) | |
101 | ;; ("xproto" ,xproto) | |
102 | ;; ("tk" ,tk) | |
103 | ("tcl" ,tcl))) | |
104 | (arguments | |
105 | '(#:configure-flags | |
988cecfd MW |
106 | (let ((out (assoc-ref %outputs "out")) |
107 | (tcl (assoc-ref %build-inputs "tcl"))) | |
108 | (list (string-append "--with-tcl=" tcl "/lib") | |
109 | (string-append "--with-tclinclude=" tcl "/include") | |
110 | (string-append "--exec-prefix=" out) | |
111 | (string-append "--mandir=" out "/share/man"))) | |
eb6d676e | 112 | |
d5529a91 LC |
113 | #:phases (alist-cons-before |
114 | 'configure 'set-path-to-stty | |
115 | (lambda _ | |
116 | (substitute* "configure" | |
117 | (("STTY_BIN=/bin/stty") | |
118 | (string-append "STTY_BIN=" (which "stty"))))) | |
119 | %standard-phases) | |
120 | ||
eb6d676e | 121 | #:test-target "test")) |
4a219a1a | 122 | (home-page "http://expect.nist.gov/") |
9e771e3b | 123 | (synopsis "Tool for automating interactive applications") |
4a219a1a LC |
124 | (description |
125 | "Expect is a tool for automating interactive applications such as | |
126 | telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this | |
35b9e423 EB |
127 | stuff trivial. Expect is also useful for testing these same |
128 | applications. And by adding Tk, you can wrap interactive applications in | |
4a219a1a LC |
129 | X11 GUIs.") |
130 | (license public-domain))) ; as written in `license.terms' | |
765904ce LC |
131 | |
132 | (define-public tk | |
133 | (package | |
134 | (name "tk") | |
135 | (version "8.6.0") | |
136 | (source (origin | |
137 | (method url-fetch) | |
138 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | |
139 | version "/tk" version "-src.tar.gz")) | |
140 | (sha256 | |
141 | (base32 | |
142 | "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w")))) | |
143 | (build-system gnu-build-system) | |
144 | (arguments | |
145 | '(#:phases (alist-cons-before | |
146 | 'configure 'pre-configure | |
147 | (lambda _ | |
148 | (chdir "unix")) | |
149 | %standard-phases) | |
150 | ||
151 | #:configure-flags (list (string-append "--with-tcl=" | |
152 | (assoc-ref %build-inputs "tcl") | |
153 | "/lib")) | |
154 | ||
155 | ;; The tests require a running X server, so we just skip them. | |
156 | #:tests? #f)) | |
8a0263f1 SB |
157 | (native-inputs `(("pkg-config" ,pkg-config))) |
158 | (inputs `(("libxft" ,libxft) | |
159 | ("tcl" ,tcl))) | |
765904ce LC |
160 | ;; tk.h refers to X11 headers, hence the propagation. |
161 | (propagated-inputs `(("libx11" ,libx11) | |
162 | ("libxext" ,libxext))) | |
163 | ||
164 | (home-page "http://www.tcl.tk/") | |
165 | (synopsis "Graphical user interface toolkit for Tcl") | |
166 | (description | |
cb150ca3 LC |
167 | "Tk is a graphical toolkit for building graphical user |
168 | interfaces (GUIs) in the Tcl language.") | |
765904ce | 169 | (license (package-license tcl)))) |
de0c3141 EB |
170 | |
171 | (define-public perl-tk | |
172 | (package | |
173 | (name "perl-tk") | |
174 | (version "804.032") | |
175 | (source (origin | |
176 | (method url-fetch) | |
177 | (uri (string-append | |
178 | "mirror://cpan/authors/id/S/SR/SREZIC/Tk-" | |
179 | version ".tar.gz")) | |
180 | (sha256 | |
181 | (base32 | |
f5ea273a EB |
182 | "0jarvplhfvnm0shhdm2a5zczlnk9mkf8jvfjiwyhjrr3cy1gl0w0")) |
183 | (patches (list (search-patch "perl-tk-x11-discover.patch"))))) | |
de0c3141 EB |
184 | (build-system perl-build-system) |
185 | (native-inputs `(("pkg-config" ,pkg-config))) | |
186 | (inputs `(("libx11" ,libx11) | |
187 | ("libpng" ,libpng) | |
188 | ("libjpeg" ,libjpeg))) | |
189 | (arguments | |
190 | `(#:make-maker-flags `(,(string-append | |
cb150ca3 LC |
191 | "X11=" (assoc-ref %build-inputs "libx11"))) |
192 | ||
193 | ;; Fails to build in parallel: <http://bugs.gnu.org/18262>. | |
194 | #:parallel-build? #f)) | |
de0c3141 EB |
195 | (synopsis "Graphical user interface toolkit for Perl") |
196 | (description | |
197 | "Tk is a Graphical User Interface ToolKit.") | |
198 | (home-page (string-append "http://search.cpan.org/~srezic/Tk-" version)) | |
199 | ;; From the package README: "... you can redistribute it and/or modify it | |
200 | ;; under the same terms as Perl itself, with the exception of all the | |
201 | ;; files in the pTk sub-directory which have separate terms derived from | |
202 | ;; those of the orignal Tix4.1.3 or Tk8.4.* sources. See the files | |
203 | ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for | |
204 | ;; details of this license." | |
205 | (license (package-license perl)))) |