[PATCH weston sdk v2 1/8] weston.pc: Add dependencies for pixman-1 and xkbcommon

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 4 00:12:05 PDT 2013


On Wed, 3 Jul 2013 18:26:06 -0400
Kristian Høgsberg <hoegsberg at gmail.com> wrote:

> On Mon, Jul 01, 2013 at 05:03:01PM +0200, Quentin Glidic wrote:
> > From: Quentin Glidic <sardemff7+git at sardemff7.net>
> > 
> > Weston headers include pixman and libxkbcommon headers
> > Using Requires.private means that CFLAGS from pixman-1 and
> > xkbcommon are added to weston CFLAGS, while LIBS are added in case
> > of static linking only. This way, plugins does not have to use
> > them, but will need to do so explicitely if needed, to properly
> > resolve symbols
> 
> No, it has to be plain Requires.  By having pixman and libxkbcommon
> headers in our SDK headers, we expose those dependencies to
> applications.

Hi,

could you explain that logic a bit more?

Is it just a convention to use Requires for header dependencies instead
of Requires.private, or does simply including SDK headers in a project
actually add a hard link time requirement to these libs, or are
Requires being used for distribution package dependencies while
Requires.private are not?

Or is this just for the SDK users' convenience, so they do not have to
explicitly link to pixman et al. as needed, since they will be linked
to them always automatically, needed or not?

Unfortunately the pkg-config manual does not clarify this situation.

Once Weston core becomes a library, then we will migrate to
Requires.private, right? That is one thing the pkg-config manual says
clearly.


Thanks,
pq

> > Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> > ---
> >  configure.ac     | 4 ++++
> >  src/weston.pc.in | 1 +
> >  2 files changed, 5 insertions(+)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 0864d10..375360c 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -55,6 +55,7 @@ AC_CHECK_HEADERS([execinfo.h])
> >  AC_CHECK_FUNCS([mkostemp strchrnul initgroups])
> >  
> >  COMPOSITOR_MODULES="wayland-server >= 1.1.90 pixman-1"
> > +WESTON_PC_REQUIRES_PRIVATE="pixman-1"
> >  
> >  AC_ARG_ENABLE(egl, [  --disable-egl],,
> >                enable_egl=yes)
> > @@ -75,6 +76,7 @@ AC_ARG_ENABLE(xkbcommon,
> >  if test x$enable_xkbcommon = xyes; then
> >  	AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with
> > libxkbcommon support]) COMPOSITOR_MODULES="$COMPOSITOR_MODULES
> > xkbcommon"
> > +	WESTON_PC_REQUIRES_PRIVATE="${WESTON_PC_REQUIRES_PRIVATE}
> > xkbcommon" fi
> >  
> >  PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
> > @@ -391,6 +393,8 @@ AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" =
> > xyes]) 
> >  WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
> >  
> > +AC_SUBST([WESTON_PC_REQUIRES_PRIVATE])
> > +
> >  AC_CONFIG_FILES([Makefile
> >  		 shared/Makefile
> >  		 src/Makefile
> > diff --git a/src/weston.pc.in b/src/weston.pc.in
> > index 828cb1f..5e61d3d 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: @WESTON_PC_REQUIRES_PRIVATE@
> >  Cflags: -I${includedir}
> > -- 
> > 1.8.3.1
> > 
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list