ipfs-http-client: update to 2021-03-01
authorRosen Penev <rosenp@gmail.com>
Wed, 24 Mar 2021 21:13:04 +0000 (14:13 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 26 Mar 2021 20:15:14 +0000 (13:15 -0700)
Switch to AUTORELEASE for simplicity.

Switch to building with Ninja for faster compilation.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/ipfs-http-client/Makefile
libs/ipfs-http-client/patches/001-add-srv-addr.patch

index 7b7cc04bc1ab43e86be63d5613fab87fc96b0359..1b6e42c7fc3049fcf7c5e05426d2f961c3660f85 100644 (file)
@@ -5,23 +5,22 @@
 include $(TOPDIR)/rules.mk
 
 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_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
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/cmake.mk
+include ../../devel/ninja/ninja-cmake.mk
 
 define Package/ipfs-http-client/Default/description
   IPFS (the InterPlanetary File System) is the Distributed Web.
@@ -66,16 +65,16 @@ endef
 
 define Package/ipfs-http-client-tests/install
        $(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
 
 $(eval $(call BuildPackage,libipfs-http-client))
index cec764ec52002e6b1f9d62e023600e01a0919cba..d2fe784cab3a44dd6b897623a2a3c3ecf27c401b 100644 (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
  #include <sstream>
  #include <stdexcept>
@@ -19,8 +19,8 @@
  
      /** [ipfs::Client::BlockPut] */
      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
  #include <iostream>
  #include <stdexcept>
@@ -40,8 +40,8 @@
  
      /** [ipfs::Client::ConfigSet] */
      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
  #include <iostream>
  #include <stdexcept>
@@ -61,8 +61,8 @@
  
      ipfs::Json add_result;
      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;
  }
  }  // namespace ipfs
@@ -90,9 +90,9 @@
  
      std::string 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 <stdexcept>
  
 +    srvaddr=argv[1];
 +
    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] */
      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 <utility>
  
 +    srvaddr=argv[1];
 +
    try {
+     // Test client constructor
      /** [ipfs::Client::Client] */
 -    ipfs::Client client("localhost", 5001);
 +    ipfs::Client client(srvaddr, 5001);
      /** [ipfs::Client::Client] */
  
+     // Test client constructor with additional parameters
+@@ -38,7 +45,7 @@ int main(int, char**) {
      ipfs::Client clientA(client);
      clientA = client;
      ipfs::Client clientB(std::move(clientA));
      clientC = std::move(clientB);
  
  #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
  
  using Json = nlohmann::json;
  
      /** [ipfs::Client::KeyGen] */
      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
  #include <sstream>
  #include <stdexcept>
  
      // We need a key here, so as not to clobber the "self" key.
      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
  #include <stdexcept>
  #include <string>
  
      /** [ipfs::Client::ObjectNew] */
      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
  #include <stdexcept>
  #include <string>
  
      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
  #include <stdexcept>
  #include <string>