commit:     4bb0ba67db279793e842530e5dee7adcbec06ea7
Author:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 21 16:04:56 2016 +0000
Commit:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 16:06:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb0ba67

games-strategy/freeorion: Fix boost-1.61 compat

Fixes bug 584354, thanks Markus Oehme

Package-Manager: portage-2.3.0

 .../files/freeorion-0.4.5-boost-1.61.patch         | 137 +++++++++++++++++++++
 games-strategy/freeorion/freeorion-0.4.5-r1.ebuild | 101 +++++++++++++++
 2 files changed, 238 insertions(+)

diff --git a/games-strategy/freeorion/files/freeorion-0.4.5-boost-1.61.patch 
b/games-strategy/freeorion/files/freeorion-0.4.5-boost-1.61.patch
new file mode 100644
index 0000000..fbd3728
--- /dev/null
+++ b/games-strategy/freeorion/files/freeorion-0.4.5-boost-1.61.patch
@@ -0,0 +1,137 @@
+From 0a0bfecac11ec376263815f559e4b1b33ff6b4c3 Mon Sep 17 00:00:00 2001
+From: "Markus (root)" <m...@wurzel.org>
+Date: Thu, 21 Jul 2016 21:15:20 +0200
+Subject: [PATCH] Make destructors public
+
+---
+ universe/Building.h | 2 +-
+ universe/Field.h    | 2 +-
+ universe/Fleet.h    | 2 +-
+ universe/Planet.h   | 2 +-
+ universe/Ship.h     | 2 +-
+ universe/System.h   | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/universe/Building.h b/universe/Building.h
+index 2cb59b0..dec0080 100644
+--- a/universe/Building.h
++++ b/universe/Building.h
+@@ -52,6 +52,7 @@ public:
+ 
+     virtual void    ResetTargetMaxUnpairedMeters();
+     //@}
++    ~Building() {}
+ 
+ protected:
+     friend class Universe;
+@@ -68,7 +69,6 @@ protected:
+ 
+     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);
+-    ~Building() {}
+ 
+     virtual Building*       Clone(int empire_id = ALL_EMPIRES) const;   ///< 
returns new copy of this Building
+     //@}
+diff --git a/universe/Field.h b/universe/Field.h
+index 5b30bb3..f193710 100644
+--- a/universe/Field.h
++++ b/universe/Field.h
+@@ -39,6 +39,7 @@ public:
+ 
+     virtual void                ResetTargetMaxUnpairedMeters();
+     //@}
++    ~Field() {}
+ 
+ protected:
+     friend class Universe;
+@@ -48,7 +49,6 @@ protected:
+     
+     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);
+-    ~Field() {}
+ 
+     virtual Field*              Clone(int empire_id = ALL_EMPIRES) const;   
///< returns new copy of this Field
+     //@}
+diff --git a/universe/Fleet.h b/universe/Fleet.h
+index f133af0..ac602ac 100644
+--- a/universe/Fleet.h
++++ b/universe/Fleet.h
+@@ -129,6 +129,7 @@ public:
+     static const int            ETA_NEVER;                                  
///< returned by ETA when fleet can't reach destination due to lack of route or 
inability to move
+     static const int            ETA_UNKNOWN;                                
///< returned when ETA can't be determined
+     static const int            ETA_OUT_OF_RANGE;                           
///< returned by ETA when fleet can't reach destination due to insufficient 
fuel capacity and lack of fleet resupply on route
++    ~Fleet() {}
+ 
+ protected:
+     friend class Universe;
+@@ -150,7 +151,6 @@ protected:
+ 
+     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);
+-    ~Fleet() {}
+ 
+     virtual Fleet*          Clone(int empire_id = ALL_EMPIRES) const;  ///< 
returns new copy of this Fleet
+     //@}
+diff --git a/universe/Planet.h b/universe/Planet.h
+index cece39a..233d31f 100644
+--- a/universe/Planet.h
++++ b/universe/Planet.h
+@@ -176,6 +176,7 @@ public:
+     //@}
+ 
+     static int      TypeDifference(PlanetType type1, PlanetType type2);
++    ~Planet() {}
+ 
+ protected:
+     friend class Universe;
+@@ -187,7 +188,6 @@ protected:
+ 
+     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);
+-    ~Planet() {}
+ 
+     virtual Planet*         Clone(int empire_id = ALL_EMPIRES) const;  ///< 
returns new copy of this Planet
+     //@}
+diff --git a/universe/Ship.h b/universe/Ship.h
+index 5e9eabb..76fac51 100644
+--- a/universe/Ship.h
++++ b/universe/Ship.h
+@@ -86,6 +86,7 @@ public:
+ 
+     virtual void    ResetTargetMaxUnpairedMeters();
+     //@}
++    ~Ship() {}
+ 
+ protected:
+     friend class Universe;
+@@ -96,7 +97,6 @@ protected:
+ 
+     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);
+-    ~Ship() {}
+ 
+     virtual Ship*   Clone(int empire_id = ALL_EMPIRES) const;   ///< returns 
new copy of this Ship
+     //@}
+diff --git a/universe/System.h b/universe/System.h
+index c92fed4..471c27e 100644
+--- a/universe/System.h
++++ b/universe/System.h
+@@ -110,6 +110,7 @@ public:
+ 
+     virtual void            ResetTargetMaxUnpairedMeters();
+     //@}
++    ~System() {}
+ 
+ protected:
+     friend class Universe;
+@@ -133,7 +134,6 @@ protected:
+ 
+     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);
+-    ~System() {}
+ 
+     virtual System*         Clone(int empire_id = ALL_EMPIRES) const;   ///< 
returns new copy of this System
+     //@}
+-- 
+2.9.2
+

