guix-commits
[Top][All Lists]
Advanced

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

02/05: gnu: libtorrent-rasterbar: Compile Python bindings in C++11 mode.


From: guix-commits
Subject: 02/05: gnu: libtorrent-rasterbar: Compile Python bindings in C++11 mode.
Date: Fri, 23 Nov 2018 19:53:08 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 39da44c2c0f78730a08bd9803bd681209124b78f
Author: Nam Nguyen <address@hidden>
Date:   Thu Nov 22 01:49:06 2018 -0800

    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 <address@hidden>
---
 gnu/packages/bittorrent.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 59fbd69..e66f089 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <address@hidden>
 ;;; Copyright © 2017 Jelle Licht <address@hidden>
 ;;; Copyright © 2018 Fis Trivial <address@hidden>
+;;; Copyright © 2018 Nam Nguyen <address@hidden>
 ;;;
 ;;; 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)



reply via email to

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