1 |
commit: 63864fecd34ba9106b6b8269368430af66b75c2a |
2 |
Author: Harri Nieminen <moikkis <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Feb 26 16:19:39 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 19:10:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63864fec |
7 |
|
8 |
x11-misc/fracplanet: EAPI bump, fix build with gcc6 (Bug #602414) |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/602414 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/4085 |
14 |
|
15 |
.../fracplanet/files/fracplanet-0.4.0-gcc6.patch | 44 ++++++++++++++++++++++ |
16 |
.../fracplanet/files/fracplanet-0.4.0-gold.patch | 8 ++-- |
17 |
...net-0.4.0.ebuild => fracplanet-0.4.0-r1.ebuild} | 34 +++++++++++------ |
18 |
3 files changed, 70 insertions(+), 16 deletions(-) |
19 |
|
20 |
diff --git a/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch b/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch |
21 |
new file mode 100644 |
22 |
index 0000000000..4d760d672f |
23 |
--- /dev/null |
24 |
+++ b/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch |
25 |
@@ -0,0 +1,44 @@ |
26 |
+Description: Fix compilation with gcc-6 |
27 |
+Author: Gert Wollny <gw.fossdev@×××××.com> |
28 |
+Last-Updated: 2016-07-09 |
29 |
+Forwarded: No |
30 |
+Bug-Debian: https://bugs.debian.org/811642 |
31 |
+ |
32 |
+--- fracplanet-0.4.0.orig/image.cpp |
33 |
++++ fracplanet-0.4.0/image.cpp |
34 |
+@@ -85,7 +85,7 @@ template <> bool Raster<uchar>::write_pg |
35 |
+ out.write(reinterpret_cast<const char*>(&(*(row->begin()))),row->size()); |
36 |
+ } |
37 |
+ out.close(); |
38 |
+- return out; |
39 |
++ return out.good(); |
40 |
+ } |
41 |
+ |
42 |
+ template <> bool Raster<ushort>::write_pgmfile(const std::string& filename,Progress* target) const |
43 |
+@@ -101,7 +101,7 @@ template <> bool Raster<ushort>::write_p |
44 |
+ progress.step(); |
45 |
+ for (const ushort* it=row->begin();it!=row->end();++it) |
46 |
+ { |
47 |
+- const uchar p[2]={((*it)>>8),(*it)}; |
48 |
++ const uchar p[2]={static_cast<uchar>((*it)>>8),static_cast<uchar>((*it) & 0x00FF)}; |
49 |
+ if (m>=256) |
50 |
+ { |
51 |
+ // PGM spec is most significant byte first |
52 |
+@@ -115,7 +115,7 @@ template <> bool Raster<ushort>::write_p |
53 |
+ } |
54 |
+ } |
55 |
+ out.close(); |
56 |
+- return out; |
57 |
++ return out.good(); |
58 |
+ } |
59 |
+ |
60 |
+ template <> bool Raster<ByteRGBA>::write_ppmfile(const std::string& filename,Progress* target) const |
61 |
+@@ -132,7 +132,7 @@ template <> bool Raster<ByteRGBA>::write |
62 |
+ out.write(reinterpret_cast<const char*>(&((*it).r)),3); |
63 |
+ } |
64 |
+ out.close(); |
65 |
+- return out; |
66 |
++ return out.good(); |
67 |
+ } |
68 |
+ |
69 |
+ |
70 |
|
71 |
diff --git a/x11-misc/fracplanet/files/fracplanet-0.4.0-gold.patch b/x11-misc/fracplanet/files/fracplanet-0.4.0-gold.patch |
72 |
index c980dfdd6b..4a52d1c44a 100644 |
73 |
--- a/x11-misc/fracplanet/files/fracplanet-0.4.0-gold.patch |
74 |
+++ b/x11-misc/fracplanet/files/fracplanet-0.4.0-gold.patch |
75 |
@@ -1,5 +1,5 @@ |
76 |
---- triangle_mesh_viewer.h |
77 |
-+++ triangle_mesh_viewer.h |
78 |
+--- a/triangle_mesh_viewer.h |
79 |
++++ b/triangle_mesh_viewer.h |
80 |
@@ -24,6 +24,7 @@ |
81 |
#ifndef _triangle_mesh_viewer_h_ |
82 |
#define _triangle_mesh_viewer_h_ |
83 |
@@ -9,8 +9,8 @@ |
84 |
#include "random.h" |
85 |
#include "triangle_mesh.h" |
86 |
|
87 |
---- fracplanet.pro |
88 |
-+++ fracplanet.pro |
89 |
+--- a/fracplanet.pro |
90 |
++++ b/fracplanet.pro |
91 |
@@ -8,7 +8,7 @@ |
92 |
|
93 |
HEADERS += $$system(ls *.h) |
94 |
|
95 |
diff --git a/x11-misc/fracplanet/fracplanet-0.4.0.ebuild b/x11-misc/fracplanet/fracplanet-0.4.0-r1.ebuild |
96 |
similarity index 67% |
97 |
rename from x11-misc/fracplanet/fracplanet-0.4.0.ebuild |
98 |
rename to x11-misc/fracplanet/fracplanet-0.4.0-r1.ebuild |
99 |
index 518fa738b3..254e38f2f6 100644 |
100 |
--- a/x11-misc/fracplanet/fracplanet-0.4.0.ebuild |
101 |
+++ b/x11-misc/fracplanet/fracplanet-0.4.0-r1.ebuild |
102 |
@@ -1,9 +1,9 @@ |
103 |
-# Copyright 1999-2013 Gentoo Foundation |
104 |
+# Copyright 1999-2017 Gentoo Foundation |
105 |
# Distributed under the terms of the GNU General Public License v2 |
106 |
# $Id$ |
107 |
|
108 |
-EAPI=4 |
109 |
-inherit qt4-r2 |
110 |
+EAPI=6 |
111 |
+inherit qmake-utils |
112 |
|
113 |
DESCRIPTION="Fractal planet and terrain generator" |
114 |
HOMEPAGE="https://sourceforge.net/projects/fracplanet/" |
115 |
@@ -14,28 +14,38 @@ SLOT="0" |
116 |
KEYWORDS="~amd64 ~x86" |
117 |
IUSE="" |
118 |
|
119 |
-RDEPEND="dev-libs/boost |
120 |
- virtual/glu |
121 |
- virtual/opengl |
122 |
+RDEPEND=" |
123 |
+ dev-libs/boost:= |
124 |
dev-qt/qtcore:4 |
125 |
dev-qt/qtgui:4 |
126 |
- dev-qt/qtopengl:4" |
127 |
+ dev-qt/qtopengl:4 |
128 |
+ virtual/glu |
129 |
+ virtual/opengl |
130 |
+" |
131 |
DEPEND="${RDEPEND} |
132 |
dev-libs/libxslt" |
133 |
|
134 |
S=${WORKDIR}/${PN} |
135 |
|
136 |
-PATCHES=( "${FILESDIR}/${P}-gold.patch" ) |
137 |
+PATCHES=( |
138 |
+ "${FILESDIR}/${P}-gold.patch" |
139 |
+ "${FILESDIR}/${P}-gcc6.patch" |
140 |
+) |
141 |
+ |
142 |
+HTML_DOCS=( fracplanet.{htm,css} ) |
143 |
+ |
144 |
+src_configure() { |
145 |
+ eqmake4 fracplanet.pro |
146 |
+} |
147 |
|
148 |
src_compile() { |
149 |
xsltproc -stringparam version ${PV} -html htm_to_qml.xsl fracplanet.htm \ |
150 |
- | sed 's/"/\\"/g' | sed 's/^/"/g' | sed 's/$/\\n"/g'> usage_text.h |
151 |
- qt4-r2_src_compile |
152 |
+ | sed 's/"/\\"/g' | sed 's/^/"/g' | sed 's/$/\\n"/g'> usage_text.h || die |
153 |
+ default |
154 |
} |
155 |
|
156 |
src_install() { |
157 |
dobin ${PN} |
158 |
doman man/man1/${PN}.1 |
159 |
- dodoc BUGS NEWS README THANKS TODO |
160 |
- dohtml *.{css,htm} |
161 |
+ einstalldocs |
162 |
} |