diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-03-04 17:03:15 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-03-04 18:29:39 +0100 |
commit | b70f16fd40ba36b9f784cde36f35a55f1fde93ab (patch) | |
tree | 3b78b4103af1a14ed411cdd897c2ff5812a6e39e /sci-biology/clustalx | |
parent | profiles: Mask sci-chemistry/massxpert for removal (diff) | |
download | gentoo-b70f16fd40ba36b9f784cde36f35a55f1fde93ab.tar.gz gentoo-b70f16fd40ba36b9f784cde36f35a55f1fde93ab.tar.bz2 gentoo-b70f16fd40ba36b9f784cde36f35a55f1fde93ab.zip |
sci-biology/clustalx: Switch to Qt5
Thanks to Debian.
Bug: https://bugs.gentoo.org/644726
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sci-biology/clustalx')
-rw-r--r-- | sci-biology/clustalx/clustalx-2.1-r3.ebuild | 56 | ||||
-rw-r--r-- | sci-biology/clustalx/files/clustalx-2.1-qt5.patch | 295 |
2 files changed, 351 insertions, 0 deletions
diff --git a/sci-biology/clustalx/clustalx-2.1-r3.ebuild b/sci-biology/clustalx/clustalx-2.1-r3.ebuild new file mode 100644 index 000000000000..0f9366bee7f5 --- /dev/null +++ b/sci-biology/clustalx/clustalx-2.1-r3.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit desktop qmake-utils + +DESCRIPTION="Graphical interface for the ClustalW multiple alignment program" +HOMEPAGE="http://www.ebi.ac.uk/tools/clustalw2/" +SRC_URI=" + http://www.clustal.org/download/current/${P}.tar.gz + https://dev.gentoo.org/~jlec/distfiles/${PN}.png.xz" + +LICENSE="GPL-3 LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 +" +RDEPEND="${DEPEND} + >=sci-biology/clustalw-${PV} +" + +PATCHES=( "${FILESDIR}/${P}"-qt5.patch ) # kindly borrowed from Debian + +src_prepare() { + default + sed \ + -e "s|colprot.xml|${EPREFIX}/usr/share/${PN}/colprot.xml|" \ + -e "s|coldna.xml|${EPREFIX}/usr/share/${PN}/coldna.xml|" \ + -e "s|colprint.xml|${EPREFIX}/usr/share/${PN}/colprint.xml|" \ + -i ClustalQtParams.h || \ + die "Failed to patch shared files location." + sed \ + -e "s|clustalx.hlp|${EPREFIX}/usr/share/${PN}/clustalx.hlp|" \ + -i HelpDisplayWidget.cpp || \ + die "Failed to patch help file location." + rm -rf usr || die +} + +src_configure() { + eqmake5 +} + +src_install() { + dobin clustalx + insinto /usr/share/${PN} + doins colprot.xml coldna.xml colprint.xml clustalx.hlp + make_desktop_entry ${PN} ClustalX + doicon "${WORKDIR}"/${PN}.png +} diff --git a/sci-biology/clustalx/files/clustalx-2.1-qt5.patch b/sci-biology/clustalx/files/clustalx-2.1-qt5.patch new file mode 100644 index 000000000000..96b108c14474 --- /dev/null +++ b/sci-biology/clustalx/files/clustalx-2.1-qt5.patch @@ -0,0 +1,295 @@ +Author: Andreas Tille <tille@debian.org> +Last-Update: Mon, 11 Sep 2017 09:30:38 +0200 +Description: Porting to Qt5 following the hints at + https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#QtWidgets_as_a_Separate_Module + https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5#toAscii.28.29_and_fromAscii.28.29_Methods_are_deprecated + +--- a/clustalx.pro ++++ b/clustalx.pro +@@ -6,6 +6,7 @@ TEMPLATE = app + TARGET = clustalx + CONFIG += release static + QT += xml ++QT += widgets + VERSION = 2.1 + win32 { + DEFINES += OS_WINDOWS +--- a/AlignOutputFileNames.cpp ++++ b/AlignOutputFileNames.cpp +@@ -20,7 +20,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <iostream> + #include "AlignOutputFileNames.h" +--- a/AlignmentFormatOptions.cpp ++++ b/AlignmentFormatOptions.cpp +@@ -5,7 +5,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include "AlignmentFormatOptions.h" + #include "clustalW/general/userparams.h" +--- a/AlignmentParameters.cpp ++++ b/AlignmentParameters.cpp +@@ -11,7 +11,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QButtonGroup> + #include <QLineEdit> +--- a/AlignmentViewerWidget.cpp ++++ b/AlignmentViewerWidget.cpp +@@ -60,7 +60,7 @@ + *****************************************************************************/ + + +-#include <QtGui> ++#include <QtWidgets> + #include <QFile> + #include <QTextStream> + #include "AlignmentViewerWidget.h" +--- a/AlignmentWidget.cpp ++++ b/AlignmentWidget.cpp +@@ -45,7 +45,7 @@ + * + ****************************************************************************/ + +-#include <QtGui> ++#include <QtWidgets> + #include "AlignmentWidget.h" + #include "clustalW/general/userparams.h" + #include "ClustalQtParams.h" +--- a/BootstrapTreeDialog.cpp ++++ b/BootstrapTreeDialog.cpp +@@ -12,7 +12,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <iostream> + #include "BootstrapTreeDialog.h" +--- a/ColorFileXmlParser.cpp ++++ b/ColorFileXmlParser.cpp +@@ -1,4 +1,4 @@ +-#include <QtGui> ++#include <QtWidgets> + + #include "ColorFileXmlParser.h" + #include "ClustalQtParams.h" +--- a/ColumnScoreParams.cpp ++++ b/ColumnScoreParams.cpp +@@ -11,7 +11,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QButtonGroup> + #include <QLineEdit> +--- a/HelpDisplayWidget.cpp ++++ b/HelpDisplayWidget.cpp +@@ -16,7 +16,7 @@ + #include <QTextEdit> + #include <iostream> + #include <fstream> +-#include <QtGui> ++#include <QtWidgets> + #include "Resources.h" + + const string HelpDisplayWidget::helpFileName = "/usr/share/clustalx/clustalx.hlp"; +--- a/HistogramWidget.cpp ++++ b/HistogramWidget.cpp +@@ -21,7 +21,7 @@ + ****************************************************************************/ + + #include "HistogramWidget.h" +-#include <QtGui> ++#include <QtWidgets> + #include <QImage> + //#include <QPixmap> + #include <QPoint> +--- a/LowScoringSegParams.cpp ++++ b/LowScoringSegParams.cpp +@@ -12,7 +12,7 @@ + #include <QHBoxLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QButtonGroup> + #include <QLineEdit> +--- a/PSPrinter.cpp ++++ b/PSPrinter.cpp +@@ -16,7 +16,7 @@ + #include <ctime> + #include <iomanip> + #include <sstream> +-#include <QtGui> ++#include <QtWidgets> + #include "PSPrinter.h" + #include "ColorFileXmlParser.h" + #include "clustalW/general/userparams.h" +@@ -594,7 +594,7 @@ void PSPrinter::printHeaderLine(ofstream + { + psX = blockLeft + (i - fr) * CHARWIDTH; + (*psOutFile) << "("; +- (*psOutFile) << data->seqHeader[ix][i].toAscii(); ++ (*psOutFile) << data->seqHeader[ix][i].toLatin1(); + (*psOutFile) << ") "; + (*psOutFile) << psX << " " << psY << " " << psX << " " + << psY << " 1.0 1.0 1.0 color_inv\n"; +--- a/PairwiseParams.cpp ++++ b/PairwiseParams.cpp +@@ -18,7 +18,7 @@ + #include <QRadioButton> + #include <QMessageBox> + #include <QHBoxLayout> +-#include <QtGui> ++#include <QtWidgets> + #include "clustalW/general/userparams.h" + #include "clustalW/substitutionMatrix/globalmatrix.h" + #include "FileDialog.h" +--- a/ProteinGapParameters.cpp ++++ b/ProteinGapParameters.cpp +@@ -5,7 +5,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QString> + #include <QMessageBox> +--- a/SaveSeqFile.cpp ++++ b/SaveSeqFile.cpp +@@ -18,7 +18,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include "SaveSeqFile.h" + #include "clustalW/general/userparams.h" +--- a/SecStructOptions.cpp ++++ b/SecStructOptions.cpp +@@ -5,7 +5,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QLineEdit> + #include "SecStructOptions.h" +--- a/SeqNameWidget.cpp ++++ b/SeqNameWidget.cpp +@@ -55,7 +55,7 @@ + * + ****************************************************************************/ + +-#include <QtGui> ++#include <QtWidgets> + #include "SeqNameWidget.h" + #include "KeyController.h" //- nige + #include "clustalW/alignment/Alignment.h" +--- a/TreeFormatOptions.cpp ++++ b/TreeFormatOptions.cpp +@@ -4,7 +4,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <QCheckBox> + #include "TreeFormatOptions.h" +--- a/TreeOutputFileNames.cpp ++++ b/TreeOutputFileNames.cpp +@@ -11,7 +11,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <iostream> + #include "TreeOutputFileNames.h" +--- a/WritePostscriptFile.cpp ++++ b/WritePostscriptFile.cpp +@@ -18,7 +18,7 @@ + #include <QGridLayout> + #include <QSizePolicy> + #include <QComboBox> +-#include <QtGui> ++#include <QtWidgets> + #include <QLabel> + #include <iostream> + #include "WritePostscriptFile.h" +--- a/mainwindow.cpp ++++ b/mainwindow.cpp +@@ -87,7 +87,7 @@ + * + ****************************************************************************/ + +-#include <QtGui> ++#include <QtWidgets> + #include <QPixmap> + #include <QFile> + #include <iostream> +--- a/ColorParameters.cpp ++++ b/ColorParameters.cpp +@@ -154,8 +154,8 @@ QColor ColorParameters::getResidueColor( + { + int i, j; + QChar colorParRes; +- char showRes = res.toAscii(); +- char showCon = consensus.toAscii(); ++ char showRes = res.toLatin1(); ++ char showCon = consensus.toLatin1(); + + for(i = 0; i < colorPar.size(); i++) + { +@@ -171,7 +171,7 @@ QColor ColorParameters::getResidueColor( + + for(j = 0; j < colorPar[i].consensusConditionList.size(); j++) + { +- char temp = colorPar[i].consensusConditionList[j].toAscii(); ++ char temp = colorPar[i].consensusConditionList[j].toLatin1(); + if(consensus == colorPar[i].consensusConditionList[j]) + { + return colorPar[i].color; +@@ -191,8 +191,8 @@ int ColorParameters::getResidueColorNum( + { + int i, j; + QChar colorParRes; +- char showRes = res.toAscii(); +- char showCon = consensus.toAscii(); ++ char showRes = res.toLatin1(); ++ char showCon = consensus.toLatin1(); + + for(i = 0; i < colorPar.size(); i++) + { +@@ -208,7 +208,7 @@ int ColorParameters::getResidueColorNum( + + for(j = 0; j < colorPar[i].consensusConditionList.size(); j++) + { +- char temp = colorPar[i].consensusConditionList[j].toAscii(); ++ char temp = colorPar[i].consensusConditionList[j].toLatin1(); + if(consensus == colorPar[i].consensusConditionList[j]) + { + return getIndexOfColor(colorPar[i].color); |