From 75ae6be0e2590f6ac5e245fac6770ebb63b6a93e Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Wed, 15 Feb 2017 22:23:46 +0100 Subject: media-gfx/kphotoalbum: Fix build w/ ecm 5.31 Revision bump adds upstream patches to fix build with next extra cmake modules version. This version adds cflags -fno-operator-names by default, which breaks the build here. Gentoo-bug: 609470 Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- .../files/kphotoalbum-5.1-ecm531-1.patch | 19 ++++++ .../files/kphotoalbum-5.1-ecm531-2.patch | 39 +++++++++++ .../files/kphotoalbum-5.1-ecm531-3.patch | 56 ++++++++++++++++ .../files/kphotoalbum-5.1-ecm531-4.patch | 19 ++++++ .../files/kphotoalbum-5.1-ecm531-5.patch | 19 ++++++ media-gfx/kphotoalbum/kphotoalbum-5.1-r1.ebuild | 75 ++++++++++++++++++++++ 6 files changed, 227 insertions(+) create mode 100644 media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-1.patch create mode 100644 media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-2.patch create mode 100644 media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-3.patch create mode 100644 media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-4.patch create mode 100644 media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-5.patch create mode 100644 media-gfx/kphotoalbum/kphotoalbum-5.1-r1.ebuild (limited to 'media-gfx') diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-1.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-1.patch new file mode 100644 index 000000000000..bf694951f910 --- /dev/null +++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-1.patch @@ -0,0 +1,19 @@ +commit 8b54a592731e65dec02bbfc83c994fe373bc0dca +Author: Raymond Wooninck +Date: Tue Jan 24 20:55:28 2017 +0100 + + Fix build with -fno-operator-names + +diff --git a/DB/ImageInfo.cpp b/DB/ImageInfo.cpp +index 59c2c6f9..5eadbb10 100644 +--- a/DB/ImageInfo.cpp ++++ b/DB/ImageInfo.cpp +@@ -190,7 +190,7 @@ void ImageInfo::rotate( int degrees, RotationMode mode ) + m_dirty = true; + m_angle = ( m_angle + degrees ) % 360; + +- if (degrees == 90 or degrees == 270) { ++ if (degrees == 90 || degrees == 270) { + m_size.transpose(); + } + diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-2.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-2.patch new file mode 100644 index 000000000000..11cd87cebe70 --- /dev/null +++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-2.patch @@ -0,0 +1,39 @@ +commit 8cc8951ba21b1e54a7cd62e50075e09e8e2f9901 +Author: Raymond Wooninck +Date: Tue Jan 24 21:06:31 2017 +0100 + + Some more fixes for -fno-operator-names + +diff --git a/AnnotationDialog/Dialog.cpp b/AnnotationDialog/Dialog.cpp +index 50e18e70..c44d88dc 100644 +--- a/AnnotationDialog/Dialog.cpp ++++ b/AnnotationDialog/Dialog.cpp +@@ -1504,7 +1504,7 @@ void AnnotationDialog::Dialog::addTagToCandidateList(QString category, QString t + void AnnotationDialog::Dialog::removeTagFromCandidateList(QString category, QString tag) + { + // Is the deselected tag the last selected positionable tag? +- if (m_lastSelectedPositionableTag.first == category and m_lastSelectedPositionableTag.second == tag) { ++ if (m_lastSelectedPositionableTag.first == category && m_lastSelectedPositionableTag.second == tag) { + m_lastSelectedPositionableTag = QPair(); + } + +@@ -1534,7 +1534,7 @@ void AnnotationDialog::Dialog::slotShowAreas(bool showAreas) + void AnnotationDialog::Dialog::positionableTagRenamed(QString category, QString oldTag, QString newTag) + { + // Is the renamed tag the last selected positionable tag? +- if (m_lastSelectedPositionableTag.first == category and m_lastSelectedPositionableTag.second == oldTag) { ++ if (m_lastSelectedPositionableTag.first == category && m_lastSelectedPositionableTag.second == oldTag) { + m_lastSelectedPositionableTag.second = newTag; + } + +@@ -1576,8 +1576,8 @@ void AnnotationDialog::Dialog::checkProposedTagData( + foreach (ResizableFrame *area, areas()) + { + if (area != areaToExclude +- and area->proposedTagData() == tagData +- and area->tagData().first.isEmpty()) { ++ && area->proposedTagData() == tagData ++ && area->tagData().first.isEmpty()) { + area->removeProposedTagData(); + } + } diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-3.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-3.patch new file mode 100644 index 000000000000..826967652932 --- /dev/null +++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-3.patch @@ -0,0 +1,56 @@ +commit 3e91323f1faea39a950b84b317a511df2f3b8875 +Author: Raymond Wooninck +Date: Tue Jan 24 22:01:16 2017 +0100 + + More fixes for -fno-operator-names + +diff --git a/AnnotationDialog/ImagePreview.cpp b/AnnotationDialog/ImagePreview.cpp +index e83f03aa..34d90b62 100644 +--- a/AnnotationDialog/ImagePreview.cpp ++++ b/AnnotationDialog/ImagePreview.cpp +@@ -330,8 +330,8 @@ void ImagePreview::mousePressEvent(QMouseEvent *event) + } + + m_areaStart = event->pos(); +- if (m_areaStart.x() < m_minX or m_areaStart.x() > m_maxX or +- m_areaStart.y() < m_minY or m_areaStart.y() > m_maxY) { ++ if (m_areaStart.x() < m_minX || m_areaStart.x() > m_maxX || ++ m_areaStart.y() < m_minY || m_areaStart.y() > m_maxY) { + // Dragging started outside of the preview image + return; + } +@@ -374,7 +374,7 @@ void ImagePreview::mouseReleaseEvent(QMouseEvent *event) + return; + } + +- if (event->button() & Qt::LeftButton and m_selectionRect->isVisible()) { ++ if (event->button() & Qt::LeftButton && m_selectionRect->isVisible()) { + m_areaEnd = event->pos(); + processNewArea(); + m_selectionRect->hide(); +@@ -583,9 +583,9 @@ bool ImagePreview::fuzzyAreaExists(QList &existingAreas, QRect area) + // maximumDeviation is 15% of the mean value of the width and height of each area + maximumDeviation = float(existingAreas.at(i).width() + existingAreas.at(i).height()) * 0.075; + if ( +- distance(existingAreas.at(i).topLeft(), area.topLeft()) < maximumDeviation and +- distance(existingAreas.at(i).topRight(), area.topRight()) < maximumDeviation and +- distance(existingAreas.at(i).bottomLeft(), area.bottomLeft()) < maximumDeviation and ++ distance(existingAreas.at(i).topLeft(), area.topLeft()) < maximumDeviation && ++ distance(existingAreas.at(i).topRight(), area.topRight()) < maximumDeviation && ++ distance(existingAreas.at(i).bottomLeft(), area.bottomLeft()) < maximumDeviation && + distance(existingAreas.at(i).bottomRight(), area.bottomRight()) < maximumDeviation + ) { + return true; +diff --git a/AnnotationDialog/ListSelect.cpp b/AnnotationDialog/ListSelect.cpp +index 6010c692..80fca8e9 100644 +--- a/AnnotationDialog/ListSelect.cpp ++++ b/AnnotationDialog/ListSelect.cpp +@@ -413,7 +413,7 @@ void AnnotationDialog::ListSelect::showContextMenu(const QPoint& pos) + i18n("Really Delete %1?",item->text(0)), + KGuiItem(i18n("&Delete"),QString::fromLatin1("editdelete")) ); + if ( code == KMessageBox::Continue ) { +- if (item->checkState(0) == Qt::Checked and m_positionable) { ++ if (item->checkState(0) == Qt::Checked && m_positionable) { + // An area could be linked against this. We can use positionableTagDeselected + // here, as the procedure is the same as if the tag had been deselected. + emit positionableTagDeselected(m_category->name(), item->text(0)); diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-4.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-4.patch new file mode 100644 index 000000000000..c35f6ae75fde --- /dev/null +++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-4.patch @@ -0,0 +1,19 @@ +commit de72ff88d7b5f69bacfbe556a5175b311657bc49 +Author: Raymond Wooninck +Date: Tue Jan 24 22:07:59 2017 +0100 + + And more of the same + +diff --git a/AnnotationDialog/DescriptionEdit.cpp b/AnnotationDialog/DescriptionEdit.cpp +index 17d12533..dd746fa2 100644 +--- a/AnnotationDialog/DescriptionEdit.cpp ++++ b/AnnotationDialog/DescriptionEdit.cpp +@@ -28,7 +28,7 @@ AnnotationDialog::DescriptionEdit::~DescriptionEdit() + + void AnnotationDialog::DescriptionEdit::keyPressEvent(QKeyEvent *event) + { +- if (event->key() == Qt::Key_PageUp or event->key() == Qt::Key_PageDown) { ++ if (event->key() == Qt::Key_PageUp || event->key() == Qt::Key_PageDown) { + emit pageUpDownPressed(event); + } else { + QTextEdit::keyPressEvent(event); diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-5.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-5.patch new file mode 100644 index 000000000000..e6d0ce05fab0 --- /dev/null +++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.1-ecm531-5.patch @@ -0,0 +1,19 @@ +commit ea36a73b1e36dc5cf5ca6d78db9491c40c1d6d4c +Author: Jonathan Riddell +Date: Fri Jan 27 15:32:22 2017 +0000 + + More fixes for -fno-operator-names + +diff --git a/AnnotationDialog/ResizableFrame.cpp b/AnnotationDialog/ResizableFrame.cpp +index 2251b2e2..e1afbc00 100644 +--- a/AnnotationDialog/ResizableFrame.cpp ++++ b/AnnotationDialog/ResizableFrame.cpp +@@ -427,7 +427,7 @@ void AnnotationDialog::ResizableFrame::setTagData(QString category, QString tag, + if (changeOrigin == ManualChange) { + m_changed = true; + +- if (m_detectedFace and ! m_trained and m_previewWidget->automatedTraining()) { ++ if (m_detectedFace && ! m_trained && m_previewWidget->automatedTraining()) { + m_preview->trainRecognitionDatabase(m_actualCoordinates, m_tagData); + m_trained = true; + } diff --git a/media-gfx/kphotoalbum/kphotoalbum-5.1-r1.ebuild b/media-gfx/kphotoalbum/kphotoalbum-5.1-r1.ebuild new file mode 100644 index 000000000000..d95c9c1fd71a --- /dev/null +++ b/media-gfx/kphotoalbum/kphotoalbum-5.1-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +KDE_HANDBOOK="forceoptional" +inherit kde5 + +DESCRIPTION="Tool for indexing, searching, and viewing images" +HOMEPAGE="http://www.kphotoalbum.org/" +SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz" + +LICENSE="GPL-2+ FDL-1.2" +KEYWORDS="~amd64 ~x86" +IUSE="face +kipi +map +raw" + +COMMON_DEPEND=" + $(add_frameworks_dep karchive) + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kxmlgui) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork) + $(add_qt_dep qtsql 'sqlite') + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + media-gfx/exiv2:= + media-libs/phonon[qt5] + virtual/jpeg:0 + face? ( $(add_kdeapps_dep libkface) ) + kipi? ( $(add_kdeapps_dep libkipi) ) + map? ( $(add_kdeapps_dep libkgeomap) ) + raw? ( $(add_kdeapps_dep libkdcraw) ) +" +DEPEND="${COMMON_DEPEND} + sys-devel/gettext +" +RDEPEND="${COMMON_DEPEND} + media-video/mplayer + kipi? ( media-plugins/kipi-plugins:5 ) + !media-gfx/kphotoalbum:4 +" + +DOCS=( ChangeLog README ) + +PATCHES=( + "${FILESDIR}/${P}-ecm531-1.patch" + "${FILESDIR}/${P}-ecm531-2.patch" + "${FILESDIR}/${P}-ecm531-3.patch" + "${FILESDIR}/${P}-ecm531-4.patch" + "${FILESDIR}/${P}-ecm531-5.patch" +) + +src_configure() { + local mycmakeargs=( + -DENABLE_PLAYGROUND=ON + $(cmake-utils_use_find_package face KF5KFace) + $(cmake-utils_use_find_package kipi KF5Kipi) + $(cmake-utils_use_find_package map KF5KGeoMap) + $(cmake-utils_use_find_package raw KF5KDcraw) + ) + + kde5_src_configure +} -- cgit v1.2.3-65-gdbad