Date: Saturday, March 31, 2018 @ 19:14:51
  Author: zorun
Revision: 313619

upgpkg: restbed 4.6+24+gb1f0182-1

patch "async_read_until.patch" merged upstream
patch "strand.patch" no longer needed with asio 1.12.0

Modified:
  restbed/trunk/PKGBUILD
Deleted:
  restbed/trunk/async_read_until.patch
  restbed/trunk/strand.patch

------------------------+
 PKGBUILD               |   24 ++-------
 async_read_until.patch |  123 -----------------------------------------------
 strand.patch           |   24 ---------
 3 files changed, 6 insertions(+), 165 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-03-31 19:04:56 UTC (rev 313618)
+++ PKGBUILD    2018-03-31 19:14:51 UTC (rev 313619)
@@ -1,7 +1,7 @@
 # Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
 # Contributor: Justin Wilcox <nat1192 at gmail dot com>
 pkgname=restbed
-pkgver=4.6+17+gdf867a8
+pkgver=4.6+24+gb1f0182
 pkgrel=1
 pkgdesc="A framework for asynchronous RESTful functionality in C++11 
applications"
 arch=('x86_64')
@@ -11,23 +11,10 @@
 replaces=('restbed-latest')
 conflicts=('restbed-latest')
 makedepends=('cmake' 'asio' 'kashmir')
-_commit=df867a858dddc4cf6ca8642da02720bd65ba239a
-source=("https://github.com/Corvusoft/restbed/archive/${_commit}/$pkgname-$pkgver.tar.gz";
-        "strand.patch"
-        "async_read_until.patch")
-sha256sums=('0b752078d75e4d7f1e896bb208186bb65e2e558ea531c6a05a086c7e7504e060'
-            'a67baa5ffce44a851ba6bd47cbd04089665e52abc154b73063f51515e2094a51'
-            '9ba679d22448bb567766dccf58f98744cc90e0a851a5ccd37596bb4790396049')
+_commit=b1f0182c0ea74ea5e6dc08fd540462422fd0dc7f
+source=("https://github.com/Corvusoft/restbed/archive/${_commit}/$pkgname-$pkgver.tar.gz";)
+sha256sums=('fb7ee67eb36eb1297e18f6ada4ba3a6fa255a6c64ff4e70a1efef5ef76c484c9')
 
-prepare() {
-  cd "$srcdir/$pkgname-$_commit"
-
-  # Necessary to build against asio 1.10.X
-  patch -p1 < "$srcdir"/strand.patch
-  # https://github.com/Corvusoft/restbed/pull/273
-  patch -p1 < "$srcdir"/async_read_until.patch
-}
-
 build() {
   cd "$srcdir/$pkgname-$_commit"
 
@@ -36,7 +23,8 @@
   cmake .. \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_LIBDIR=lib \
-    -DBUILD_SHARED=on
+    -DBUILD_SHARED=on \
+    -DBUILD_SSL=on
   make
 }
 

