From 1114a5836ca3a81c4881a54f963b59a770e6d843 Mon Sep 17 00:00:00 2001
From: Jeremy Bicha <jbicha@ubuntu.com>
Date: Tue, 6 Aug 2013 22:10:51 -0400
Subject: [PATCH] Add replace-pcretest-with-bin-true.patch

Short circuit pcretest with /bin/true since pcretest isn't
packaged in Debian, thanks Tim Gardner (Closes: #718938)
---
 debian/changelog                                    |  8 ++++++++
 debian/patches/replace-pcretest-with-bin-true.patch | 13 +++++++++++++
 debian/patches/series                               |  1 +
 3 files changed, 22 insertions(+)
 create mode 100644 debian/patches/replace-pcretest-with-bin-true.patch

diff --git a/debian/changelog b/debian/changelog
index 7310cf3..5a5928b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+goffice-0.8 (0.8.17-3) UNRELEASED; urgency=low
+
+  * replace-pcretest-with-bin-true.patch:
+    - Short circuit pcretest with /bin/true since pcretest isn't
+      packaged in Debian, thanks Tim Gardner (Closes: #718938)
+
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Tue, 06 Aug 2013 22:02:23 -0400
+
 goffice-0.8 (0.8.17-2) unstable; urgency=low
 
   * Renamed source package to "goffice-0.8" (Closes: #702656).
diff --git a/debian/patches/replace-pcretest-with-bin-true.patch b/debian/patches/replace-pcretest-with-bin-true.patch
new file mode 100644
index 0000000..c583260
--- /dev/null
+++ b/debian/patches/replace-pcretest-with-bin-true.patch
@@ -0,0 +1,13 @@
+Description: pcretest isn't packaged in Debian, see bug 683408
+Author: Tim Gardner <tim.gardner@canonical.com>
+--- goffice-0.8.17.orig/configure.in
++++ goffice-0.8.17/configure.in
+@@ -516,7 +516,7 @@ if test "x$glib_has_G_REGEX_ERROR_STRAY_
+   AC_CHECK_HEADER(pcre.h,[], AC_MSG_ERROR([Header files for PCRE were not found]))
+   AC_CHECK_LIB(pcre,pcre_compile2,[], AC_MSG_ERROR([The PCRE library is missing or too old]))
+   AC_MSG_CHECKING([for UTF-8 support in pcre])
+-  if (pcretest -C 2>&1) | grep -i "^ *UTF-8 support" >/dev/null; then
++  if /bin/true; then
+       AC_MSG_RESULT(yes)
+       LIBS="$LIBS -lpcre"
+       EXTRA_LIBS="$EXTRA_LIBS -lpcre"
diff --git a/debian/patches/series b/debian/patches/series
index e2870fe..17de82c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix-pcre.patch
+replace-pcretest-with-bin-true.patch
-- 
1.8.3.2

