summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:39:13 +0000
committerDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:39:13 +0000
commitcaab40c947af8c0ddcc54d8fe7ebeb2a9de7b95e (patch)
tree9a2d71a60d04d6dd2c19d59d029670e4310885e5
parent6364deedc63a2b29ae30c66f792017d05de71977 (diff)
Fix FTCBFS: cross.patch: Indirect pkg-config invocations through $PKG_CONFIG and autoreconf (Closes: #845816)
-rw-r--r--configure.ac8
-rw-r--r--debian/changelog4
-rw-r--r--debian/control1
-rw-r--r--debian/patches/cross.patch32
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules5
6 files changed, 46 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index b08bfe60..559a6f67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,8 +55,8 @@ dnl
dnl Calls pkg-config --static
dnl
AC_DEFUN([PKG_STATIC], [
- if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
- $1=`pkg-config --libs --static "$2"`
+ if AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$2"]); then
+ $1=`$PKG_CONFIG --libs --static "$2"`
AC_SUBST([$1])
else
AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
@@ -173,8 +173,8 @@ PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
# Our udev rule gives us the friendly dm names but isn't required (or valid)
# on earlier releases.
UDEVDIR=
-if pkg-config udev --atleast-version 190; then
- UDEVDIR="$(pkg-config udev --variable=udevdir)"
+if $PKG_CONFIG udev --atleast-version 190; then
+ UDEVDIR="$($PKG_CONFIG udev --variable=udevdir)"
fi
AC_SUBST(UDEVDIR)
diff --git a/debian/changelog b/debian/changelog
index fb8420c4..9e7e8aaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,10 @@ btrfs-progs (4.9.1-1) UNRELEASED; urgency=medium
- call dh_bash-completion
* add debian/btrfs-progs.bash-completion Closes: #840302, #800790.
+ [ Helmut Grohne ]
+ * Fix FTCBFS: cross.patch: Indirect pkg-config invocations through
+ $PKG_CONFIG and autoreconf (Closes: #845816)
+
-- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 13 Feb 2017 11:25:12 +0000
btrfs-progs (4.7.3-1) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 349a4e35..9ab107ce 100644
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,7 @@ Section: admin
Priority: optional
Maintainer: Dimitri John Ledkov <xnox@debian.org>
Build-Depends: debhelper (>= 9),
+ dh-autoreconf,
e2fslibs-dev,
pkg-config,
libacl1-dev,
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 00000000..b78bdbea
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,32 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: use PKG_PROG_PKG_CONFIG correctly
+
+Using $PKG_CONFIG allows PKG_PROG_PKG_CONFIG to add $ac_tool_prefix which is
+crucial for cross compilation.
+
+Index: btrfs-progs-4.7.3/configure.ac
+===================================================================
+--- btrfs-progs-4.7.3.orig/configure.ac
++++ btrfs-progs-4.7.3/configure.ac
+@@ -55,8 +55,8 @@
+ dnl Calls pkg-config --static
+ dnl
+ AC_DEFUN([PKG_STATIC], [
+- if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
+- $1=`pkg-config --libs --static "$2"`
++ if AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$2"]); then
++ $1=`$PKG_CONFIG --libs --static "$2"`
+ AC_SUBST([$1])
+ else
+ AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
+@@ -165,8 +165,8 @@
+ # Our udev rule gives us the friendly dm names but isn't required (or valid)
+ # on earlier releases.
+ UDEVDIR=
+-if pkg-config udev --atleast-version 190; then
+- UDEVDIR="$(pkg-config udev --variable=udevdir)"
++if $PKG_CONFIG udev --atleast-version 190; then
++ UDEVDIR="$($PKG_CONFIG udev --variable=udevdir)"
+ fi
+ AC_SUBST(UDEVDIR)
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..def274a0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+cross.patch
diff --git a/debian/rules b/debian/rules
index 60fba6c3..265ef280 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,10 @@ CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CFLAGS := $(patsubst -O2,-Os,$(CFLAGS))
%:
- dh ${@} --parallel --with bash-completion
+ dh ${@} --parallel --with bash-completion,autoreconf
+
+override_dh_autoreconf:
+ dh_autoreconf ./autogen.sh
override_dh_auto_configure:
dh_auto_configure -- --bindir=/bin