From 39da44c2c0f78730a08bd9803bd681209124b78f Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Thu, 22 Nov 2018 01:49:06 -0800 Subject: [PATCH] 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 --- 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 59fbd6906b..e66f089cf8 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Jelle Licht ;;; Copyright © 2018 Fis Trivial +;;; Copyright © 2018 Nam Nguyen ;;; ;;; 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 + ;; . + ;; 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)