1 |
commit: b4f25602d999f03cf7ac5c936971ac145f4226f8 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 29 17:40:38 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 29 18:10:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4f25602 |
7 |
|
8 |
sci-visualization/xds-viewer: Allow for compiling with GCC 6 |
9 |
|
10 |
Gentoo-bug: 598126 |
11 |
* EAPI=6 |
12 |
* Add missing sub-slot operators |
13 |
|
14 |
Package-Manager: portage-2.3.2 |
15 |
|
16 |
.../files/xds-viewer-0.6-fix-c++14.patch | 66 ++++++++++++++++++++++ |
17 |
...-viewer-0.6.ebuild => xds-viewer-0.6-r1.ebuild} | 12 ++-- |
18 |
2 files changed, 72 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/sci-visualization/xds-viewer/files/xds-viewer-0.6-fix-c++14.patch b/sci-visualization/xds-viewer/files/xds-viewer-0.6-fix-c++14.patch |
21 |
new file mode 100644 |
22 |
index 00000000..612b503 |
23 |
--- /dev/null |
24 |
+++ b/sci-visualization/xds-viewer/files/xds-viewer-0.6-fix-c++14.patch |
25 |
@@ -0,0 +1,66 @@ |
26 |
+Fix building with C++14, caused by invalid implicit T* -> bool conversions. |
27 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=598126 |
28 |
+ |
29 |
+--- a/src/CbfReader.cpp |
30 |
++++ b/src/CbfReader.cpp |
31 |
+@@ -315,12 +315,12 @@ |
32 |
+ |
33 |
+ for ( int i = 0;i < nx*ny;i++ ) |
34 |
+ { |
35 |
+- if ( tapin.get( sc ) == 0 )return -4; |
36 |
++ if ( !tapin.get( sc ) )return -4; |
37 |
+ diff = sc; |
38 |
+ if ( diff == -128 ) |
39 |
+ { |
40 |
+- if ( tapin.get( uc0 ) == 0 )return -4; |
41 |
+- if ( tapin.get( uc1 ) == 0 )return -4; |
42 |
++ if ( !tapin.get( uc0 ) )return -4; |
43 |
++ if ( !tapin.get( uc1 ) )return -4; |
44 |
+ tmp0 = uc0; |
45 |
+ if ( uc0 < 0 ) tmp0 += 256; // converting signed to unsigned char |
46 |
+ diff = uc1; |
47 |
+@@ -329,15 +329,15 @@ |
48 |
+ if ( diff > 32767 )diff -= 65536; |
49 |
+ if ( diff == -32768 ) |
50 |
+ { |
51 |
+- if ( tapin.get( uc0 ) == 0 )return -4; |
52 |
+- if ( tapin.get( uc1 ) == 0 )return -4; |
53 |
++ if ( !tapin.get( uc0 ) )return -4; |
54 |
++ if ( !tapin.get( uc1 ) )return -4; |
55 |
+ tmp0 = uc0; |
56 |
+ if ( tmp0 < 0 ) tmp0 += 256; // converting signed to unsigned char |
57 |
+ tmp1 = uc1; |
58 |
+ if ( tmp1 < 0 ) tmp1 += 256; // converting signed to unsigned char |
59 |
+ diff = tmp0 + 256 * tmp1; |
60 |
+- if ( tapin.get( uc0 ) == 0 )return -4; |
61 |
+- if ( tapin.get( uc1 ) == 0 )return -4; |
62 |
++ if ( !tapin.get( uc0 ) )return -4; |
63 |
++ if ( !tapin.get( uc1 ) )return -4; |
64 |
+ tmp0 = uc0; |
65 |
+ if ( tmp0 < 0 ) tmp0 += 256; // converting signed to unsigned char |
66 |
+ tmp1 = uc1; |
67 |
+@@ -359,7 +359,7 @@ |
68 |
+ { |
69 |
+ std::ifstream::pos_type streamPos = tapin.tellg(); |
70 |
+ |
71 |
+- char binaryMarker[5] = {12, 26, 4, 213, '\0'}; |
72 |
++ char binaryMarker[5] = {12, 26, 4, (char)213, '\0'}; |
73 |
+ char buffer[5] = {0, 0, 0, 0, '\0'}; |
74 |
+ |
75 |
+ bool equal = true; |
76 |
+@@ -448,13 +448,13 @@ |
77 |
+ |
78 |
+ int CbfReader::checkImageFormat( std::ifstream& tapin ) |
79 |
+ { |
80 |
+- if ( tapin == 0 )return -2; // Cannot open image file |
81 |
++ if ( !tapin )return -2; // Cannot open image file |
82 |
+ |
83 |
+ { // Check image file format |
84 |
+ std::string s( "###CBF: " ); |
85 |
+ char label[9]; |
86 |
+ for ( int i = 0;i < 8;i++ ) |
87 |
+- if ( tapin.get( label[i] ) == false )return -4; // Cannot read image file |
88 |
++ if ( !tapin.get( label[i] ) )return -4; // Cannot read image file |
89 |
+ label[8] = '\0'; |
90 |
+ std::string sLabel = ( std::string )label; |
91 |
+ |
92 |
|
93 |
diff --git a/sci-visualization/xds-viewer/xds-viewer-0.6.ebuild b/sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild |
94 |
similarity index 59% |
95 |
rename from sci-visualization/xds-viewer/xds-viewer-0.6.ebuild |
96 |
rename to sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild |
97 |
index 6a79a58..3d4b78c 100644 |
98 |
--- a/sci-visualization/xds-viewer/xds-viewer-0.6.ebuild |
99 |
+++ b/sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild |
100 |
@@ -1,12 +1,12 @@ |
101 |
-# Copyright 1999-2013 Gentoo Foundation |
102 |
+# Copyright 1999-2016 Gentoo Foundation |
103 |
# Distributed under the terms of the GNU General Public License v2 |
104 |
# $Id$ |
105 |
|
106 |
-EAPI=4 |
107 |
+EAPI=6 |
108 |
|
109 |
inherit cmake-utils |
110 |
|
111 |
-DESCRIPTION="Viewing X-ray diffraction and control images in the context of data processing by the XDS" |
112 |
+DESCRIPTION="X-ray diffraction/control image viewer in the context of data processing by XDS" |
113 |
HOMEPAGE="http://xds-viewer.sourceforge.net/" |
114 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
115 |
|
116 |
@@ -17,9 +17,9 @@ IUSE="" |
117 |
|
118 |
RDEPEND=" |
119 |
dev-libs/glib:2 |
120 |
- media-libs/libpng |
121 |
+ media-libs/libpng:0= |
122 |
dev-qt/qtgui:4" |
123 |
DEPEND="${RDEPEND}" |
124 |
|
125 |
-DOCS="README" |
126 |
-HTML_DOCS="src/doc/*" |
127 |
+HTML_DOCS=( src/doc/. ) |
128 |
+PATCHES=( "${FILESDIR}"/${P}-fix-c++14.patch ) |