From ba334114c19ca05e07c095b8eda580e1ff8a6112 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Tue, 14 May 2013 20:00:13 +0200 Subject: [PATCH] Removed the use of the environment variable PKG_CONFIG_LIBDIR - Removed the use of the environment variable PKG_CONFIG_LIBDIR While building binaries the tool {i686,x86_64}-w64-mingw32-pkg-config should be used to find out pkg-config information The environment variable PKG_CONFIG already automatically points to the right cross-compiler aware version of pkg-config when the mingw{32,64}-pkg-config packages are installed - Fixes compilation of mingw-gtk3 3.9.0 (GNOME BZ #699690) - Automatically add R: mingw{32,64}-pkg-config tags when .pc files are detected while building mingw packages --- macros.mingw32 | 1 - macros.mingw64 | 1 - mingw-filesystem.spec | 15 +++++++++++++-- mingw-find-requires.sh | 14 ++++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/macros.mingw32 b/macros.mingw32 index c61eeee..249eb06 100644 --- a/macros.mingw32 +++ b/macros.mingw32 @@ -57,7 +57,6 @@ fi; \ PATH="%{mingw32_bindir}:$PATH_ORIG"; export PATH; \ HOST_CC=gcc; export HOST_CC; \ - PKG_CONFIG_LIBDIR="%{mingw32_libdir}/pkgconfig:%{_mingw32_datadir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \ unset PKG_CONFIG_PATH; \ _PREFIX="%{_bindir}/%{mingw32_target}-"; \ for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \ diff --git a/macros.mingw64 b/macros.mingw64 index 0436582..587405d 100644 --- a/macros.mingw64 +++ b/macros.mingw64 @@ -57,7 +57,6 @@ fi; \ PATH="%{mingw64_bindir}:$PATH_ORIG"; export PATH; \ HOST_CC=gcc; export HOST_CC; \ - PKG_CONFIG_LIBDIR="%{mingw64_libdir}/pkgconfig:%{mingw64_datadir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \ unset PKG_CONFIG_PATH; \ _PREFIX="%{_bindir}/%{mingw64_target}-"; \ for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \ diff --git a/mingw-filesystem.spec b/mingw-filesystem.spec index e00b3d1..5688848 100644 --- a/mingw-filesystem.spec +++ b/mingw-filesystem.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: mingw-filesystem -Version: 97 -Release: 3%{?dist} +Version: 98 +Release: 1%{?dist} Summary: MinGW cross compiler base filesystem and environment Group: Development/Libraries @@ -248,6 +248,17 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/ %changelog +* Sun May 12 2013 Erik van Pienbroek - 98-1 +- Removed the use of the environment variable PKG_CONFIG_LIBDIR + While building binaries the tool {i686,x86_64}-w64-mingw32-pkg-config + should be used to find out pkg-config information + The environment variable PKG_CONFIG already automatically points + to the right cross-compiler aware version of pkg-config when + the mingw{32,64}-pkg-config packages are installed +- Fixes compilation of mingw-gtk3 3.9.0 (GNOME BZ #699690) +- Automatically add R: mingw{32,64}-pkg-config tags when .pc files + are detected while building mingw packages + * Thu Feb 28 2013 Ralf Corsépius - 97-3 - Remove %%config from %%{_sysconfdir}/rpm/macros.* (https://fedorahosted.org/fpc/ticket/259). diff --git a/mingw-find-requires.sh b/mingw-find-requires.sh index 1e38cfb..4837b66 100755 --- a/mingw-find-requires.sh +++ b/mingw-find-requires.sh @@ -16,6 +16,7 @@ fi filelist=`sed "s/['\"]/\\\&/g"` dlls=$(echo $filelist | tr [:blank:] '\n' | grep -Ei '\.(dll|exe)$') +pkgconfig_files=$(echo $filelist | tr [:blank:] '\n' | grep -Ei '\.(pc)$') for target in $targets; do dll_found=false @@ -28,9 +29,22 @@ for target in $targets; do dll_found=true fi done + # Add a dependency on filesystem and crt if necessary if [ $dll_found = true ]; then echo "${target}-filesystem >= 83" echo "${target}-crt" fi + + pkgconfig_files_found=false + for f in $pkgconfig_files; do + if [[ $f =~ .*$host_triplet.* ]]; then + pkgconfig_files_found=true + fi + done + + # Add a dependency on $target-pkg-config if necessary + if [ $pkgconfig_files_found = true ]; then + echo "${target}-pkg-config" + fi done | sort -u