aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/boost.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-11-16 09:34:27 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-11-16 09:34:27 +0100
commit154d97abdd16674fdebc763351f661bbcdc869a4 (patch)
tree0277a9380edd1390f16e432283d32499ffed36d1 /gnu/packages/boost.scm
parente4696c69d75f4fcf54c42beeb928032726bdaf7d (diff)
parent87e7faa2ae641d8302efc8b90f1e45f43f67f6da (diff)
downloadpatches-154d97abdd16674fdebc763351f661bbcdc869a4.tar
patches-154d97abdd16674fdebc763351f661bbcdc869a4.tar.gz
Merge remote-tracking branch master into core-updates
Diffstat (limited to 'gnu/packages/boost.scm')
-rw-r--r--gnu/packages/boost.scm50
1 files changed, 50 insertions, 0 deletions
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 4e1e68204f..1d241ac6ff 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -161,6 +162,55 @@ across a broad spectrum of applications.")
(license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"
"Some components have other similar licences."))))
+;; TODO: Merge with 'Boost' in the next rebuild cycle.
+(define-public boost-with-python3
+ (package
+ (inherit boost)
+ (name "boost-python3")
+ (native-inputs
+ `(("perl" ,perl)
+ ("python" ,python)
+ ("tcsh" ,tcsh)))
+ (arguments (substitute-keyword-arguments (package-arguments boost)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((icu (assoc-ref inputs "icu4c"))
+ (python (assoc-ref inputs "python"))
+ (out (assoc-ref outputs "out")))
+ (substitute* '("libs/config/configure"
+ "libs/spirit/classic/phoenix/test/runtest.sh"
+ "tools/build/src/engine/execunix.c"
+ "tools/build/src/engine/Jambase"
+ "tools/build/src/engine/jambase.c")
+ (("/bin/sh") (which "sh")))
+
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+
+ (substitute* "tools/build/src/tools/python.jam"
+ (("include/python\\$\\(version\\)")
+ "include/python$(version)m"))
+
+ (invoke "./bootstrap.sh"
+ (string-append "--prefix=" out)
+ ;; Auto-detection looks for dependencies only
+ ;; in traditional install locations.
+ (string-append "--with-icu=" icu)
+ (string-append "--with-python=" python "/bin/python3")
+ (string-append "--with-python-root=" python)
+ "--with-python-version=3.7"
+ "--with-toolset=gcc"))))
+ (replace 'provide-libboost_python
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (with-directory-excursion (string-append out "/lib")
+ (symlink "libboost_python37.so" "libboost_python.so")
+ ;; Some packages also look for libboost_python3.so
+ (symlink "libboost_python37.so" "libboost_python3.so"))
+ #t)))))))))
+
(define-public boost-for-mysql
;; Older version for MySQL 5.7.23.
(package