From 423d250352ffb7a5e631c71ad95b1440bcf29344 Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Fri, 24 Aug 2018 09:26:22 +0200 Subject: [PATCH] freeorion: Fix build with boost[>=1.67.0] --- ...-Fix-compatibility-with-boost-1.67.0.patch | 37 +++++++++++++++++++ ...mit-Spirit-workaround-for-Boost-1.67.patch | 27 ++++++++++++++ .../freeorion/freeorion-0.4.7.1-r1.exheres-0 | 2 + 3 files changed, 66 insertions(+) create mode 100644 packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Fix-compatibility-with-boost-1.67.0.patch create mode 100644 packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Limit-Spirit-workaround-for-Boost-1.67.patch diff --git a/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Fix-compatibility-with-boost-1.67.0.patch b/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Fix-compatibility-with-boost-1.67.0.patch new file mode 100644 index 0000000..5997678 --- /dev/null +++ b/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Fix-compatibility-with-boost-1.67.0.patch @@ -0,0 +1,37 @@ +Upstream: yes, will be in 0.4.8 + +From 618568705a0ca37ffd9e88d08cda3d3601d01d98 Mon Sep 17 00:00:00 2001 +From: Dmitry Marakasov +Date: Fri, 29 Jun 2018 19:42:52 +0300 +Subject: [PATCH] Fix compatibility with boost 1.67.0 + +--- + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b2fe63a7..4d26e06a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,11 +204,17 @@ find_package(Boost ${MINIMUM_BOOST_VERSION} + log_setup + regex + serialization +- python + signals + system + thread + REQUIRED) ++if(${Boost_VERSION} GREATER 106699) # boost >= 1.67 ++ find_package(Boost COMPONENTS python27 REQUIRED) ++ set(Boost_PYTHON_LIBRARY ${Boost_PYTHON27_LIBRARY}) ++else() ++ find_package(Boost COMPONENTS python REQUIRED) ++endif() ++ + find_package(ZLIB REQUIRED) + if(NOT BUILD_HEADLESS) + find_package(Freetype REQUIRED) +-- +2.18.0 + diff --git a/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Limit-Spirit-workaround-for-Boost-1.67.patch b/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Limit-Spirit-workaround-for-Boost-1.67.patch new file mode 100644 index 0000000..1b89c81 --- /dev/null +++ b/packages/games-strategy/freeorion/files/freeorion-0.4.7.1-Limit-Spirit-workaround-for-Boost-1.67.patch @@ -0,0 +1,27 @@ +Upstream: yes, will be in 0.4.8 + +From 9d55160487c658695cb86a57104e69833b287604 Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Sat, 14 Jul 2018 13:33:24 +0000 +Subject: [PATCH] Limit Spirit workaround for Boost < 1.67 + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b2fe63a7..adde763a8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -262,7 +262,7 @@ set_property(DIRECTORY APPEND + # 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 +- $<$:BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL> ++ $<$,$>:BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL> + + # We don't need localized output of Boost date_time and not setting + # the define causes the inclusion of code, which contains std::tolower. +-- +2.18.0 + diff --git a/packages/games-strategy/freeorion/freeorion-0.4.7.1-r1.exheres-0 b/packages/games-strategy/freeorion/freeorion-0.4.7.1-r1.exheres-0 index 4ad0104..d6a9b10 100644 --- a/packages/games-strategy/freeorion/freeorion-0.4.7.1-r1.exheres-0 +++ b/packages/games-strategy/freeorion/freeorion-0.4.7.1-r1.exheres-0 @@ -48,6 +48,8 @@ BUGS_TO="hasufell@posteo.de" DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PNV}-Replace-use-of-boost-system-posix_error.patch + "${FILES}"/${PNV}-Fix-compatibility-with-boost-1.67.0.patch + "${FILES}"/${PNV}-Limit-Spirit-workaround-for-Boost-1.67.patch ) CMAKE_SRC_CONFIGURE_PARAMS=(