Package: ntop
Version: 3:5.0.1+dfsg1-2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu trusty ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * debian/rules: use dh_autotools-dev to update config.* for new ports.
  * debian/patches/kfreebsd-ftbfs.patch: fix broken preprocessor ifdefs.

The first bit fixes the FTBFS on arm64 and ppc64el and future-proofs
the package for other new ports.

As a bonus, I noticed a CPP error while testbuilding, and figured I'd
fix the kfreebsd patch at the same time.  This was tested on a kfbsd
porter machine and builds fine.

Cheers,

... Adam

-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru ntop-5.0.1+dfsg1/debian/changelog ntop-5.0.1+dfsg1/debian/changelog
diff -Nru ntop-5.0.1+dfsg1/debian/patches/kfreebsd-ftbfs.patch ntop-5.0.1+dfsg1/debian/patches/kfreebsd-ftbfs.patch
--- ntop-5.0.1+dfsg1/debian/patches/kfreebsd-ftbfs.patch	2013-09-12 01:58:55.000000000 -0600
+++ ntop-5.0.1+dfsg1/debian/patches/kfreebsd-ftbfs.patch	2014-03-30 13:38:10.000000000 -0600
@@ -25,7 +25,7 @@
  #endif
  
 -#ifdef LINUX
-+#ifdef LINUX || __GLIBC__
++#if defined(__linux__) || defined(__GLIBC__)
  /*
   * This allows to hide the (minimal) differences between linux and BSD
   */
@@ -38,3 +38,23 @@
  #ifndef  _GNU_SOURCE
  #define _GNU_SOURCE
  #endif
+Index: ntop/nDPI/src/lib/ipq_main.h
+===================================================================
+--- ntop.orig/nDPI/src/lib/ipq_main.h	2012-02-04 10:03:20.000000000 -0700
++++ ntop/nDPI/src/lib/ipq_main.h	2014-03-30 13:34:27.184950117 -0600
+@@ -50,13 +50,13 @@
+ 
+ /* default includes */
+ 
+-#if defined(__APPLE__) || (defined(HAVE_NTOP) && defined(WIN32)) || defined(__FreeBSD__)
++#if defined(__APPLE__) || (defined(HAVE_NTOP) && defined(WIN32)) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ 
+ #ifndef WIN32
+ #include <sys/param.h>
+ #endif
+ 
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ #include <netinet/in.h>
+ #endif
+ 
diff -Nru ntop-5.0.1+dfsg1/debian/rules ntop-5.0.1+dfsg1/debian/rules
--- ntop-5.0.1+dfsg1/debian/rules	2013-09-12 01:58:55.000000000 -0600
+++ ntop-5.0.1+dfsg1/debian/rules	2014-03-30 01:12:54.000000000 -0600
@@ -65,7 +65,7 @@
 	debconf-updatepo
 
 %:
-	dh $@
+	dh $@ --with autotools_dev
 
 DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]+:)?([^+]+).*,\2,p')
 DEB_DFSG_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]+:)?(.*\+dfsg[0-9]+).*,\2,p')

Reply via email to