Import buildroot 2016.02.01

This commit is contained in:
2016-02-24 22:35:39 +01:00
parent a6ee09dea4
commit 828befcf3c
7393 changed files with 390887 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
From d667b13a87cf3207599a19eb981a893a1d7a67ee Mon Sep 17 00:00:00 2001
From: Brendan Heading <brendanheading@gmail.com>
Date: Mon, 14 Sep 2015 23:25:52 +0100
Subject: [PATCH 1/1] ibrcommon/data/File.cpp: support POSIX basename call
Firstly, and somewhat strangely, musl chooses not to provide a basename(3)
prototype within <string.h> whenever __cplusplus is defined. This can be
solved by including the <libgen.h> header defined by POSIX 1003.1 whenever
__GLIBC__ is not defined.
However, this leads to a second problem. POSIX defines the function as
char* basename(char*) and this is the only version supported by musl.
However, the std::string.cstr() method returns a const char*.
POSIX says that the string parameter can be modified. However the GNU
implementation never modifies it. glibc therefore supports an extension
when compiling under C++ by also supplying
const char* basename(const char*). This extension is not present on musl
which is the cause of the failure.
The solution is reasonably straightforward; test if __GLIBC__ is defined
before calling basename. If not, use the fallback already provided for
other platforms whereby basename() is called on a temporary copy.
Signed-off-by: Brendan Heading <brendanheading@gmail.com>
Upstream-status: pending
---
ibrcommon/data/File.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ibrcommon/data/File.cpp b/ibrcommon/data/File.cpp
index 31af4ae..68e9b4f 100644
--- a/ibrcommon/data/File.cpp
+++ b/ibrcommon/data/File.cpp
@@ -35,7 +35,7 @@
#include <cerrno>
#include <fstream>
-#if !defined(HAVE_FEATURES_H) || defined(ANDROID)
+#if !defined(HAVE_FEATURES_H) || !defined(__GLIBC__) || defined(ANDROID)
#include <libgen.h>
#endif
@@ -225,7 +225,7 @@ namespace ibrcommon
std::string File::getBasename() const
{
-#if !defined(ANDROID) && defined(HAVE_FEATURES_H)
+#if !defined(ANDROID) && defined(HAVE_FEATURES_H) && defined(__GLIBC__)
return std::string(basename(_path.c_str()));
#else
char path[_path.length()+1];
--
2.4.3

View File

@@ -0,0 +1,13 @@
config BR2_PACKAGE_IBRCOMMON
bool "ibrcommon"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
help
IBR-DTN is a small dtn application that supports:
Bundle Protocol RFC 5050
Bundle Security Protocol RFC 6257
http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn
comment "ibrcommon needs a toolchain w/ C++, threads"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 9c457c1ebc01e6216524636628c647bef34ab11bd96f0e0788be8749374fdc20 ibrcommon-1.0.1.tar.gz

View File

@@ -0,0 +1,36 @@
################################################################################
#
# ibrcommon
#
################################################################################
IBRCOMMON_VERSION = 1.0.1
IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz
IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
IBRCOMMON_INSTALL_STAGING = YES
IBRCOMMON_LICENSE = Apache-2.0
IBRCOMMON_LICENSE_FILES = COPYING README
IBRCOMMON_DEPENDENCIES = host-pkgconf
ifeq ($(BR2_PACKAGE_OPENSSL),y)
IBRCOMMON_DEPENDENCIES += openssl
IBRCOMMON_CONF_OPTS += --with-openssl
else
IBRCOMMON_CONF_OPTS += --without-openssl
endif
ifeq ($(BR2_PACKAGE_LIBNL),y)
IBRCOMMON_DEPENDENCIES += libnl
IBRCOMMON_CONF_OPTS += --with-lowpan
else
IBRCOMMON_CONF_OPTS += --without-lowpan
endif
ifeq ($(BR2_PACKAGE_LIBXML2),y)
IBRCOMMON_DEPENDENCIES += libxml2
IBRCOMMON_CONF_OPTS += --with-xml
else
IBRCOMMON_CONF_OPTS += --without-xml
endif
$(eval $(autotools-package))