commit:     687f792527e89fb9d0c80031685c0abc418d80eb
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 29 21:37:22 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 21:42:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=687f7925

games-action/openlierox: Add missing DEPEND on x11-proto/xproto

Gentoo-bug: 606908
* Also fix building with GCC 6

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/openlierox-0.58_rc3-fix-c++14.patch      | 215 +++++++++++++++++++++
 .../openlierox/openlierox-0.58_rc3-r1.ebuild       |  61 +++---
 2 files changed, 243 insertions(+), 33 deletions(-)

diff --git a/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch 
b/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch
new file mode 100644
index 00000000..a907161
--- /dev/null
+++ b/games-action/openlierox/files/openlierox-0.58_rc3-fix-c++14.patch
@@ -0,0 +1,215 @@
+static_assert is a reserved keyword in C++14 now.
+
+--- a/include/CGameScript.h
++++ b/include/CGameScript.h
+@@ -40,7 +40,7 @@
+ // current most recent version
+ #define               GS_VERSION              8
+ 
+-static_assert(GS_VERSION - GS_FIRST_SUPPORTED_VERSION + 1 == 
sizeof(GS_MinLxVersion)/sizeof(Version), GS_MinLxVersion__sizecheck);
++static_openlierox_assert(GS_VERSION - GS_FIRST_SUPPORTED_VERSION + 1 == 
sizeof(GS_MinLxVersion)/sizeof(Version), GS_MinLxVersion__sizecheck);
+ 
+ // Error codes
+ #define               GSE_OK                  1
+--- a/include/EndianSwap.h
++++ b/include/EndianSwap.h
+@@ -23,7 +23,7 @@
+ 
+ template <int n>
+ void ByteSwap(unsigned char * b) {
+-      static_assert(n == 1 || n % 2 == 0, n_must_be_equal);
++      static_openlierox_assert(n == 1 || n % 2 == 0, n_must_be_equal);
+       for(int i = 0; i < n/2; ++i) {
+               std::swap(b[i], b[n - i - 1]);
+       }
+@@ -57,8 +57,8 @@
+ 
+ template <int size, int nmemb, typename T>
+ static size_t fwrite_endian_compat_wrapper(FILE* stream, T d) {
+-      static_assert(nmemb == 1, nmemb__equals1);
+-      static_assert(size == sizeof(T), size__mismatch);
++      static_openlierox_assert(nmemb == 1, nmemb__equals1);
++      static_openlierox_assert(size == sizeof(T), size__mismatch);
+       EndianSwap(d);
+       return fwrite(&d, sizeof(T), 1, stream);
+ }
+@@ -69,8 +69,8 @@
+ 
+ template <int size, int nmemb, typename T>
+ static size_t fread_compat_wrapper(FILE* stream, T& d) {
+-      static_assert(nmemb == 1, nmemb__equals1);
+-      static_assert(size == sizeof(T), size__mismatch);
++      static_openlierox_assert(nmemb == 1, nmemb__equals1);
++      static_openlierox_assert(size == sizeof(T), size__mismatch);
+       return fread(&d, sizeof(T), 1, stream); 
+ }
+ 
+--- a/include/ProjAction.h
++++ b/include/ProjAction.h
+@@ -125,7 +125,7 @@
+       __TRL_UBOUND = INT_MAX // force enum to be of size int
+ };
+ 
+-static_assert(sizeof(Proj_TrailType) == sizeof(int), 
Proj_TrailType__SizeCheck);
++static_openlierox_assert(sizeof(Proj_TrailType) == sizeof(int), 
Proj_TrailType__SizeCheck);
+ 
+ 
+ struct Proj_Trail {
+@@ -176,7 +176,7 @@
+       __PJ_UBOUND = INT_MAX // force enum to be of size int
+ };
+ 
+-static_assert(sizeof(Proj_ActionType) == sizeof(int), 
Proj_ActionType__SizeCheck);
++static_openlierox_assert(sizeof(Proj_ActionType) == sizeof(int), 
Proj_ActionType__SizeCheck);
+ 
+ 
+ struct ProjCollisionType;
+@@ -379,7 +379,7 @@
+               __PET_LBOUND = INT_MIN,
+               __PET_UBOUND = INT_MAX
+       } type;
+-      static_assert(sizeof(Type) == sizeof(int), Proj_Event_Type__SizeCheck);
++      static_openlierox_assert(sizeof(Type) == sizeof(int), 
Proj_Event_Type__SizeCheck);
+       
+       Proj_Event(Type t = PET_UNSET) : type(t) {}
+       Proj_TimerEvent timer;
+--- a/include/ProjectileDesc.h
++++ b/include/ProjectileDesc.h
+@@ -60,7 +60,7 @@
+       ATT_QUADRATIC,  // The force fades out using the inverse quadratic 
function
+ };
+ 
+-static_assert(sizeof(Proj_GfxType) == sizeof(int), Proj_Type__SizeCheck);
++static_openlierox_assert(sizeof(Proj_GfxType) == sizeof(int), 
Proj_Type__SizeCheck);
+ 
+ 
+ // Animation types
+@@ -73,7 +73,7 @@
+       __ANI_UBOUND = INT_MAX,
+ };
+ 
+-static_assert(sizeof(Proj_AnimType) == sizeof(int), Proj_AnimType__SizeCheck);
++static_openlierox_assert(sizeof(Proj_AnimType) == sizeof(int), 
Proj_AnimType__SizeCheck);
+ 
+ 
+ 
+--- a/include/StaticAssert.h
++++ b/include/StaticAssert.h
+@@ -10,11 +10,11 @@
+ #ifndef __OLX__STATICASSERT_H__
+ #define __OLX__STATICASSERT_H__
+ 
+-template <bool b> class static_assert_failure;
+-template <> class static_assert_failure<true>  { char foo; };
+-template <int s> class static_assert_test{};
++template <bool b> class static_openlierox_assert_failure;
++template <> class static_openlierox_assert_failure<true>  { char foo; };
++template <int s> class static_openlierox_assert_test{};
+ 
+-#define static_assert(X, desc)  \
+-      typedef static_assert_test< (int)sizeof(static_assert_failure< 
(bool)(X) >) > static_assert_typedef_##desc;
++#define static_openlierox_assert(X, desc)  \
++      typedef static_openlierox_assert_test< 
(int)sizeof(static_openlierox_assert_failure< (bool)(X) >) > 
static_assert_typedef_##desc;
+ 
+ #endif
+--- a/include/WeaponDesc.h
++++ b/include/WeaponDesc.h
+@@ -34,7 +34,7 @@
+       __WCL_UBOUND = INT_MAX,
+ };
+ 
+-static_assert(sizeof(Wpn_Class) == sizeof(int), Wpn_Class__SizeCheck);
++static_openlierox_assert(sizeof(Wpn_Class) == sizeof(int), 
Wpn_Class__SizeCheck);
+ 
+ // Weapon types
+ enum Wpn_Type {
+@@ -46,7 +46,7 @@
+       __WPN_UBOUND = INT_MAX
+ };
+ 
+-static_assert(sizeof(Wpn_Type) == sizeof(int), Wpn_Type__SizeCheck);
++static_openlierox_assert(sizeof(Wpn_Type) == sizeof(int), 
Wpn_Type__SizeCheck);
+ 
+ 
+ // Special Weapons
+@@ -58,7 +58,7 @@
+       __SPC_UBOUND = INT_MAX
+ };
+ 
+-static_assert(sizeof(Wpn_Special) == sizeof(int), Wpn_Special__SizeCheck);
++static_openlierox_assert(sizeof(Wpn_Special) == sizeof(int), 
Wpn_Special__SizeCheck);
+ 
+ 
+ 
+--- a/src/client/DeprecatedGUI/Menu_FloatingOptions.cpp
++++ b/src/client/DeprecatedGUI/Menu_FloatingOptions.cpp
+@@ -134,7 +134,7 @@
+ };
+ 
+ static const int sFloatingOpt_InputNames__size = 
sizeof(sFloatingOpt_InputNames) / sizeof(std::string);
+-static_assert( sFloatingOpt_InputNames__size == __SIN_PLY_BOTTOM - 5, 
inputopts__sizecheck );
++static_openlierox_assert( sFloatingOpt_InputNames__size == __SIN_PLY_BOTTOM - 
5, inputopts__sizecheck );
+ 
+ 
+ ///////////////////
+--- a/src/client/Options.cpp
++++ b/src/client/Options.cpp
+@@ -51,11 +51,11 @@
+ const std::string    gen_keys[] = {"Chat", "ShowScore", "ShowHealth", 
"ShowSettings",  "TakeScreenshot",  "ViewportManager", "SwitchMode", 
"ToggleTopBar", "TeamChat",        "IrcChat", "Console"};
+ const std::string    gen_def[]  = {"i",    "tab",             "h",            
  "space",             "F12",                           "F2",                   
         "F5",             "F8",                   "o",                 "F4",   
"F3"};
+ 
+-static_assert( sizeof(ply_keys) / sizeof(std::string) == __SIN_PLY_BOTTOM, 
ply_keys__sizecheck );
+-static_assert( sizeof(ply_def1) / sizeof(std::string) == __SIN_PLY_BOTTOM, 
ply_def1__sizecheck );
+-static_assert( sizeof(ply_def2) / sizeof(std::string) == __SIN_PLY_BOTTOM, 
ply_def2__sizecheck );
+-static_assert( sizeof(gen_keys) / sizeof(std::string) == 
__SIN_GENERAL_BOTTOM, gen_keys__sizecheck );
+-static_assert( sizeof(gen_def) / sizeof(std::string) == __SIN_GENERAL_BOTTOM, 
gen_def__sizecheck );
++static_openlierox_assert( sizeof(ply_keys) / sizeof(std::string) == 
__SIN_PLY_BOTTOM, ply_keys__sizecheck );
++static_openlierox_assert( sizeof(ply_def1) / sizeof(std::string) == 
__SIN_PLY_BOTTOM, ply_def1__sizecheck );
++static_openlierox_assert( sizeof(ply_def2) / sizeof(std::string) == 
__SIN_PLY_BOTTOM, ply_def2__sizecheck );
++static_openlierox_assert( sizeof(gen_keys) / sizeof(std::string) == 
__SIN_GENERAL_BOTTOM, gen_keys__sizecheck );
++static_openlierox_assert( sizeof(gen_def) / sizeof(std::string) == 
__SIN_GENERAL_BOTTOM, gen_def__sizecheck );
+ 
+ static const Version defaultMinVersion("OpenLieroX/0.58_rc1");
+ 
+--- a/src/common/CScriptableVars.cpp
++++ b/src/common/CScriptableVars.cpp
+@@ -32,7 +32,7 @@
+ {"Race", "Race gamemode settings"},
+ };
+ 
+-static_assert( sizeof(GameInfoGroupDescriptions) / (sizeof(char*) * 2) == 
GIG_Size, GIG_desc__sizecheck );
++static_openlierox_assert( sizeof(GameInfoGroupDescriptions) / (sizeof(char*) 
* 2) == GIG_Size, GIG_desc__sizecheck );
+ 
+ 
+ std::string AdvancedLevelDescription(AdvancedLevel l) {
+--- a/src/common/FeatureList.cpp
++++ b/src/common/FeatureList.cpp
+@@ -114,7 +114,7 @@
+       Feature::Unset()
+ };
+ 
+-static_assert(__FTI_BOTTOM == sizeof(featureArray)/sizeof(Feature) - 1, 
featureArray__sizecheck);
++static_openlierox_assert(__FTI_BOTTOM == sizeof(featureArray)/sizeof(Feature) 
- 1, featureArray__sizecheck);
+ 
+ 
+ 
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -135,12 +135,12 @@
+ static void DoSystemChecks() {
+       // sadly, these sizeof are directly used in CGameScript.cpp/CMap.cpp
+       // TODO: fix this issue
+-      static_assert(sizeof(char) == 1, sizeof_char__equals1);
+-      static_assert(sizeof(short) == 2, sizeof_short__equals2);
+-      static_assert(sizeof(int) == 4, sizeof_int__equals4);
+-      static_assert(sizeof(float) == 4, sizeof_float__equals4);
++      static_openlierox_assert(sizeof(char) == 1, sizeof_char__equals1);
++      static_openlierox_assert(sizeof(short) == 2, sizeof_short__equals2);
++      static_openlierox_assert(sizeof(int) == 4, sizeof_int__equals4);
++      static_openlierox_assert(sizeof(float) == 4, sizeof_float__equals4);
+       // sometimes the return value of SendMessage is used as a pointer
+-      static_assert(sizeof(DWORD) == sizeof(void*), sizeof_dword__equals_p);
++      static_openlierox_assert(sizeof(DWORD) == sizeof(void*), 
sizeof_dword__equals_p);
+ }
+ 
+ 

