[PATCH 0/1] build: Add meson build system

Bastien Nocera <[email protected]> Fri, 1 Aug 2025 14:36:35 +0200
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
This adds meson as an alternative build system. I'm doing this to get
bluez also ported, and have a try at porting some plugins to Rust,
something which meson makes easier on the build system side at least.
See: https://mesonbuild.com/Rust-module.html#rust-module

Benefits of meson:
- build and tests is marginally faster with meson on my i9-9900k from 2018:
  autotools with -j 16: about 11 seconds
  meson: 6 seconds
- it can be used as a subproject for other projects (so either
  vendored, or external) like bluez (see above)
- enforces builddir != srcdir which can be useful to avoid bugs
- no more EXTRA_DIST! meson bundles the whole git repo
  when running meson dist
- no more m4 macros or libtool :)
- only dependency is python3 and ninja (which also only needs python3)

notes about the port:
- symbols export was verified with abidiff, if there's a CI, it would
  be great to add a regression test:
  https://gitlab.freedesktop.org/hadess/check-abi
- cert-ca.cnf could be a static file
- xxd.sh is only needed because xxd behaves differently when passed a
  file and stdin as input, but we could change both autotools and
  meson to use the file directly
- we could do with more de-duplication in the certificate generation
- 100% of the tests run successfully

Bastien Nocera (1):
  build: Add meson build system

 ell/meson.build              | 185 +++++++++++++
 examples/meson.build         |  32 +++
 meson.build                  |  66 +++++
 meson_options.txt            |   5 +
 tools/meson.build            |  18 ++
 unit/gen-cert-expired-pem.sh |  15 ++
 unit/meson.build             | 501 +++++++++++++++++++++++++++++++++++
 unit/xxd.sh                  |   3 +
 8 files changed, 825 insertions(+)
 create mode 100644 ell/meson.build
 create mode 100644 examples/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 tools/meson.build
 create mode 100755 unit/gen-cert-expired-pem.sh
 create mode 100644 unit/meson.build
 create mode 100755 unit/xxd.sh

-- 
2.50.0