diff mbox

[15/24] gnu: gstreamer: Symlink gstconfig.h into include directory.

Message ID 20160816183938.22794-15-david@craven.ch
State New
Headers show

Commit Message

David Craven Aug. 16, 2016, 6:39 p.m. UTC
* gnu/packages/gstreamer.scm (gstreamer)[arguments]: Add symlink-gstconfig.h
  phase.
---
 gnu/packages/gstreamer.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Mark H Weaver Aug. 17, 2016, 9:28 a.m. UTC | #1
David Craven <david@craven.ch> writes:

> * gnu/packages/gstreamer.scm (gstreamer)[arguments]: Add symlink-gstconfig.h
>   phase.

What is the reason for this change?  Would it be appropriate to submit a
bug report upstream to add this to their "make install"?

      Mark
      

> ---
>  gnu/packages/gstreamer.scm | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
> index bd99880..54919cd 100644
> --- a/gnu/packages/gstreamer.scm
> +++ b/gnu/packages/gstreamer.scm
> @@ -113,7 +113,16 @@ arrays of data.")
>       `(#:configure-flags
>         (list (string-append "--with-html-dir="
>                              (assoc-ref %outputs "doc")
> -                            "/share/gtk-doc/html"))))
> +                            "/share/gtk-doc/html"))
> +       #:phases
> +        (modify-phases %standard-phases
> +          (add-after 'install 'symlink-gstconfig.h
> +            (lambda* (#:key outputs #:allow-other-keys)
> +              (symlink
> +                (string-append (assoc-ref outputs "out")
> +                 "/lib/gstreamer-1.0/include/gst/gstconfig.h")
> +                (string-append (assoc-ref outputs "out")
> +                 "/include/gstreamer-1.0/gst/gstconfig.h")))))))
>      (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
>      (native-inputs
>       `(("bison" ,bison)
David Craven Aug. 17, 2016, 9:35 a.m. UTC | #2
> What is the reason for this change?  Would it be appropriate to submit a
> bug report upstream to add this to their "make install"?

The reason is because applications may contain #include <gst/gstconfig.h>,
but gstconfig.h was moved to the lib directory because it contains "platform
specific information".

What do you suggest?
Mark H Weaver Aug. 17, 2016, 9:57 a.m. UTC | #3
David Craven <david@craven.ch> writes:

>> What is the reason for this change?  Would it be appropriate to submit a
>> bug report upstream to add this to their "make install"?
>
> The reason is because applications may contain #include <gst/gstconfig.h>,
> but gstconfig.h was moved to the lib directory because it contains "platform
> specific information".
>
> What do you suggest?

The pkgconfig file for gstreamer, $out/lib/pkgconfig/pkgconfig-1.0.pc,
includes this:

  Cflags: -I${includedir} -I${libdir}/gstreamer-1.0/include

Where ${libdir} is ${prefix}/lib.  So, the include path needed to find
<gst/gstconfig.h> should automatically be included by non-broken build
systems.

What application(s) are you aware of that are unable to find
<gst/gstconfig.h>?

In general, we should stick to upstream packaging unless it is clearly
broken or there is a compelling reason to deviate.  In this case, if an
application can't find <gst/gstconfig.h>, then it would seem to have a
buggy build system, and we should fix the problem there.

What do you think?

    Thanks,
      Mark
David Craven Aug. 17, 2016, 10:10 a.m. UTC | #4
> In general, we should stick to upstream packaging unless it is clearly
> broken or there is a compelling reason to deviate.  In this case, if an
> application can't find <gst/gstconfig.h>, then it would seem to have a
> buggy build system, and we should fix the problem there.

The qt-gstreamer package doesn't build without this, but I agree that the
problem is with the qt-gstreamer package and not gstreamer and should
therefore be fixed there.
diff mbox

Patch

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index bd99880..54919cd 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -113,7 +113,16 @@  arrays of data.")
      `(#:configure-flags
        (list (string-append "--with-html-dir="
                             (assoc-ref %outputs "doc")
-                            "/share/gtk-doc/html"))))
+                            "/share/gtk-doc/html"))
+       #:phases
+        (modify-phases %standard-phases
+          (add-after 'install 'symlink-gstconfig.h
+            (lambda* (#:key outputs #:allow-other-keys)
+              (symlink
+                (string-append (assoc-ref outputs "out")
+                 "/lib/gstreamer-1.0/include/gst/gstconfig.h")
+                (string-append (assoc-ref outputs "out")
+                 "/include/gstreamer-1.0/gst/gstconfig.h")))))))
     (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
     (native-inputs
      `(("bison" ,bison)