Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=688171
Erik van Pienbroek erik-fedora@vanpienbroek.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #1 from Erik van Pienbroek erik-fedora@vanpienbroek.nl 2011-03-17 07:27:34 EDT --- Unfortunately this will break compilation of packages using RPM: $ grep -Hr PKG_CONFIG /usr/lib/rpm/* macros: PKG_CONFIG_PATH="%{_libdir}/pkgconfig:%{_datadir}/pkgconfig"\ macros: export PKG_CONFIG_PATH\ pkgconfigdeps.sh: export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" pkgconfigdeps.sh: export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
The match in the macros file is part of the %___build_pre section (which will always get called in RPM %build sections)
If I change the mingw32-curl package to this: %build +export > /tmp/rpm_export1 %{_mingw32_configure} \ --with-ssl --enable-ipv6 \ --with-ca-bundle=%{_mingw32_sysconfdir}/pki/tls/certs/ca-bundle.crt \ --with-libidn \ --enable-static --with-libssh2 \ --without-random +export > /tmp/rpm_export2
Then the /tmp/rpm_export1 file will contain the line: export PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig" (set by the %___build_pre macro) The /tmp/rpm_export2 file doesn't have the PKG_CONFIG_PATH export as the %{_mingw32_configure} call (thus %{_mingw32_env}) has replaced it with: export PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" (which is what we want to avoid pulling in native stuff)
A possible solution to your issue would be that a new variable like MINGW32_PKG_CONFIG_PATH gets introduced. When it's set, we won't unset the PKG_CONFIG_PATH, but set the PKG_CONFIG_PATH to the value of that MINGW32_PKG_CONFIG_PATH variable. So with this, you could do something like:
MINGW32_PKG_CONFIG_PATH=/opt/my_custom_prefix/lib/pkgconfig pkg-config --cflags glib-2.0
How do the other Fedora MinGW maintainers think of such a change?