Skip to content

Commit

Permalink
Generate pkg-config files directly
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
Kangie authored and williamh committed Jul 22, 2024
1 parent 917a703 commit 5a69404
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 45 deletions.
27 changes: 25 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -207,14 +208,36 @@ subdir('etc')
subdir('init.d')
subdir('local.d')
subdir('man')
subdir('pkgconfig')
subdir('sh')
subdir('src')
subdir('support')
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',
Expand Down
9 changes: 0 additions & 9 deletions pkgconfig/einfo.pc.in

This file was deleted.

24 changes: 0 additions & 24 deletions pkgconfig/meson.build

This file was deleted.

10 changes: 0 additions & 10 deletions pkgconfig/openrc.pc.in

This file was deleted.

0 comments on commit 5a69404

Please sign in to comment.