When invoked as $triplet-pkg-config, pkg-config is smart enough to search the paths corresponding to the target architecture, so we don't need to point it to them directly. This works for both MinGW builds and non-x86_64 Linux builds, and avoids the problems that come from setting $PKG_CONFIG_LIBDIR in containers, mainly that you can't use the same container image to perform both native builds and cross builds - something that libosinfo is alreayd doing today in their CI. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- guests/lcitool | 2 -- guests/playbooks/build/jobs/defaults.yml | 2 -- jenkins/jobs/defaults.yaml | 2 -- 3 files changed, 6 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 86416c4..053e46a 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -899,7 +899,6 @@ class Application: ENV ABI "{cross_abi}" ENV CONFIGURE_OPTS "--host={cross_abi} \\ --target={cross_abi}" - ENV PKG_CONFIG_LIBDIR "/usr/lib/{cross_lib}/pkgconfig" """).format(**varmap)) if cross_arch and package_format == "rpm": @@ -907,7 +906,6 @@ class Application: ENV ABI "{cross_abi}" ENV CONFIGURE_OPTS "--host={cross_abi} \\ --target={cross_abi}" - ENV PKG_CONFIG_LIBDIR "/usr/{cross_abi}/sys-root/mingw/lib/pkgconfig:/usr/{cross_abi}/sys-root/mingw/share/pkgconfig" """).format(**varmap)) def _action_dockerfile(self, args): diff --git a/guests/playbooks/build/jobs/defaults.yml b/guests/playbooks/build/jobs/defaults.yml index 65dee78..3d5eaa0 100644 --- a/guests/playbooks/build/jobs/defaults.yml +++ b/guests/playbooks/build/jobs/defaults.yml @@ -37,13 +37,11 @@ strip_buildrequires: | mingw32_local_env: | export VIRT_PREFIX="$VIRT_PREFIX/i686-w64-mingw32/sys-root/mingw" export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig" - export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig" mingw32_autogen_args: --host=i686-w64-mingw32 mingw32_meson_args: --cross-file=/usr/share/mingw/toolchain-mingw32.meson mingw64_local_env: | export VIRT_PREFIX="$VIRT_PREFIX/x86_64-w64-mingw32/sys-root/mingw" export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig" - export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig" mingw64_autogen_args: --host=x86_64-w64-mingw32 mingw64_meson_args: --cross-file=/usr/share/mingw/toolchain-mingw64.meson git_urls: diff --git a/jenkins/jobs/defaults.yaml b/jenkins/jobs/defaults.yaml index ec429ed..8e9486d 100644 --- a/jenkins/jobs/defaults.yaml +++ b/jenkins/jobs/defaults.yaml @@ -33,13 +33,11 @@ mingw32_local_env: | export VIRT_PREFIX="$VIRT_PREFIX/i686-w64-mingw32/sys-root/mingw" export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig" - export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig" mingw32_autogen_args: --host=i686-w64-mingw32 mingw32_meson_args: --cross-file=/usr/share/mingw/toolchain-mingw32.meson mingw64_local_env: | export VIRT_PREFIX="$VIRT_PREFIX/x86_64-w64-mingw32/sys-root/mingw" export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig" - export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig" mingw64_autogen_args: --host=x86_64-w64-mingw32 mingw64_meson_args: --cross-file=/usr/share/mingw/toolchain-mingw64.meson git_urls: -- 2.24.1