From 79232b89c0af6ac248687e434809ad1f1581e163 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jul 24 2014 15:32:11 +0000 Subject: fix/hack build on epel-6 otherwise, bump glib2 build-dep to 2.30 --- diff --git a/qt5-qtlocation.spec b/qt5-qtlocation.spec index 677e943..905a219 100644 --- a/qt5-qtlocation.spec +++ b/qt5-qtlocation.spec @@ -20,9 +20,15 @@ Source0: http://download.qt-project.org/official_releases/qt/5.3/%{version}/subm BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(geoclue) +%if 0%{?rhel} < 7 # gyspy currently not available on epel7, https://bugzilla.redhat.com/1069225 -%if 0%{?rhel} != 7 BuildRequires: pkgconfig(gypsy) +%define g_value_init_hack 1 +# # try to support older glib2 (like el6) +Patch50: qtlocation-opensource-src-5.3.1-G_VALUE_INIT.patch +%else +# G_VALUE_INIT is new in 2.30 +BuildRequiers: pkgconfig(glib-2.0) >= 2.30 %endif %{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}} @@ -61,6 +67,10 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?pre:-%{pre}} +%if 0%{?g_value_init_hack} +%patch50 -p1 -b .G_VALUE_INIT +%endif + %build %{_qt5_qmake} diff --git a/qtlocation-opensource-src-5.3.1-G_VALUE_INIT.patch b/qtlocation-opensource-src-5.3.1-G_VALUE_INIT.patch new file mode 100644 index 0000000..10cddd8 --- /dev/null +++ b/qtlocation-opensource-src-5.3.1-G_VALUE_INIT.patch @@ -0,0 +1,14 @@ +diff -up qtlocation-opensource-src-5.3.1/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp.G_VALUE_INIT qtlocation-opensource-src-5.3.1/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp +--- qtlocation-opensource-src-5.3.1/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp.G_VALUE_INIT 2014-06-19 05:08:32.000000000 -0500 ++++ qtlocation-opensource-src-5.3.1/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp 2014-07-24 09:48:59.800638065 -0500 +@@ -61,6 +61,10 @@ QT_BEGIN_NAMESPACE + #define MINIMUM_UPDATE_INTERVAL 1000 + #define UPDATE_TIMEOUT_COLD_START 120000 + ++#ifndef G_VALUE_INIT ++#define G_VALUE_INIT { 0 } ++#endif ++ + namespace + { +