diff options
author | Matt Turner <mattst88@gentoo.org> | 2022-04-04 18:19:00 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2022-04-04 21:14:02 -0700 |
commit | 029e7035530da87ddc163102e966eaab88eb189a (patch) | |
tree | ecd8e5eb403a3f2c52810be80a52754facccfd45 /media-gfx | |
parent | net-print/hplip: Stabilize 3.22.2 arm64, #836636 (diff) | |
download | gentoo-029e7035530da87ddc163102e966eaab88eb189a.tar.gz gentoo-029e7035530da87ddc163102e966eaab88eb189a.tar.bz2 gentoo-029e7035530da87ddc163102e966eaab88eb189a.zip |
media-gfx/shotwell: Version bump to 0.30.15
- EAPI 8
- Allow vala-0.56
- Fix USE=opencv (bug #702354)
- Fix build with dev-lang/python-exec[-native-symlinks] (bug #792168)
Closes: https://bugs.gentoo.org/702354
Closes: https://bugs.gentoo.org/792168
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/shotwell/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/shotwell/files/0.30.15-opencv4-compatibility.patch | 64 | ||||
-rw-r--r-- | media-gfx/shotwell/shotwell-0.30.15.ebuild | 88 |
3 files changed, 153 insertions, 0 deletions
diff --git a/media-gfx/shotwell/Manifest b/media-gfx/shotwell/Manifest index ea81ec76f55a..895ed3778370 100644 --- a/media-gfx/shotwell/Manifest +++ b/media-gfx/shotwell/Manifest @@ -1 +1,2 @@ DIST shotwell-0.30.14.tar.xz 6524680 BLAKE2B 321406d3731a4baa333c3820ee46e8dc12ca9a340c7f1ac3824ee894fa2826b7efa3ee7a27f551d62043e5f22199042befb5063cc67cefd27830e19db7d7f661 SHA512 bd899ac099ec4760f6119804812ef9314c9261c18273309abfb1dccc675b9e4a561c0abea1c46ea0dbbab9f5c00301d840b52714f97ec06548c180a77871db7c +DIST shotwell-0.30.15.tar.xz 6533632 BLAKE2B a973c22f06b2c05561db72974fa8f8a72006e4795ca282bd7c94e99f1b59c411917a30dd00b896cf606b80596c1510fe50e81c1a1c8fa6b98bcd75f8b25c5769 SHA512 aded4c8ec015546cb64189cc1a85b6bc233861367ec514cce041607a1deec9d69687f26e448865783c686813c1caec78df17c29d38c4296c4a255ff20c7cde0e diff --git a/media-gfx/shotwell/files/0.30.15-opencv4-compatibility.patch b/media-gfx/shotwell/files/0.30.15-opencv4-compatibility.patch new file mode 100644 index 000000000000..1b7275188535 --- /dev/null +++ b/media-gfx/shotwell/files/0.30.15-opencv4-compatibility.patch @@ -0,0 +1,64 @@ +https://gitlab.gnome.org/GNOME/shotwell/-/merge_requests/54 + +From a8fc1328bcc4296045fece633330814fbfb40bcc Mon Sep 17 00:00:00 2001 +From: Jens Georg <mail@jensge.org> +Date: Sun, 15 Mar 2020 11:19:18 +0100 +Subject: [PATCH] Fix compatibility with OpenCV 4 + +Second try, much simpler version + +(cherry picked from commit f54094594016359bbafd0be44a53ea28c8968593) +--- + facedetect/meson.build | 5 ++++- + facedetect/shotwell-facedetect.cpp | 6 +++--- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/facedetect/meson.build b/facedetect/meson.build +index 6724abcb..bd5f3c3b 100644 +--- a/facedetect/meson.build ++++ b/facedetect/meson.build +@@ -1,6 +1,9 @@ + subproject = ('facedetect') + add_languages('cpp') +-facedetect_dep = dependency('opencv', version : ['>= 2.3.0'], required : true) ++facedetect_dep = dependency('opencv4', version : ['>= 4.0.0'], required : false) ++if not facedetect_dep.found() ++ facedetect_dep = dependency('opencv', version : ['>= 3.4.0'], required : true) ++endif + executable('shotwell-facedetect', + 'shotwell-facedetect.cpp', + dependencies : facedetect_dep, +diff --git a/facedetect/shotwell-facedetect.cpp b/facedetect/shotwell-facedetect.cpp +index 1b093797..1c105806 100644 +--- a/facedetect/shotwell-facedetect.cpp ++++ b/facedetect/shotwell-facedetect.cpp +@@ -34,7 +34,7 @@ void help() { + void detectFaces(Mat &img, CascadeClassifier &cascade, double scale) { + + Mat gray; +- cvtColor(img, gray, CV_BGR2GRAY); ++ cvtColor(img, gray, cv::COLOR_BGR2GRAY); + + Mat smallImg(cvRound(img.rows / scale), cvRound(img.cols / scale), CV_8UC1); + Size smallImgSize = smallImg.size(); +@@ -43,7 +43,7 @@ void detectFaces(Mat &img, CascadeClassifier &cascade, double scale) { + equalizeHist(smallImg, smallImg); + + vector<Rect> faces; +- cascade.detectMultiScale(smallImg, faces, 1.1, 2, CV_HAAR_SCALE_IMAGE, Size(30, 30)); ++ cascade.detectMultiScale(smallImg, faces, 1.1, 2, cv::CASCADE_SCALE_IMAGE, Size(30, 30)); + + int i = 0; + for (vector<Rect>::const_iterator r = faces.begin(); r != faces.end(); r++, i++) { +@@ -117,7 +117,7 @@ int main(int argc, const char** argv) { + + } + +- Mat image = imread(inputName, 1); ++ Mat image = cv::imread(inputName, 1); + + if (image.empty()) { + +-- +2.35.1 + diff --git a/media-gfx/shotwell/shotwell-0.30.15.ebuild b/media-gfx/shotwell/shotwell-0.30.15.ebuild new file mode 100644 index 000000000000..fae21f9f1568 --- /dev/null +++ b/media-gfx/shotwell/shotwell-0.30.15.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit gnome.org gnome2-utils meson python-any-r1 vala xdg + +DESCRIPTION="Open source photo manager for GNOME" +HOMEPAGE="https://wiki.gnome.org/Apps/Shotwell" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86" +IUSE="opencv udev" + +DEPEND=" + >=x11-libs/gtk+-3.22.0:3 + >=dev-libs/glib-2.40.0:2 + >=dev-libs/libgee-0.8.5:0.8 + >=net-libs/webkit-gtk-2.26:4 + >=dev-libs/json-glib-0.7.6 + >=dev-libs/libxml2-2.6.32:2 + x11-libs/gdk-pixbuf:2 + >=dev-db/sqlite-3.5.9:3 + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + >=media-libs/libgphoto2-2.5:= + udev? ( >=dev-libs/libgudev-145:= ) + >=media-libs/gexiv2-0.10.4 + >=media-libs/libraw-0.13.2:= + >=media-libs/libexif-0.6.16:= + dev-libs/libgdata + >=app-crypt/gcr-3:=[gtk] + x11-libs/cairo + opencv? ( >=media-libs/opencv-2.3.0:= ) +" +RDEPEND="${DEPEND} + media-plugins/gst-plugins-gdkpixbuf:1.0 + media-plugins/gst-plugins-meta:1.0 +" +BDEPEND=" + ${PYTHON_DEPS} + $(vala_depend) + dev-libs/appstream-glib + dev-util/itstool + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + net-libs/libsoup:2.4[vala] + media-libs/gexiv2[vala] + app-crypt/gcr[vala] +" + +PATCHES=( + "${FILESDIR}"/${PV}-opencv4-compatibility.patch +) + +src_prepare() { + default + vala_setup + xdg_environment_reset +} + +src_configure() { + local emesonargs=( + -Dunity-support=false + # -Dpublishers # In 0.30.2 all get compiled in anyways, even if restricted list, affects only runtime support + -Dextra-plugins=true + #trace + #measure + -Ddupe-detection=true + $(meson_use udev) + -Dinstall-apport-hook=false + $(meson_use opencv face-detection) + -Dfatal_warnings=false + ) + meson_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} |