[Pkg-clamav-devel] Bug#732744: clamav: use dh-autoreconf for better new-port coverage

Dimitri John Ledkov xnox at ubuntu.com
Fri Dec 20 23:24:43 UTC 2013


Package: clamav
Severity: normal
Tags: patch
Version: 0.97.8+dfsg-1
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch trusty

Hi,

The ppc64el port requires a patch to libtool.m4. I don't think that's in
Debian yet, but when it is it will require autoreconfing a bunch of
packages to pick it up. clamav could handle this quite easily by using
dh-autoreconf, when libtool is in use (as of course it is here),
dh-autoreconf is a superset of autotools-dev, and it seems to still
build just fine if I do the following.  I did have to do a bit of extra
work to make things happy with new automake.

  * Convert to dh-autoreconf in order to update libtool.m4 for new
    ports.
  * Remove -Werror from automake flags, to avoid failing autoreconf with
    new automake.

diff -u clamav-0.97.8+dfsg/debian/rules clamav-0.97.8+dfsg/debian/rules
--- clamav-0.97.8+dfsg/debian/rules
+++ clamav-0.97.8+dfsg/debian/rules
@@ -57,6 +57,7 @@
 	  fi;\
 	done;
 	# Add here commands to configure the package.
+	dh_autoreconf
 	./configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-clamav --with-dbdir=/var/lib/clamav/ --sysconfdir=/etc/clamav --enable-milter --disable-clamuko --with-gnu-ld --enable-dns-fix ${DEBUG_OPTS} --disable-unrar --libdir=\$${prefix}/lib --with-system-tommath  --without-included-ltdl
 
 build: build-stamp
@@ -126,6 +126,7 @@
 	rm -f debian/clamav-freshclam.config
 	rm -f debian/clamav-freshclam.postinst
 	rm -f libclamav/c++/llvm/utils/lit/lit/*.pyc
+	dh_autoreconf_clean
 	dh_clean
 
 install: install-indep install-arch
diff -u clamav-0.97.8+dfsg/debian/control clamav-0.97.8+dfsg/debian/control
--- clamav-0.97.8+dfsg/debian/control
+++ clamav-0.97.8+dfsg/debian/control
@@ -4,6 +4,6 @@
 Maintainer: ClamAV Team <pkg-clamav-devel at lists.alioth.debian.org>
 Uploaders: Stephen Gran <sgran at debian.org>, Michael Meskes <meskes at debian.org>, Michael Tautschnig <mt at debian.org>, Scott Kitterman <scott at kitterman.com>
-Build-Depends: debhelper (>= 6.0.7), po-debconf, zlib1g-dev, libbz2-dev, libmilter-dev, perl, bc, check, libtommath-dev, libltdl-dev, libncurses5-dev, python
+Build-Depends: debhelper (>= 6.0.7), po-debconf, zlib1g-dev, libbz2-dev, libmilter-dev, perl, bc, check, libtommath-dev, libltdl-dev, libncurses5-dev, python, dh-autoreconf
 Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/pkg-clamav/clamav.git
 Vcs-Browser: http://git.debian.org/?p=pkg-clamav/clamav.git;a=summary
only in patch2:
unchanged:
--- clamav-0.97.8+dfsg.orig/configure.in
+++ clamav-0.97.8+dfsg/configure.in
@@ -34,7 +34,7 @@
 
 dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
 dnl enable stealth builds and psychedelic tests
-AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar])
+AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar])
 AM_SILENT_RULES([yes])
 
 dnl we told automake to not define these, since we want to include
only in patch2:
unchanged:
--- clamav-0.97.8+dfsg.orig/libclamav/c++/configure.ac
+++ clamav-0.97.8+dfsg/libclamav/c++/configure.ac
@@ -20,7 +20,7 @@
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER([clamavcxx-config.h])
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE([1.9 -Wall -Wportability -Werror foreign no-define color-tests tar-pax])
+AM_INIT_AUTOMAKE([1.9 -Wall -Wportability foreign no-define color-tests tar-pax])
 AM_SILENT_RULES([yes])
 
 cxxset=${CXXFLAGS+set}


--
Regards,

Dimitri.



More information about the Pkg-clamav-devel mailing list