[pkg-bacula-commits] [SCM] Bacula, a network backup, recovery and verification program branch, alexandro-dev, updated. debian/5.0.3-1-14-ged1bd9e
Alexander Golovko
alexandro at ankalagon.ru
Sun May 13 22:11:01 UTC 2012
The following commit has been merged in the alexandro-dev branch:
commit ed1bd9e48deff2ff39f1b6c7c1a37b73ffe7f08f
Author: Alexander Golovko <alexandro at ankalagon.ru>
Date: Mon May 14 02:07:16 2012 +0400
Fix building with multiarch libmysqlclient-dev (thanks to Ben Hutchings)
Closes: #672765
diff --git a/debian/changelog b/debian/changelog
index 7edfe4f..ad40e53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,12 @@ bacula (5.0.3-2) UNRELEASED; urgency=low
+ fix linking with binutils-gold
* debian/patches/switch-nonfree-sha1-to-openssl.patch (Closes: #658326)
+ switch from upstream nonfree SHA1 implementation to openssl
+ * debian/patches/fix-build-with-multiarch-libmysql.patch,
+ debian/control, debian/rules (Closes: #672765)
+ + fix building with multiarch libmysqlclient-dev
+ + add autoconf to Build-Depends
+ + recreate configure script on build
+ (thanks to Ben Hutchings)
--
diff --git a/debian/control b/debian/control
index 1ed36d5..97d0c6c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: admin
Priority: optional
Maintainer: Debian Bacula packaging Group <pkg-bacula-devel at lists.alioth.debian.org>
Uploaders: Jan Hauke Rahm <jhr at debian.org>
-Build-Depends: autotools-dev, debhelper (>= 6.0.7~), po-debconf (>= 0.8.2),
+Build-Depends: autotools-dev, autoconf, debhelper (>= 6.0.7~),
+ po-debconf (>= 0.8.2),
zlib1g-dev, libreadline-dev, libjconv-dev,
libsqlite3-dev, libmysqlclient-dev, libpq-dev (>= 9.1),
postgresql-server-dev-all,
diff --git a/debian/patches/fix-build-with-multiarch-libmysql.patch b/debian/patches/fix-build-with-multiarch-libmysql.patch
new file mode 100644
index 0000000..bcc2a1a
--- /dev/null
+++ b/debian/patches/fix-build-with-multiarch-libmysql.patch
@@ -0,0 +1,97 @@
+Description: Fix FTBFS with multi-arch libmysqlclient-dev
+Bug-Debian: 672765
+Author: Ben Hutchings <ben at decadent.org.uk>
+Last-Update: 2012-05-14
+
+diff -Nur a/autoconf/bacula-macros/db.m4 b/autoconf/bacula-macros/db.m4
+--- a/autoconf/bacula-macros/db.m4
++++ b/autoconf/bacula-macros/db.m4
+@@ -327,8 +327,16 @@ AC_ARG_WITH(mysql,
+ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the MySQL base install directory, default is to search through a number of common places for the MySQL files.]),
+ [
+ if test "$withval" != "no"; then
++ SQL_INCLUDE=
++ SQL_LFLAGS=
+ if test "$withval" = "yes"; then
+- if test -f /usr/local/mysql/include/mysql/mysql.h; then
++ MYSQL_CONFIG="$(which mysql_config 2>/dev/null)"
++ if test -n "$MYSQL_CONFIG"; then
++ SQL_INCLUDE="$(mysql_config --cflags)"
++ SQL_LFLAGS="$(mysql_config --libs_r || mysql_config --libs)"
++ MYSQL_BINDIR="$(basename "$MYSQL_CONFIG")"
++ else
++ if test -f /usr/local/mysql/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/local/mysql/include/mysql
+ if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
+ -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
+@@ -337,7 +345,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+ fi
+ MYSQL_BINDIR=/usr/local/mysql/bin
+- elif test -f /usr/include/mysql/mysql.h; then
++ elif test -f /usr/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/include/mysql
+ if test -f /usr/lib64/mysql/libmysqlclient_r.a \
+ -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
+@@ -352,7 +360,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ MYSQL_LIBDIR=/usr/lib
+ fi
+ MYSQL_BINDIR=/usr/bin
+- elif test -f /usr/include/mysql.h; then
++ elif test -f /usr/include/mysql.h; then
+ MYSQL_INCDIR=/usr/include
+ if test -f /usr/lib64/libmysqlclient_r.a \
+ -o -f /usr/lib64/libmysqlclient_r.so; then
+@@ -361,7 +369,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ MYSQL_LIBDIR=/usr/lib
+ fi
+ MYSQL_BINDIR=/usr/bin
+- elif test -f /usr/local/include/mysql/mysql.h; then
++ elif test -f /usr/local/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include/mysql
+ if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
+ -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
+@@ -370,7 +378,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ MYSQL_LIBDIR=/usr/local/lib/mysql
+ fi
+ MYSQL_BINDIR=/usr/local/bin
+- elif test -f /usr/local/include/mysql.h; then
++ elif test -f /usr/local/include/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include
+ if test -f /usr/local/lib64/libmysqlclient_r.a \
+ -o -f /usr/local/lib64/libmysqlclient_r.so; then
+@@ -379,9 +387,10 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ MYSQL_LIBDIR=/usr/local/lib
+ fi
+ MYSQL_BINDIR=/usr/local/bin
+- else
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR(Unable to find mysql.h in standard locations)
++ else
++ AC_MSG_RESULT(no)
++ AC_MSG_ERROR(Unable to find mysql.h in standard locations)
++ fi
+ fi
+ else
+ if test -f $withval/include/mysql/mysql.h; then
+@@ -413,11 +422,15 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@
+ AC_MSG_ERROR(Invalid MySQL directory $withval - unable to find mysql.h under $withval)
+ fi
+ fi
+- SQL_INCLUDE=-I$MYSQL_INCDIR
+- if test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
+- -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then
+- SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
+- AC_DEFINE(HAVE_THREAD_SAFE_MYSQL)
++ if test -z "$SQL_INCLUDE"; then
++ SQL_INCLUDE=-I$MYSQL_INCDIR
++ fi
++ if test -z "$SQL_LFLAGS"; then
++ if test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
++ -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then
++ SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
++ AC_DEFINE(HAVE_THREAD_SAFE_MYSQL)
++ fi
+ fi
+ SQL_BINDIR=$MYSQL_BINDIR
+ SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a
diff --git a/debian/patches/series b/debian/patches/series
index 4209e81..7ba978b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ fix-default-config
fix-sql-bindir
fix-binutils-gold-linking.patch
switch-nonfree-sha1-to-openssl.patch
+fix-build-with-multiarch-libmysql.patch
diff --git a/debian/rules b/debian/rules
index 69eb1c9..323e2bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -91,6 +91,8 @@ configure-stamp-%: extract-stamp-%
@echo " *** DEBIAN *** CONFIGURING VARIANT $*"
cp /usr/share/misc/config.guess /usr/share/misc/config.sub \
$(BUILDDIR)-$(*)/autoconf/
+ cd $(BUILDDIR)-$(*)/autoconf && \
+ autoconf configure.in >../configure
cd $(BUILDDIR)-$(*) && \
QMAKE=/usr/bin/qmake-qt4 ./configure --config-cache \
--host=${DEB_HOST_GNU_TYPE} --build=${DEB_BUILD_GNU_TYPE} \
--
Bacula, a network backup, recovery and verification program
More information about the pkg-bacula-commits
mailing list