summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorNam Nguyen <namn@berkeley.edu>2018-11-22 01:49:06 -0800
committerMarius Bakke <mbakke@fastmail.com>2018-11-24 01:50:43 +0100
commit39da44c2c0f78730a08bd9803bd681209124b78f (patch)
treeece610bcc5e8f015ed3ac43575814c2d1126d14f /gnu
parent8afe166dd7e8baf710a92f0c6e295e66bb44e606 (diff)
downloadguix-39da44c2c0f78730a08bd9803bd681209124b78f.tar.gz
gnu: libtorrent-rasterbar: Compile Python bindings in C++11 mode.
* gnu/packages/bittorrent.scm (libtorrent-rasterbar)[arguments]: Add phase to
  substitute setup.py.

Co-authored-by: Marius Bakke <mbakke@fastmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bittorrent.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 59fbd6906b..e66f089cf8 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
+;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -393,7 +394,18 @@ and will take advantage of multiple processor cores where possible.")
              "CXXFLAGS=-std=c++11")     ; Use std::chrono instead of boost
        #:make-flags (list
                      (string-append "LDFLAGS=-Wl,-rpath="
-                                    (assoc-ref %outputs "out") "/lib"))))
+                                    (assoc-ref %outputs "out") "/lib"))
+       #:phases (modify-phases %standard-phases
+           (add-after 'unpack 'compile-python-c++11
+             (lambda _
+               ;; Make sure the Python bindings are compiled in C++ mode to
+               ;; avoid undefined references as mentioned in
+               ;; <https://github.com/qbittorrent/qBittorrent/issues/638>.
+               ;; XXX: This can be removed for 1.2+.
+               (substitute* "bindings/python/setup.py"
+                 (("\\+ target_specific\\(\\)\\,")
+                  "+ target_specific() + ['-std=c++11'],"))
+               #t)))))
     (inputs `(("boost" ,boost)
               ("openssl" ,openssl)))
     (native-inputs `(("python" ,python-2)