mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
gnu: Boost: Use #:configure-flags.
* gnu/packages/boost.scm (boost)[arguments]: Add #:configure-flags. Adjust configure phase accordingly. Split out shell patching to separate phase. While at it, remove obsolete GNU/Hurd substitution. (boost-for-mysql)[arguments]: Adjust accordingly.
This commit is contained in:
parent
f12ca428b8
commit
eb32bcea32
1 changed files with 55 additions and 68 deletions
|
@ -99,6 +99,25 @@ (define-public boost
|
||||||
#:modules `(((guix build python-build-system) #:select (python-version))
|
#:modules `(((guix build python-build-system) #:select (python-version))
|
||||||
,@%gnu-build-system-modules)
|
,@%gnu-build-system-modules)
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
|
#:configure-flags
|
||||||
|
#~(let ((icu (dirname (dirname (search-input-file
|
||||||
|
%build-inputs "bin/uconv")))))
|
||||||
|
(list
|
||||||
|
;; Auto-detection looks for ICU only in traditional
|
||||||
|
;; install locations.
|
||||||
|
(string-append "--with-icu=" icu)
|
||||||
|
;; Ditto for Python.
|
||||||
|
#$@(if (%current-target-system)
|
||||||
|
#~()
|
||||||
|
#~((let ((python (dirname (dirname (search-input-file
|
||||||
|
%build-inputs
|
||||||
|
"bin/python")))))
|
||||||
|
(string-append "--with-python-root=" python)
|
||||||
|
(string-append "--with-python=" python
|
||||||
|
"/bin/python")
|
||||||
|
(string-append "--with-python-version="
|
||||||
|
(python-version python)))))
|
||||||
|
"--with-toolset=gcc"))
|
||||||
#:make-flags
|
#:make-flags
|
||||||
#~(list "threading=multi" "link=shared"
|
#~(list "threading=multi" "link=shared"
|
||||||
|
|
||||||
|
@ -124,49 +143,29 @@ (define-public boost
|
||||||
#~()))
|
#~()))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-shells
|
||||||
|
(lambda _
|
||||||
|
(substitute* '("libs/config/configure"
|
||||||
|
"libs/spirit/classic/phoenix/test/runtest.sh"
|
||||||
|
"tools/build/src/engine/execunix.cpp")
|
||||||
|
(("/bin/sh") (which "sh")))))
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key (configure-flags ''()) #:allow-other-keys)
|
||||||
(let ((icu (dirname (dirname (search-input-file
|
(setenv "SHELL" (which "sh"))
|
||||||
inputs "bin/uconv")))))
|
(setenv "CONFIG_SHELL" (which "sh"))
|
||||||
(substitute* '("libs/config/configure"
|
|
||||||
"libs/spirit/classic/phoenix/test/runtest.sh"
|
|
||||||
"tools/build/src/engine/execunix.cpp")
|
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
|
|
||||||
(setenv "SHELL" (which "sh"))
|
#$@(if (%current-target-system)
|
||||||
(setenv "CONFIG_SHELL" (which "sh"))
|
#~((call-with-output-file "user-config.jam"
|
||||||
|
(lambda (port)
|
||||||
|
(format port
|
||||||
|
"using gcc : cross : ~a-c++ ;"
|
||||||
|
#$(%current-target-system)))))
|
||||||
|
#~())
|
||||||
|
|
||||||
#$@(if (%current-target-system)
|
(apply invoke "./bootstrap.sh"
|
||||||
#~((call-with-output-file "user-config.jam"
|
(string-append "--prefix=" #$output)
|
||||||
(lambda (port)
|
configure-flags)))
|
||||||
(format port
|
|
||||||
"using gcc : cross : ~a-c++ ;"
|
|
||||||
#$(%current-target-system)))))
|
|
||||||
#~())
|
|
||||||
|
|
||||||
;; Change an #ifdef __MACH__ that really targets macOS.
|
|
||||||
(substitute* "boost/test/utils/timer.hpp"
|
|
||||||
(("defined\\(__MACH__\\)")
|
|
||||||
"(defined __MACH__ && !defined __GNU__)"))
|
|
||||||
|
|
||||||
(invoke "./bootstrap.sh"
|
|
||||||
(string-append "--prefix=" #$output)
|
|
||||||
;; Auto-detection looks for ICU only in traditional
|
|
||||||
;; install locations.
|
|
||||||
(string-append "--with-icu=" #$output)
|
|
||||||
;; Ditto for Python.
|
|
||||||
#$@(if (%current-target-system)
|
|
||||||
#~()
|
|
||||||
#~((let ((python (dirname (dirname (search-input-file
|
|
||||||
inputs
|
|
||||||
"bin/python")))))
|
|
||||||
(string-append "--with-python-root=" python)
|
|
||||||
(string-append "--with-python=" python
|
|
||||||
"/bin/python")
|
|
||||||
(string-append "--with-python-version="
|
|
||||||
(python-version python)))))
|
|
||||||
"--with-toolset=gcc"))))
|
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key make-flags #:allow-other-keys)
|
(lambda* (#:key make-flags #:allow-other-keys)
|
||||||
(apply invoke "./b2"
|
(apply invoke "./b2"
|
||||||
|
@ -317,37 +316,25 @@ (define-public boost-for-mysql
|
||||||
"1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"))))
|
"1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments boost)
|
(substitute-keyword-arguments (package-arguments boost)
|
||||||
|
((#:configure-flags _ #~'())
|
||||||
|
#~(let ((icu (dirname (dirname (search-input-file
|
||||||
|
%build-inputs "bin/uconv")))))
|
||||||
|
(list
|
||||||
|
;; Auto-detection looks for ICU only in traditional
|
||||||
|
;; install locations.
|
||||||
|
(string-append "--with-icu=" icu)
|
||||||
|
"--with-toolset=gcc")))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
#~(modify-phases #$phases
|
#~(modify-phases #$phases
|
||||||
(replace 'configure
|
(replace 'patch-shells
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((icu (dirname (dirname (search-input-file
|
(substitute* (append
|
||||||
inputs "bin/uconv")))))
|
(find-files "tools/build/src/engine/" "execunix\\.c.*")
|
||||||
(substitute* (append
|
'("libs/config/configure"
|
||||||
(find-files "tools/build/src/engine/" "execunix\\.c.*")
|
"libs/spirit/classic/phoenix/test/runtest.sh"
|
||||||
'("libs/config/configure"
|
"tools/build/doc/bjam.qbk"
|
||||||
"libs/spirit/classic/phoenix/test/runtest.sh"
|
"tools/build/src/engine/Jambase"))
|
||||||
"tools/build/doc/bjam.qbk"
|
(("/bin/sh") (which "sh")))))
|
||||||
"tools/build/src/engine/Jambase"))
|
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
|
|
||||||
(setenv "SHELL" (which "sh"))
|
|
||||||
(setenv "CONFIG_SHELL" (which "sh"))
|
|
||||||
|
|
||||||
#$@(if (%current-target-system)
|
|
||||||
#~((call-with-output-file "user-config.jam"
|
|
||||||
(lambda (port)
|
|
||||||
(format port
|
|
||||||
"using gcc : cross : ~a-c++ ;"
|
|
||||||
#$(%current-target-system)))))
|
|
||||||
#~())
|
|
||||||
|
|
||||||
(invoke "./bootstrap.sh"
|
|
||||||
(string-append "--prefix=" #$output)
|
|
||||||
;; Auto-detection looks for ICU only in traditional
|
|
||||||
;; install locations.
|
|
||||||
(string-append "--with-icu=" icu)
|
|
||||||
"--with-toolset=gcc"))))
|
|
||||||
(delete 'provide-libboost_python)))
|
(delete 'provide-libboost_python)))
|
||||||
((#:make-flags make-flags)
|
((#:make-flags make-flags)
|
||||||
#~(cons* "--without-python" #$make-flags))))
|
#~(cons* "--without-python" #$make-flags))))
|
||||||
|
|
Loading…
Reference in a new issue