[Mesa-dev] [PATCH] Revert "configure: ask vdpau.pc for the default location of the vdpau drivers"
Ilia Mirkin
imirkin at alum.mit.edu
Tue Oct 7 06:47:35 PDT 2014
On Tue, Oct 7, 2014 at 9:36 AM, Christian König <deathsimple at vodafone.de> wrote:
> Am 07.10.2014 um 15:19 schrieb Ilia Mirkin:
>
>> On Tue, Oct 7, 2014 at 9:13 AM, Christian König <deathsimple at vodafone.de>
>> wrote:
>>>
>>> Am 07.10.2014 um 15:07 schrieb Ilia Mirkin:
>>>
>>>> On Tue, Oct 7, 2014 at 9:04 AM, Christian König
>>>> <deathsimple at vodafone.de>
>>>> wrote:
>>>>>
>>>>> Am 07.10.2014 um 03:11 schrieb Ilia Mirkin:
>>>>>>
>>>>>> I'm under the assumption that OMX/etc don't do anything ridiculous. If
>>>>>> they do, it's a bug just like this vdpau situation, and should be
>>>>>> addressed as such. However addressing them should not preclude vdpau
>>>>>> from being fixed.
>>>>>
>>>>>
>>>>> Well, that was the whole point of the change. For OMX you don't have a
>>>>> standardized sub directory where to put the loadable modules, e.g. it's
>>>>> named libomxil-bellagio0 on Ubuntu and completely different on Fedora.
>>>>>
>>>>> So what I did was just to use the $pluginsdir from libomxil-bellagio.pc
>>>>> to
>>>>> determine where to install the OMX files and ignored $prefix. But Emil
>>>>> wanted all generated plugins to be installed consistently so he changed
>>>>> VDPAU to the same behavior as OMX.
>>>>>
>>>>> I'm perfectly fine with either approach, but it should just be
>>>>> consistent.
>>>>
>>>> How about just failing the configure if you enable OMX (or anything
>>>> else we don't know what to do with) but don't specify an install dir?
>>>
>>>
>>> Would work for me as well, but doesn't sounds like the ideal solution.
>>>
>>> Looking into the libomxil-bellagio.pc we have a whole chain of
>>> definitions
>>> like:
>>> prefix=/usr
>>> exec_prefix=${prefix}
>>> libdir=${exec_prefix}/lib
>>> includedir=${prefix}/include
>>> toolsdir=${exec_prefix}/bin
>>> pluginsdir=${libdir}/libomxil-bellagio0
>>>
>>> Isn't it somehow possible to let pkg-config assume a different $prefix
>>> while
>>> evaluating the $pluginsdir variable (I honestly have no idea how
>>> pkg-config
>>> works)?
>>>
>>> That would solve the problem for OMX and make the behavior consistent
>>> again.
>>
>> Not sure about pkg-config either, but seems like defaulting it to
>> ${libdir}/libomxil-bellagio0 is the right thing then (similarly to
>> vdpau defaulting to ${libdir}/vdpau). That way you can set --libdir to
>> /usr/lib/weirdo/place/that/debian/likes and everything will work out
>> as expected. Right?
>
>
> Nope, that won't work neither for Ubuntu nor Fedora.
>
> Ubuntu usually sets $libdir to /usr/lib/x86_64-linux-gnu/ but the OMX dir is
> /usr/lib/libomxil-bellagio0/. And for Fedora the subdirectory is named
> differently than libomxil-bellagio0.
So... Ubuntu sets libdir differently for bellagio than for all their
other packages? That's a little odd. But... do we care? Ubuntu can
have an installation script that deals with their... peculiarities.
Much like we have a --libdir option, it seems reasonable to have a
--omx-plugin-dir or whatever, which Ubuntu and Fedora can set to their
heart's content.
>
> I've checked the pkg-config man page in the meantime, all we need to do is
> using "--define-variable=prefix=$prefix" for OMX.
>
> At least on Ubuntu running "pkg-config --variable=pluginsdir
> --define-variable=prefix=/foo libomxil-bellagio" gives me
> "/foo/lib/libomxil-bellagio0" which is exactly what we wanted to know.
>
> I'm pretty sure that's the right approach here,
IMO the right approach is for people who do weird things to suffer the
consequences of their weirdness. Of course 'weird' is in the eye of
the beholder, but I think that setting libdir's differently between
packages fits nicely into that definition. In this case, it seems like
feeding the libdir in if it's specified is the correct thing, which
would yield the same result as just defauting the way I had suggested
without involving pkg-config.
However I'm happy to accept any approach that results in a
./configure --prefix=/path/to/dir
make install
not installing to a directory outside of the prefix. That's my #1
concern. My personal inclination, however, would be to just default it
to ${libdir}/whatever.
Cheers,
-ilia
More information about the mesa-dev
mailing list