dev-games/crystalspace: Fix build with gcc-5
authorTupone Alfredo <tupone@gentoo.org>
Sun, 17 Apr 2016 08:24:58 +0000 (10:24 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Sun, 17 Apr 2016 08:25:34 +0000 (10:25 +0200)
Package-Manager: portage-2.2.26

dev-games/crystalspace/crystalspace-2.0-r1.ebuild
dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch [new file with mode: 0644]

index e90bc2ee8f93f29c2c888637dcb1ef924868eb3a..20aaa6f22755a6605c6ccd92d58f41e1e61a8559 100644 (file)
@@ -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 (file)
index 0000000..341b33d
--- /dev/null
@@ -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.