[Lunar-commits] <moonbase> ntrack: fix build and solve multiple libnl problem

Zbigniew Luszpinski zbiggy at lunar-linux.org
Fri Jun 24 04:47:05 CEST 2011


commit 998a32bef9a145b2423c6306da3b776b6a76dd97
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Fri Jun 24 04:47:05 2011 +0200

    ntrack: fix build and solve multiple libnl problem
---
 libs/ntrack/BUILD   |   18 ++++++++++++++++++
 libs/ntrack/DEPENDS |    4 +++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/libs/ntrack/BUILD b/libs/ntrack/BUILD
new file mode 100644
index 0000000..1543ef2
--- /dev/null
+++ b/libs/ntrack/BUILD
@@ -0,0 +1,18 @@
+(
+
+  find . -name 'Makefile.*' -exec sed -i 's/-Werror//g' {} \; &&
+  find . -name 'Makefile.*' -exec sed -i 's/-pedantic//g' {} \; &&
+
+  # If more than one libnl is installed compilation will break because
+  # ntrack will try to use them all. So we choose the newest one
+  # and hide the older so configure can skip them.
+  if module_installed libnl3; then
+  sedit 's/libnl-2.0/lib-bad-nl-2.0/g' configure
+  sedit 's/libnl-1/lib-bad-nl-1/g' configure
+  elif module_installed libnl2; then
+  sedit 's/libnl-1/lib-bad-nl-1/g' configure
+  fi &&
+  OPTS+=" --disable-static " &&
+  default_build
+
+) > $C_FIFO 2>&1
diff --git a/libs/ntrack/DEPENDS b/libs/ntrack/DEPENDS
index 357e23d..7a96602 100644
--- a/libs/ntrack/DEPENDS
+++ b/libs/ntrack/DEPENDS
@@ -1,5 +1,7 @@
-depends libnl
 optional_depends glib-2                "--with-glib2"     "--without-glib2"     "for glib-2 bindings support"
 optional_depends gobject-introspection "--with-gobject"   "--without-gobject"   "for introspection support"
 optional_depends pygobject             "--with-pygobject" "--without-pygobject" "for pygobject bindings support"
 optional_depends qt4                   "--with-qt4"       "--without-qt4"       "for qt4 support"
+optional_depends libnl3                ""                 ""                    "netlink socket. choose  one from libnl3,2,1 below because they coflict each other. libnl3 is recommended so install it if older one is not required by other modules"
+optional_depends libnl2                ""                 ""                    "netlink socket. choose  one from libnl3,2,1 below because they coflict each other. libnl3 is recommended so install it if older one is not required by other modules"
+optional_depends libnl                ""                 ""                    "netlink socket. choose  one from libnl3,2,1 below because they coflict each other. libnl3 is recommended so install it if older one is not required by other modules"


More information about the Lunar-commits mailing list