diff --git a/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild 
b/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild
index a9fd8f9..b820b7e 100644
--- a/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild
+++ b/games-action/openlierox/openlierox-0.58_rc3-r1.ebuild
@@ -8,6 +8,7 @@ inherit cmake-utils eutils
 
 MY_PN="OpenLieroX"
 MY_P="${MY_PN}_${PV}"
+
 DESCRIPTION="Real-time excessive Worms-clone"
 HOMEPAGE="http://openlierox.sourceforge.net/";
 SRC_URI="mirror://sourceforge/openlierox/${MY_P}.src.tar.bz2"
@@ -17,56 +18,50 @@ SLOT="0"
 KEYWORDS="amd64 x86"
 IUSE="X breakpad debug joystick"
 
-RDEPEND="media-libs/sdl-mixer
-       media-libs/sdl-image
-       media-libs/gd[jpeg,png]
+RDEPEND="
        dev-libs/libxml2
-       dev-libs/libzip
+       dev-libs/libzip:=
+       media-libs/gd:=[jpeg,png]
+       media-libs/libsdl[joystick?,X?]
+       media-libs/sdl-image
+       media-libs/sdl-mixer
        net-misc/curl
-       joystick? ( media-libs/libsdl[joystick] )
-       !joystick? ( media-libs/libsdl )
-       X? ( x11-libs/libX11
-               media-libs/libsdl[X] )
-       !X? ( media-libs/libsdl )"
-DEPEND="${RDEPEND}"
+       X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+       X? ( x11-proto/xproto )"
 
 S="${WORKDIR}/${MY_PN}"
 
