Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate pkg-config files directly #719

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

Kangie
Copy link
Contributor

@Kangie Kangie commented Jul 16, 2024

I recently ported the openrc-plymouth-plugin to use the Meson build system. As part of that I made a seemingly sane decision to install to get_option('libdir'), 'rc' / 'plugins' based on PFL listings among other things.

Unfortunately this assumption broke on certain Gentoo configurations.

This PR attempts to address this by providing a rc_path pkgconfig variable that can be queried so that plugins (etc) don't have to make assumptions.

To do this we update to using the meson pkgconfig module to generate pkgconfig files from whole cloth and drop the old configure_file path.

  • Remove 'pkgconfig' subdir
  • use meson 'pkgconfig' module to generate and install appropriate .pc files when required.
  • Raise minimum meson version to 0.56.0 (pkgconfg variables as dict)
  • add rc_path variable

Plymouth Plugin Bug: https://bugs.gentoo.org/935378

- 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]>
@Kangie
Copy link
Contributor Author

Kangie commented Jul 17, 2024

/tmp/openrc/usr/lib64/pkgconfig/einfo.pc
prefix=/usr
includedir=${prefix}/include
libdir=${prefix}/lib64

Name: einfo
Description: Pretty console informational display
Version: 0.54
Libs: -L/lib64 -leinfo
Cflags: -I${includedir}/einfo
/tmp/openrc/usr/lib64/pkgconfig/OpenRC.pc
prefix=/usr
includedir=${prefix}/include
libdir=${prefix}/lib64

rc_path=/lib/rc

Name: OpenRC
Description: Universal init system
Version: 0.54
Libs: -L/lib64 -lrc
Cflags: -I${includedir}/openrc

@williamh williamh merged commit 5a69404 into OpenRC:master Jul 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants