[freeorion] 01/05: Add boost1.61.patch
Markus Koschany
apo at moszumanska.debian.org
Mon Aug 22 01:27:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
apo pushed a commit to branch master
in repository freeorion.
commit 087d3f825a268f6a99f31ae349c8e4d2f9c293b0
Author: Markus Koschany <apo at debian.org>
Date: Mon Aug 22 00:49:04 2016 +0200
Add boost1.61.patch
---
debian/patches/boost1.61.patch | 49 ++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 50 insertions(+)
diff --git a/debian/patches/boost1.61.patch b/debian/patches/boost1.61.patch
new file mode 100644
index 0000000..616906b
--- /dev/null
+++ b/debian/patches/boost1.61.patch
@@ -0,0 +1,49 @@
+From 70c19e312ae86919bd77b39d45fa35dc4b66d458 Mon Sep 17 00:00:00 2001
+From: Marcel Metz <mmetz at adrian-broher.net>
+Date: Sun, 21 Aug 2016 20:23:48 +0200
+Subject: [PATCH] Use old boost::optional implementation for boost 1.61
+
+Fixes #777
+
+- boost::spirit v 1.61 relies on the fact that the `Variant` template
+ type of `boost::spirit::qi::detail::find_substitute` typedefs a
+ `types` subtype.
+- For the failing instantiation of `find_substition` a
+ `boost::optional` is used as `Variant` template type.
+- `boost::optional` removed its `types` subtype implementation with
+ commit [boost::optional b5b8414c0], which means that this type is
+ missing on every boost version 1.61 and onwards (until fixed of course).
+- Using the BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+ reenables the old implementation of boost::optional, which provides a
+ `types` subtype.
+
+This commits enables said define for boost 1.61 only, because I consider
+this an upstream bug. The upstream bug is tracked as [boost #12349].
+
+[boost::optional b5b8414c0]: https://github.com/boostorg/optional/commit/b5b8414c069a2c5f16cc1f9813d069c8b36e2c35
+[boost #12349]: https://svn.boost.org/trac/boost/ticket/12349
+---
+ CMakeLists.txt | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3e70e72..65f1537 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -143,6 +143,16 @@ find_package(Boost ${MINIMUM_BOOST_VERSION} COMPONENTS chrono date_time filesyst
+ find_package(ZLIB REQUIRED)
+ find_package(Freetype REQUIRED)
+
++if(${Boost_VERSION} EQUAL "106100")
++ # with boost 1.61 some boost::optional internals were changed. However
++ # boost::spirit relies on some API the old implementation provided. This
++ # define enables the usage of the old boost::optional implementation.
++ # boost upstream tracks this bug as #12349
++ add_definitions(
++ -DBOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
++ )
++endif()
++
+ include_directories(
+ ${Boost_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIR}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5c3fd74
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+boost1.61.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/freeorion.git
More information about the Pkg-games-commits
mailing list