From cd69e7376c4d441bc9ebdad60b110559b606d6e6 Mon Sep 17 00:00:00 2001
From: Carlos Ferreira <carlosmf.pt@gmail.com>
Date: Sun, 13 Nov 2016 13:29:11 +0000
Subject: [PATCH] boost: Patch to support Fiber

This update provides a patch in order to support Boost.Fiber.

Signed-off-by: Carlos M. Ferreira carlosmf.pt@gmail.com
---
 libs/boost/Makefile                   |  5 ++---
 libs/boost/patches/01_fiber_fix.patch | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)
 create mode 100644 libs/boost/patches/01_fiber_fix.patch

diff --git a/libs/boost/Makefile b/libs/boost/Makefile
index 06ce4f644..fd87298b5 100644
--- a/libs/boost/Makefile
+++ b/libs/boost/Makefile
@@ -18,7 +18,7 @@ include $(INCLUDE_DIR)/target.mk
 PKG_NAME:=boost
 PKG_VERSION:=1.62.0
 PKG_SOURCE_VERSION:=1_62_0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceforge.net/projects/boost/files/boost/$(PKG_VERSION)
@@ -253,7 +253,6 @@ define Package/boost/config
 			prompt "Boost $(lib) library."
 			default m if ALL
 			$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
-			$(if $(findstring fiber,$(lib)),depends on BROKEN,)\
 			$(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)
 
 		)
@@ -303,7 +302,7 @@ $(eval $(call DefineBoostLibrary,context,chrono system thread,))
 $(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
 $(eval $(call DefineBoostLibrary,date_time,,))
 #$(eval $(call DefineBoostLibrary,exception,,))
-$(eval $(call DefineBoostLibrary,fiber,coroutine,,BROKEN))
+$(eval $(call DefineBoostLibrary,fiber,coroutine,,))
 $(eval $(call DefineBoostLibrary,filesystem,system,))
 $(eval $(call DefineBoostLibrary,graph,regex,))
 $(eval $(call DefineBoostLibrary,iostreams,,+zlib))
diff --git a/libs/boost/patches/01_fiber_fix.patch b/libs/boost/patches/01_fiber_fix.patch
new file mode 100644
index 000000000..dc62f6fdf
--- /dev/null
+++ b/libs/boost/patches/01_fiber_fix.patch
@@ -0,0 +1,25 @@
+Index: boost_1_62_0/libs/fiber/build/Jamfile.v2
+===================================================================
+--- boost_1_62_0.orig/libs/fiber/build/Jamfile.v2
++++ boost_1_62_0/libs/fiber/build/Jamfile.v2
+@@ -43,19 +43,6 @@ lib boost_fiber
+       recursive_timed_mutex.cpp
+       timed_mutex.cpp
+       scheduler.cpp
+-    : <link>shared:<library>../../context/build//boost_context
+-    [ requires cxx11_auto_declarations
+-               cxx11_constexpr
+-               cxx11_defaulted_functions
+-               cxx11_final
+-               cxx11_hdr_tuple
+-               cxx11_lambdas
+-               cxx11_noexcept
+-               cxx11_nullptr
+-               cxx11_rvalue_references
+-               cxx11_template_aliases
+-               cxx11_thread_local
+-               cxx11_variadic_templates ]
+-    ;
++    : <link>shared:<library>../../context/build//boost_context ;
+ 
+ boost-install boost_fiber ;