aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-06-15 15:00:44 -0700
committerGitHub <noreply@github.com>2019-06-15 15:00:44 -0700
commit45d40b4a8820f18367de6443eab05878609ec424 (patch)
tree28708452a670f8d1dd76389e72fc151e3c6145ba
parentc66479e18a05f997aed2a96e57d0cd65ddb63c86 (diff)
parenta216030b596cf7468ec737c9320f170e9893c18a (diff)
Merge pull request #9035 from neheb/ibr
ibr*: Switch to uClibc++
-rw-r--r--libs/ibrcommon/Makefile5
-rw-r--r--libs/ibrdtn/Makefile3
-rw-r--r--libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch25
-rw-r--r--libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch22
-rw-r--r--libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch41
-rw-r--r--libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch53
-rw-r--r--net/ibrdtn-tools/Makefile3
-rw-r--r--net/ibrdtnd/Makefile3
-rw-r--r--net/ibrdtnd/patches/030-openssl-deprecated.patch20
9 files changed, 170 insertions, 5 deletions
diff --git a/libs/ibrcommon/Makefile b/libs/ibrcommon/Makefile
index 3c50d3acf..dfa2e5910 100644
--- a/libs/ibrcommon/Makefile
+++ b/libs/ibrcommon/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ibrcommon
PKG_VERSION:=1.0.1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,12 +20,13 @@ PKG_LICENSE:=Apache-2.0
PKG_INSTALL:=1
PKG_FIXUP:=libtool
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrcommon
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libstdcpp +libpthread +librt +libnl +libopenssl
+ DEPENDS:=$(CXX_DEPENDS) +librt +libnl +libopenssl
TITLE:=IBR Common C++ Library
endef
diff --git a/libs/ibrdtn/Makefile b/libs/ibrdtn/Makefile
index a510c7861..c4aceba12 100644
--- a/libs/ibrdtn/Makefile
+++ b/libs/ibrdtn/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ibrdtn
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,6 +20,7 @@ PKG_LICENSE:=Apache-2.0
PKG_INSTALL:=1
PKG_FIXUP:=libtool
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtn
diff --git a/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch b/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch
new file mode 100644
index 000000000..fe535089a
--- /dev/null
+++ b/libs/ibrdtn/patches/010-Add-operator-to-Bundle-block_elem.patch
@@ -0,0 +1,25 @@
+From 199c86591edc7e82b92903efecadc4f69ea63370 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Tue, 1 Jan 2019 11:25:50 +0100
+Subject: [PATCH] Add operator!=() to Bundle::block_elem
+
+Alternative implementations of libstdcpp as uclibc++ use it in
+the algorithm implemenetations.
+---
+ ibrdtn/data/Bundle.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 036a2a6fb..9bbc066d7 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -69,6 +69,9 @@ namespace dtn
+ bool operator==(const dtn::data::block_t &type) const {
+ return (**this) == type;
+ }
++ bool operator!=(const dtn::data::block_t &type) const {
++ return !((**this) == type);
++ }
+ };
+
+ typedef std::list<block_elem> block_list;
diff --git a/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch b/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch
new file mode 100644
index 000000000..d1e2c588d
--- /dev/null
+++ b/libs/ibrdtn/patches/020-Use-const-iterator-in-const-function-of-MemoryBundle.patch
@@ -0,0 +1,22 @@
+From 6945698778caf7cdaace9ce8dae82162dbe2ee9f Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:26:51 +0100
+Subject: [PATCH] Use const iterator in const function of MemoryBundleSet
+
+---
+ ibrdtn/data/MemoryBundleSet.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ibrdtn/data/MemoryBundleSet.cpp b/ibrdtn/data/MemoryBundleSet.cpp
+index 987342e6d..b67fdd393 100644
+--- a/ibrdtn/data/MemoryBundleSet.cpp
++++ b/ibrdtn/data/MemoryBundleSet.cpp
+@@ -134,7 +134,7 @@ namespace dtn
+ // the bundles set. This happen if the MemoryBundleSet gets deserialized.
+ if (!_consistent) return true;
+
+- bundle_set::iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
++ bundle_set::const_iterator iter = _bundles.find(dtn::data::MetaBundle::create(bundle));
+ return (iter != _bundles.end());
+ }
+
diff --git a/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch b/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch
new file mode 100644
index 000000000..0e29a132e
--- /dev/null
+++ b/libs/ibrdtn/patches/030-Use-std-streamoff-instead-of-std-streampos.patch
@@ -0,0 +1,41 @@
+From 1395d849d73147319ee422d2ce34de0bcb90e6f8 Mon Sep 17 00:00:00 2001
+From: Johannes Morgenroth <jm@m-network.de>
+Date: Thu, 3 Jan 2019 07:34:14 +0100
+Subject: [PATCH] Use std::streamoff instead of std::streampos
+
+---
+ ibrdtn/data/BundleMerger.cpp | 2 +-
+ ibrdtn/data/Dictionary.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ibrdtn/data/BundleMerger.cpp b/ibrdtn/data/BundleMerger.cpp
+index 1cd20c522..b71a0849b 100644
+--- a/ibrdtn/data/BundleMerger.cpp
++++ b/ibrdtn/data/BundleMerger.cpp
+@@ -119,7 +119,7 @@ namespace dtn
+ }
+
+ ibrcommon::BLOB::iostream stream = c._blob.iostream();
+- (*stream).seekp(obj.fragmentoffset.get<std::streampos>());
++ (*stream).seekp(obj.fragmentoffset.get<std::streamoff>());
+
+ const dtn::data::PayloadBlock &p = obj.find<dtn::data::PayloadBlock>();
+ const Length plength = p.getLength();
+diff --git a/ibrdtn/data/Dictionary.cpp b/ibrdtn/data/Dictionary.cpp
+index 6299e66f3..208f90488 100644
+--- a/ibrdtn/data/Dictionary.cpp
++++ b/ibrdtn/data/Dictionary.cpp
+@@ -154,11 +154,11 @@ namespace dtn
+ {
+ char buffer[1024];
+
+- _bytestream.seekg(scheme.get<std::streampos>());
++ _bytestream.seekg(scheme.get<std::streamoff>());
+ _bytestream.get(buffer, 1024, '\0');
+ std::string scheme_str(buffer);
+
+- _bytestream.seekg(ssp.get<std::streampos>());
++ _bytestream.seekg(ssp.get<std::streamoff>());
+ _bytestream.get(buffer, 1024, '\0');
+ std::string ssp_str(buffer);
+
diff --git a/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch b/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch
new file mode 100644
index 000000000..df9f27f1a
--- /dev/null
+++ b/libs/ibrdtn/patches/040-Add-operator-to-BundleID-and-MetaBundle.patch
@@ -0,0 +1,53 @@
+From a5b9c2feeaabbd90c9734c5d865d471eed0d5e3a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 01:55:15 -0700
+Subject: [PATCH] Add operator!=() to BundleID and MetaBundle
+
+Needed for uClibc++.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ ibrdtn/data/Bundle.cpp | 10 ++++++++++
+ ibrdtn/data/Bundle.h | 2 ++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/ibrdtn/data/Bundle.cpp b/ibrdtn/data/Bundle.cpp
+index f515860..943544e 100644
+--- a/ibrdtn/data/Bundle.cpp
++++ b/ibrdtn/data/Bundle.cpp
+@@ -71,11 +71,21 @@ namespace dtn
+ return other == (const PrimaryBlock&)(*this);
+ }
+
++ bool Bundle::operator!=(const BundleID& other) const
++ {
++ return other != (const PrimaryBlock&)(*this);
++ }
++
+ bool Bundle::operator==(const MetaBundle& other) const
+ {
+ return other == (const PrimaryBlock&)(*this);
+ }
+
++ bool Bundle::operator!=(const MetaBundle& other) const
++ {
++ return other != (const PrimaryBlock&)(*this);
++ }
++
+ bool Bundle::operator!=(const Bundle& other) const
+ {
+ return (const PrimaryBlock&)(*this) != (const PrimaryBlock&)other;
+diff --git a/ibrdtn/data/Bundle.h b/ibrdtn/data/Bundle.h
+index 9bbc066..6a4ea47 100644
+--- a/ibrdtn/data/Bundle.h
++++ b/ibrdtn/data/Bundle.h
+@@ -97,7 +97,9 @@ namespace dtn
+ virtual ~Bundle();
+
+ bool operator==(const BundleID& other) const;
++ bool operator!=(const BundleID& other) const;
+ bool operator==(const MetaBundle& other) const;
++ bool operator!=(const MetaBundle& other) const;
+
+ bool operator==(const Bundle& other) const;
+ bool operator!=(const Bundle& other) const;
diff --git a/net/ibrdtn-tools/Makefile b/net/ibrdtn-tools/Makefile
index 3ef388136..6112c993d 100644
--- a/net/ibrdtn-tools/Makefile
+++ b/net/ibrdtn-tools/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ibrdtn-tools
PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -19,6 +19,7 @@ PKG_LICENSE:=Apache-2.0
PKG_INSTALL:=1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtn-tools
diff --git a/net/ibrdtnd/Makefile b/net/ibrdtnd/Makefile
index 0a2a5ee81..d83bc2cc1 100644
--- a/net/ibrdtnd/Makefile
+++ b/net/ibrdtnd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ibrdtnd
PKG_VERSION:=1.0.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases
@@ -20,6 +20,7 @@ PKG_LICENSE:=Apache-2.0
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ibrdtnd
diff --git a/net/ibrdtnd/patches/030-openssl-deprecated.patch b/net/ibrdtnd/patches/030-openssl-deprecated.patch
new file mode 100644
index 000000000..a793da8ad
--- /dev/null
+++ b/net/ibrdtnd/patches/030-openssl-deprecated.patch
@@ -0,0 +1,20 @@
+--- a/src/security/SecurityKeyManager.cpp
++++ b/src/security/SecurityKeyManager.cpp
+@@ -29,6 +29,7 @@
+ #include <fstream>
+ #include <fcntl.h>
+
++#include <openssl/bn.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/err.h>
+--- a/src/security/exchange/DHProtocol.cpp
++++ b/src/security/exchange/DHProtocol.cpp
+@@ -28,6 +28,7 @@
+ #include <ibrcommon/ssl/HMacStream.h>
+ #include <ibrcommon/Logger.h>
+
++#include <openssl/dh.h>
+ #include <openssl/rand.h>
+ #include <openssl/pem.h>
+ #include "openssl_compat.h"