Skip to content
Snippets Groups Projects
Commit 27cceaf0 authored by Adrien Béraud's avatar Adrien Béraud Committed by gerrit2
Browse files

contrib: split restbed, asio

* spinoff asio as an independent contrib module
* build restbd and asio by default with daemon
* requires clang to build on Android (GCC 4.9 not supported).

Tuleap: #1042
Change-Id: I21ab2b052655b051176e7649dc58d0cd8946a92e
parent 1a0e4c0e
No related branches found
No related tags found
No related merge requests found
decc154ab5a3da00adadc7c10889e0fd18a62a3c131d63ac5981d93039d966ecdc62980b9079180f03e198bf3149be781ef30005a9f32f3c2d5d155e3a5f50f2 asio-28d9b8d6df708024af5227c551673fdb2519f5bf.tar.gz
\ No newline at end of file
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 = \
#
# 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
--- 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 )
4262260c0b740e0be1c42e59e1680ab664b9e5b8f07e354b2bc66a7cdf29d738997011687689b3a25fdf365ddcb7861c8b9b0642053b7f5e956142973abfe6f5 restbed-4.0.tar.gz
d9af8eb7b43f35518a5bc07306521022a970b4cab77dd58c7dbeef7b685e372d2b08074b756dec962d5935bee67b8010e1a448010f898aa4d5f9f39dbb0157cf restbed-34187502642144ab9f749ab40f5cdbd8cb17a54a.tar.gz
......@@ -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 $@
......
--- 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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment