--- /dev/null
+From 6b971f65dbef4614cd0c9020bcc6670d3f11b961 Mon Sep 17 00:00:00 2001
+From: geoffthemedio <geoffthemedio@gmail.com>
+Date: Thu, 20 Oct 2016 13:27:23 +0200
+Subject: [PATCH] Made Boost version-specific changes more flexible, as they
+ reportedly are needed for 1.62 as well.
+
+---
+ universe/Building.h | 4 ++--
+ universe/Field.h | 4 ++--
+ universe/Fleet.h | 4 ++--
+ universe/Planet.h | 4 ++--
+ universe/Ship.h | 4 ++--
+ universe/System.h | 4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/universe/Building.h b/universe/Building.h
+index 18d4810..b34f400 100644
+--- a/universe/Building.h
++++ b/universe/Building.h
+@@ -69,11 +69,11 @@ class FO_COMMON_API Building : public UniverseObject {
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~Building() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
+diff --git a/universe/Field.h b/universe/Field.h
+index f1d454e..5cf67c1 100644
+--- a/universe/Field.h
++++ b/universe/Field.h
+@@ -48,11 +48,11 @@ class FO_COMMON_API Field : public UniverseObject {
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~Field() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
+diff --git a/universe/Fleet.h b/universe/Fleet.h
+index a6a1fe0..7b5121c 100644
+--- a/universe/Fleet.h
++++ b/universe/Fleet.h
+@@ -150,11 +150,11 @@ class FO_COMMON_API Fleet : public UniverseObject {
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~Fleet() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
+diff --git a/universe/Planet.h b/universe/Planet.h
+index 3b3848e..267e2b1 100644
+--- a/universe/Planet.h
++++ b/universe/Planet.h
+@@ -128,11 +128,11 @@ class FO_COMMON_API Planet :
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~Planet() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
+diff --git a/universe/Ship.h b/universe/Ship.h
+index 4881086..db0d5d7 100644
+--- a/universe/Ship.h
++++ b/universe/Ship.h
+@@ -104,11 +104,11 @@ class FO_COMMON_API Ship : public UniverseObject {
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~Ship() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
+diff --git a/universe/System.h b/universe/System.h
+index 1563347..47ee4f1 100644
+--- a/universe/System.h
++++ b/universe/System.h
+@@ -134,11 +134,11 @@ class FO_COMMON_API System : public UniverseObject {
+ template <class T> friend void boost::python::detail::value_destroyer<false>::execute(T const volatile* p);
+ template <class T> friend void boost::checked_delete(T* x);
+
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ public:
+ #endif
+ ~System() {}
+-#if BOOST_VERSION == 106100
++#if BOOST_VERSION >= 106100
+ protected:
+ #endif
+
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils python-any-r1 gnome2-utils
+
+DESCRIPTION="A free turn-based space empire and galactic conquest game"
+HOMEPAGE="http://www.freeorion.org"
+
+RELDATE=2016-09-16
+SHA=49f9123
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/FreeOrion_v${PV}_${RELDATE}.${SHA}_Source.tar.gz -> ${P}.tar.gz"
+# Issue with version.cpp, TODO fix
+#SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/boost-1.56[python,threads]
+ media-libs/freealut
+ media-libs/freetype
+ media-libs/glew:*
+ media-libs/libsdl2
+ >=media-libs/libogg-1.1.3
+ media-libs/libpng:0
+ media-libs/libsdl2[X,opengl,video]
+ >=media-libs/libvorbis-1.1.2
+ media-libs/openal
+ sci-physics/bullet
+ sys-libs/zlib
+ virtual/opengl
+ !dev-games/gigi"
+ # Use bundled gigi as of freeorion-0.4.3
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/src-tarball"
+
+PATCHES=( "${FILESDIR}/${P}-boost-1.62.patch" )
+
+pkg_setup() {
+ # build system is using FindPythonLibs.cmake which needs python:2
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -e "s/-O3//" -i CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DRELEASE_COMPILE_FLAGS=""
+ -DCMAKE_SKIP_RPATH=ON
+ )
+
+ append-cppflags -DBOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog.md
+
+ newenvd "${FILESDIR}/${PN}.envd" 99${PN}
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}