* [PATCH] gnu: boost: Allow for customizable build flags.
@ 2016-06-13 13:08 David Thompson
2016-06-14 10:54 ` Ricardo Wurmus
0 siblings, 1 reply; 6+ messages in thread
From: David Thompson @ 2016-06-13 13:08 UTC (permalink / raw)
To: guix-devel; +Cc: David Thompson
From: David Thompson <davet@gnu.org>
* gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
---
gnu/packages/boost.scm | 80 +++++++++++++++++++++++++-------------------------
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 0a644e8..882f9cc 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -51,50 +51,50 @@
("python" ,python-2)
("tcsh" ,tcsh)))
(arguments
- (let ((build-flags
- `("threading=multi" "link=shared"
+ `(#:tests? #f
+ #:make-flags
+ (list "threading=multi" "link=shared"
- ;; Set the RUNPATH to $libdir so that the libs find each other.
- (string-append "linkflags=-Wl,-rpath="
- (assoc-ref outputs "out") "/lib")
+ ;; Set the RUNPATH to $libdir so that the libs find each other.
+ (string-append "linkflags=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib")
- ;; Boost's 'context' library is not yet supported on mips64, so
- ;; we disable it. The 'coroutine' library depends on 'context',
- ;; so we disable that too.
- ,@(if (string-prefix? "mips64" (or (%current-target-system)
- (%current-system)))
- '("--without-context"
- "--without-coroutine" "--without-coroutine2")
- '()))))
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* '("libs/config/configure"
- "libs/spirit/classic/phoenix/test/runtest.sh"
- "tools/build/doc/bjam.qbk"
- "tools/build/src/engine/execunix.c"
- "tools/build/src/engine/Jambase"
- "tools/build/src/engine/jambase.c")
- (("/bin/sh") (which "sh")))
+ ;; Boost's 'context' library is not yet supported on mips64, so
+ ;; we disable it. The 'coroutine' library depends on 'context',
+ ;; so we disable that too.
+ ,@(if (string-prefix? "mips64" (or (%current-target-system)
+ (%current-system)))
+ '("--without-context"
+ "--without-coroutine" "--without-coroutine2")
+ '()))
+ #:phases
+ (modify-phases %standard-phases
+ (replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* '("libs/config/configure"
+ "libs/spirit/classic/phoenix/test/runtest.sh"
+ "tools/build/doc/bjam.qbk"
+ "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"))
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
- (zero? (system* "./bootstrap.sh"
- (string-append "--prefix=" out)
- "--with-toolset=gcc")))))
- (replace
- 'build
- (lambda* (#:key outputs #:allow-other-keys)
- (zero? (system* "./b2" ,@build-flags))))
- (replace
- 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (zero? (system* "./b2" "install" ,@build-flags))))))))
+ (zero? (system* "./bootstrap.sh"
+ (string-append "--prefix=" out)
+ "--with-toolset=gcc")))))
+ (replace
+ 'build
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (zero? (apply system* "./b2" make-flags))))
+ (replace
+ 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (zero? (apply system* "./b2" "install" make-flags)))))))
(home-page "http://boost.org")
(synopsis "Peer-reviewed portable C++ source libraries")
--
2.8.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: boost: Allow for customizable build flags.
2016-06-13 13:08 [PATCH] gnu: boost: Allow for customizable build flags David Thompson
@ 2016-06-14 10:54 ` Ricardo Wurmus
2016-06-14 11:41 ` Thompson, David
0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-06-14 10:54 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel, David Thompson
David Thompson <dthompson2@worcester.edu> writes:
> From: David Thompson <davet@gnu.org>
>
> * gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
If I understand correctly, this moves the let-bound “build-flags” to
regular make-flags and reuses the default mechanism for passing
make-flags, right?
If this is so it looks good to me.
(It’s a little hard for me to read the patch because of the indentation
change.)
~~ Ricardo
> gnu/packages/boost.scm | 80 +++++++++++++++++++++++++-------------------------
> 1 file changed, 40 insertions(+), 40 deletions(-)
>
> diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
> index 0a644e8..882f9cc 100644
> --- a/gnu/packages/boost.scm
> +++ b/gnu/packages/boost.scm
> @@ -51,50 +51,50 @@
> ("python" ,python-2)
> ("tcsh" ,tcsh)))
> (arguments
> - (let ((build-flags
> - `("threading=multi" "link=shared"
> + `(#:tests? #f
> + #:make-flags
> + (list "threading=multi" "link=shared"
>
> - ;; Set the RUNPATH to $libdir so that the libs find each other.
> - (string-append "linkflags=-Wl,-rpath="
> - (assoc-ref outputs "out") "/lib")
> + ;; Set the RUNPATH to $libdir so that the libs find each other.
> + (string-append "linkflags=-Wl,-rpath="
> + (assoc-ref %outputs "out") "/lib")
>
> - ;; Boost's 'context' library is not yet supported on mips64, so
> - ;; we disable it. The 'coroutine' library depends on 'context',
> - ;; so we disable that too.
> - ,@(if (string-prefix? "mips64" (or (%current-target-system)
> - (%current-system)))
> - '("--without-context"
> - "--without-coroutine" "--without-coroutine2")
> - '()))))
> - `(#:tests? #f
> - #:phases
> - (modify-phases %standard-phases
> - (replace
> - 'configure
> - (lambda* (#:key outputs #:allow-other-keys)
> - (let ((out (assoc-ref outputs "out")))
> - (substitute* '("libs/config/configure"
> - "libs/spirit/classic/phoenix/test/runtest.sh"
> - "tools/build/doc/bjam.qbk"
> - "tools/build/src/engine/execunix.c"
> - "tools/build/src/engine/Jambase"
> - "tools/build/src/engine/jambase.c")
> - (("/bin/sh") (which "sh")))
> + ;; Boost's 'context' library is not yet supported on mips64, so
> + ;; we disable it. The 'coroutine' library depends on 'context',
> + ;; so we disable that too.
> + ,@(if (string-prefix? "mips64" (or (%current-target-system)
> + (%current-system)))
> + '("--without-context"
> + "--without-coroutine" "--without-coroutine2")
> + '()))
> + #:phases
> + (modify-phases %standard-phases
> + (replace
> + 'configure
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (substitute* '("libs/config/configure"
> + "libs/spirit/classic/phoenix/test/runtest.sh"
> + "tools/build/doc/bjam.qbk"
> + "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"))
> + (setenv "SHELL" (which "sh"))
> + (setenv "CONFIG_SHELL" (which "sh"))
>
> - (zero? (system* "./bootstrap.sh"
> - (string-append "--prefix=" out)
> - "--with-toolset=gcc")))))
> - (replace
> - 'build
> - (lambda* (#:key outputs #:allow-other-keys)
> - (zero? (system* "./b2" ,@build-flags))))
> - (replace
> - 'install
> - (lambda* (#:key outputs #:allow-other-keys)
> - (zero? (system* "./b2" "install" ,@build-flags))))))))
> + (zero? (system* "./bootstrap.sh"
> + (string-append "--prefix=" out)
> + "--with-toolset=gcc")))))
> + (replace
> + 'build
> + (lambda* (#:key outputs make-flags #:allow-other-keys)
> + (zero? (apply system* "./b2" make-flags))))
> + (replace
> + 'install
> + (lambda* (#:key outputs make-flags #:allow-other-keys)
> + (zero? (apply system* "./b2" "install" make-flags)))))))
>
> (home-page "http://boost.org")
> (synopsis "Peer-reviewed portable C++ source libraries")
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: boost: Allow for customizable build flags.
2016-06-14 10:54 ` Ricardo Wurmus
@ 2016-06-14 11:41 ` Thompson, David
2016-06-14 11:53 ` Efraim Flashner
2016-06-14 12:04 ` Ludovic Courtès
0 siblings, 2 replies; 6+ messages in thread
From: Thompson, David @ 2016-06-14 11:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel, David Thompson
On Tue, Jun 14, 2016 at 6:54 AM, Ricardo Wurmus
<ricardo.wurmus@mdc-berlin.de> wrote:
>
> David Thompson <dthompson2@worcester.edu> writes:
>
>> From: David Thompson <davet@gnu.org>
>>
>> * gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
>
> If I understand correctly, this moves the let-bound “build-flags” to
> regular make-flags and reuses the default mechanism for passing
> make-flags, right?
Yes, exactly. With it I can easily create things like a statically
linked variant.
~283 packages will need to rebuilt with this change, so maybe
core-updates would be a good place to put this? Or would it be
core-updates-next? I'm not sure anymore. :)
Thanks!
- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: boost: Allow for customizable build flags.
2016-06-14 11:41 ` Thompson, David
@ 2016-06-14 11:53 ` Efraim Flashner
2016-06-14 12:04 ` Ludovic Courtès
1 sibling, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2016-06-14 11:53 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel, David Thompson
[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]
On Tue, Jun 14, 2016 at 07:41:31AM -0400, Thompson, David wrote:
> On Tue, Jun 14, 2016 at 6:54 AM, Ricardo Wurmus
> <ricardo.wurmus@mdc-berlin.de> wrote:
> >
> > David Thompson <dthompson2@worcester.edu> writes:
> >
> >> From: David Thompson <davet@gnu.org>
> >>
> >> * gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
> >
> > If I understand correctly, this moves the let-bound “build-flags” to
> > regular make-flags and reuses the default mechanism for passing
> > make-flags, right?
>
> Yes, exactly. With it I can easily create things like a statically
> linked variant.
>
> ~283 packages will need to rebuilt with this change, so maybe
> core-updates would be a good place to put this? Or would it be
> core-updates-next? I'm not sure anymore. :)
>
> Thanks!
>
> - Dave
>
I would toss it into core-updates and hope Ludo doesn't notice :). I don't
think it's quite reached building out that far yet so it should be ok.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: boost: Allow for customizable build flags.
2016-06-14 11:41 ` Thompson, David
2016-06-14 11:53 ` Efraim Flashner
@ 2016-06-14 12:04 ` Ludovic Courtès
2016-06-14 12:52 ` Thompson, David
1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-06-14 12:04 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel, David Thompson
"Thompson, David" <dthompson2@worcester.edu> skribis:
> On Tue, Jun 14, 2016 at 6:54 AM, Ricardo Wurmus
> <ricardo.wurmus@mdc-berlin.de> wrote:
>>
>> David Thompson <dthompson2@worcester.edu> writes:
>>
>>> From: David Thompson <davet@gnu.org>
>>>
>>> * gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
>>
>> If I understand correctly, this moves the let-bound “build-flags” to
>> regular make-flags and reuses the default mechanism for passing
>> make-flags, right?
>
> Yes, exactly. With it I can easily create things like a statically
> linked variant.
>
> ~283 packages will need to rebuilt with this change, so maybe
> core-updates would be a good place to put this? Or would it be
> core-updates-next? I'm not sure anymore. :)
Heh, I think we need a PhD student to work on the scheduling of changes
in the package DAG (seriously, I think that’d be a real topic!).
Please apply to ‘core-updates’ and we’ll get it built.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: boost: Allow for customizable build flags.
2016-06-14 12:04 ` Ludovic Courtès
@ 2016-06-14 12:52 ` Thompson, David
0 siblings, 0 replies; 6+ messages in thread
From: Thompson, David @ 2016-06-14 12:52 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
On Tue, Jun 14, 2016 at 8:04 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> "Thompson, David" <dthompson2@worcester.edu> skribis:
>
>> On Tue, Jun 14, 2016 at 6:54 AM, Ricardo Wurmus
>> <ricardo.wurmus@mdc-berlin.de> wrote:
>>>
>>> David Thompson <dthompson2@worcester.edu> writes:
>>>
>>>> From: David Thompson <davet@gnu.org>
>>>>
>>>> * gnu/packages/boost.scm (boost)[arguments]: Extract build flags to #:make-flags argument.
>>>
>>> If I understand correctly, this moves the let-bound “build-flags” to
>>> regular make-flags and reuses the default mechanism for passing
>>> make-flags, right?
>>
>> Yes, exactly. With it I can easily create things like a statically
>> linked variant.
>>
>> ~283 packages will need to rebuilt with this change, so maybe
>> core-updates would be a good place to put this? Or would it be
>> core-updates-next? I'm not sure anymore. :)
>
> Heh, I think we need a PhD student to work on the scheduling of changes
> in the package DAG (seriously, I think that’d be a real topic!).
There certainly are some subtleties. ;)
> Please apply to ‘core-updates’ and we’ll get it built.
Done, thanks!
- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-14 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 13:08 [PATCH] gnu: boost: Allow for customizable build flags David Thompson
2016-06-14 10:54 ` Ricardo Wurmus
2016-06-14 11:41 ` Thompson, David
2016-06-14 11:53 ` Efraim Flashner
2016-06-14 12:04 ` Ludovic Courtès
2016-06-14 12:52 ` Thompson, David
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).