diff options
author | Matt Jolly <kangie@gentoo.org> | 2024-07-16 21:23:28 +1000 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-07-20 15:11:34 +0200 |
commit | 1485cfb36cbdc2a079f73be16670cb3e64567852 (patch) | |
tree | 50fe36151016eb2b2aeac76c475f859d12b35cdd /meson.build | |
parent | 3586a899e49fbe9d3e5d88b9f0500040dc622565 (diff) |
Generate pkg-config files directly
- Remove 'pkgconfig' subdir
- use meson 'pkgconfig' module to generate and install appropriate
.pc files when required.
- add `rc_path` variable to installed pkgconfig files
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 6ee4466b..71f8a3ea 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,8 @@ project('OpenRC', 'c', 'prefix=/usr', 'warning_level=3', ], - meson_version : '>=0.53.2') + meson_version : '>=0.56.0' # pkgconfig dict support +) cc = meson.get_compiler('c') fs = import('fs') @@ -207,7 +208,6 @@ subdir('etc') subdir('init.d') subdir('local.d') subdir('man') -subdir('pkgconfig') subdir('sh') subdir('src') subdir('support') @@ -215,6 +215,29 @@ subdir('sysctl.d') subdir('test') subdir('zsh-completion') +if get_option('pkgconfig') + pkg = import('pkgconfig') + + einfo_pkgconf = pkg.generate( + name : 'einfo', + description : 'Pretty console informational display', + version : meson.project_version(), + libraries : libeinfo, + subdirs : ['einfo'], + ) + + openrc_pkgconf = pkg.generate( + name : 'OpenRC', + description : 'Universal init system', + version : meson.project_version(), + libraries : librc, + subdirs : ['openrc'], + variables: { + 'rc_path': rc_libexecdir, + } + ) +endif + meson.add_install_script('tools/meson_runlevels.sh', os, get_option('newnet') ? 'yes' : 'no', |