diff --git a/games-strategy/freeorion/freeorion-0.4.5-r1.ebuild 
b/games-strategy/freeorion/freeorion-0.4.5-r1.ebuild
new file mode 100644
index 0000000..09b81dd
--- /dev/null
+++ b/games-strategy/freeorion/freeorion-0.4.5-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils python-any-r1 games
+
+DESCRIPTION="A free turn-based space empire and galactic conquest game"
+HOMEPAGE="http://www.freeorion.org";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/FreeOrion_v0.4.5_2015-09-01.f203162_Source.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cg"
+
+# Needs it's own version of GG(dev-games/gigi) which it ships.
+# The split version dev-games/gigi is not used anymore as of 0.4.3
+RDEPEND="
+       !dev-games/gigi
+       media-libs/libsdl2
+       >=dev-libs/boost-1.47[python]
+       media-libs/freealut
+       media-libs/libogg
+       media-libs/libsdl[X,opengl,video]
+       media-libs/libvorbis
+       media-libs/openal
+       sci-physics/bullet
+       sys-libs/zlib
+       virtual/opengl"
+DEPEND="${RDEPEND}
+       ${PYTHON_DEPS}
+       virtual/pkgconfig"
+
+CMAKE_USE_DIR="${S}"
+CMAKE_VERBOSE="1"
+
+pkg_setup() {
+       # build system is using FindPythonLibs.cmake which needs python:2
+       python-any-r1_pkg_setup
+       games_pkg_setup
+}
+
+src_unpack() {
+       default
+       mv src-tarball "${P}" || die
+       }
+
+src_prepare() {
+       # parse subdir sets -O3
+       sed -e "s:-O3::" -i parse/CMakeLists.txt
+       epatch "${FILESDIR}/${P}-boost-1.61.patch"
+
+       # For snapshots, the following can be used to the set revision
+       # for display in game -- update on bump!
+       # sed -i -e 's/???/8051/' CMakeLists.txt
+}
+
+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_compile() {
+       cmake-utils_src_compile
+}
+
+src_install() {
+       # data files
+       rm "${CMAKE_USE_DIR}"/default/COPYING || die
+       insinto "${GAMES_DATADIR}"/${PN}
+       doins -r "${CMAKE_USE_DIR}"/default || die
+
+       # bin
+       dogamesbin "${CMAKE_BUILD_DIR}"/${PN}{ca,d} || die
+       newgamesbin "${CMAKE_BUILD_DIR}"/${PN} ${PN}.bin || die
+       games_make_wrapper ${PN} \
+               "${GAMES_BINDIR}/${PN}.bin --resource-dir 
${GAMES_DATADIR}/${PN}/default" \
+               "${GAMES_DATADIR}/${PN}"
+
+       # lib
+       dogameslib "${CMAKE_BUILD_DIR}"/libfreeorion{common,parse}.so || die
+       dogameslib "${CMAKE_BUILD_DIR}"/libGiGi*.so || die
+
+       # other
+       dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
+       newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
+               ${PN}.png || die
+       make_desktop_entry ${PN} ${PN} ${PN}
+
+       # permissions
+       prepgamesdirs
+}

Reply via email to