-src_prepare() {
-       epatch "${FILESDIR}"/${PN}-0.58_rc1-icu.patch \
-                       "${FILESDIR}"/${PN}-0.58_rc1-curl.patch
-       eapply_user
-}
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.58_rc1-icu.patch
+       "${FILESDIR}"/${PN}-0.58_rc1-curl.patch
+       "${FILESDIR}"/${PN}-0.58_rc3-fix-c++14.patch
+)
 
 src_configure() {
        local mycmakeargs=(
-               -D DEBUG=$(usex debug)
-               -D X11=$(usex X)
-               -D BREAKPAD=$(usex breakpad Yes No)
-               -D DISABLE_JOYSTICK=$(usex joystick No Yes)
-               -D SYSTEM_DATA_DIR=/usr/share
-               -D VERSION=${PV}
+               -DDEBUG=$(usex debug)
+               -DX11=$(usex X)
+               -DBREAKPAD=$(usex breakpad)
+               -DDISABLE_JOYSTICK=$(usex !joystick)
+               -DSYSTEM_DATA_DIR=usr/share
+               -DVERSION=${PV}
        )
-
        cmake-utils_src_configure
 }
 
-src_compile() {
-       cmake-utils_src_compile
-}
-
 src_install() {
        # NOTE: App uses case-insensitive file-handling
-       insinto /usr/share/${PN}/
-       doins -r share/gamedir/*
+       dobin "${CMAKE_BUILD_DIR}"/bin/openlierox
+
+       insinto /usr/share/${PN}
+       doins -r share/gamedir/.
 
-       dodoc doc/{README,ChangeLog,Development,TODO}
-       insinto /usr/share/doc/"${PF}"
-       doins -r doc/original_lx_docs
+       DOCS=( doc/{README,ChangeLog,Development,TODO,original_lx_docs/*.txt} )
+       HTML_DOCS=( doc/original_lx_docs/{*.html,images} )
+       einstalldocs
 
        doicon share/OpenLieroX.*
        make_desktop_entry openlierox OpenLieroX OpenLieroX \
                        "Game;ActionGame;ArcadeGame;"
-
-       dobin "${CMAKE_BUILD_DIR}"/bin/openlierox
 }

Reply via email to