[mingw-qt: 59/65] Replaced the pkg-config environment hacks with a proper fix in the qmake.conf mkspecs file

epienbro epienbro at fedoraproject.org
Tue Mar 6 21:31:43 UTC 2012


commit 71e40d462c0ac12cc61979310c93a2b1c3ea4ee8
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Tue Jan 31 20:48:21 2012 +0100

    Replaced the pkg-config environment hacks with a proper fix in the qmake.conf mkspecs file
    
    - Replaced the pkg-config environment hacks with a proper fix in the qmake.conf mkspecs file
    - Rebuild against libpng 1.5

 mingw32-qt.spec |   16 +++++++++++-----
 qmake.conf      |    1 +
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/mingw32-qt.spec b/mingw32-qt.spec
index 8bf1593..4e3726d 100644
--- a/mingw32-qt.spec
+++ b/mingw32-qt.spec
@@ -43,6 +43,7 @@ BuildRequires:  mingw32-libpng
 BuildRequires:  mingw32-libtiff
 BuildRequires:  mingw32-sqlite
 BuildRequires:  mingw32-dbus
+BuildRequires:  mingw32-pkg-config
 
 BuildRequires:  zip
 BuildRequires:  dos2unix
@@ -75,11 +76,6 @@ cp %{SOURCE1} %{SOURCE2} mkspecs/%{platform}
 
 
 %build
-# Force the right pkg-config settings
-# We can't use %%{_mingw32_env} here as that breaks the compilation
-export PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"
-unset PKG_CONFIG_PATH
-
 # Generic configure arguments
 # Phonon is disabled for now because we lack the directx headers
 # The 'javascript-jit' argument causes a compile failure on the mingw32 toolchain
@@ -124,6 +120,11 @@ qt_configure_args="\
     -dbus-linked \
     -nomake demos,examples"
 
+# RPM automatically sets the environment variable PKG_CONFIG_PATH
+# to point to the native pkg-config files, but while cross compiling
+# we don't want to have this environment variable set
+unset PKG_CONFIG_PATH
+
 # We have to build Qt twice, once for the release build and once for the debug build
 # Unfortunately Qt only supports out-of-source builds which are in ../some_folder
 rm -rf ../build_debug
@@ -322,6 +323,11 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/imports
 
 
 %changelog
+* Tue Jan 31 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.8.0-4
+- Replaced the pkg-config environment hacks with a proper fix
+  in the qmake.conf mkspecs file
+- Rebuild against libpng 1.5
+
 * Fri Jan 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 4.8.0-3
 - Fix compilation against gcc 4.7
 
diff --git a/qmake.conf b/qmake.conf
index c6819c1..11a3b9e 100644
--- a/qmake.conf
+++ b/qmake.conf
@@ -93,6 +93,7 @@ QMAKE_INSTALL_PROGRAM = install -m 755 -p
 QMAKE_CHK_DIR_EXISTS  = mkdir -p
 QMAKE_MKDIR           = 
 
+PKG_CONFIG		= i686-pc-mingw32-pkg-config
 QMAKE_MOC		= moc-qt4
 QMAKE_UIC		= uic-qt4
 QMAKE_IDC		= idc


More information about the scm-commits mailing list