Fix giflib check

Additionally, fix AC_CHECK_LIB checks in configure.
This commit is contained in:
David King 2015-03-03 19:51:03 +00:00
parent 9b23fe9a1f
commit 497fc5510b
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From ed805f6992f3c5cfb78f139a5e49ab62909fb944 Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Tue, 3 Mar 2015 20:53:43 +0000
Subject: [PATCH] configure: Fix giflib check
As libgif often links to libX11, and some linker flags require that
dependent libraries must be explicitly linked with, try adding -lX11 to
the linker commandline when trying to link with -lgif.
https://bugzilla.gnome.org/show_bug.cgi?id=745582
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 11c785e..fb4364d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2102,7 +2102,7 @@ AC_ARG_ENABLE(libgif,
if test "x$enable_libgif" != "xno" ; then
AC_CHECK_HEADER(gif_lib.h,
- AC_CHECK_LIB(gif, DGifOpen))
+ AC_CHECK_LIB(gif, DGifOpen, [], [], [-lX11]))
have_libgif=${ac_cv_lib_gif_DGifOpen:-no}
--
2.3.1

View File

@ -16,7 +16,7 @@
Name: tracker
Version: 1.3.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Desktop-neutral search tool and indexer
Group: Applications/System
@ -27,7 +27,12 @@ Source0: https://download.gnome.org/sources/%{name}/1.3/%{name}-%{version
# only autostart in Gnome, see also
# https://bugzilla.redhat.com/show_bug.cgi?id=771601
Patch0: 0001-Only-autostart-in-GNOME-771601.patch
# Fix checking for gif support.
# https://bugzilla.gnome.org/show_bug.cgi?id=745582
Patch1: tracker-1.3.4-fix-giflib-check.patch
# Required for patch1.
BuildRequires: autoconf automake libtool
BuildRequires: desktop-file-utils
BuildRequires: firefox
BuildRequires: giflib-devel
@ -172,6 +177,7 @@ This package contains the documentation for tracker
%setup -q
%patch0 -p1 -b .autostart-gnome
%patch1 -p1 -b .giflib-check
## nuke unwanted rpaths, see also
## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
@ -179,6 +185,10 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
%build
autoreconf --force --install
# Workaround linking problems with AC_CHECK_LIB.
LDFLAGS_save="$LDFLAGS"
LDFLAGS="$LDFLAGS -fPIC"
%configure --disable-static \
--enable-gtk-doc \
--enable-libflac \
@ -203,6 +213,7 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
--disable-functional-tests
# Disable the functional tests for now, they use python bytecodes.
LDFLAGS="$LDFLAGS_save"
make V=1 %{?_smp_mflags}
@ -319,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Tue Mar 03 2015 David King <amigadave@amigadave.com> - 1.3.4-2
- Fix checking for giflib
* Tue Mar 03 2015 Kalev Lember <kalevlember@gmail.com> - 1.3.4-1
- Update to 1.3.4
- Use license macro for COPYING files