summary refs log tree commit diff
path: root/gnu/packages/gtk.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2015-04-20 13:45:43 +0800
committer宋文武 <iyzsong@gmail.com>2015-04-22 09:57:51 +0800
commitb837e658bdab9e68d17fc0b326ff4556ab623a6b (patch)
treeae18381a9cad8d81ebcbf5d1a39a133309244e2c /gnu/packages/gtk.scm
parent45ca81c20da134074718a8450f77b32e3f3491d0 (diff)
downloadguix-b837e658bdab9e68d17fc0b326ff4556ab623a6b.tar.gz
gnu: python-pycairo: Fix build with with python-3.4.3.
* gnu/packages/patches/pycairo-wscript.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/gtk.scm (python-pycairo)[source]: Use it.
  [build-system]: Use waf-build-system.
  [native-inputs]: Add python-waf.
  [arguments]<#:phases>: Use 'modify-phases'.  Add 'patch-waf phase.
* gnu/packages/gtk.scm (python2-pycairo): Adjust accordingly.
Diffstat (limited to 'gnu/packages/gtk.scm')
-rw-r--r--gnu/packages/gtk.scm37
1 files changed, 18 insertions, 19 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index cd54cfc5b9..67838a3752 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -30,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
+  #:use-module (gnu packages)
   #:use-module (gnu packages check)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages compression)
@@ -733,29 +734,23 @@ extensive documentation, including API reference and a tutorial.")
                           version ".tar.bz2"))
       (sha256
        (base32
-        "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))))
-    (build-system python-build-system)
+        "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
+      (patches (list (search-patch "pycairo-wscript.patch")))))
+    (build-system waf-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("python-waf" ,python-waf)))
     (propagated-inputs                  ;pycairo.pc references cairo
      `(("cairo" ,cairo)))
     (arguments
      `(#:tests? #f
-       #:phases (alist-cons-before
-                 'build 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (zero? (system* "./waf" "configure"
-                                   (string-append "--prefix="
-                                                  (assoc-ref outputs "out")))))
-                 (alist-replace
-                  'build
-                  (lambda _
-                    (zero? (system* "./waf" "build")))
-                  (alist-replace
-                   'install
-                   (lambda _
-                     (zero? (system* "./waf" "install")))
-                   %standard-phases)))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'patch-waf
+          (lambda* (#:key inputs #:allow-other-keys)
+            ;; The bundled `waf' doesn't work with python-3.4.x.
+            (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
     (home-page "http://cairographics.org/pycairo/")
     (synopsis "Python bindings for cairo")
     (description
@@ -776,7 +771,11 @@ extensive documentation, including API reference and a tutorial.")
         "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
     (arguments
      `(#:python ,python-2
-       ,@(package-arguments python-pycairo)))
+       ,@(substitute-keyword-arguments (package-arguments python-pycairo)
+           ((#:phases phases)
+            `(alist-delete 'patch-waf ,phases))
+           ((#:native-inputs native-inputs)
+            `(alist-delete "python-waf" ,native-inputs)))))
     ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
     (license (list license:lgpl2.1 license:mpl1.1))))