From 5c55c8ec6951864b46f9436f87ae31ff16fe825d Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Wed, 5 Jun 2013 11:54:19 +0000 Subject: [PATCH] gnu: tcl: Avoid a circular dependency. * gnu/packages/tcl.scm: Remove 'tk'. * gnu/packages/tk.scm: Move 'tk' to this file. * gnu/packages/wordnet.scm: Import (gnu packages tk). * Makefile.am (MODULES): Add 'gnu/packages/tk.scm'. --- Makefile.am | 1 + gnu/packages/tcl.scm | 38 --------------------------- gnu/packages/tk.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/packages/wordnet.scm | 3 +- 4 files changed, 66 insertions(+), 39 deletions(-) create mode 100644 gnu/packages/tk.scm diff --git a/Makefile.am b/Makefile.am index 9f106a2..8da4c46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -192,6 +192,7 @@ MODULES = \ gnu/packages/texinfo.scm \ gnu/packages/texlive.scm \ gnu/packages/time.scm \ + gnu/packages/tk.scm \ gnu/packages/tmux.scm \ gnu/packages/tor.scm \ gnu/packages/unrtf.scm \ diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index d025bff..3324d7b 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -20,7 +20,6 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (gnu packages xorg) #:use-module (guix licenses)) (define-public tcl @@ -117,40 +116,3 @@ applications. And by adding Tk, you can wrap interactive applications in X11 GUIs.") (license public-domain))) ; as written in `license.terms' -(define-public tk - (package - (name "tk") - (version "8.6.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/tcl/Tcl/" - version "/tk" version "-src.tar.gz")) - (sha256 - (base32 - "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w")))) - (build-system gnu-build-system) - (arguments - '(#:phases (alist-cons-before - 'configure 'pre-configure - (lambda _ - (chdir "unix")) - %standard-phases) - - #:configure-flags (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") - "/lib")) - - ;; The tests require a running X server, so we just skip them. - #:tests? #f)) - (inputs `(("tcl" ,tcl))) - - ;; tk.h refers to X11 headers, hence the propagation. - (propagated-inputs `(("libx11" ,libx11) - ("libxext" ,libxext))) - - (home-page "http://www.tcl.tk/") - (synopsis "Graphical user interface toolkit for Tcl") - (description - "Tk is a graphical toolkit for building graphical user interfaces -(GUIs) in the Tcl language.") - (license (package-license tcl)))) diff --git a/gnu/packages/tk.scm b/gnu/packages/tk.scm new file mode 100644 index 0000000..446e2cb --- /dev/null +++ b/gnu/packages/tk.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages tk) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages tcl) + #:use-module (gnu packages xorg) + #:use-module (guix licenses)) + +(define-public tk + (package + (name "tk") + (version "8.6.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/tcl/Tcl/" + version "/tk" version "-src.tar.gz")) + (sha256 + (base32 + "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w")))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-cons-before + 'configure 'pre-configure + (lambda _ + (chdir "unix")) + %standard-phases) + + #:configure-flags (list (string-append "--with-tcl=" + (assoc-ref %build-inputs "tcl") + "/lib")) + + ;; The tests require a running X server, so we just skip them. + #:tests? #f)) + (inputs `(("tcl" ,tcl))) + + ;; tk.h refers to X11 headers, hence the propagation. + (propagated-inputs `(("libx11" ,libx11) + ("libxext" ,libxext))) + + (home-page "http://www.tcl.tk/") + (synopsis "Graphical user interface toolkit for Tcl") + (description + "Tk is a graphical toolkit for building graphical user interfaces +(GUIs) in the Tcl language.") + (license (package-license tcl)))) \ No newline at end of file diff --git a/gnu/packages/wordnet.scm b/gnu/packages/wordnet.scm index cb385d4..151ad67 100644 --- a/gnu/packages/wordnet.scm +++ b/gnu/packages/wordnet.scm @@ -21,7 +21,8 @@ #:use-module (guix build-system gnu) #:use-module (guix licenses) #:use-module (guix download) - #:use-module (gnu packages tcl)) + #:use-module (gnu packages tcl) + #:use-module (gnu packages tk)) (define-public wordnet (package -- 1.7.5.4