Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On 22/06/2013 14:50, Uli Schlachter wrote: On 22.06.2013 14:44, Quentin Glidic wrote: And that is exactly the point of Requires.private: provide include directories -I in CFLAGS without -l in LIBS while Requires add both. No, it isn't. Requires.private is about things needed for static linking. Let me quote "man pkg-config": Requires.private: A list of packages required by this package. The difference from Requires is that the packages listed under Requires.private are not taken into account when a flag list is computed for dynamically linked executable (i.e., when --static was not specified). In the situation where each .pc file corresponds to a library, Requires.private shall be used exclusively to specify the dependencies between the libraries. So “Requires.private shall be used exclusively to specify the dependencies between the libraries” and this is the case here. From http://people.freedesktop.org/~dbn/pkg-config-guide.html I quote: “Cflags: The compiler flags specific to this package and any required libraries that don't support pkg-config. If the required libraries support pkg-config, they should be added to Requires or Requires.private.” And with a simple test: $ tail test1.pc test2.pc ==> test1.pc <== Cflags: -I/tmp Libs: -ltest1 ==> test2.pc <== Requires.private: test1 $ pkg-config --cflags --libs test1 -I/tmp -ltest1 $ pkg-config --cflags --libs test2 -I/tmp $ pkg-config --cflags --libs --static test1 -I/tmp -ltest1 $ pkg-config --cflags --libs --static test2 -I/tmp -ltest1 I think the result is pretty clear. -- Quentin “Sardem FF7” Glidic ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On 22.06.2013 14:44, Quentin Glidic wrote: > On 22/06/2013 01:20, Kristian Høgsberg wrote: >> On Fri, Jun 21, 2013 at 06:43:36AM +0200, Quentin Glidic wrote: >>> On 20/06/2013 21:05, Kristian Høgsberg wrote: On Tue, Jun 18, 2013 at 09:11:28AM +0200, Quentin Glidic wrote: > From: Quentin Glidic > > Weston headers include pixman and libxkbcommon headers > > Signed-off-by: Quentin Glidic > --- > src/weston.pc.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/weston.pc.in b/src/weston.pc.in > index 828cb1f..7a09938 100644 > --- a/src/weston.pc.in > +++ b/src/weston.pc.in > @@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ > Name: Weston Plugin API > Description: Header files for Weston plugin development > Version: @WESTON_VERSION@ > +Requires.private: pixman-1 xkbcommon Oh, right we need that... but shouldn't it just be plain Requires:? If an external header file is part of the API, we need an explicit Requires: >>> >>> That was the case in the first version of the patch. However, a >>> client can use Weston without using pixman or xkbcommon (that’s the >>> case for my notifications plugin, for example). >>> If the plugin needs them, it should definitely link to them explicitly. >>> If it does not, we want to avoid the plugin linking to them. >> >> But it doesn't matter whether or not the client uses pixman, it still >> needs the right cflags to make the #include in compositor.h >> not break. > > And that is exactly the point of Requires.private: provide include > directories -I in CFLAGS without -l in LIBS while Requires add both. No, it isn't. Requires.private is about things needed for static linking. Let me quote "man pkg-config": > Requires.private: >A list of packages required by this package. The difference from > Requires is that >the packages listed under Requires.private are not taken into > account when a flag >list is computed for dynamically linked executable (i.e., when > --static was not >specified). In the situation where each .pc file corresponds > to a library, >Requires.private shall be used exclusively to specify the dependencies > between the >libraries. > Cflags: -I${includedir} > -- > 1.8.3 >>> >>> -- >>> >>> Quentin “Sardem FF7” Glidic > > -- Who needs a ~/.signature anyway? ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On 22/06/2013 01:20, Kristian Høgsberg wrote: On Fri, Jun 21, 2013 at 06:43:36AM +0200, Quentin Glidic wrote: On 20/06/2013 21:05, Kristian Høgsberg wrote: On Tue, Jun 18, 2013 at 09:11:28AM +0200, Quentin Glidic wrote: From: Quentin Glidic Weston headers include pixman and libxkbcommon headers Signed-off-by: Quentin Glidic --- src/weston.pc.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/weston.pc.in b/src/weston.pc.in index 828cb1f..7a09938 100644 --- a/src/weston.pc.in +++ b/src/weston.pc.in @@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ Name: Weston Plugin API Description: Header files for Weston plugin development Version: @WESTON_VERSION@ +Requires.private: pixman-1 xkbcommon Oh, right we need that... but shouldn't it just be plain Requires:? If an external header file is part of the API, we need an explicit Requires: That was the case in the first version of the patch. However, a client can use Weston without using pixman or xkbcommon (that’s the case for my notifications plugin, for example). If the plugin needs them, it should definitely link to them explicitly. If it does not, we want to avoid the plugin linking to them. But it doesn't matter whether or not the client uses pixman, it still needs the right cflags to make the #include in compositor.h not break. And that is exactly the point of Requires.private: provide include directories -I in CFLAGS without -l in LIBS while Requires add both. Cflags: -I${includedir} -- 1.8.3 -- Quentin “Sardem FF7” Glidic -- Quentin “Sardem FF7” Glidic ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On Fri, Jun 21, 2013 at 06:43:36AM +0200, Quentin Glidic wrote: > On 20/06/2013 21:05, Kristian Høgsberg wrote: > >On Tue, Jun 18, 2013 at 09:11:28AM +0200, Quentin Glidic wrote: > >>From: Quentin Glidic > >> > >>Weston headers include pixman and libxkbcommon headers > >> > >>Signed-off-by: Quentin Glidic > >>--- > >> src/weston.pc.in | 1 + > >> 1 file changed, 1 insertion(+) > >> > >>diff --git a/src/weston.pc.in b/src/weston.pc.in > >>index 828cb1f..7a09938 100644 > >>--- a/src/weston.pc.in > >>+++ b/src/weston.pc.in > >>@@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ > >> Name: Weston Plugin API > >> Description: Header files for Weston plugin development > >> Version: @WESTON_VERSION@ > >>+Requires.private: pixman-1 xkbcommon > > > >Oh, right we need that... but shouldn't it just be plain Requires:? > >If an external header file is part of the API, we need an explicit > >Requires: > > That was the case in the first version of the patch. However, a > client can use Weston without using pixman or xkbcommon (that’s the > case for my notifications plugin, for example). > If the plugin needs them, it should definitely link to them explicitly. > If it does not, we want to avoid the plugin linking to them. But it doesn't matter whether or not the client uses pixman, it still needs the right cflags to make the #include in compositor.h not break. Kristian > >> Cflags: -I${includedir} > >>-- > >>1.8.3 > > -- > > Quentin “Sardem FF7” Glidic ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On 20/06/2013 21:05, Kristian Høgsberg wrote: On Tue, Jun 18, 2013 at 09:11:28AM +0200, Quentin Glidic wrote: From: Quentin Glidic Weston headers include pixman and libxkbcommon headers Signed-off-by: Quentin Glidic --- src/weston.pc.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/weston.pc.in b/src/weston.pc.in index 828cb1f..7a09938 100644 --- a/src/weston.pc.in +++ b/src/weston.pc.in @@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ Name: Weston Plugin API Description: Header files for Weston plugin development Version: @WESTON_VERSION@ +Requires.private: pixman-1 xkbcommon Oh, right we need that... but shouldn't it just be plain Requires:? If an external header file is part of the API, we need an explicit Requires: That was the case in the first version of the patch. However, a client can use Weston without using pixman or xkbcommon (that’s the case for my notifications plugin, for example). If the plugin needs them, it should definitely link to them explicitly. If it does not, we want to avoid the plugin linking to them. Cflags: -I${includedir} -- 1.8.3 -- Quentin “Sardem FF7” Glidic ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/7] weston.pc: Add dependencies for pixman-1 and xkbcommon
On Tue, Jun 18, 2013 at 09:11:28AM +0200, Quentin Glidic wrote: > From: Quentin Glidic > > Weston headers include pixman and libxkbcommon headers > > Signed-off-by: Quentin Glidic > --- > src/weston.pc.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/weston.pc.in b/src/weston.pc.in > index 828cb1f..7a09938 100644 > --- a/src/weston.pc.in > +++ b/src/weston.pc.in > @@ -8,4 +8,5 @@ pkglibexecdir=${libexecdir}/@PACKAGE@ > Name: Weston Plugin API > Description: Header files for Weston plugin development > Version: @WESTON_VERSION@ > +Requires.private: pixman-1 xkbcommon Oh, right we need that... but shouldn't it just be plain Requires:? If an external header file is part of the API, we need an explicit Requires: Kristian > Cflags: -I${includedir} > -- > 1.8.3 > > ___ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel