diff --git a/contrib/src/asio/SHA512SUMS b/contrib/src/asio/SHA512SUMS new file mode 100644 index 0000000000000000000000000000000000000000..684d2cf67f827821e2955f3643e49d00a5f9747f --- /dev/null +++ b/contrib/src/asio/SHA512SUMS @@ -0,0 +1 @@ +decc154ab5a3da00adadc7c10889e0fd18a62a3c131d63ac5981d93039d966ecdc62980b9079180f03e198bf3149be781ef30005a9f32f3c2d5d155e3a5f50f2 asio-28d9b8d6df708024af5227c551673fdb2519f5bf.tar.gz \ No newline at end of file diff --git a/contrib/src/restbed/conditional_sslv3.patch b/contrib/src/asio/conditional_sslv3.patch similarity index 100% rename from contrib/src/restbed/conditional_sslv3.patch rename to contrib/src/asio/conditional_sslv3.patch diff --git a/contrib/src/asio/no_tests_examples.patch b/contrib/src/asio/no_tests_examples.patch new file mode 100644 index 0000000000000000000000000000000000000000..b3c148eb4bc4f0459a6c391299ee6d680dc3408c --- /dev/null +++ b/contrib/src/asio/no_tests_examples.patch @@ -0,0 +1,16 @@ +Description: Disable building tests and examples +Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com> + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,9 +1,1 @@ +-if STANDALONE +-SUBDIRS = examples/cpp11 tests +-else +-SUBDIRS = examples/cpp03 tests +-endif +- +-DIST_SUBDIRS = examples/cpp03 examples/cpp11 tests +- + EXTRA_DIST = \ + diff --git a/contrib/src/asio/rules.mak b/contrib/src/asio/rules.mak new file mode 100644 index 0000000000000000000000000000000000000000..8e873dcc7fd67f0d368314554b22d7f3eac03bf8 --- /dev/null +++ b/contrib/src/asio/rules.mak @@ -0,0 +1,42 @@ +# +# Copyright (C) 2016 Savoir-faire Linux Inc. +# +# Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +ASIO_VERSION := 28d9b8d6df708024af5227c551673fdb2519f5bf +ASIO_URL := https://github.com/chriskohlhoff/asio/archive/$(ASIO_VERSION).tar.gz + +PKGS += asio + +$(TARBALLS)/asio-$(ASIO_VERSION).tar.gz: + $(call download,$(ASIO_URL)) + +asio: asio-$(ASIO_VERSION).tar.gz + $(UNPACK) + mv asio-$(ASIO_VERSION)/asio/* asio-$(ASIO_VERSION)/ && rm -rf asio-$(ASIO_VERSION)/asio + #$(APPLY) $(SRC)/asio/conditional_sslv3.patch + $(APPLY) $(SRC)/asio/no_tests_examples.patch + $(MOVE) + +.asio: asio .sum-asio + cd $< && ./autogen.sh + cd $< && $(HOSTVARS) ./configure --without-boost $(HOSTCONF) + cd $< && $(MAKE) install + touch $@ + +.sum-asio: asio-$(ASIO_VERSION).tar.gz diff --git a/contrib/src/restbed/CMakeLists.patch b/contrib/src/restbed/CMakeLists.patch index 94128ded8180d133540eed52ca7ffb5f7bbbb758..7ed34917b6a19174f9951c28c5dd244cd3dafe30 100644 --- a/contrib/src/restbed/CMakeLists.patch +++ b/contrib/src/restbed/CMakeLists.patch @@ -1,10 +1,7 @@ ---- CMakeLists.txt 2016-06-13 12:01:30.415787179 -0400 -+++ CMakeLists.txt 2016-06-13 12:01:33.329120391 -0400 -@@ -71,5 +71,5 @@ +--- a/CMakeLists.txt 2016-06-13 12:01:30.415787179 -0400 ++++ b/CMakeLists.txt 2016-06-13 12:01:33.329120391 -0400 +@@ -79,3 +79,3 @@ install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "include" ) - install( FILES ${BUILD_ARTIFACTS} DESTINATION "include/corvusoft/${PROJECT_NAME}" ) - install( TARGETS ${PROJECT_NAME} -- LIBRARY DESTINATION "library" -- ARCHIVE DESTINATION "library" COMPONENT library ) -+ LIBRARY DESTINATION "lib" -+ ARCHIVE DESTINATION "lib" COMPONENT library ) + install( FILES ${ARTIFACTS} DESTINATION "include/corvusoft/${PROJECT_NAME}" ) +-install( TARGETS ${PROJECT_NAME} LIBRARY DESTINATION "library" ARCHIVE DESTINATION "library" COMPONENT library ) ++install( TARGETS ${PROJECT_NAME} LIBRARY DESTINATION "lib" ARCHIVE DESTINATION "lib" COMPONENT library ) diff --git a/contrib/src/restbed/SHA512SUMS b/contrib/src/restbed/SHA512SUMS index 0c4be3b9a078d846a7eddf7cdb6dc60b77eecdcc..653847ddbbb6fb2c78ff316d113f10b21bba78a7 100644 --- a/contrib/src/restbed/SHA512SUMS +++ b/contrib/src/restbed/SHA512SUMS @@ -1 +1 @@ -4262260c0b740e0be1c42e59e1680ab664b9e5b8f07e354b2bc66a7cdf29d738997011687689b3a25fdf365ddcb7861c8b9b0642053b7f5e956142973abfe6f5 restbed-4.0.tar.gz +d9af8eb7b43f35518a5bc07306521022a970b4cab77dd58c7dbeef7b685e372d2b08074b756dec962d5935bee67b8010e1a448010f898aa4d5f9f39dbb0157cf restbed-34187502642144ab9f749ab40f5cdbd8cb17a54a.tar.gz diff --git a/contrib/src/restbed/rules.mak b/contrib/src/restbed/rules.mak index 08013ba04c59991653691e473fe0128f9ee30327..2f85405d26b8aedae8584aa8f5423422823ff02d 100644 --- a/contrib/src/restbed/rules.mak +++ b/contrib/src/restbed/rules.mak @@ -2,6 +2,7 @@ # Copyright (C) 2016 Savoir-faire Linux Inc. # # Author: Simon Zeni <simon.zeni@savoirfairelinux.com> +# Adrien Béraud <adrien.beraud@savoirfairelinux.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,10 +19,12 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -RESTBED_VERSION := 4.0 +RESTBED_VERSION := 34187502642144ab9f749ab40f5cdbd8cb17a54a RESTBED_URL := https://github.com/Corvusoft/restbed/archive/$(RESTBED_VERSION).tar.gz -ASIO_VERSION := 722f7e2be05a51c69644662ec514d6149b2b7ef8 -ASIO_URL := https://github.com/Corvusoft/asio-dependency/archive/$(ASIO_VERSION).tar.gz + +ifndef HAVE_WIN32 +PKGS += restbed +endif ifeq ($(call need_pkg,"restbed >= 4.0"),) PKGS_FOUND += restbed @@ -30,33 +33,22 @@ endif $(TARBALLS)/restbed-$(RESTBED_VERSION).tar.gz: $(call download,$(RESTBED_URL)) -$(TARBALLS)/asio-dependency-$(ASIO_VERSION).tar.gz: - $(call download,$(ASIO_URL)) +DEPS_restbed = asio RESTBED_CONF = -DBUILD_TESTS=NO \ -DBUILD_EXAMPLES=NO \ -DBUILD_SSL=NO \ -DBUILD_SHARED=NO \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_INSTALL_PREFIX=$(PREFIX) -restbed-asio-dependency: asio-dependency-$(ASIO_VERSION).tar.gz - $(UNPACK) - $(MOVE) - -.restbed-asio-dependency: restbed-asio-dependency - touch $@ - -restbed: restbed-$(RESTBED_VERSION).tar.gz .restbed-asio-dependency +restbed: restbed-$(RESTBED_VERSION).tar.gz $(UNPACK) - cp -r restbed-asio-dependency/asio $(UNPACK_DIR)/dependency/asio - cd $(UNPACK_DIR)/dependency/asio/asio && patch -fp1 < ../../../../../src/restbed/conditional_sslv3.patch - cd $(UNPACK_DIR)/ && ls && patch -p0 < ../../src/restbed/CMakeLists.patch + $(APPLY) $(SRC)/restbed/CMakeLists.patch + $(APPLY) $(SRC)/restbed/strand.patch $(MOVE) -.restbed: restbed - cd $< && cmake $(RESTBED_CONF) . +.restbed: restbed toolchain.cmake + cd $< && $(HOSTVARS) $(CMAKE) $(RESTBED_CONF) . cd $< && $(MAKE) install touch $@ diff --git a/contrib/src/restbed/strand.patch b/contrib/src/restbed/strand.patch new file mode 100644 index 0000000000000000000000000000000000000000..1ef4c55c35c4fb1ea18e526aff0d671a2a6a5006 --- /dev/null +++ b/contrib/src/restbed/strand.patch @@ -0,0 +1,8 @@ +--- a/source/corvusoft/restbed/detail/socket_impl.hpp 2016-09-28 12:01:30.415787179 -0400 +--- a/source/corvusoft/restbed/detail/socket_impl.hpp 2016-09-28 12:01:33.329120391 -0400 +@@ -23,3 +23,3 @@ + #include <asio/io_service.hpp> +-#include <asio/io_service_strand.hpp> ++#include <asio/strand.hpp> + +