[gentoo-commits] repo/gentoo:master commit in: media-gfx/shotwell/files/, media-gfx/shotwell/

2023-03-05 Thread Matt Turner
commit: 1cff7d2418b4111ad0108badd404bba85244d21f
Author: Matt Turner  gentoo  org>
AuthorDate: Sun Mar  5 20:32:38 2023 +
Commit: Matt Turner  gentoo  org>
CommitDate: Sun Mar  5 20:32:52 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cff7d24

media-gfx/shotwell: Add patch to build with vala-0.56.4

Closes: https://bugs.gentoo.org/895912
Signed-off-by: Matt Turner  gentoo.org>

 ...-missing-cheader-attributes-of-delegate-s.patch | 57 ++
 media-gfx/shotwell/shotwell-0.30.17-r1.ebuild  |  5 +-
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git 
a/media-gfx/shotwell/files/shotwell-gphoto2-Add-missing-cheader-attributes-of-delegate-s.patch
 
b/media-gfx/shotwell/files/shotwell-gphoto2-Add-missing-cheader-attributes-of-delegate-s.patch
new file mode 100644
index ..76e959266fc7
--- /dev/null
+++ 
b/media-gfx/shotwell/files/shotwell-gphoto2-Add-missing-cheader-attributes-of-delegate-s.patch
@@ -0,0 +1,57 @@
+From cd82759231e5ece2fa0dea40397c9051d15fd5c2 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz 
+Date: Sun, 5 Feb 2023 20:44:49 +0100
+Subject: [PATCH] gphoto2: Add missing cheader attributes of delegate symbols
+
+---
+ vapi/libgphoto2.vapi | 21 +
+ 1 file changed, 21 insertions(+)
+
+diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi
+index e9387b29..67cb2098 100644
+--- a/vapi/libgphoto2.vapi
 b/vapi/libgphoto2.vapi
+@@ -340,19 +340,40 @@ namespace GPhoto {
+ public void set_message_func([CCode (delegate_target_pos=3.1)] 
ContextMessageFunc messageFunc);
+ }
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextIdleFunc(Context context);
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextErrorFunc(Context context, string text);
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextStatusFunc(Context context, string text);
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextMessageFunc(Context context, string text);
+ 
+ // TODO: Support for va_args in Vala, esp. for delegates?
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate uint ContextProgressStartFunc(Context context, float 
target, string text);
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextProgressUpdateFunc(Context context, uint id, 
float current);
+ 
++[CCode (
++cheader_filename="gphoto2/gphoto2-context.h"
++)]
+ public delegate void ContextProgressStopFunc(Context context, uint id);
+ 
+ [CCode (
+-- 
+2.39.2
+

diff --git a/media-gfx/shotwell/shotwell-0.30.17-r1.ebuild 
b/media-gfx/shotwell/shotwell-0.30.17-r1.ebuild
index 3eb97823c813..332fa0c27c41 100644
--- a/media-gfx/shotwell/shotwell-0.30.17-r1.ebuild
+++ b/media-gfx/shotwell/shotwell-0.30.17-r1.ebuild
@@ -51,7 +51,10 @@ BDEPEND="
app-crypt/gcr:0[vala]
 "
 
-PATCHES=( "${FILESDIR}"/0.30.16-optional-wayland.patch )
+PATCHES=(
+   
"${FILESDIR}"/${PN}-gphoto2-Add-missing-cheader-attributes-of-delegate-s.patch
+   "${FILESDIR}"/0.30.16-optional-wayland.patch
+)
 
 src_prepare() {
default



[gentoo-commits] repo/gentoo:master commit in: media-gfx/shotwell/files/, media-gfx/shotwell/

2022-04-04 Thread Matt Turner
commit: 029e7035530da87ddc163102e966eaab88eb189a
Author: Matt Turner  gentoo  org>
AuthorDate: Tue Apr  5 01:19:00 2022 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue Apr  5 04:14:02 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=029e7035

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  gentoo.org>

 media-gfx/shotwell/Manifest|  1 +
 .../files/0.30.15-opencv4-compatibility.patch  | 64 
 media-gfx/shotwell/shotwell-0.30.15.ebuild | 88 ++
 3 files changed, 153 insertions(+)

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 ..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 a8fc1328bcc4296045fece60814fbfb40bcc Mon Sep 17 00:00:00 2001
+From: Jens Georg 
+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 , CascadeClassifier , 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 , CascadeClassifier , 
double scale) {
+   equalizeHist(smallImg, smallImg);
+ 
+   vector 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::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 ..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="
+   

[gentoo-commits] repo/gentoo:master commit in: media-gfx/shotwell/files/, media-gfx/shotwell/

2021-12-17 Thread Mart Raudsepp
commit: a0658e156d37df070621d9c49189289fcc26f9e8
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Fri Dec 17 17:47:18 2021 +
Commit: Mart Raudsepp  gentoo  org>
CommitDate: Fri Dec 17 17:48:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0658e15

media-gfx/shotwell: fix compatibility with vala-0.52.8

Closes: https://bugs.gentoo.org/829261
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Mart Raudsepp  gentoo.org>

 media-gfx/shotwell/files/0.30.14-vala-0.52.8-compat.patch | 13 +
 media-gfx/shotwell/shotwell-0.30.14.ebuild|  5 +
 2 files changed, 18 insertions(+)

diff --git a/media-gfx/shotwell/files/0.30.14-vala-0.52.8-compat.patch 
b/media-gfx/shotwell/files/0.30.14-vala-0.52.8-compat.patch
new file mode 100644
index ..0aef3e4eea96
--- /dev/null
+++ b/media-gfx/shotwell/files/0.30.14-vala-0.52.8-compat.patch
@@ -0,0 +1,13 @@
+diff --git a/src/dialogs/ExportDialog.vala b/src/dialogs/ExportDialog.vala
+index 5a61dc4a..c8011b7f 100644
+--- a/src/dialogs/ExportDialog.vala
 b/src/dialogs/ExportDialog.vala
+@@ -23,7 +23,7 @@ public class ExportDialog : Gtk.Dialog {
+ 
+ private static ScaleConstraint current_constraint = 
ScaleConstraint.ORIGINAL;
+ private static ExportFormatParameters current_parameters = 
ExportFormatParameters.current();
+-private static int current_scale = DEFAULT_SCALE;
++private static int current_scale = 1200; //FIXME not needed with vala 
0.54+
+ 
+ private Gtk.Grid table = new Gtk.Grid();
+ private Gtk.ComboBoxText quality_combo;

diff --git a/media-gfx/shotwell/shotwell-0.30.14.ebuild 
b/media-gfx/shotwell/shotwell-0.30.14.ebuild
index 629bc8a3d4c2..d0ee07286e10 100644
--- a/media-gfx/shotwell/shotwell-0.30.14.ebuild
+++ b/media-gfx/shotwell/shotwell-0.30.14.ebuild
@@ -50,6 +50,11 @@ BDEPEND="
app-crypt/gcr[vala]
 "
 
+PATCHES=(
+   # Fix build against vala-0.52.8. Isn't needed once we use 0.54+ or drop 
vala:0.52 slots
+   "${FILESDIR}"/${PV}-vala-0.52.8-compat.patch
+)
+
 src_prepare() {
xdg_src_prepare
vala_src_prepare