mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: boost, boost-static: Consolidate libboost_python phases.
* gnu/packages/boost.scm (boost)[arguments]: Determine library extension based on #:make-flags in 'provide-libboost_python phase. (boost-static)[arguments]: Remove #:phases.
This commit is contained in:
parent
d1e9f626b4
commit
526071290f
1 changed files with 11 additions and 23 deletions
|
@ -173,23 +173,26 @@
|
||||||
#$@(if (%current-target-system)
|
#$@(if (%current-target-system)
|
||||||
#~()
|
#~()
|
||||||
#~((add-after 'install 'provide-libboost_python
|
#~((add-after 'install 'provide-libboost_python
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key make-flags inputs outputs #:allow-other-keys)
|
||||||
(let* ((python-version (python-version
|
(let* ((static? (member "link=static" make-flags))
|
||||||
|
(libext (if static? ".a" ".so"))
|
||||||
|
(python-version (python-version
|
||||||
#+(this-package-native-input
|
#+(this-package-native-input
|
||||||
"python-minimal-wrapper")))
|
"python-minimal-wrapper")))
|
||||||
(libboost_pythonNN.so
|
(libboost_pythonNN
|
||||||
(string-append "libboost_python"
|
(string-append "libboost_python"
|
||||||
(string-join (string-split
|
(string-join (string-split
|
||||||
python-version #\.)
|
python-version #\.)
|
||||||
"")
|
"")
|
||||||
".so")))
|
libext)))
|
||||||
(with-directory-excursion (string-append #$output "/lib")
|
(with-directory-excursion (string-append #$output "/lib")
|
||||||
(symlink libboost_pythonNN.so "libboost_python.so")
|
(symlink libboost_pythonNN
|
||||||
|
(string-append "libboost_python" libext))
|
||||||
;; Some packages only look for the major version.
|
;; Some packages only look for the major version.
|
||||||
(symlink libboost_pythonNN.so
|
(symlink libboost_pythonNN
|
||||||
(string-append "libboost_python"
|
(string-append "libboost_python"
|
||||||
(string-take python-version 1)
|
(string-take python-version 1)
|
||||||
".so")))))))))))
|
libext)))))))))))
|
||||||
|
|
||||||
(home-page "https://www.boost.org")
|
(home-page "https://www.boost.org")
|
||||||
(synopsis "Peer-reviewed portable C++ source libraries")
|
(synopsis "Peer-reviewed portable C++ source libraries")
|
||||||
|
@ -291,22 +294,7 @@ across a broad spectrum of applications.")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments boost)
|
(substitute-keyword-arguments (package-arguments boost)
|
||||||
((#:make-flags flags)
|
((#:make-flags flags)
|
||||||
#~(cons "link=static" (delete "link=shared" #$flags)))
|
#~(cons "link=static" (delete "link=shared" #$flags)))))))
|
||||||
((#:phases phases)
|
|
||||||
#~(modify-phases #$phases
|
|
||||||
(replace 'provide-libboost_python
|
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
(let* ((python-version (python-version
|
|
||||||
#+(this-package-native-input
|
|
||||||
"python-minimal-wrapper")))
|
|
||||||
(libboost_pythonNN.a
|
|
||||||
(string-append "libboost_python"
|
|
||||||
(string-join (string-split
|
|
||||||
python-version #\.)
|
|
||||||
"")
|
|
||||||
".a")))
|
|
||||||
(with-directory-excursion (string-append #$output "/lib")
|
|
||||||
(symlink libboost_pythonNN.a "libboost_python.a")))))))))))
|
|
||||||
|
|
||||||
(define-public boost-for-mysql
|
(define-public boost-for-mysql
|
||||||
;; Older version for MySQL 5.7.23.
|
;; Older version for MySQL 5.7.23.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue