mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
From d89fca062ba966332b573673fdd5c4cf01c3e2f5 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Mon, 29 Dec 2014 15:32:08 +0100
|
||||
Subject: [PATCH 2/2] Add Libs.private field to libnftnl.pc
|
||||
|
||||
Static linking userspace programs such as nftables against libnftnl
|
||||
currently doesn't work out of the box, because libnftnl is linked
|
||||
against libmnl, but this isn't expressed in libnftnl pkg-config
|
||||
file:
|
||||
|
||||
CCLD nft
|
||||
[...]/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libnftnl.a(table.o): In function `_nft_table_nlmsg_parse':
|
||||
table.c:(.text+0x480): undefined reference to `_mnl_attr_parse'
|
||||
table.c:(.text+0x492): undefined reference to `_mnl_attr_get_str'
|
||||
table.c:(.text+0x4a8): undefined reference to `_mnl_attr_get_u32'
|
||||
table.c:(.text+0x4ca): undefined reference to `_mnl_attr_get_u32'
|
||||
[...]
|
||||
|
||||
The Libs.private field is specifically designed for such usage:
|
||||
|
||||
From pkg-config documentation:
|
||||
|
||||
Libs.private:
|
||||
|
||||
This line should list any private libraries in use. Private
|
||||
libraries are libraries which are not exposed through your
|
||||
library, but are needed in the case of static linking.
|
||||
|
||||
Therefore, this patch adds a reference to libmnl in the Libs.private
|
||||
field of libnftnl pkg-config file.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
libnftnl.pc.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libnftnl.pc.in b/libnftnl.pc.in
|
||||
index fd5cc6a..7fef921 100644
|
||||
--- a/libnftnl.pc.in
|
||||
+++ b/libnftnl.pc.in
|
||||
@@ -12,4 +12,5 @@ Version: @VERSION@
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lnftnl
|
||||
+Libs.private: @LIBMNL_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.1.0
|
||||
|
||||
25
package/libnftnl/Config.in
Normal file
25
package/libnftnl/Config.in
Normal file
@@ -0,0 +1,25 @@
|
||||
comment "libnftnl needs a toolchain w/ headers >= 3.12"
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
|
||||
|
||||
config BR2_PACKAGE_LIBNFTNL
|
||||
bool "libnftnl"
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
|
||||
select BR2_PACKAGE_LIBMNL
|
||||
help
|
||||
libnftnl is a userspace library providing a low-level
|
||||
netlink programming interface (API) to the in-kernel
|
||||
nf_tables subsystem. The library libnftnl has been
|
||||
previously known as libnftables. This library is
|
||||
currently used by nftables.
|
||||
|
||||
http://netfilter.org/projects/libnftnl/index.html
|
||||
|
||||
if BR2_PACKAGE_LIBNFTNL
|
||||
|
||||
config BR2_PACKAGE_LIBNFTNL_JSON
|
||||
bool "enable JSON support"
|
||||
select BR2_PACKAGE_JANSSON
|
||||
help
|
||||
Enable JSON parsing support
|
||||
|
||||
endif
|
||||
3
package/libnftnl/libnftnl.hash
Normal file
3
package/libnftnl/libnftnl.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# From http://www.netfilter.org/projects/libnftnl/downloads.html
|
||||
sha256 22dd97d3b06ae8c67499506e2bfd6803ce116479076ec3700e7a4c7cd9fcba0f libnftnl-1.1.3.tar.bz2
|
||||
sha256 98193898c663001eff2fdcfb676e210c13042bc1a05e8d570c363efa396f8e24 COPYING
|
||||
22
package/libnftnl/libnftnl.mk
Normal file
22
package/libnftnl/libnftnl.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# libnftnl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBNFTNL_VERSION = 1.1.3
|
||||
LIBNFTNL_SITE = https://netfilter.org/projects/libnftnl/files
|
||||
LIBNFTNL_SOURCE = libnftnl-$(LIBNFTNL_VERSION).tar.bz2
|
||||
LIBNFTNL_LICENSE = GPL-2.0+
|
||||
LIBNFTNL_LICENSE_FILES = COPYING
|
||||
LIBNFTNL_INSTALL_STAGING = YES
|
||||
LIBNFTNL_DEPENDENCIES = host-pkgconf libmnl
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNFTNL_JSON),y)
|
||||
LIBNFTNL_CONF_OPTS += --with-json-parsing
|
||||
LIBNFTNL_DEPENDENCIES += jansson
|
||||
else
|
||||
LIBNFTNL_CONF_OPTS += --without-json-parsing
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user