summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-18 22:58:06 +0000
committerSam James <sam@gentoo.org>2023-01-18 22:58:06 +0000
commitc728871c7314838f496f516e46a2d7a528572927 (patch)
tree8dfe0188d7fa944242a6a382b495a8387c86bc87 /media-gfx
parentnet-misc/chrony: drop no-dep USE=ipv6 (diff)
downloadgentoo-c728871c7314838f496f516e46a2d7a528572927.tar.gz
gentoo-c728871c7314838f496f516e46a2d7a528572927.tar.bz2
gentoo-c728871c7314838f496f516e46a2d7a528572927.zip
media-gfx/photoqt: fix build w/ libraw 0.21
Closes: https://bugs.gentoo.org/891325 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/photoqt/files/photoqt-2.9.1-libraw-0.21.patch22
-rw-r--r--media-gfx/photoqt/photoqt-2.9.1-r2.ebuild77
2 files changed, 99 insertions, 0 deletions
diff --git a/media-gfx/photoqt/files/photoqt-2.9.1-libraw-0.21.patch b/media-gfx/photoqt/files/photoqt-2.9.1-libraw-0.21.patch
new file mode 100644
index 000000000000..683a72e65d71
--- /dev/null
+++ b/media-gfx/photoqt/files/photoqt-2.9.1-libraw-0.21.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/891325
+https://gitlab.com/lspies/photoqt/-/commit/a8908dbfac01886204a5d911106208bd0f15b467
+
+From a8908dbfac01886204a5d911106208bd0f15b467 Mon Sep 17 00:00:00 2001
+From: Lukas Spies <Lukas@photoqt.org>
+Date: Thu, 22 Dec 2022 03:07:40 -0600
+Subject: [PATCH] [PQLoadImageRAW] make raw loader work when libraw is compiled
+ without rawspeed support. Not aware of macro to chewck at compile time, thsu
+ disabled for now
+
+--- a/cplusplus/imageprovider/loader/loadimage_raw.cpp
++++ b/cplusplus/imageprovider/loader/loadimage_raw.cpp
+@@ -57,7 +57,6 @@ QImage PQLoadImageRAW::load(QString filename, QSize maxSize, QSize &origSize, bo
+ // Since we don't care about manipulating RAW images but only want to display
+ // them, we can optimise for speed
+ raw.imgdata.params.user_qual = 2;
+- raw.imgdata.params.use_rawspeed = 1;
+ raw.imgdata.params.use_camera_wb = 1;
+
+ // Open the RAW image
+--
+GitLab
diff --git a/media-gfx/photoqt/photoqt-2.9.1-r2.ebuild b/media-gfx/photoqt/photoqt-2.9.1-r2.ebuild
new file mode 100644
index 000000000000..cdd579030848
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-2.9.1-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_KDEINSTALLDIRS=false
+inherit ecm optfeature
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="https://photoqt.org/"
+SRC_URI="https://photoqt.org/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="devil exif freeimage graphicsmagick imagemagick mpv pdf raw"
+
+COMMON_DEPEND="
+ app-arch/libarchive:=
+ app-arch/unrar
+ dev-libs/pugixml
+ dev-qt/qtdbus:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5[jpeg]
+ dev-qt/qtimageformats:5
+ dev-qt/qtmultimedia:5[qml]
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ devil? ( media-libs/devil )
+ exif? ( media-gfx/exiv2:= )
+ freeimage? ( media-libs/freeimage )
+ imagemagick? (
+ !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
+ )
+ mpv? ( media-video/mpv:=[libmpv] )
+ pdf? ( app-text/poppler[qt5] )
+ raw? ( media-libs/libraw:= )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-qt/qtconcurrent:5
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/qtgraphicaleffects:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtquickcontrols2:5
+"
+BDEPEND="dev-qt/linguist-tools:5"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libmpv-api2.patch
+ "${FILESDIR}"/${P}-libraw-0.21.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCHROMECAST=OFF # TODO needs python
+ -DDEVIL=$(usex devil)
+ -DEXIV2=$(usex exif)
+ -DFREEIMAGE=$(usex freeimage)
+ -DGRAPHICSMAGICK=$(usex graphicsmagick $(usex imagemagick))
+ -DIMAGEMAGICK=$(usex imagemagick $(usex !graphicsmagick))
+ -DVIDEO_MPV=$(usex mpv)
+ -DPOPPLER=$(usex pdf)
+ -DRAW=$(usex raw)
+ )
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ optfeature "additional image formats like AVIF, EPS, HEIF/HEIC, PSD, etc." kde-frameworks/kimageformats
+ ecm_pkg_postinst
+}