Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358637 - x11-misc/xkeyboard-config: broken .pc file
Summary: x11-misc/xkeyboard-config: broken .pc file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 360227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-13 00:26 UTC by 5FBCDB43
Modified: 2011-04-20 17:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 5FBCDB43 2011-03-13 00:26:11 UTC
The x11-libs/libxkbcommon-9999 from x11 overlay fails to compile.

Compiler has this on the command line:
-DDFLT_XKB_CONFIG_ROOT='""/usr/share/X11/xkb""'
There are duplicate "s in there.

This variable is set by, in order:
1) configure.ac: sets XKBCONFIGROOT from `$PKG_CONFIG --variable=xkb_base xkeyboard-config`; pkg-config returns the path encolsed in "s for me
2) src/xkbcomp/Makefile.am: adds -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' to CFLAGS; which results in "s doubled

We can either delete the double quotes from src/xkbcomp/Makefile.am, or pass --with-xkb-config-root=<paths> to the configure script.
My guess is that the latter is better; unless pkg-config returning that var in double quotes isn't Gentoo-specific.
Comment 1 Matt Turner gentoo-dev 2011-03-24 19:20:41 UTC
*** Bug 360227 has been marked as a duplicate of this bug. ***
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2011-03-27 21:06:10 UTC
Looks like xkeyboard-config.pc is the one that's broken. I've never seen a .pc file with quotes like that.

Fixing this should fix all your other issues. Could you try editing the file manually to confirm it?

Thanks
Comment 3 Jean-Francis Roy 2011-03-30 16:04:08 UTC
I just ran into the same bug and I confirm that editing xkeyboard-config.pc resolves this issue.
Comment 4 Matt Turner gentoo-dev 2011-03-31 04:14:16 UTC
Instead of passing the argument to --with-xkb-base= in quotes, all you have to do is escape the spaces, like so

--with-xkb-base=/home/mattst88/test\ test/abc\ 123/

From there, the resulting pkgconfig file will have

xkb_base=/home/mattst88/test test/abc 123/

which will allow libxkbcommon to not fail.
Comment 5 Matt Turner gentoo-dev 2011-04-15 05:52:46 UTC
Dan Nicholson says "pkgconfig is not a shell and will read the whole string up to the newline", so the quotes which break libxkbcommon's compilation shouldn't be in xkeyboard-config's pc file.

Can we change the xkeyboard-config ebuild to escape spaces in the EPREFIX variable, like so?

--with-xkb-base=${EPREFIX// /\\ }/usr/share/X11/xkb
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2011-04-15 09:32:55 UTC
I still think that the autotools should strip the quotes for us before they put it into the .pc file. But feel free to fix it this way as it is legit and will work.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-04-15 17:23:18 UTC
=xkeyboard-config-9999 (in the overlay) fixed through passing configure options as an array.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-04-20 17:23:39 UTC
Fixed in xkeyboard-config-2.2.1-r1.