guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: tcl: Add missing -L flag in tk.pc and tkConfig.sh.


From: Ludovic Courtès
Subject: 02/02: gnu: tcl: Add missing -L flag in tk.pc and tkConfig.sh.
Date: Thu, 24 Sep 2015 21:01:45 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit c3aeac385aba64996c8470975fea853030d1cc3a
Author: Ludovic Courtès <address@hidden>
Date:   Thu Sep 24 23:00:02 2015 +0200

    gnu: tcl: Add missing -L flag in tk.pc and tkConfig.sh.
    
    * gnu/packages/tcl.scm (tk)[arguments]: Use 'modify-phases'.  Add
      'add-fontconfig-flag' phase.
      [inputs]: Add FONTCONFIG.
---
 gnu/packages/tcl.scm |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 7bcc59e..5b55ccc 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -25,6 +25,7 @@
   #:use-module (guix build-system perl)
   #:use-module (gnu packages)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xorg)
@@ -142,11 +143,24 @@ X11 GUIs.")
                "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-cons-before
-                 'configure 'pre-configure
-                 (lambda _
-                   (chdir "unix"))
-                 %standard-phases)
+     '(#:phases (modify-phases %standard-phases
+                  (add-before
+                   'configure 'pre-configure
+                   (lambda _
+                     (chdir "unix")))
+                  (add-after
+                   'install 'add-fontconfig-flag
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                     ;; Add the missing -L flag for Fontconfig in 'tk.pc' and
+                     ;; 'tkConfig.sh'.
+                     (let ((out        (assoc-ref outputs "out"))
+                           (fontconfig (assoc-ref inputs "fontconfig")))
+                       (substitute* (find-files out
+                                                "^(tkConfig\\.sh|tk\\.pc)$")
+                         (("-lfontconfig")
+                          (string-append "-L" fontconfig
+                                         "/lib -lfontconfig")))
+                       #t))))
 
        #:configure-flags (list (string-append "--with-tcl="
                                               (assoc-ref %build-inputs "tcl")
@@ -156,6 +170,7 @@ X11 GUIs.")
        #:tests? #f))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("libxft" ,libxft)
+              ("fontconfig" ,fontconfig)
               ("tcl" ,tcl)))
     ;; tk.h refers to X11 headers, hence the propagation.
     (propagated-inputs `(("libx11" ,libx11)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]