x11-misc/fracplanet: EAPI bump, fix build with gcc6 (Bug #602414)
authorHarri Nieminen <moikkis@gmail.com>
Sun, 26 Feb 2017 16:19:39 +0000 (18:19 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 28 Feb 2017 19:10:47 +0000 (20:10 +0100)
Gentoo-Bug: https://bugs.gentoo.org/602414

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4085

x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch [new file with mode: 0644]
x11-misc/fracplanet/files/fracplanet-0.4.0-gold.patch
x11-misc/fracplanet/fracplanet-0.4.0-r1.ebuild [moved from x11-misc/fracplanet/fracplanet-0.4.0.ebuild with 67% similarity]

diff --git a/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch b/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch
new file mode 100644 (file)
index 0000000..4d760d6
--- /dev/null
@@ -0,0 +1,44 @@
+Description: Fix compilation with gcc-6
+Author: Gert Wollny <gw.fossdev@gmail.com>
+Last-Updated: 2016-07-09
+Forwarded: No
+Bug-Debian: https://bugs.debian.org/811642
+
+--- fracplanet-0.4.0.orig/image.cpp
++++ fracplanet-0.4.0/image.cpp
+@@ -85,7 +85,7 @@ template <> bool Raster<uchar>::write_pg
+       out.write(reinterpret_cast<const char*>(&(*(row->begin()))),row->size());
+     }
+   out.close();
+-  return out;
++  return out.good();
+ }
+ template <> bool Raster<ushort>::write_pgmfile(const std::string& filename,Progress* target) const
+@@ -101,7 +101,7 @@ template <> bool Raster<ushort>::write_p
+       progress.step();
+       for (const ushort* it=row->begin();it!=row->end();++it)
+       {
+-        const uchar p[2]={((*it)>>8),(*it)};
++        const uchar p[2]={static_cast<uchar>((*it)>>8),static_cast<uchar>((*it) & 0x00FF)};
+         if (m>=256)
+           {
+             // PGM spec is most significant byte first
+@@ -115,7 +115,7 @@ template <> bool Raster<ushort>::write_p
+       }
+     }
+   out.close();
+-  return out;
++  return out.good();
+ }
+ template <> bool Raster<ByteRGBA>::write_ppmfile(const std::string& filename,Progress* target) const
+@@ -132,7 +132,7 @@ template <> bool Raster<ByteRGBA>::write
+       out.write(reinterpret_cast<const char*>(&((*it).r)),3);
+     }
+   out.close();
+-  return out;
++  return out.good();
+ }
index c980dfdd6b33a011f06bb47d46bb1f8d45b2c54b..4a52d1c44a6272588b7804389f5f854cdffad935 100644 (file)
@@ -1,5 +1,5 @@
---- triangle_mesh_viewer.h
-+++ triangle_mesh_viewer.h
+--- a/triangle_mesh_viewer.h
++++ b/triangle_mesh_viewer.h
 @@ -24,6 +24,7 @@
  #ifndef _triangle_mesh_viewer_h_
  #define _triangle_mesh_viewer_h_
@@ -9,8 +9,8 @@
  #include "random.h"
  #include "triangle_mesh.h"
 
---- fracplanet.pro
-+++ fracplanet.pro
+--- a/fracplanet.pro
++++ b/fracplanet.pro
 @@ -8,7 +8,7 @@
  
  HEADERS += $$system(ls *.h)
similarity index 67%
rename from x11-misc/fracplanet/fracplanet-0.4.0.ebuild
rename to x11-misc/fracplanet/fracplanet-0.4.0-r1.ebuild
index 518fa738b3321fc7b84d59163c0ea6e90c371f35..254e38f2f673641979c7d0166345e8f8bfaed9cc 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
-inherit qt4-r2
+EAPI=6
+inherit qmake-utils
 
 DESCRIPTION="Fractal planet and terrain generator"
 HOMEPAGE="https://sourceforge.net/projects/fracplanet/"
@@ -14,28 +14,38 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-RDEPEND="dev-libs/boost
-       virtual/glu
-       virtual/opengl
+RDEPEND="
+       dev-libs/boost:=
        dev-qt/qtcore:4
        dev-qt/qtgui:4
-       dev-qt/qtopengl:4"
+       dev-qt/qtopengl:4
+       virtual/glu
+       virtual/opengl
+"
 DEPEND="${RDEPEND}
        dev-libs/libxslt"
 
 S=${WORKDIR}/${PN}
 
-PATCHES=( "${FILESDIR}/${P}-gold.patch" )
+PATCHES=(
+       "${FILESDIR}/${P}-gold.patch"
+       "${FILESDIR}/${P}-gcc6.patch"
+)
+
+HTML_DOCS=( fracplanet.{htm,css} )
+
+src_configure() {
+       eqmake4 fracplanet.pro
+}
 
 src_compile() {
        xsltproc -stringparam version ${PV} -html htm_to_qml.xsl fracplanet.htm \
-               | sed 's/"/\\"/g' | sed 's/^/"/g' | sed 's/$/\\n"/g'> usage_text.h
-       qt4-r2_src_compile
+               | sed 's/"/\\"/g' | sed 's/^/"/g' | sed 's/$/\\n"/g'> usage_text.h || die
+       default
 }
 
 src_install() {
        dobin ${PN}
        doman man/man1/${PN}.1
-       dodoc BUGS NEWS README THANKS TODO
-       dohtml *.{css,htm}
+       einstalldocs
 }