Fix the build on RHEL
This commit is contained in:
parent
aa707b9a13
commit
2a809c379c
51
0001-Add-disable-tests-to-skip-the-building-of-tests.patch
Normal file
51
0001-Add-disable-tests-to-skip-the-building-of-tests.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 730dfd4f728ca33d5dee20216562a45b644ae952 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <kalevlember@gmail.com>
|
||||
Date: Thu, 30 Oct 2014 11:31:36 +0100
|
||||
Subject: [PATCH] Add --disable-tests to skip the building of tests
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=739395
|
||||
---
|
||||
Makefile.am | 6 +++++-
|
||||
configure.ac | 12 ++++++++----
|
||||
2 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index e5c5d07..8a54690 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,4 +1,8 @@
|
||||
-SUBDIRS = . gdata/tests po docs
|
||||
+SUBDIRS = . po docs
|
||||
+
|
||||
+if ENABLE_TESTS
|
||||
+SUBDIRS += gdata/tests
|
||||
+endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c578235..ae57c49 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -149,10 +149,14 @@ AC_SUBST([GNOME_PACKAGES_PRIVATE])
|
||||
AC_SUBST([GNOME_PACKAGES])
|
||||
AC_SUBST([GOA_ENABLED])
|
||||
|
||||
-dnl ****************************
|
||||
-dnl Check for uhttpmock
|
||||
-dnl ****************************
|
||||
-PKG_CHECK_MODULES(UHTTPMOCK, libuhttpmock-0.0)
|
||||
+AC_MSG_CHECKING([whether to build tests])
|
||||
+AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [Enable building of tests]),, [enable_tests=yes])
|
||||
+AC_MSG_RESULT($enable_tests)
|
||||
+AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])
|
||||
+
|
||||
+if test "x$enable_tests" = "xyes"; then
|
||||
+ PKG_CHECK_MODULES(UHTTPMOCK, libuhttpmock-0.0)
|
||||
+fi
|
||||
|
||||
# Various necessary functions and headers
|
||||
AC_CHECK_FUNCS([memset])
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: libgdata
|
||||
Version: 0.16.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library for the GData protocol
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -8,12 +8,17 @@ License: LGPLv2+
|
||||
URL: http://live.gnome.org/libgdata
|
||||
Source0: http://download.gnome.org/sources/%{name}/0.16/%{name}-%{version}.tar.xz
|
||||
|
||||
# Backported upstream patch to allow building without uhttpmock
|
||||
Patch0: 0001-Add-disable-tests-to-skip-the-building-of-tests.patch
|
||||
|
||||
BuildRequires: gcr-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gnome-online-accounts-devel
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: gtk-doc
|
||||
%if ! 0%{?rhel}
|
||||
BuildRequires: uhttpmock-devel
|
||||
%endif
|
||||
BuildRequires: intltool
|
||||
BuildRequires: json-glib-devel
|
||||
BuildRequires: liboauth-devel
|
||||
@ -21,6 +26,9 @@ BuildRequires: libsoup-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: vala-devel
|
||||
BuildRequires: vala-tools
|
||||
# For patch0
|
||||
BuildRequires: autoconf automake libtool
|
||||
|
||||
Requires: gobject-introspection
|
||||
|
||||
%description
|
||||
@ -39,9 +47,15 @@ developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .no-uhttpmock
|
||||
autoreconf -fi
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
%configure \
|
||||
%if 0%{?rhel}
|
||||
--disable-tests \
|
||||
%endif
|
||||
--disable-static
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
%install
|
||||
@ -76,6 +90,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
||||
%{_datadir}/vala/
|
||||
|
||||
%changelog
|
||||
* Mon Nov 03 2014 Kalev Lember <kalevlember@gmail.com> - 0.16.0-2
|
||||
- Fix the build on RHEL
|
||||
|
||||
* Thu Sep 18 2014 Kalev Lember <kalevlember@gmail.com> - 0.16.0-1
|
||||
- Update to 0.16.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user