summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2012-06-05 00:09:57 +0400
committerVlad Glagolev2012-06-14 12:30:17 +0400
commita8483ad4ba08005ed6f5bfccdffb1f687012bba2 (patch)
tree31019c40ce9d37c41f10a0353d21a60366c71d5e
parent3d89e243a670162f6e4cbcb17812fa7582dd6317 (diff)
libpcap: fixed libnl support
(cherry picked from commit ee167d992ede32000fa62424a4cc9d0290f0f954)
-rwxr-xr-xnet/libpcap/BUILD3
-rwxr-xr-xnet/libpcap/DEPENDS11
-rw-r--r--net/libpcap/HISTORY6
-rwxr-xr-xnet/libpcap/PRE_BUILD6
-rw-r--r--net/libpcap/libnl-3.patch21
5 files changed, 46 insertions, 1 deletions
diff --git a/net/libpcap/BUILD b/net/libpcap/BUILD
new file mode 100755
index 0000000000..6f9ce09fa6
--- /dev/null
+++ b/net/libpcap/BUILD
@@ -0,0 +1,3 @@
+CFLAGS="-I$INSTALL_ROOT/usr/include/libnl3 $CFLAGS" &&
+
+default_build
diff --git a/net/libpcap/DEPENDS b/net/libpcap/DEPENDS
index 46f3a9814c..1d85d08621 100755
--- a/net/libpcap/DEPENDS
+++ b/net/libpcap/DEPENDS
@@ -1,3 +1,12 @@
depends flex &&
depends bison &&
-optional_depends libnl '' '--without-libnl' 'nettlink support'
+
+optional_depends BLUEZ \
+ "--enable-bluetooth" \
+ "--disable-bluetooth" \
+ "for Bluetooth support" &&
+
+optional_depends libnl \
+ "--with-libnl" \
+ "--without-libnl" \
+ "for netlink support"
diff --git a/net/libpcap/HISTORY b/net/libpcap/HISTORY
index 7b5d9cb0af..2b3a32bdf7 100644
--- a/net/libpcap/HISTORY
+++ b/net/libpcap/HISTORY
@@ -1,3 +1,9 @@
+2012-06-05 Vlad Glagolev <stealth@sourcemage.org>
+ * BUILD: added, for missing flags
+ * DEPENDS: added optional depends on BLUEZ; corrected flags
+ * PRE_BUILD: added, to apply the patch
+ * libnl-3.patch: added, to make libnl dependency actually work
+
2012-01-03 Ladislav Hagara <hgr@vabo.cz>
* DETAILS: 1.2.1
diff --git a/net/libpcap/PRE_BUILD b/net/libpcap/PRE_BUILD
new file mode 100755
index 0000000000..8a3b86d1ba
--- /dev/null
+++ b/net/libpcap/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/libnl-3.patch" &&
+
+autoconf
diff --git a/net/libpcap/libnl-3.patch b/net/libpcap/libnl-3.patch
new file mode 100644
index 0000000000..2ce593616f
--- /dev/null
+++ b/net/libpcap/libnl-3.patch
@@ -0,0 +1,21 @@
+--- configure.in.orig 2012-01-02 04:47:37.000000000 +0400
++++ configure.in 2012-06-04 23:41:10.871001151 +0400
+@@ -431,14 +431,14 @@
+
+ if test x$with_libnl != xno ; then
+ #
+- # Try libnl 2.x first.
++ # Try libnl 3.x first.
+ #
+- AC_CHECK_LIB(nl, nl_socket_alloc,
++ AC_CHECK_LIB(nl-3, nl_socket_alloc,
+ [
+ #
+- # Yes, we have libnl 2.x.
++ # Yes, we have libnl 3.x.
+ #
+- LIBS="-lnl-genl -lnl $LIBS"
++ LIBS="-lnl-genl-3 -lnl-3 $LIBS"
+ AC_DEFINE(HAVE_LIBNL,1,[if libnl exists])
+ AC_DEFINE(HAVE_LIBNL_2_x,1,[if libnl exists and is version 2.x])
+ ],