gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / tcl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
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
21 (define-module (gnu packages tcl)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix build-system perl)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages image)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages xorg)
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
53 (lambda* (#:key outputs #:allow-other-keys)
54 ;; Private headers are needed by Expect.
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")))))
64 %standard-phases))
65
66 ;; By default, man pages are put in PREFIX/man,
67 ;; but we want them in PREFIX/share/man.
68 #:configure-flags (list (string-append "--mandir="
69 (assoc-ref %outputs "out")
70 "/share/man"))
71
72 ;; XXX: There are a few test failures (related to HTTP, most
73 ;; likely related to name resolution), but that doesn't cause
74 ;; `make' to fail.
75 #:test-target "test"))
76 (home-page "http://www.tcl.tk/")
77 (synopsis "The Tcl scripting language")
78 (description "The Tcl (Tool Command Language) scripting language.")
79 (license (bsd-style "http://www.tcl.tk/software/tcltk/license.html"
80 "Tcl/Tk license"))))
81
82
83 (define-public expect
84 (package
85 (name "expect")
86 (version "5.45")
87 (source
88 (origin
89 (method url-fetch)
90 (uri (string-append "mirror://sourceforge/expect/Expect/"
91 version "/expect" version ".tar.gz"))
92 (sha256
93 (base32
94 "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj"))))
95 (build-system gnu-build-system)
96 (inputs
97 `(;; TODO: Add these optional dependencies.
98 ;; ("libX11" ,libX11)
99 ;; ("xproto" ,xproto)
100 ;; ("tk" ,tk)
101 ("tcl" ,tcl)))
102 (arguments
103 '(#:configure-flags
104 (let ((out (assoc-ref %outputs "out"))
105 (tcl (assoc-ref %build-inputs "tcl")))
106 (list (string-append "--with-tcl=" tcl "/lib")
107 (string-append "--with-tclinclude=" tcl "/include")
108 (string-append "--exec-prefix=" out)
109 (string-append "--mandir=" out "/share/man")))
110
111 #:phases (alist-cons-before
112 'configure 'set-path-to-stty
113 (lambda _
114 (substitute* "configure"
115 (("STTY_BIN=/bin/stty")
116 (string-append "STTY_BIN=" (which "stty")))))
117 %standard-phases)
118
119 #:test-target "test"))
120 (home-page "http://expect.nist.gov/")
121 (synopsis
122 "A tool for automating interactive applications")
123 (description
124 "Expect is a tool for automating interactive applications such as
125 telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this
126 stuff trivial. Expect is also useful for testing these same
127 applications. And by adding Tk, you can wrap interactive applications in
128 X11 GUIs.")
129 (license public-domain))) ; as written in `license.terms'
130
131 (define-public tk
132 (package
133 (name "tk")
134 (version "8.6.0")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append "mirror://sourceforge/tcl/Tcl/"
138 version "/tk" version "-src.tar.gz"))
139 (sha256
140 (base32
141 "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w"))))
142 (build-system gnu-build-system)
143 (arguments
144 '(#:phases (alist-cons-before
145 'configure 'pre-configure
146 (lambda _
147 (chdir "unix"))
148 %standard-phases)
149
150 #:configure-flags (list (string-append "--with-tcl="
151 (assoc-ref %build-inputs "tcl")
152 "/lib"))
153
154 ;; The tests require a running X server, so we just skip them.
155 #:tests? #f))
156 (inputs `(("tcl" ,tcl)))
157
158 ;; tk.h refers to X11 headers, hence the propagation.
159 (propagated-inputs `(("libx11" ,libx11)
160 ("libxext" ,libxext)))
161
162 (home-page "http://www.tcl.tk/")
163 (synopsis "Graphical user interface toolkit for Tcl")
164 (description
165 "Tk is a graphical toolkit for building graphical user interfaces
166 (GUIs) in the Tcl language.")
167 (license (package-license tcl))))
168
169 (define-public perl-tk
170 (package
171 (name "perl-tk")
172 (version "804.032")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append
176 "mirror://cpan/authors/id/S/SR/SREZIC/Tk-"
177 version ".tar.gz"))
178 (sha256
179 (base32
180 "0jarvplhfvnm0shhdm2a5zczlnk9mkf8jvfjiwyhjrr3cy1gl0w0"))
181 (patches (list (search-patch "perl-tk-x11-discover.patch")))))
182 (build-system perl-build-system)
183 (native-inputs `(("pkg-config" ,pkg-config)))
184 (inputs `(("libx11" ,libx11)
185 ("libpng" ,libpng)
186 ("libjpeg" ,libjpeg)))
187 (arguments
188 `(#:make-maker-flags `(,(string-append
189 "X11=" (assoc-ref %build-inputs "libx11")))))
190 (synopsis "Graphical user interface toolkit for Perl")
191 (description
192 "Tk is a Graphical User Interface ToolKit.")
193 (home-page (string-append "http://search.cpan.org/~srezic/Tk-" version))
194 ;; From the package README: "... you can redistribute it and/or modify it
195 ;; under the same terms as Perl itself, with the exception of all the
196 ;; files in the pTk sub-directory which have separate terms derived from
197 ;; those of the orignal Tix4.1.3 or Tk8.4.* sources. See the files
198 ;; pTk/license.terms, pTk/license.html_lib, and pTk/Tix.license for
199 ;; details of this license."
200 (license (package-license perl))))