From: Michael Tremer Date: Thu, 18 Feb 2010 13:16:23 +0000 (+0100) Subject: libnl: New package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1d1dae58a3586973ddadc0991fac4c085a74b4b;p=ipfire-3.x.git libnl: New package. --- diff --git a/pkgs/core/libnl/libnl.nm b/pkgs/core/libnl/libnl.nm new file mode 100644 index 000000000..46c2da713 --- /dev/null +++ b/pkgs/core/libnl/libnl.nm @@ -0,0 +1,52 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = libnl +PKG_VER = 1.1 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = Development/Libraries +PKG_URL = http://people.suug.ch/~tgr/libnl/ +PKG_LICENSE = LGPLv2 +PKG_SUMMARY = Convenience library for kernel netlink sockets. + +define PKG_DESCRIPTION + This package contains a convenience library to simplify using the \ + Linux kernel's netlink sockets interface for network manipulation. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +CONFIGURE_OPTIONS += --libdir=/lib + +define STAGE_INSTALL_CMDS + rm -vf $(BUILDROOT)/lib/libnl.so + -mkdir -pv $(BUILDROOT)/usr/lib + ln -svf ../../lib/libnl.so.1 $(BUILDROOT)/usr/lib/libnl.so + + mv -v $(BUILDROOT)/lib/pkgconfig $(BUILDROOT)/usr/lib/pkgconfig +endef diff --git a/pkgs/core/libnl/patches/libnl-1.1-include-limits-h.patch b/pkgs/core/libnl/patches/libnl-1.1-include-limits-h.patch new file mode 100644 index 000000000..3bead1623 --- /dev/null +++ b/pkgs/core/libnl/patches/libnl-1.1-include-limits-h.patch @@ -0,0 +1,11 @@ +diff -up libnl-1.1/include/netlink-local.h.limits libnl-1.1/include/netlink-local.h +--- libnl-1.1/include/netlink-local.h.limits 2008-02-22 11:31:18.000000000 -0500 ++++ libnl-1.1/include/netlink-local.h 2008-02-22 11:32:57.000000000 -0500 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/pkgs/core/libnl/patches/libnl-1.1-no-extern-inline.patch b/pkgs/core/libnl/patches/libnl-1.1-no-extern-inline.patch new file mode 100644 index 000000000..16a4f8f09 --- /dev/null +++ b/pkgs/core/libnl/patches/libnl-1.1-no-extern-inline.patch @@ -0,0 +1,57 @@ +From 84fefcadcde5d6c343db7f5c1744f6b1f070bc71 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 14 May 2009 11:30:40 -0400 +Subject: [PATCH] Remove "inline" keyword from nl_object_priv(). + +"extern inline foo();" in a header file generates a compiler warning in +consumers of the library. Also, it doesn't make any sense whatsoever. +For this reason, and the fact that this function is not used at all in +the file in which it's defined, I have removed the "inline" keyword. +--- + doc/Doxyfile.in | 2 +- + include/netlink/object.h | 2 +- + lib/object.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in +index 0c518b7..396fcbc 100644 +--- a/doc/Doxyfile.in ++++ b/doc/Doxyfile.in +@@ -113,7 +113,7 @@ FULL_PATH_NAMES = YES + # If left blank the directory from which doxygen is run is used as the + # path to strip. + +-STRIP_FROM_PATH = ++STRIP_FROM_PATH = /home/pjones/build/BUILD/libnl-1.1 + + # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of + # the path mentioned in the documentation of a class, which tells +diff --git a/include/netlink/object.h b/include/netlink/object.h +index 751a1b3..241a2ad 100644 +--- a/include/netlink/object.h ++++ b/include/netlink/object.h +@@ -55,7 +55,7 @@ extern int nl_object_is_marked(struct nl_object *); + /* Access Functions */ + extern int nl_object_get_refcnt(struct nl_object *); + extern struct nl_cache * nl_object_get_cache(struct nl_object *); +-extern inline void * nl_object_priv(struct nl_object *); ++extern void * nl_object_priv(struct nl_object *); + + #ifdef __cplusplus + } +diff --git a/lib/object.c b/lib/object.c +index 74f6e2d..845ca1d 100644 +--- a/lib/object.c ++++ b/lib/object.c +@@ -376,7 +376,7 @@ struct nl_cache *nl_object_get_cache(struct nl_object *obj) + return obj->ce_cache; + } + +-inline void *nl_object_priv(struct nl_object *obj) ++void *nl_object_priv(struct nl_object *obj) + { + return obj; + } +-- +1.6.2.2 + diff --git a/pkgs/core/libnl/patches/libnl-1.1-permissions.patch b/pkgs/core/libnl/patches/libnl-1.1-permissions.patch new file mode 100644 index 000000000..916ec9a00 --- /dev/null +++ b/pkgs/core/libnl/patches/libnl-1.1-permissions.patch @@ -0,0 +1,13 @@ +--- libnl-1.0-pre5/lib/Makefile.debuginfo 2006-06-15 18:11:21.000000000 -0400 ++++ libnl-1.0-pre5/lib/Makefile 2006-06-15 18:11:28.000000000 -0400 +@@ -64,7 +64,7 @@ + + install: + mkdir -p $(DESTDIR)$(libdir)/ +- install -m 0644 $(OUT_SLIB) $(DESTDIR)$(libdir) ++ install -m 0755 $(OUT_SLIB) $(DESTDIR)$(libdir) + rm -f $(DESTDIR)$(libdir)/$(LN1_SLIB) + $(LN) -s $(OUT_SLIB) $(DESTDIR)$(libdir)/$(LN1_SLIB) + rm -f $(DESTDIR)$(libdir)/$(LN_SLIB) + $(LN) -s $(LN1_SLIB) $(DESTDIR)$(libdir)/$(LN_SLIB) +