Source: enchant
Version: 1.6.0-11
Tags: patch
User: [email protected]
Usertags: rebootstrap

enchant fails to cross build from source, because it uses the build
architecture pkg-config. It has two checks for pkg-config (one implicit
and and explicit) where the explicit has a bad default and the implicit
reuses the previous value. The attached patch removes the unneeded,
explicit check and thus makes cross building work.

Helmut
diff --minimal -Nru enchant-1.6.0/debian/changelog 
enchant-1.6.0/debian/changelog
--- enchant-1.6.0/debian/changelog      2016-05-01 18:29:59.000000000 +0200
+++ enchant-1.6.0/debian/changelog      2016-09-03 22:58:11.000000000 +0200
@@ -1,3 +1,10 @@
+enchant (1.6.0-11.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: cross_build.diff (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sat, 03 Sep 2016 22:54:54 +0200
+
 enchant (1.6.0-11) unstable; urgency=medium
 
   [ Mattia Rizzolo ]
diff --minimal -Nru enchant-1.6.0/debian/patches/cross_build.diff 
enchant-1.6.0/debian/patches/cross_build.diff
--- enchant-1.6.0/debian/patches/cross_build.diff       1970-01-01 
01:00:00.000000000 +0100
+++ enchant-1.6.0/debian/patches/cross_build.diff       2016-09-03 
23:00:19.000000000 +0200
@@ -0,0 +1,23 @@
+From: Helmut Grohne <[email protected]>
+Last-Modified: 2016-09-03
+Subject: do not supply a bad default for the PKG_CONFIG check
+
+PKG_CHECK_MODULES implicitly checks for a suitable cross pkg-config and uses
+$PKG_CONFIG as a default. The preceeding AC_PATH_PROG supplies that variables
+with its default value "pkg-config" instead of the a value that carries the
+host architecture as a prefix. By removing the (otherwise unused AC_PATH_PROG),
+the implicit check can do the right thing.
+
+Index: enchant-1.6.0/configure.in
+===================================================================
+--- enchant-1.6.0.orig/configure.in
++++ enchant-1.6.0/configure.in
+@@ -48,8 +48,6 @@
+ AC_PROG_CXX(,have_cxx=no)
+ AM_CONDITIONAL(WITH_CXX, test "x$have_cxx" = "xyes")
+ 
+-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+-
+ PKG_CHECK_MODULES(ENCHANT, [glib-2.0 >= 2.6 gmodule-2.0])
+ 
+ dnl 
===========================================================================
diff --minimal -Nru enchant-1.6.0/debian/patches/series 
enchant-1.6.0/debian/patches/series
--- enchant-1.6.0/debian/patches/series 2016-05-01 17:20:07.000000000 +0200
+++ enchant-1.6.0/debian/patches/series 2016-09-03 22:56:35.000000000 +0200
@@ -4,3 +4,4 @@
 02-new-ispell-format.diff
 02_Requires-Private.diff
 fix_for_hunspell_1.4.diff
+cross_build.diff

Reply via email to