[PATCH] fix overquoting of $(XKBCONFIGROOT)

Matt Turner mattst88 at gmail.com
Thu Mar 24 14:17:56 PDT 2011


On Thu, Mar 24, 2011 at 7:19 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, Mar 24, 2011 at 7:09 PM, Dan Nicholson <dbn.lists at gmail.com> wrote:
>> On Thu, Mar 24, 2011 at 10:14 AM, Daniel Stone <daniel at fooishbar.org> wrote:
>>> On Thu, Mar 24, 2011 at 09:20:39AM -0400, Gaetan Nadon wrote:
>>>> On Wed, 2011-03-23 at 23:29 -0400, Matt Turner wrote:
>>>> > Fixes: http://bugs.gentoo.org/show_bug.cgi?id=360227
>>>> >
>>>> > Problem is easily seen during compile:
>>>> >     -DDFLT_XKB_CONFIG_ROOT='""/usr/share/X11/xkb""'
>>>>
>>>> This is what I get on Ubuntu before the patch:
>>>>
>>>>     -DDFLT_XKB_CONFIG_ROOT=\"/home/nadon/xorg/src/share/X11/xkb\"
>>>>
>>>> Is this a platform difference?
>>>>
>>>> With the patch I get:
>>>>
>>>>         -DDFLT_XKB_CONFIG_ROOT='/home/nadon/xorg/src/share/X11/xkb'
>>>
>>> Why not just use xserver's AC_DEFINE_PATH macro rather than buggering
>>> around with the command line?
>>
>> Yeah, that's probably the right thing to do. Although, I'm still not
>> sure Matt's path with embedded quotes won't get screwed up. Actually,
>> since AC_DEFINE_DIR uses eval a couple times, I'm sure the quotes
>> would get taken out. Thinking about this some more, I'm sure the issue
>> can be worked around by adding an eval when getting the variable from
>> pkg-config.
>>
>> $ cat > test.pc << "EOF"
>> foo="bar"
>> Name: test
>> Description: test
>> Version: 1.2.3
>> EOF
>> $ FOO=`pkg-config --variable=foo ./test.pc`
>> $ echo x${FOO}x
>> x"bar"x
>> $ eval FOO=`pkg-config --variable=foo ./test.pc`
>> $ echo x${FOO}x
>> xbarx
>>
>> Whatever.
>>
>> --
>> Dan
>
> xkeyboard-config-2.0 installed on another system of mine doesn't have
> quotes in /usr/share/pkgconfig/xkeyboard-config.pc so this is
> definitely a Gentoo bug.

OK, more info. The breakage occurred when we (Gentoo) began putting
quotes around it to allow spaces, say for systems with a weird prefix.
So, what Dan suggests might be good. Thoughts?

Matt


More information about the xorg-devel mailing list