commit:     dbae5dff6178aac6872743824f765be3d2564d86
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 08:24:58 2016 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 08:25:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbae5dff

dev-games/crystalspace: Fix build with gcc-5

Package-Manager: portage-2.2.26

 dev-games/crystalspace/crystalspace-2.0-r1.ebuild  |  5 +-
 .../files/crystalspace-2.0-gcc52.patch             | 53 ++++++++++++++++++++++
 2 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/dev-games/crystalspace/crystalspace-2.0-r1.ebuild 
b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild
index e90bc2e..20aaa6f 100644
--- a/dev-games/crystalspace/crystalspace-2.0-r1.ebuild
+++ b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -46,7 +46,7 @@ DEPEND="${COMMON_DEP}
        java? ( >=virtual/jdk-1.5
                dev-java/ant-core )
        dev-util/ftjam
-       dev-lang/swig
+       <dev-lang/swig-3
        virtual/pkgconfig"
 
 S=${WORKDIR}/${MY_P}
@@ -60,6 +60,7 @@ src_prepare() {
                docs/Jamfile || die
        epatch \
                "${FILESDIR}"/${P}-gcc47.patch \
+               "${FILESDIR}"/${P}-gcc52.patch \
                "${FILESDIR}"/${P}-wxgtk.patch
        use wxwidgets && append-libs -lGL
        AT_M4DIR=mk/autoconf \

diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch 
b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch
new file mode 100644
index 0000000..341b33d
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch
@@ -0,0 +1,53 @@
+--- include/csgfx/imagememory.h.old    2016-04-17 09:09:31.497152401 +0200
++++ include/csgfx/imagememory.h        2016-04-17 09:12:13.838355158 +0200
+@@ -179,8 +179,8 @@
+   /// Get a pointer to the alpha data that can be changed.
+   uint8* GetAlphaPtr ();
+ 
+-  virtual const void* GetImageData () { return GetImagePtr (); }
+-  virtual int GetWidth () const { return Width; }
++  virtual const void* GetImageData ();
++  virtual int GetWidth () const;
+   virtual int GetHeight () const { return Height; }
+   virtual int GetDepth () const { return Depth; }
+ 
+--- libs/csgfx/imagememory.cpp.old     2016-04-17 09:07:19.555451540 +0200
++++ libs/csgfx/imagememory.cpp 2016-04-17 09:13:09.339398463 +0200
+@@ -208,6 +208,23 @@
+   EnsureImage();
+   return (void*)databuf->GetData ();
+ }
++
++const void* csImageMemory::GetImageData ()
++{
++  return GetImagePtr ();
++}
++
++int csImageMemory::GetWidth () const
++{
++  return Width;
++}
++
++void csImageBase::SetName (const char* iName)
++{
++  cs_free (fName);
++  fName = CS::StrDup (iName);
++}
++
+ csRGBpixel* csImageMemory::GetPalettePtr ()
+ {
+   EnsureImage();
+--- include/csgfx/imagebase.h.old      2016-04-17 09:59:09.211101864 +0200
++++ include/csgfx/imagebase.h  2016-04-17 09:59:20.041919599 +0200
+@@ -61,10 +61,7 @@
+   // Most images are 2D, so provide a sensible default
+   virtual int GetDepth () const { return 1; }
+ 
+-  virtual void SetName (const char* iName)
+-  {
+-    cs_free (fName); fName = CS::StrDup (iName);
+-  }
++  virtual void SetName (const char* iName);
+   virtual const char* GetName () const { return fName; }
+ 
+   /* Commented out: should be implemented by all descendants.

Reply via email to