[PATCH libinput 5/5] Add meson.build file

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 26 10:24:09 UTC 2017


On Wed, Apr 26, 2017 at 11:26:17AM +0200, Quentin Glidic wrote:
> On 4/26/17 4:20 AM, Peter Hutterer wrote:
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> >   meson.build       | 596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >   meson_options.txt |  16 ++
> >   2 files changed, 612 insertions(+)
> >   create mode 100644 meson.build
> >   create mode 100644 meson_options.txt
> 
> I’m not reviewing the libinput aspect of this patch, only the Meson one.

thanks heaps, I learned a fair bit there. Commenting only on a few things,
the rest I'll just adopt as-is.

> > diff --git a/meson.build b/meson.build
> > new file mode 100644
> > index 0000000..a6cbb81
> > --- /dev/null
> > +++ b/meson.build
> > @@ -0,0 +1,596 @@
> > +project('libinput', 'c', 'cpp',
> > +	version : '1.7.0',
> > +	license: 'MIT/Expat',
> > +	default_options : [ 'c_std=gnu99' ],
> > +	meson_version : '>= 0.38.0')
> > +
> > +libinput_version = meson.project_version().split('.')
> > +
> > +# We use libtool-version numbers because it's easier to understand.
> 
> Actually it’s version-info, version-number is the equivalent to Meson
> so_version.

that comment is just copied from configure.ac, but the so versioning needs
revamping anyway.

[...]

> > +############ udev bits ############
> > +
> > +udev_dir = get_option('udev-dir')
> > +if udev_dir == ''
> > +	udev_dir = '@0@/lib/udev'.format(get_option('prefix'))
> 
> Here you should use:
> join_paths(get_option('prefix'), get_option('libdir'), udev)
> That’ll do exactly what you mean (join_paths() will drop the prefix if
> libdir is absolute).

at least on Fedora, libdir is /usr/lib64 but udev bits go into /usr/lib,
that's why it's hardcoded here instead of using libdir. join_paths works for
me in case it does something else (we don't have to worry about / vs
window's \ in libinput)

> As a side note, maybe could you simply defaults to:
> dependency('udev').get_pkgconfig_variable('udevdir')

we had that, but there was some pushback because installing into the prefix
was considered more consistent than dropping random files all over the
place (also made it possible to install into e.g. /opt/foo)

[...]

> Nit: join_paths() (you probably copied the exact line from Meson doc, sorry
> ;-) )
> 
> Btw, with a version script, is it still useful to have the so_version? Isn’t
> it to solve the same issue but nicer (by providing everything in a single
> .so whatever the version is)?

yeah, I guess I should've dropped this a while ago. I was just happy with
the LT versioning ;) the meson switch would be a good way to just drop this
and keep the soname, though I'll have to read up on if/when I have to bump
anything in the soname numbers in the future then.

thanks again, I'll get these fixed asap

Cheers,
   Peter



More information about the wayland-devel mailing list