* [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
@ 2018-12-30 13:22 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2018-12-30 13:22 UTC (permalink / raw
To: gentoo-commits
commit: 4368fe063eb2065a56ccc943a8cabacb80735ba3
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 30 13:19:43 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 30 13:21:51 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4368fe06
kde-apps/gwenview: Fix build with exiv2-0.27
Apply conditionally for now while patch is in review upstream.
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/gwenview-18.12.0-exiv2-0.27.patch | 216 +++++++++++++++++++++
kde-apps/gwenview/gwenview-18.12.0.ebuild | 1 +
2 files changed, 217 insertions(+)
diff --git a/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch b/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch
new file mode 100644
index 00000000000..fa0d62d84b7
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch
@@ -0,0 +1,216 @@
+From 7e4cd5e91d7434448b7227ee8cf3307435cc7d00 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 30 Dec 2018 12:59:05 +0100
+Subject: [PATCH 1/2] Include exiv2.hpp instead of individual headers
+
+Headers are subject to refactoring upstream, using exiv2.hpp per recommendation.
+---
+ lib/cms/cmsprofile.h | 2 +-
+ lib/document/document.h | 2 +-
+ lib/exiv2imageloader.cpp | 4 ----
+ lib/exiv2imageloader.h | 2 +-
+ lib/imagemetainfomodel.cpp | 4 +---
+ lib/jpegcontent.cpp | 4 ----
+ lib/timeutils.cpp | 4 ----
+ tests/auto/documenttest.cpp | 2 --
+ tests/auto/imagemetainfomodeltest.cpp | 2 --
+ 9 files changed, 4 insertions(+), 22 deletions(-)
+
+diff --git a/lib/cms/cmsprofile.h b/lib/cms/cmsprofile.h
+index a2a38a87..bc378ff9 100644
+--- a/lib/cms/cmsprofile.h
++++ b/lib/cms/cmsprofile.h
+@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
+ #include <QSharedData>
+
+ // Exiv2
+-#include <exiv2/image.hpp>
++#include <exiv2/exiv2.hpp>
+
+ class QByteArray;
+ class QString;
+diff --git a/lib/document/document.h b/lib/document/document.h
+index c0bb454b..8e32c044 100644
+--- a/lib/document/document.h
++++ b/lib/document/document.h
+@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #include <lib/gwenviewlib_export.h>
+
+ #include <string.h>
+-#include <exiv2/image.hpp>
++#include <exiv2/exiv2.hpp>
+
+ // Qt
+ #include <QObject>
+diff --git a/lib/exiv2imageloader.cpp b/lib/exiv2imageloader.cpp
+index f2830f81..f12b7383 100644
+--- a/lib/exiv2imageloader.cpp
++++ b/lib/exiv2imageloader.cpp
+@@ -28,10 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ // KDE
+
+-// Exiv2
+-#include <exiv2/error.hpp>
+-#include <exiv2/types.hpp>
+-
+ // Local
+
+ namespace Gwenview
+diff --git a/lib/exiv2imageloader.h b/lib/exiv2imageloader.h
+index 57ef24d2..866e7fac 100644
+--- a/lib/exiv2imageloader.h
++++ b/lib/exiv2imageloader.h
+@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ // Exiv2
+ #include <string.h>
+-#include <exiv2/image.hpp>
++#include <exiv2/exiv2.hpp>
+
+ // Local
+
+diff --git a/lib/imagemetainfomodel.cpp b/lib/imagemetainfomodel.cpp
+index d7b89ab2..58f1c13d 100644
+--- a/lib/imagemetainfomodel.cpp
++++ b/lib/imagemetainfomodel.cpp
+@@ -33,9 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #include <KFormat>
+
+ // Exiv2
+-#include <exiv2/exif.hpp>
+-#include <exiv2/image.hpp>
+-#include <exiv2/iptc.hpp>
++#include <exiv2/exiv2.hpp>
+
+ // Local
+ #ifdef HAVE_FITS
+diff --git a/lib/jpegcontent.cpp b/lib/jpegcontent.cpp
+index bb810dd4..a628e8a8 100644
+--- a/lib/jpegcontent.cpp
++++ b/lib/jpegcontent.cpp
+@@ -41,10 +41,6 @@ extern "C" {
+ // KDE
+ #include <KLocalizedString>
+
+-// Exiv2
+-#include <exiv2/exif.hpp>
+-#include <exiv2/image.hpp>
+-
+ // Local
+ #include "jpegerrormanager.h"
+ #include "iodevicejpegsourcemanager.h"
+diff --git a/lib/timeutils.cpp b/lib/timeutils.cpp
+index 9e8836a9..19befff5 100644
+--- a/lib/timeutils.cpp
++++ b/lib/timeutils.cpp
+@@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
+ // KDE
+ #include <KFileItem>
+
+-// Exiv2
+-#include <exiv2/exif.hpp>
+-#include <exiv2/image.hpp>
+-
+ // Local
+ #include <lib/exiv2imageloader.h>
+ #include <lib/urlutils.h>
+diff --git a/tests/auto/documenttest.cpp b/tests/auto/documenttest.cpp
+index 9373641f..496346f0 100644
+--- a/tests/auto/documenttest.cpp
++++ b/tests/auto/documenttest.cpp
+@@ -39,8 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #include "../lib/transformimageoperation.h"
+ #include "testutils.h"
+
+-#include <exiv2/exif.hpp>
+-
+ #include "documenttest.h"
+
+ QTEST_MAIN(DocumentTest)
+diff --git a/tests/auto/imagemetainfomodeltest.cpp b/tests/auto/imagemetainfomodeltest.cpp
+index e3ec8d30..c4467a73 100644
+--- a/tests/auto/imagemetainfomodeltest.cpp
++++ b/tests/auto/imagemetainfomodeltest.cpp
+@@ -28,8 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #include "../lib/imagemetainfomodel.h"
+ #include "testutils.h"
+
+-#include <exiv2/exif.hpp>
+-
+ #include "imagemetainfomodeltest.h"
+
+ QTEST_MAIN(ImageMetaInfoModelTest)
+--
+2.20.1
+
+
+From 7d6c5d95cf4e4d7c857f5d659a58f82bdc46259c Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 30 Dec 2018 11:31:20 +0100
+Subject: [PATCH 2/2] Fix build with exiv2-0.27
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Summary:
+Include exiv2.hpp instead of individual headers
+
+Headers are subject to refactoring upstream, using exiv2.hpp per recommendation.
+
+Enable exceptions globally - otherwise, lots of the following error:
+
+In file included from /usr/include/exiv2/types.hpp:34,
+ from /usr/include/exiv2/image.hpp:28,
+ from gwenview-18.12.0/lib/cms/cmsprofile.h:33,
+ from gwenview-18.12.0/lib/cms/cmsprofile.cpp:22:
+/usr/include/exiv2/slice.hpp: In constructor ‘Exiv2::Internal::SliceBase::SliceBase(size_t, size_t)’:
+/usr/include/exiv2/slice.hpp:99:77: error: exception handling disabled, use -fexceptions to enable
+ throw std::out_of_range("Begin must be smaller than end");
+ ^
+
+Test Plan: Built fine with exiv2-0.27
+
+Reviewers: #gwenview, cgiboudeaux
+
+Tags: #gwenview
+
+Differential Revision: https://phabricator.kde.org/D17869
+---
+ CMakeLists.txt | 2 ++
+ lib/CMakeLists.txt | 6 ------
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f44f9afc..b85ba4bc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -126,6 +126,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+ add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
+
++kde_enable_exceptions()
++
+ ## dirs to build
+ add_subdirectory(lib)
+ add_subdirectory(app)
+diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 169df3c6..f7e9f71f 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -220,12 +220,6 @@ if (GWENVIEW_SEMANTICINFO_BACKEND_BALOO)
+ )
+ endif()
+
+-kde_source_files_enable_exceptions(
+- exiv2imageloader.cpp
+- imagemetainfomodel.cpp
+- timeutils.cpp
+- )
+-
+ ki18n_wrap_ui(gwenviewlib_SRCS
+ crop/cropwidget.ui
+ documentview/messageview.ui
+--
+2.20.1
+
diff --git a/kde-apps/gwenview/gwenview-18.12.0.ebuild b/kde-apps/gwenview/gwenview-18.12.0.ebuild
index a580d5a58cc..22f5b406075 100644
--- a/kde-apps/gwenview/gwenview-18.12.0.ebuild
+++ b/kde-apps/gwenview/gwenview-18.12.0.ebuild
@@ -73,6 +73,7 @@ RDEPEND="${COMMON_DEPEND}
src_prepare() {
kde5_src_prepare
+ has_version ">=media-gfx/exiv2-0.27" && eapply "${FILESDIR}/${P}-exiv2-0.27.patch"
if ! use mpris; then
# FIXME: upstream a better solution
sed -e "/set(HAVE_QTDBUS/s/\${Qt5DBus_FOUND}/0/" -i CMakeLists.txt || die
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
@ 2019-05-13 0:18 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-05-13 0:18 UTC (permalink / raw
To: gentoo-commits
commit: 85cfe3d430d0d89cda610d5343618757223498dc
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May 12 06:53:57 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 13 00:12:54 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85cfe3d4
kde-apps/gwenview: Fix build with media-libs/exiv2-0.27.1
Closes: https://bugs.gentoo.org/685682
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/gwenview-19.04.1-exiv2-0.27.1.patch | 34 ++++++++++++++++++++++
kde-apps/gwenview/gwenview-19.04.1.ebuild | 2 ++
2 files changed, 36 insertions(+)
diff --git a/kde-apps/gwenview/files/gwenview-19.04.1-exiv2-0.27.1.patch b/kde-apps/gwenview/files/gwenview-19.04.1-exiv2-0.27.1.patch
new file mode 100644
index 00000000000..f95f26c68bd
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-19.04.1-exiv2-0.27.1.patch
@@ -0,0 +1,34 @@
+From 3f3e9a546fa5e9a335ad3dc9afc805fd4d2809fd Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 12 May 2019 08:40:53 +0200
+Subject: [PATCH] Fix build with exiv2-0.27.1
+
+Summary: Upstream is moving things around between headers. While they are busy doing that, they recommend including exiv2.hpp.
+
+Reviewers: #gwenview
+
+Tags: #gwenview
+
+Differential Revision: https://phabricator.kde.org/D21148
+---
+ lib/imagemetainfomodel.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/lib/imagemetainfomodel.cpp b/lib/imagemetainfomodel.cpp
+index d7b89ab2..58f1c13d 100644
+--- a/lib/imagemetainfomodel.cpp
++++ b/lib/imagemetainfomodel.cpp
+@@ -33,9 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #include <KFormat>
+
+ // Exiv2
+-#include <exiv2/exif.hpp>
+-#include <exiv2/image.hpp>
+-#include <exiv2/iptc.hpp>
++#include <exiv2/exiv2.hpp>
+
+ // Local
+ #ifdef HAVE_FITS
+--
+2.21.0
+
diff --git a/kde-apps/gwenview/gwenview-19.04.1.ebuild b/kde-apps/gwenview/gwenview-19.04.1.ebuild
index 4bc3b01ee80..d4b54e523ff 100644
--- a/kde-apps/gwenview/gwenview-19.04.1.ebuild
+++ b/kde-apps/gwenview/gwenview-19.04.1.ebuild
@@ -71,6 +71,8 @@ RDEPEND="${COMMON_DEPEND}
kipi? ( media-plugins/kipi-plugins:5 )
"
+PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.1.patch" )
+
src_prepare() {
kde5_src_prepare
if ! use mpris; then
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
@ 2023-01-25 19:07 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-01-25 19:07 UTC (permalink / raw
To: gentoo-commits
commit: 2719d30e9a3c60fa2c089a39952c8060d097f197
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 25 19:01:50 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 19:07:25 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2719d30e
kde-apps/gwenview: Fix RAW plugin coexistence
Upstream commit c419ec4a052b39eae7c17caf2a89d39d76b43777
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=463132
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...enview-22.08.3-fix-raw-plugin-coexistence.patch | 58 +++++++++++
kde-apps/gwenview/gwenview-22.08.3-r2.ebuild | 107 +++++++++++++++++++++
kde-apps/gwenview/gwenview-22.12.1-r1.ebuild | 103 ++++++++++++++++++++
3 files changed, 268 insertions(+)
diff --git a/kde-apps/gwenview/files/gwenview-22.08.3-fix-raw-plugin-coexistence.patch b/kde-apps/gwenview/files/gwenview-22.08.3-fix-raw-plugin-coexistence.patch
new file mode 100644
index 000000000000..759b23095ff9
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-22.08.3-fix-raw-plugin-coexistence.patch
@@ -0,0 +1,58 @@
+From c419ec4a052b39eae7c17caf2a89d39d76b43777 Mon Sep 17 00:00:00 2001
+From: Mirco Miranda <mirco.miranda@systemceramics.com>
+Date: Tue, 10 Jan 2023 14:53:30 +0000
+Subject: [PATCH] Fixed coexistence between Qt Raw plugin and KDcraw
+
+Use the RAW plugin to load raw images if installed:
+- Previews are always generated from the RAW image at the fastest possible speed.
+- Images are loaded in the highest possible quality (default plugin raw).
+- If the raw plugin is not installed everything works as before (use KDcraw).
+
+BUG: 463132
+FIXED-IN: 22.12.2
+
+
+(cherry picked from commit a7dc8feefc2147a08526b61bf361b63f78645ea0)
+---
+ lib/document/loadingdocumentimpl.cpp | 3 ++-
+ lib/thumbnailprovider/thumbnailgenerator.cpp | 8 +++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/document/loadingdocumentimpl.cpp b/lib/document/loadingdocumentimpl.cpp
+index baa0542a..ece4d9e2 100644
+--- a/lib/document/loadingdocumentimpl.cpp
++++ b/lib/document/loadingdocumentimpl.cpp
+@@ -205,7 +205,8 @@ struct LoadingDocumentImplPrivate {
+ QImageReader reader;
+
+ #ifdef KDCRAW_FOUND
+- if (KDcrawIface::KDcraw::rawFilesList().contains(QString::fromLatin1(mFormatHint))) {
++ if (!QImageReader::supportedImageFormats().contains(QByteArray("raw"))
++ && KDcrawIface::KDcraw::rawFilesList().contains(QString::fromLatin1(mFormatHint))) {
+ QByteArray previewData;
+
+ // if the image is in format supported by dcraw, fetch its embedded preview
+diff --git a/lib/thumbnailprovider/thumbnailgenerator.cpp b/lib/thumbnailprovider/thumbnailgenerator.cpp
+index 3179dfae..f01d5c04 100644
+--- a/lib/thumbnailprovider/thumbnailgenerator.cpp
++++ b/lib/thumbnailprovider/thumbnailgenerator.cpp
+@@ -70,9 +70,15 @@ bool ThumbnailContext::load(const QString &pixPath, int pixelSize)
+ QBuffer buffer;
+ int previewRatio = 1;
+
++ bool useRawPlugin = QImageReader::imageFormat(pixPath) == QByteArray("raw");
++ if (useRawPlugin) { // make preview generation faster (same as KDcrawIface::KDcraw::loadHalfPreview)
++ reader.setQuality(1);
++ previewRatio = 2;
++ }
++
+ #ifdef KDCRAW_FOUND
+ // raw images deserve special treatment
+- if (KDcrawIface::KDcraw::rawFilesList().contains(QString::fromLatin1(formatHint))) {
++ if (!useRawPlugin && KDcrawIface::KDcraw::rawFilesList().contains(QString::fromLatin1(formatHint))) {
+ // use KDCraw to extract the preview
+ bool ret = KDcrawIface::KDcraw::loadEmbeddedPreview(data, pixPath);
+
+--
+GitLab
+
diff --git a/kde-apps/gwenview/gwenview-22.08.3-r2.ebuild b/kde-apps/gwenview/gwenview-22.08.3-r2.ebuild
new file mode 100644
index 000000000000..6ec7c9ce9c16
--- /dev/null
+++ b/kde-apps/gwenview/gwenview-22.08.3-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+PVCUT=$(ver_cut 1-3)
+KFMIN=5.96.0
+QTMIN=5.15.5
+inherit ecm gear.kde.org optfeature
+
+DESCRIPTION="Image viewer by KDE"
+HOMEPAGE="https://apps.kde.org/gwenview/ https://userbase.kde.org/Gwenview"
+
+LICENSE="GPL-2+ handbook? ( FDL-1.2 )"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="activities fits +mpris raw semantic-desktop share X"
+
+# requires running environment
+RESTRICT="test"
+
+COMMON_DEPEND="
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kguiaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/kitemviews-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/solid-${KFMIN}:5
+ media-gfx/exiv2:=
+ media-libs/kcolorpicker
+ >=media-libs/kimageannotator-0.5.0
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:0=
+ >=media-libs/phonon-4.11.0
+ media-libs/tiff:=
+ activities? ( >=kde-frameworks/kactivities-${KFMIN}:5 )
+ fits? ( sci-libs/cfitsio )
+ mpris? ( >=dev-qt/qtdbus-${QTMIN}:5 )
+ raw? ( >=kde-apps/libkdcraw-${PVCUT}:5 )
+ semantic-desktop? (
+ >=kde-frameworks/baloo-${KFMIN}:5
+ >=kde-frameworks/kfilemetadata-${KFMIN}:5
+ )
+ share? ( >=kde-frameworks/purpose-${KFMIN}:5 )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+"
+RDEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtimageformats-${QTMIN}:5
+ >=kde-frameworks/kimageformats-${KFMIN}:5
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-without_x11.patch"
+ "${FILESDIR}/${P}-fix-raw-plugin-coexistence.patch" # KDE-bug 463132
+)
+
+src_prepare() {
+ ecm_src_prepare
+ if ! use mpris; then
+ # FIXME: upstream a better solution
+ sed -e "/set(HAVE_QTDBUS/s/\${Qt5DBus_FOUND}/0/" -i CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package activities KF5Activities)
+ $(cmake_use_find_package fits CFitsio)
+ $(cmake_use_find_package raw KF5KDcraw)
+ -DGWENVIEW_SEMANTICINFO_BACKEND=$(usex semantic-desktop Baloo None)
+ $(cmake_use_find_package share KF5Purpose)
+ -DWITHOUT_X11=$(usex !X)
+ )
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "SVG support" kde-apps/svgpart:${SLOT}
+ fi
+ ecm_pkg_postinst
+}
diff --git a/kde-apps/gwenview/gwenview-22.12.1-r1.ebuild b/kde-apps/gwenview/gwenview-22.12.1-r1.ebuild
new file mode 100644
index 000000000000..e049d2beb5ae
--- /dev/null
+++ b/kde-apps/gwenview/gwenview-22.12.1-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+PVCUT=$(ver_cut 1-3)
+KFMIN=5.101.0
+QTMIN=5.15.5
+inherit ecm gear.kde.org optfeature
+
+DESCRIPTION="Image viewer by KDE"
+HOMEPAGE="https://apps.kde.org/gwenview/ https://userbase.kde.org/Gwenview"
+
+LICENSE="GPL-2+ handbook? ( FDL-1.2 )"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="activities fits +mpris raw semantic-desktop share X"
+
+# requires running environment
+RESTRICT="test"
+
+COMMON_DEPEND="
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kguiaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/kitemviews-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/solid-${KFMIN}:5
+ media-gfx/exiv2:=
+ media-libs/kcolorpicker
+ >=media-libs/kimageannotator-0.5.0
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:0=
+ >=media-libs/phonon-4.11.0
+ media-libs/tiff:=
+ activities? ( >=kde-frameworks/kactivities-${KFMIN}:5 )
+ fits? ( sci-libs/cfitsio )
+ mpris? ( >=dev-qt/qtdbus-${QTMIN}:5 )
+ raw? ( >=kde-apps/libkdcraw-${PVCUT}:5 )
+ semantic-desktop? (
+ >=kde-frameworks/baloo-${KFMIN}:5
+ >=kde-frameworks/kfilemetadata-${KFMIN}:5
+ )
+ share? ( >=kde-frameworks/purpose-${KFMIN}:5 )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+"
+RDEPEND="${COMMON_DEPEND}
+ >=dev-qt/qtimageformats-${QTMIN}:5
+ >=kde-frameworks/kimageformats-${KFMIN}:5
+"
+PATCHES=( "${FILESDIR}/${PN}-22.08.3-fix-raw-plugin-coexistence.patch" ) # KDE-bug 463132
+
+src_prepare() {
+ ecm_src_prepare
+ if ! use mpris; then
+ # FIXME: upstream a better solution
+ sed -e "/set(HAVE_QTDBUS/s/\${Qt5DBus_FOUND}/0/" -i CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package activities KF5Activities)
+ $(cmake_use_find_package fits CFitsio)
+ $(cmake_use_find_package raw KF5KDcraw)
+ -DGWENVIEW_SEMANTICINFO_BACKEND=$(usex semantic-desktop Baloo None)
+ $(cmake_use_find_package share KF5Purpose)
+ -DWITHOUT_X11=$(usex !X)
+ )
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "SVG support" "kde-apps/svgpart:${SLOT}"
+ fi
+ ecm_pkg_postinst
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
@ 2023-05-22 17:33 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-05-22 17:33 UTC (permalink / raw
To: gentoo-commits
commit: bc7d8c325d342435ed3d3f52627f3ea46d472835
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon May 22 17:32:11 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 22 17:32:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc7d8c32
kde-apps/gwenview: Fix build with >=exiv2-0.28
Closes: https://bugs.gentoo.org/906467
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/gwenview-23.04.1-exiv2-0.28.patch | 83 ++++++++++++++++++++++
kde-apps/gwenview/gwenview-23.04.1.ebuild | 2 +
2 files changed, 85 insertions(+)
diff --git a/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch b/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch
new file mode 100644
index 000000000000..dde9b1c2321e
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch
@@ -0,0 +1,83 @@
+From a7275c90bf51a352783c723116a716af419896f4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch>
+Date: Sun, 21 May 2023 01:09:59 +0200
+Subject: [PATCH] Fix build with exiv2 >= 0.28
+
+---
+ lib/jpegcontent.cpp | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/lib/jpegcontent.cpp b/lib/jpegcontent.cpp
+index 284fb6e61..286333f69 100644
+--- a/lib/jpegcontent.cpp
++++ b/lib/jpegcontent.cpp
+@@ -301,7 +301,11 @@ Orientation JpegContent::orientation() const
+ if (it == d->mExifData.end() || it->count() == 0 || it->typeId() != Exiv2::unsignedShort) {
+ return NOT_AVAILABLE;
+ }
++#if EXIV2_TEST_VERSION(0,28,0)
++ return Orientation(it->toUint32());
++#else
+ return Orientation(it->toLong());
++#endif
+ }
+
+ int JpegContent::dotsPerMeterX() const
+@@ -321,7 +325,11 @@ int JpegContent::dotsPerMeter(const QString &keyName) const
+ if (it == d->mExifData.end()) {
+ return 0;
+ }
++#if EXIV2_TEST_VERSION(0,28,0)
++ int res = it->toUint32();
++#else
+ int res = it->toLong();
++#endif
+ QString keyVal = QStringLiteral("Exif.Image.") + keyName;
+ Exiv2::ExifKey keyResolution(keyVal.toLocal8Bit().data());
+ it = d->mExifData.findKey(keyResolution);
+@@ -337,9 +345,17 @@ int JpegContent::dotsPerMeter(const QString &keyName) const
+ const float INCHESPERMETER = (100. / 2.54);
+ switch (res) {
+ case 3: // dots per cm
++#if EXIV2_TEST_VERSION(0,28,0)
++ return int(it->toUint32() * 100);
++#else
+ return int(it->toLong() * 100);
++#endif
+ default: // dots per inch
++#if EXIV2_TEST_VERSION(0,28,0)
++ return int(it->toUint32() * INCHESPERMETER);
++#else
+ return int(it->toLong() * INCHESPERMETER);
++#endif
+ }
+
+ return 0;
+@@ -568,15 +584,24 @@ QImage JpegContent::thumbnail() const
+ auto it = d->mExifData.findKey(Exiv2::ExifKey("Exif.Canon.ThumbnailImageValidArea"));
+ // ensure ThumbnailImageValidArea actually specifies a rectangle, i.e. there must be 4 coordinates
+ if (it != d->mExifData.end() && it->count() == 4) {
++#if EXIV2_TEST_VERSION(0,28,0)
++ QRect validArea(QPoint(it->toUint32(0), it->toUint32(2)), QPoint(it->toUint32(1), it->toUint32(3)));
++#else
+ QRect validArea(QPoint(it->toLong(0), it->toLong(2)), QPoint(it->toLong(1), it->toLong(3)));
++#endif
+ image = image.copy(validArea);
+ } else {
+ // Unfortunately, Sony does not provide an exif tag that specifies the valid area of the
+ // embedded thumbnail. Need to derive it from the size of the preview image instead.
+ it = d->mExifData.findKey(Exiv2::ExifKey("Exif.Sony1.PreviewImageSize"));
+ if (it != d->mExifData.end() && it->count() == 2) {
++#if EXIV2_TEST_VERSION(0,28,0)
++ const long prevHeight = it->toUint32(0);
++ const long prevWidth = it->toUint32(1);
++#else
+ const long prevHeight = it->toLong(0);
+ const long prevWidth = it->toLong(1);
++#endif
+
+ if (image.width() > 0 && prevWidth > 0) {
+ const double scale = prevWidth / image.width();
+--
+GitLab
+
diff --git a/kde-apps/gwenview/gwenview-23.04.1.ebuild b/kde-apps/gwenview/gwenview-23.04.1.ebuild
index 423f549f8d73..62079ea15c37 100644
--- a/kde-apps/gwenview/gwenview-23.04.1.ebuild
+++ b/kde-apps/gwenview/gwenview-23.04.1.ebuild
@@ -82,6 +82,8 @@ BDEPEND="
dev-util/wayland-scanner
"
+PATCHES=( "${FILESDIR}/${P}-exiv2-0.28.patch" ) # bug 906467
+
src_prepare() {
ecm_src_prepare
if ! use mpris; then
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
@ 2024-09-03 5:29 Eli Schwartz
0 siblings, 0 replies; 5+ messages in thread
From: Eli Schwartz @ 2024-09-03 5:29 UTC (permalink / raw
To: gentoo-commits
commit: 02627a66a2883017dc5888ce730e9d4f63e9ed86
Author: Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 3 04:58:42 2024 +0000
Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Sep 3 05:29:23 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02627a66
kde-apps/gwenview: apply patch to fix UB due to ODR violations
Closes: https://bugs.gentoo.org/921649
Acked-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>
kde-apps/gwenview/files/gwenview-24.08.0-odr.patch | 58 ++++++++++++++++++++++
...w-24.08.0.ebuild => gwenview-24.05.2-r2.ebuild} | 10 ++--
...w-24.08.0.ebuild => gwenview-24.08.0-r1.ebuild} | 4 ++
3 files changed, 69 insertions(+), 3 deletions(-)
diff --git a/kde-apps/gwenview/files/gwenview-24.08.0-odr.patch b/kde-apps/gwenview/files/gwenview-24.08.0-odr.patch
new file mode 100644
index 000000000000..148921f18169
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-24.08.0-odr.patch
@@ -0,0 +1,58 @@
+From b5cc214574eeb62f469a058daf52cd92270e4aa9 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@gentoo.org>
+Date: Tue, 3 Sep 2024 00:40:11 -0400
+Subject: [PATCH] fix ODR violation: many files had the wrong definition of
+ Enum
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This enum has a different number of values, depending on whether
+gwenview is configured with the semanticinfo backend "none" or
+fake/baloo.
+
+In order to avoid Undefined Behavior, every file that includes sorting.h
+also has to include config-gwenview.h *before* sorting.h, which was not
+true. Solve this by including the config header inside the sorting.h
+header.
+
+Fixes link failures when LTO is enabled, since LTO allows the compiler
+to do whole-program optimization and type-check across the entire
+program:
+
+```
+/var/tmp/portage/kde-apps/gwenview-24.08.0/work/gwenview-24.08.0/app/../lib/sorting.h:37:6: error: type ‘Gwenview::Sorting::Enum’ violates the C++ One Definition Rule [-Werror=odr]
+ 37 | enum Enum {
+ | ^
+/var/tmp/portage/kde-apps/gwenview-24.08.0/work/gwenview-24.08.0/app/../lib/sorting.h:37:6: note: an enum with different number of values is defined in another translation unit
+ 37 | enum Enum {
+ | ^
+lto1: some warnings being treated as errors
+lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
+compilation terminated.
+/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: lto-wrapper failed
+collect2: error: ld returned 1 exit status
+```
+
+Fixes: https://bugs.gentoo.org/921649
+---
+ lib/sorting.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/sorting.h b/lib/sorting.h
+index 529ea6fc9..c008865cf 100644
+--- a/lib/sorting.h
++++ b/lib/sorting.h
+@@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
+ #ifndef SORTING_H
+ #define SORTING_H
+
++// Do not assume every file that includes this one, includes the config.h
++#include <config-gwenview.h>
++
+ // Qt
+
+ // KF
+--
+GitLab
+
diff --git a/kde-apps/gwenview/gwenview-24.08.0.ebuild b/kde-apps/gwenview/gwenview-24.05.2-r2.ebuild
similarity index 96%
copy from kde-apps/gwenview/gwenview-24.08.0.ebuild
copy to kde-apps/gwenview/gwenview-24.05.2-r2.ebuild
index d209a9e40aee..622f9c53904b 100644
--- a/kde-apps/gwenview/gwenview-24.08.0.ebuild
+++ b/kde-apps/gwenview/gwenview-24.05.2-r2.ebuild
@@ -6,8 +6,8 @@ EAPI=8
ECM_HANDBOOK="optional"
ECM_TEST="true"
PVCUT=$(ver_cut 1-3)
-KFMIN=6.5.0
-QTMIN=6.7.2
+KFMIN=6.3.0
+QTMIN=6.6.2
inherit ecm gear.kde.org optfeature
DESCRIPTION="Image viewer by KDE"
@@ -15,7 +15,7 @@ HOMEPAGE="https://apps.kde.org/gwenview/ https://userbase.kde.org/Gwenview"
LICENSE="GPL-2+ handbook? ( FDL-1.2 )"
SLOT="6"
-KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
IUSE="activities fits +mpris raw semantic-desktop share X"
# requires running environment
@@ -81,6 +81,10 @@ BDEPEND="
dev-util/wayland-scanner
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-24.08.0-odr.patch
+)
+
src_prepare() {
ecm_src_prepare
if ! use mpris; then
diff --git a/kde-apps/gwenview/gwenview-24.08.0.ebuild b/kde-apps/gwenview/gwenview-24.08.0-r1.ebuild
similarity index 98%
rename from kde-apps/gwenview/gwenview-24.08.0.ebuild
rename to kde-apps/gwenview/gwenview-24.08.0-r1.ebuild
index d209a9e40aee..d720385f4680 100644
--- a/kde-apps/gwenview/gwenview-24.08.0.ebuild
+++ b/kde-apps/gwenview/gwenview-24.08.0-r1.ebuild
@@ -81,6 +81,10 @@ BDEPEND="
dev-util/wayland-scanner
"
+PATCHES=(
+ "${FILESDIR}"/${P}-odr.patch
+)
+
src_prepare() {
ecm_src_prepare
if ! use mpris; then
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-03 5:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 17:33 [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2024-09-03 5:29 Eli Schwartz
2023-01-25 19:07 Andreas Sturmlechner
2019-05-13 0:18 Andreas Sturmlechner
2018-12-30 13:22 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox