Browse Source

ipfs-http-client: update to 2021-03-01

Switch to AUTORELEASE for simplicity.

Switch to building with Ninja for faster compilation.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
6fb3f7d0d9
2 changed files with 48 additions and 45 deletions
  1. +18
    -19
      libs/ipfs-http-client/Makefile
  2. +30
    -26
      libs/ipfs-http-client/patches/001-add-srv-addr.patch

+ 18
- 19
libs/ipfs-http-client/Makefile View File

@ -5,23 +5,22 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=ipfs-http-client PKG_NAME:=ipfs-http-client
PKG_RELEASE:=3
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/vasild/cpp-ipfs-http-client.git
PKG_SOURCE_DATE:=2021-03-01
PKG_SOURCE_VERSION:=27f6439303f7afb5b8b2e4154f4269ba296059c7
PKG_MIRROR_HASH:=61814d666bbd927750a0af7d350ad8ba27c2a78e0b5f5196ec4e0b5049ef2690
PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com> PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com>
PKG_LICENSE:=MIT PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.MIT PKG_LICENSE_FILES:=LICENSE.MIT
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/vasild/cpp-ipfs-http-client.git
PKG_SOURCE_DATE:=2019-11-05
PKG_SOURCE_VERSION:=763e59ad698f3e3846f85df11e01c18ef3fbc401
PKG_MIRROR_HASH:=a2b5721faf0d43ddb4a892245ef382666149c83f3f97e558e1a6acf2402fb9fd
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=nlohmannjson PKG_BUILD_DEPENDS:=nlohmannjson
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ../../devel/ninja/ninja-cmake.mk
define Package/ipfs-http-client/Default/description define Package/ipfs-http-client/Default/description
IPFS (the InterPlanetary File System) is the Distributed Web. IPFS (the InterPlanetary File System) is the Distributed Web.
@ -66,16 +65,16 @@ endef
define Package/ipfs-http-client-tests/install define Package/ipfs-http-client-tests/install
$(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/block $(1)/usr/bin/ipfs-block
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/config $(1)/usr/bin/ipfs-config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/dht $(1)/usr/bin/ipfs-dht
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/files $(1)/usr/bin/ipfs-files
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/generic $(1)/usr/bin/ipfs-generic
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/key $(1)/usr/bin/ipfs-key
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/name $(1)/usr/bin/ipfs-name
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/object $(1)/usr/bin/ipfs-object
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/pin $(1)/usr/bin/ipfs-pin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/swarm $(1)/usr/bin/ipfs-swarm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_block $(1)/usr/bin/ipfs-block
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_config $(1)/usr/bin/ipfs-config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_dht $(1)/usr/bin/ipfs-dht
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_files $(1)/usr/bin/ipfs-files
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_generic $(1)/usr/bin/ipfs-generic
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_key $(1)/usr/bin/ipfs-key
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_name $(1)/usr/bin/ipfs-name
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_object $(1)/usr/bin/ipfs-object
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_pin $(1)/usr/bin/ipfs-pin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_swarm $(1)/usr/bin/ipfs-swarm
endef endef
$(eval $(call BuildPackage,libipfs-http-client)) $(eval $(call BuildPackage,libipfs-http-client))


+ 30
- 26
libs/ipfs-http-client/patches/001-add-srv-addr.patch View File

@ -1,5 +1,5 @@
--- a/test/block.cc
+++ b/test/block.cc
--- a/test/test_block.cc
+++ b/test/test_block.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
@ -19,8 +19,8 @@
/** [ipfs::Client::BlockPut] */ /** [ipfs::Client::BlockPut] */
ipfs::Json block; ipfs::Json block;
--- a/test/config.cc
+++ b/test/config.cc
--- a/test/test_config.cc
+++ b/test/test_config.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
@ -40,8 +40,8 @@
/** [ipfs::Client::ConfigSet] */ /** [ipfs::Client::ConfigSet] */
client.ConfigSet("Datastore.StorageMax", "20GB"); client.ConfigSet("Datastore.StorageMax", "20GB");
--- a/test/dht.cc
+++ b/test/dht.cc
--- a/test/test_dht.cc
+++ b/test/test_dht.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
@ -61,8 +61,8 @@
ipfs::Json add_result; ipfs::Json add_result;
client.FilesAdd( client.FilesAdd(
--- a/test/error.cc
+++ b/test/error.cc
--- a/test/test_error.cc
+++ b/test/test_error.cc
@@ -35,16 +35,23 @@ extern std::string replace_body; @@ -35,16 +35,23 @@ extern std::string replace_body;
} }
} // namespace ipfs } // namespace ipfs
@ -90,9 +90,9 @@
std::string object_id; std::string object_id;
client.ObjectNew(&object_id); client.ObjectNew(&object_id);
--- a/test/files.cc
+++ b/test/files.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
--- a/test/test_files.cc
+++ b/test/test_files.cc
@@ -24,10 +24,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
@ -106,14 +106,15 @@
+ srvaddr=argv[1]; + srvaddr=argv[1];
+ +
try { try {
- ipfs::Client client("localhost", 5001);
+ ipfs::Client client(srvaddr, 5001);
// Try Files API tests with time-out setting of 20 seconds
- ipfs::Client client("localhost", 5001, "20s");
+ ipfs::Client client(srvaddr, 5001, "20s");
/** [ipfs::Client::FilesGet] */ /** [ipfs::Client::FilesGet] */
std::stringstream contents; std::stringstream contents;
--- a/test/generic.cc
+++ b/test/generic.cc
@@ -24,16 +24,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE
--- a/test/test_generic.cc
+++ b/test/test_generic.cc
@@ -24,11 +24,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept> #include <stdexcept>
#include <utility> #include <utility>
@ -127,11 +128,14 @@
+ srvaddr=argv[1]; + srvaddr=argv[1];
+ +
try { try {
// Test client constructor
/** [ipfs::Client::Client] */ /** [ipfs::Client::Client] */
- ipfs::Client client("localhost", 5001); - ipfs::Client client("localhost", 5001);
+ ipfs::Client client(srvaddr, 5001); + ipfs::Client client(srvaddr, 5001);
/** [ipfs::Client::Client] */ /** [ipfs::Client::Client] */
// Test client constructor with additional parameters
@@ -38,7 +45,7 @@ int main(int, char**) {
ipfs::Client clientA(client); ipfs::Client clientA(client);
clientA = client; clientA = client;
ipfs::Client clientB(std::move(clientA)); ipfs::Client clientB(std::move(clientA));
@ -140,8 +144,8 @@
clientC = std::move(clientB); clientC = std::move(clientB);
#pragma GCC diagnostic push #pragma GCC diagnostic push
--- a/test/key.cc
+++ b/test/key.cc
--- a/test/test_key.cc
+++ b/test/test_key.cc
@@ -26,9 +26,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -26,9 +26,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
using Json = nlohmann::json; using Json = nlohmann::json;
@ -161,8 +165,8 @@
/** [ipfs::Client::KeyGen] */ /** [ipfs::Client::KeyGen] */
std::string key_id; std::string key_id;
--- a/test/name.cc
+++ b/test/name.cc
--- a/test/test_name.cc
+++ b/test/test_name.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
@ -182,8 +186,8 @@
// We need a key here, so as not to clobber the "self" key. // We need a key here, so as not to clobber the "self" key.
std::string key_id; std::string key_id;
--- a/test/object.cc
+++ b/test/object.cc
--- a/test/test_object.cc
+++ b/test/test_object.cc
@@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -24,9 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
@ -203,8 +207,8 @@
/** [ipfs::Client::ObjectNew] */ /** [ipfs::Client::ObjectNew] */
std::string object_id; std::string object_id;
--- a/test/pin.cc
+++ b/test/pin.cc
--- a/test/test_pin.cc
+++ b/test/test_pin.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
@ -224,8 +228,8 @@
std::string object_id; std::string object_id;
--- a/test/swarm.cc
+++ b/test/swarm.cc
--- a/test/test_swarm.cc
+++ b/test/test_swarm.cc
@@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE @@ -23,9 +23,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>


Loading…
Cancel
Save