diff mbox

[1/2] gnu: lvtk: Build UI library.

Message ID 20161203194209.19164-1-rekado@elephly.net
State New
Headers show

Commit Message

Ricardo Wurmus Dec. 3, 2016, 7:42 p.m. UTC
* gnu/packages/audio.scm (lvtk)[inputs]: Add gtkmm-2.
[arguments]: Pass "-std=c++11" flag.
---
 gnu/packages/audio.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Marius Bakke Dec. 3, 2016, 9:04 p.m. UTC | #1
Ricardo Wurmus <rekado@elephly.net> writes:

> * gnu/packages/audio.scm (lvtk)[inputs]: Add gtkmm-2.
> [arguments]: Pass "-std=c++11" flag.
> ---
>  gnu/packages/audio.scm | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
> index 5de0681..d7bdc01 100644
> --- a/gnu/packages/audio.scm
> +++ b/gnu/packages/audio.scm
> @@ -1653,9 +1653,16 @@ software.")
>                       (setenv "LDFLAGS"
>                               (string-append
>                                "-L" (assoc-ref inputs "boost") "/lib "
> -                              "-lboost_system")))))))
> +                              "-lboost_system"))
> +                     ;; Needed for gtkmm
> +                     (substitute* '("src/wscript_build"
> +                                    "examples/wscript_build")
> +                       (("cxxflags.*= \\[" line)
> +                        (string-append line "\"-std=c++11\", ")))
> +                     #t)))))

Is it not possible to pass this through #:make-flags? If not this LGTM,
but would be nice with a comment about why make-flags won't work.

>      (inputs
>       `(("boost" ,boost)
> +       ("gtkmm" ,gtkmm-2)
>         ("lv2" ,lv2)))
>      (native-inputs
>       `(("pkg-config" ,pkg-config)))
> -- 
> 2.10.2
Ricardo Wurmus Dec. 3, 2016, 10:32 p.m. UTC | #2
Marius Bakke <mbakke@fastmail.com> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> * gnu/packages/audio.scm (lvtk)[inputs]: Add gtkmm-2.
>> [arguments]: Pass "-std=c++11" flag.
>> ---
>>  gnu/packages/audio.scm | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
>> index 5de0681..d7bdc01 100644
>> --- a/gnu/packages/audio.scm
>> +++ b/gnu/packages/audio.scm
>> @@ -1653,9 +1653,16 @@ software.")
>>                       (setenv "LDFLAGS"
>>                               (string-append
>>                                "-L" (assoc-ref inputs "boost") "/lib "
>> -                              "-lboost_system")))))))
>> +                              "-lboost_system"))
>> +                     ;; Needed for gtkmm
>> +                     (substitute* '("src/wscript_build"
>> +                                    "examples/wscript_build")
>> +                       (("cxxflags.*= \\[" line)
>> +                        (string-append line "\"-std=c++11\", ")))
>> +                     #t)))))
>
> Is it not possible to pass this through #:make-flags? If not this LGTM,
> but would be nice with a comment about why make-flags won't work.

The waf-build-system doesn’t have any support for make-flags.  It flat
out ignores them and only runs “waf build”.  Whenever we want to change
flags in projects using waf we usually need to patch up the wscript(s).

I don’t know if there’s a standard way to amend certain flags.  If there
is we should add it to the waf-build-system.
diff mbox

Patch

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 5de0681..d7bdc01 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1653,9 +1653,16 @@  software.")
                      (setenv "LDFLAGS"
                              (string-append
                               "-L" (assoc-ref inputs "boost") "/lib "
-                              "-lboost_system")))))))
+                              "-lboost_system"))
+                     ;; Needed for gtkmm
+                     (substitute* '("src/wscript_build"
+                                    "examples/wscript_build")
+                       (("cxxflags.*= \\[" line)
+                        (string-append line "\"-std=c++11\", ")))
+                     #t)))))
     (inputs
      `(("boost" ,boost)
+       ("gtkmm" ,gtkmm-2)
        ("lv2" ,lv2)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))