[PATCH xkbcomp] Add .pc file for version export

Peter Hutterer peter.hutterer at who-t.net
Tue Jul 5 16:35:15 PDT 2011


On Tue, Jul 05, 2011 at 03:55:07PM -0400, Gaetan Nadon wrote:
> On Tue, 2011-07-05 at 08:25 +1000, Peter Hutterer wrote:
> 
> > Exports xkbcomp version and the xkb base directory.
> > 
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > Something like this should do to get us around the bugs.
> > 
> >  Makefile.am   |    3 +++
> >  configure.ac  |    3 ++-
> >  xkbcomp.pc.in |    8 ++++++++
> >  3 files changed, 13 insertions(+), 1 deletions(-)
> >  create mode 100644 xkbcomp.pc.in
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index d0e991d..2493f1e 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -60,6 +60,9 @@ xkbcomp_SOURCES = \
> >          xkbpath.h \
> >          xkbscan.c
> >  
> > +pkgconfigdir = $(datadir)/pkgconfig
> 
> 
> It's been a while, but shouldn't that be $(libdir)? This is an
> application binary and is certainly not architecture independent.

yep, it should, sorry.

> This will most likely fail on distro install where this classification
> is respected.
> There might be a bit of confusion here if the pkgconfig file refers to
> both a binary and a resource directory.
> If it refers only to xkbconfigroot, perhaps the file should be renamed
> to make it clearer so people don't
> refer tp the executable version but to the xkbconfigdir content version.

Well, the thing is that the default xkbconfigroot is built into xkbcomp.
Getting this information out may be useful (even though I don't know of any
current users). that's why I added it as a variable. but the pkgconfig file
is really there for xkbcomp, not the xkbconfigroot.

Cheers,
  Peter
 
> > +pkgconfig_DATA = xkbcomp.pc
> > +
> >  MAINTAINERCLEANFILES = ChangeLog INSTALL
> >  
> >  .PHONY: ChangeLog INSTALL
> > diff --git a/configure.ac b/configure.ac
> > index 252eb1a..b4635de 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -58,5 +58,6 @@ AC_SUBST([XKBCONFIGROOT])
> >  
> >  AC_CONFIG_FILES([
> >  	Makefile
> > -	man/Makefile])
> > +	man/Makefile
> > +	xkbcomp.pc])
> >  AC_OUTPUT
> > diff --git a/xkbcomp.pc.in b/xkbcomp.pc.in
> > new file mode 100644
> > index 0000000..0950e2d
> > --- /dev/null
> > +++ b/xkbcomp.pc.in
> > @@ -0,0 +1,8 @@
> > +prefix=@prefix@
> > +datarootdir=@datarootdir@
> > +datadir=@datadir@
> > +xkbconfigdir=@XKBCONFIGROOT@
> > +
> > +Name: xkbcomp
> > +Description: XKB keymap compiler
> > +Version: @PACKAGE_VERSION@
> 
> Should it not have a Requires.private to take into account this
> statement, assuming the statement is correct:
> 
>     PKG_CHECK_MODULES(XKBCOMP, x11 xkbfile)



More information about the xorg-devel mailing list