[Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
Eric Engestrom
eric.engestrom at imgtec.com
Wed Jan 31 11:46:41 UTC 2018
On Tuesday, 2018-01-30 13:31:09 -0800, Dylan Baker wrote:
> Quoting Emil Velikov (2018-01-30 10:43:06)
> > On 29 January 2018 at 18:57, Dylan Baker <dylan at pnwbakers.com> wrote:
> > > Quoting Eric Engestrom (2018-01-29 10:15:50)
> > >> The big comment is taken from the equivalent block in configure.ac
> > >>
> > >> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> > >> ---
> > >> meson.build | 30 +++++++++++++++++++++--------
> > >> src/gallium/targets/d3dadapter9/meson.build | 2 +-
> > >> src/mesa/drivers/dri/meson.build | 2 +-
> > >> 3 files changed, 24 insertions(+), 10 deletions(-)
> > >>
> > >> diff --git a/meson.build b/meson.build
> > >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644
> > >> --- a/meson.build
> > >> +++ b/meson.build
> > >> @@ -41,6 +41,20 @@ pre_args = [
> > >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"',
> > >> ]
> > >>
> > >> +# The idea is that libdrm is distributed as one cohesive package, even
> > >> +# though it is composed of multiple libraries. However some drivers
> > >> +# may have different version requirements than others. This list
> > >> +# codifies which drivers need which version of libdrm. Any libdrm
> > >> +# version dependencies in non-driver-specific code should be reflected
> > >> +# in the first entry.
> > >> +libdrm_version = '2.4.75'
> > >> +libdrm_amdgpu_version = '2.4.89'
> > >> +libdrm_etnaviv_version = '2.4.82'
> > >> +libdrm_freedreno_version = '2.4.82'
> > >> +libdrm_intel_version = '2.4.75'
> > >> +libdrm_nouveau_version = '2.4.66'
> > >> +libdrm_radeon_version = '2.4.71'
> > >
> > > Is there any reason we can't just make these (for example):
> > > libdrm_radeon_version = '>= 2.4.71'
> > >
> > > Since that avoids all of the format calls?
> > >
> > Is there particular reason why meson doesn't allow plain
> > concatenation, and one must go through the format dance?
> > Off the top of my head, I think that most higher level programming
> > languages (including python) have it, making for clearer and more
> > obvious code.
I'm an idiot, meson supports `'foo' + 'bar'`; I'll send a v2 in a minute.
> >
> > That aside:
> > A huge +1 from me on the idea, although the libdrm_foo checks should
> > become libdrm && libdrm_foo.
> > See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f.
> >
> > Thanks
> > Emil
>
> I'm confused by that commit. pkg-config is supposed to handle this, libdrm_intel
> (for example) has `Requires : libdrm` in it, so when you generate libs you get
> `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just that
> we need to make sure that the version matches we should fix the pkg-config files
> in libdrm to set `Requires : libdrm >= version`. Or am I missing something?
I must say I'm confused as well: specific drivers should depend on the version
of libdrm_$drv they need, and the generic code all drivers use depends on the
version of libdrm it needs; this should cover all the cases.
Quoting the comment in the code (I think you wrote it Emil?):
> The idea is that libdrm is distributed as one cohesive package, even
> though it is composed of multiple libraries.
This means that libdrm_$drv 2.4.99 comes with libdrm 2.4.99, so there is no
need to check both versions as they will always be identical, right?
Are there distributions that provide separate libdrm_$drv and libdrm packages?
More information about the mesa-dev
mailing list