-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Change default pkgconfig directory on FreeBSD #4410
Conversation
FreeBSD uses ${PREFIX}/libdata/pkgconfig as default pkgconf search path for non-base libraries. This commit makes that directory the default install_dir in the pkgconfig module on FreeBSD.
What are non-base libraries defined as? Do base libraries also use pkg-config? |
Test failure is unrelated, and can be fixed by rebasing after #4408 is merged. |
Base is the system you get when you install FreeBSD. Everything you install after (from ports, packages, or otherwise) is non-base. |
Is that because a base project will always use hand-rolled Makefiles or something else? Just trying to understand and document the situation so we can revisit it if needed. |
Something like that :) FreeBSD itself is the base project. It is a self-contained entity in the sense that it consists of the kernel and a userland, and both are built using only software in the base system. Does this makes sense? I'm sorry if I'm not explaining this right, it's just that the distinction between base and non-base is so natural to me after using FreeBSD for a decade, that I don't really know how to explain it effectively. |
Makes sense, thanks. I guess we can revisit this if FreeBSD decides to use Meson in its base system. |
Rather than checking if it is being built on FreeBSD, shouldn't we check if it is being built for FreeBSD? Otherwise cross compiling either to or from FreeBSD would put the .pc file in the wrong place. Granted this would only be a problem for projects that cross compile between FreeBSD and some other platform and would need to produce .pc files for that. It seems unlikely but maybe there are people around who need that? |
It is correct that both FreeBSD base and ports put .pc files in I think the better way to resolve the problem is to support In case you don't know the rule of man pages and info pages on FreeBSD, it is that FreeBSD ports require all ports to install man pages in |
We've run into this before with all of the BSDs, that no one here is knowledgeable enough to know for sure what the right thing to do is. Maybe we should just go to the appropriate mailing list for FreeBSD and ask the FreeBSD devs what they would like meson to do in these cases? |
Any progress on this? |
Please, merge it. |
I know nothing about BSDs but I'm fine merging this, if only to break things so people will file bugs telling how things should have been done. |
I know nothing about Meson ;) |
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
Since mesonbuild#4410 changes the installation directory of pkg-config files on FreeBSD, it is no longer possible for a portable script, such as JHBuild, to use the same directory layout on different platforms. Projects not using Meson's pkgconfig module are likely to keep installing pkg-config files into lib/pkgconfig, so we end up having both libdata/pkgconfig and lib/pkgconfig on FreeBSD. Unless JHBuild wants to patch build files for other build systems or manually move files after installation like what FreeBSD ports currently do, we will have a mixed directory layout when using a custom prefix on FreeBSD. Instead of hard-coding the path of pkg-config files, provide options for users to override the default values. JHBuild can just set '--libpkgconfigdir lib/pkgconfig --sharepkgconfigdir share/pkgconfig' to keep its existing behavior like what it already does to disable Debian-style multiarch with '--libdir lib'. Projects not using Meson's pkgconfig module are also encouraged to use these options to ensure a consistent directory layout.
That turned to be wrong: #6343
What does autotools exactly? |
Meson 0.53 is now able to use PKG_CONFIG_PATH to sort library paths. Therefore, the local patch included in JHBuild can be dropped. mesonbuild/meson#4271 mesonbuild/meson#4325 Meson 0.53 changes the installation path of .pc files from lib/pkgconfig to libdata/pkgconfig on FreeBSD without providing any way to override the behavior. While it can be an improvement of usability on FreeBSD because FreeBSD configures its pkgconf to use libdata/pkgconfig instead of the upstream default lib/pkgconfig and share/pkgconfig, it can also be a problem for JHBuild. JHBuild does not change the directory layout depending on the platform, and doing so can confuse the user and make the environment messy. Therefore, revert the change until there is a better way to choose the default installation path. mesonbuild/meson#4410 mesonbuild/meson#6343
Meson 0.53 is now able to use PKG_CONFIG_PATH to sort library paths. Therefore, the local patch included in JHBuild can be dropped. mesonbuild/meson#4271 mesonbuild/meson#4325 Meson 0.53 changes the installation path of .pc files from lib/pkgconfig to libdata/pkgconfig on FreeBSD without providing any way to override the behavior. While it can be an improvement of usability on FreeBSD because FreeBSD configures its pkgconf to use libdata/pkgconfig instead of the upstream default lib/pkgconfig and share/pkgconfig, it can also be a problem for JHBuild. JHBuild does not change the directory layout depending on the platform, and doing so can confuse the user and make the environment messy. Therefore, revert the change until there is a better way to choose the default installation path. mesonbuild/meson#4410 mesonbuild/meson#6343
…ctory. Breaking upstream commit requires this. See: - mesonbuild/meson#4410 - mesonbuild/meson@aba8792 - mesonbuild/meson#6343 Fixes HandBrake#2662.
…ctory. Breaking upstream commit requires this. See: - mesonbuild/meson#4410 - mesonbuild/meson@aba8792 - mesonbuild/meson#6343 Fixes #2662. (cherry picked from commit f77ca8d)
Hey,
FreeBSD uses ${PREFIX}/libdata/pkgconfig as default pkgconf search path for non-base libraries, so I think it would be appropriate for Meson to default to that directory too. This commit makes necessary changes for this.