Package: libpcap0.8-dev
Version: 1.6.2-2
Followup-For: Bug #760370
Dear Maintainer,
The thing that makes the pcap-config script incompatible with multiarch is that
it outputs
a -L$libdir option.
However on Debian that option is not needed to link with libraries in
/usr/lib/<triplet>. So I propose the following patch to make libpcap0.8-dev
multiarch-compatible.
The patch also reorders a couple extra lines as I think it makes sense to have
the Architecture and Multi-Arch lines together, and the Pre-Depends line right
before the Depends one. Those cosmetic changes could be ignored of course.
diff -ur libpcap-1.6.2.orig/debian/control libpcap-1.6.2/debian/control
--- libpcap-1.6.2.orig/debian/control 2014-10-11 19:26:58.000000000 +0200
+++ libpcap-1.6.2/debian/control 2015-02-11 01:02:41.234332566 +0100
@@ -25,6 +25,7 @@
Package: libpcap0.8-dev
Section: libdevel
Architecture: any
+Multi-Arch: same
Depends: libpcap0.8 (= ${binary:Version}), ${misc:Depends}, libc6-dev
Conflicts: libpcap-dev (<< 0.9), libpcap0.7-dev
Description: development library and header files for libpcap0.8
@@ -43,10 +44,10 @@
Package: libpcap0.8
Section: libs
Architecture: any
+Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: libpcap0.8-dev (<< 1.0.0-2)
-Multi-Arch: same
Description: system interface for user-level packet capture
libpcap (Packet CAPture) provides a portable framework for low-level
network monitoring. Applications include network statistics collection,
@@ -62,8 +63,8 @@
Section: debug
Priority: extra
Architecture: any
-Depends: libpcap0.8 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Multi-Arch: same
+Depends: libpcap0.8 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: debugging symbols for libpcap0.8
libpcap (Packet CAPture) provides a portable framework for low-level
network monitoring. Applications include network statistics collection,
diff -ur libpcap-1.6.2.orig/debian/patches/series
libpcap-1.6.2/debian/patches/series
--- libpcap-1.6.2.orig/debian/patches/series 2014-09-04 19:06:05.000000000
+0200
+++ libpcap-1.6.2/debian/patches/series 2015-02-11 00:49:23.648557473 +0100
@@ -1,5 +1,6 @@
10_shared_lib.diff
15_linker_script.diff
+20_pcap_config.diff
30_man_fixes.diff
40_fix_bus_usb_path.diff
41_bt_monitor.diff
--- /dev/null 2015-01-27 12:27:17.181130653 +0100
+++ libpcap-1.6.2/debian/patches/20_pcap_config.diff 2015-02-11
01:00:51.898666056 +0100
@@ -0,0 +1,61 @@
+Modify the pcap-config script to make it compatible with multiarch.
+Note that on Debian using the -L option is not needed to link with libraries in
+/usr/lib/<triplet>/ anyway.
+
+--- a/pcap-config.in
++++ b/pcap-config.in
+@@ -7,7 +7,7 @@
+ prefix="@prefix@"
+ exec_prefix="@exec_prefix@"
+ includedir="@includedir@"
+-libdir="@libdir@"
++libdir=""
+ V_RPATH_OPT="@V_RPATH_OPT@"
+ LIBS="@LIBS@"
+
+@@ -36,6 +36,8 @@
+ esac
+ shift
+ done
++Lopt=""
++[ -z "$libdir" ] || Lopt="-L$libdir"
+ if [ "$static" = 1 ]
+ then
+ #
+@@ -44,16 +46,16 @@
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir -lpcap $LIBS"
++ echo "-I$includedir $Lopt -lpcap $LIBS"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir $LIBS"
++ echo "-I$includedir $Lopt $LIBS"
+ elif [ "$show_cflags" = 1 ]
+ then
+ echo "-I$includedir"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L$libdir -lpcap $LIBS"
++ echo "$Lopt -lpcap $LIBS"
+ elif [ "$show_additional_libs" = 1 ]
+ then
+ echo "$LIBS"
+@@ -65,7 +67,7 @@
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I$includedir -L$libdir $RPATH -lpcap"
++ echo "-I$includedir $Lopt $RPATH -lpcap"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+ echo "-I$includedir"
+@@ -74,6 +76,6 @@
+ echo "-I$includedir"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L$libdir $RPATH -lpcap"
++ echo "$Lopt $RPATH -lpcap"
+ fi
+ fi
-- System Information:
Debian Release: 8.0
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libpcap0.8-dev depends on:
ii libc6-dev 2.19-13
ii libpcap0.8 1.6.2-2
libpcap0.8-dev recommends no packages.
libpcap0.8-dev suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]