diff options
author | David Seifert <soap@gentoo.org> | 2016-10-29 19:40:38 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-10-29 20:10:01 +0200 |
commit | b4f25602d999f03cf7ac5c936971ac145f4226f8 (patch) | |
tree | 28f27f3648383e26e7fa28d6955e9e5b0fe69346 /sci-visualization | |
parent | virtual/perl-Filter-Simple: Add missing arm keywords provided by dev-lang/perl (diff) | |
download | gentoo-b4f25602d999f03cf7ac5c936971ac145f4226f8.tar.gz gentoo-b4f25602d999f03cf7ac5c936971ac145f4226f8.tar.bz2 gentoo-b4f25602d999f03cf7ac5c936971ac145f4226f8.zip |
sci-visualization/xds-viewer: Allow for compiling with GCC 6
Gentoo-bug: 598126
* EAPI=6
* Add missing sub-slot operators
Package-Manager: portage-2.3.2
Diffstat (limited to 'sci-visualization')
-rw-r--r-- | sci-visualization/xds-viewer/files/xds-viewer-0.6-fix-c++14.patch | 66 | ||||
-rw-r--r-- | sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild (renamed from sci-visualization/xds-viewer/xds-viewer-0.6.ebuild) | 12 |
2 files changed, 72 insertions, 6 deletions
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 new file mode 100644 index 000000000000..612b5038c845 --- /dev/null +++ b/sci-visualization/xds-viewer/files/xds-viewer-0.6-fix-c++14.patch @@ -0,0 +1,66 @@ +Fix building with C++14, caused by invalid implicit T* -> bool conversions. +See also: https://bugs.gentoo.org/show_bug.cgi?id=598126 + +--- a/src/CbfReader.cpp ++++ b/src/CbfReader.cpp +@@ -315,12 +315,12 @@ + + for ( int i = 0;i < nx*ny;i++ ) + { +- if ( tapin.get( sc ) == 0 )return -4; ++ if ( !tapin.get( sc ) )return -4; + diff = sc; + if ( diff == -128 ) + { +- if ( tapin.get( uc0 ) == 0 )return -4; +- if ( tapin.get( uc1 ) == 0 )return -4; ++ if ( !tapin.get( uc0 ) )return -4; ++ if ( !tapin.get( uc1 ) )return -4; + tmp0 = uc0; + if ( uc0 < 0 ) tmp0 += 256; // converting signed to unsigned char + diff = uc1; +@@ -329,15 +329,15 @@ + if ( diff > 32767 )diff -= 65536; + if ( diff == -32768 ) + { +- if ( tapin.get( uc0 ) == 0 )return -4; +- if ( tapin.get( uc1 ) == 0 )return -4; ++ if ( !tapin.get( uc0 ) )return -4; ++ if ( !tapin.get( uc1 ) )return -4; + tmp0 = uc0; + if ( tmp0 < 0 ) tmp0 += 256; // converting signed to unsigned char + tmp1 = uc1; + if ( tmp1 < 0 ) tmp1 += 256; // converting signed to unsigned char + diff = tmp0 + 256 * tmp1; +- if ( tapin.get( uc0 ) == 0 )return -4; +- if ( tapin.get( uc1 ) == 0 )return -4; ++ if ( !tapin.get( uc0 ) )return -4; ++ if ( !tapin.get( uc1 ) )return -4; + tmp0 = uc0; + if ( tmp0 < 0 ) tmp0 += 256; // converting signed to unsigned char + tmp1 = uc1; +@@ -359,7 +359,7 @@ + { + std::ifstream::pos_type streamPos = tapin.tellg(); + +- char binaryMarker[5] = {12, 26, 4, 213, '\0'}; ++ char binaryMarker[5] = {12, 26, 4, (char)213, '\0'}; + char buffer[5] = {0, 0, 0, 0, '\0'}; + + bool equal = true; +@@ -448,13 +448,13 @@ + + int CbfReader::checkImageFormat( std::ifstream& tapin ) + { +- if ( tapin == 0 )return -2; // Cannot open image file ++ if ( !tapin )return -2; // Cannot open image file + + { // Check image file format + std::string s( "###CBF: " ); + char label[9]; + for ( int i = 0;i < 8;i++ ) +- if ( tapin.get( label[i] ) == false )return -4; // Cannot read image file ++ if ( !tapin.get( label[i] ) )return -4; // Cannot read image file + label[8] = '\0'; + std::string sLabel = ( std::string )label; + diff --git a/sci-visualization/xds-viewer/xds-viewer-0.6.ebuild b/sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild index 6a79a58ef306..3d4b78c87060 100644 --- a/sci-visualization/xds-viewer/xds-viewer-0.6.ebuild +++ b/sci-visualization/xds-viewer/xds-viewer-0.6-r1.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=4 +EAPI=6 inherit cmake-utils -DESCRIPTION="Viewing X-ray diffraction and control images in the context of data processing by the XDS" +DESCRIPTION="X-ray diffraction/control image viewer in the context of data processing by XDS" HOMEPAGE="http://xds-viewer.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" @@ -17,9 +17,9 @@ IUSE="" RDEPEND=" dev-libs/glib:2 - media-libs/libpng + media-libs/libpng:0= dev-qt/qtgui:4" DEPEND="${RDEPEND}" -DOCS="README" -HTML_DOCS="src/doc/*" +HTML_DOCS=( src/doc/. ) +PATCHES=( "${FILESDIR}"/${P}-fix-c++14.patch ) |