Deleted: async_read_until.patch
===================================================================
--- async_read_until.patch      2018-03-31 19:04:56 UTC (rev 313618)
+++ async_read_until.patch      2018-03-31 19:14:51 UTC (rev 313619)
@@ -1,123 +0,0 @@
-From 09b542eea3fb3038d02ff056d41dea16bfe889bd Mon Sep 17 00:00:00 2001
-From: AmarOk <cont...@enconn.fr>
-Date: Tue, 5 Dec 2017 10:45:53 -0600
-Subject: [PATCH]socket_impl: replace read_until by async_read_until
-
----
- source/corvusoft/restbed/detail/socket_impl.cpp | 62 +++++++++++++++++++------
- 1 file changed, 49 insertions(+), 13 deletions(-)
-
-diff --git a/source/corvusoft/restbed/detail/socket_impl.cpp 
b/source/corvusoft/restbed/detail/socket_impl.cpp
-index 90e8b04..379f1c7 100644
---- a/source/corvusoft/restbed/detail/socket_impl.cpp
-+++ b/source/corvusoft/restbed/detail/socket_impl.cpp
-@@ -417,28 +417,47 @@ namespace restbed
-             m_timer->expires_from_now( m_timeout );
-             m_timer->async_wait( bind( 
&SocketImpl::connection_timeout_handler, this, shared_from_this( ), _1 ) );
-             
-+
-             size_t size = 0;
-+            auto finished = std::make_shared<bool>(false);
-+            auto sharedError = std::make_shared<error_code>();
-+            auto sharedSize = std::make_shared<size_t>(0);
-+
- #ifdef BUILD_SSL
--            
-+
-             if ( m_socket not_eq nullptr )
-             {
- #endif
--                size = asio::read( *m_socket, *data, asio::transfer_at_least( 
length ), error );
-+                asio::async_read( *m_socket, *data, asio::transfer_at_least( 
length ),
-+                    [ this, finished, sharedSize, sharedError ]( const 
error_code & error, size_t size ) {
-+                        *sharedError = error;
-+                        *sharedSize = size;
-+                        *finished = true;
-+                });
- #ifdef BUILD_SSL
-             }
-             else
-             {
--                size = asio::read( *m_ssl_socket, *data, 
asio::transfer_at_least( length ), error );
-+                asio::async_read( *m_ssl_socket, *data, 
asio::transfer_at_least( length ),
-+                    [ this, finished, sharedSize, sharedError ]( const 
error_code & error, size_t size ) {
-+                        *sharedError = error;
-+                        *sharedSize = size;
-+                        *finished = true;
-+                });
-             }
--            
- #endif
-+            auto& io_service = m_socket->get_io_service( );
-+            while (!*finished)
-+                io_service.run_one();
-+            error = *sharedError;
-+            size = *sharedSize;
-             m_timer->cancel( );
--            
-+
-             if ( error )
-             {
-                 m_is_open = false;
-             }
--            
-+
-             return size;
-         }
-         
-@@ -549,28 +568,45 @@ namespace restbed
-             m_timer->async_wait( bind( 
&SocketImpl::connection_timeout_handler, this, shared_from_this( ), _1 ) );
-             
-             size_t length = 0;
--            
-+            auto finished = std::make_shared<bool>(false);
-+            auto sharedError = std::make_shared<error_code>();
-+            auto sharedLength = std::make_shared<size_t>(0);
-+
- #ifdef BUILD_SSL
--            
-+
-             if ( m_socket not_eq nullptr )
-             {
- #endif
--                length = asio::read_until( *m_socket, *data, delimiter, error 
);
-+                asio::async_read_until( *m_socket, *data, delimiter,
-+                    [ this, finished, sharedLength, sharedError ]( const 
error_code & error, size_t length ) {
-+                        *sharedError = error;
-+                        *sharedLength = length;
-+                        *finished = true;
-+                });
- #ifdef BUILD_SSL
-             }
-             else
-             {
--                length = asio::read_until( *m_ssl_socket, *data, delimiter, 
error );
-+                asio::async_read_until( *m_ssl_socket, *data, delimiter,
-+                    [ this, finished, sharedLength, sharedError ]( const 
error_code & error, size_t length ) {
-+                        *sharedError = error;
-+                        *sharedLength = length;
-+                        *finished = true;
-+                });
-             }
--            
- #endif
-+            auto& io_service = m_socket->get_io_service( );
-+            while (!*finished)
-+                io_service.run_one();
-+            error = *sharedError;
-+            length = *sharedLength;
-             m_timer->cancel( );
--            
-+
-             if ( error )
-             {
-                 m_is_open = false;
-             }
--            
-+
-             return length;
-         }
-         
--- 
-2.14.3
-

Deleted: strand.patch
===================================================================
--- strand.patch        2018-03-31 19:04:56 UTC (rev 313618)
+++ strand.patch        2018-03-31 19:14:51 UTC (rev 313619)
@@ -1,24 +0,0 @@
-From a330edb28151830aeaf08a71e42cb6618c25ef2f Mon Sep 17 00:00:00 2001
-From: S├ębastien Blin <sebastiem.b...@savoirfairelinux.fr>
-Date: Tue, 5 Dec 2017 10:31:21 -0600
-Subject: [PATCH]update strand header for asio
-
----
- source/corvusoft/restbed/detail/socket_impl.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/corvusoft/restbed/detail/socket_impl.hpp 
b/source/corvusoft/restbed/detail/socket_impl.hpp
-index b10c3f7..02df572 100644
---- a/source/corvusoft/restbed/detail/socket_impl.hpp
-+++ b/source/corvusoft/restbed/detail/socket_impl.hpp
-@@ -23,7 +23,7 @@
- #include <asio/streambuf.hpp>
- #include <asio/steady_timer.hpp>
- #include <asio/io_service.hpp>
--#include <asio/io_service_strand.hpp>
-+#include <asio/strand.hpp>
-
- #ifdef BUILD_SSL
-     #include <asio/ssl.hpp>
---
-2.14.3

Reply via email to