commit:     f90717a6f0d4eb222fe07c771947797b1aca0984
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 10 12:01:33 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 10 12:01:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f90717a6

app-misc/localsearch: fix build issues, inc ffmpeg-7 compat

Closes: https://bugs.gentoo.org/957768
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/localsearch-3.8.2-ffmpeg-7.patch         | 30 ++++++++++++++++++++++
 .../files/localsearch-3.8.2-ontologies.patch       | 28 ++++++++++++++++++++
 app-misc/localsearch/localsearch-3.8.2.ebuild      |  2 ++
 3 files changed, 60 insertions(+)

diff --git a/app-misc/localsearch/files/localsearch-3.8.2-ffmpeg-7.patch 
b/app-misc/localsearch/files/localsearch-3.8.2-ffmpeg-7.patch
new file mode 100644
index 000000000000..0d5ca0e7eaa1
--- /dev/null
+++ b/app-misc/localsearch/files/localsearch-3.8.2-ffmpeg-7.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/957768
+https://gitlab.gnome.org/GNOME/localsearch/-/commit/5e246f9a9423b1baf15ad4f4c4194a22f3caf247
+
+From 5e246f9a9423b1baf15ad4f4c4194a22f3caf247 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <[email protected]>
+Date: Sat, 28 Dec 2024 23:54:21 +0100
+Subject: [PATCH] extract: Update libav extractor to ffmpeg 7.x
+
+Adapt to API changes in that version.
+---
+ src/tracker-extract/tracker-extract-libav.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/tracker-extract/tracker-extract-libav.c 
b/src/tracker-extract/tracker-extract-libav.c
+index f53371574..bac445600 100644
+--- a/src/tracker-extract/tracker-extract-libav.c
++++ b/src/tracker-extract/tracker-extract-libav.c
+@@ -101,8 +101,8 @@ tracker_extract_get_metadata (TrackerExtractInfo  *info,
+               if (audio_stream->codecpar->sample_rate > 0) {
+                       tracker_resource_set_int64 (metadata, "nfo:sampleRate", 
audio_stream->codecpar->sample_rate);
+               }
+-              if (audio_stream->codecpar->channels > 0) {
+-                      tracker_resource_set_int64 (metadata, "nfo:channels", 
audio_stream->codecpar->channels);
++              if (audio_stream->codecpar->ch_layout.nb_channels > 0) {
++                      tracker_resource_set_int64 (metadata, "nfo:channels", 
audio_stream->codecpar->ch_layout.nb_channels);
+               }
+       }
+ 
+-- 
+GitLab

diff --git a/app-misc/localsearch/files/localsearch-3.8.2-ontologies.patch 
b/app-misc/localsearch/files/localsearch-3.8.2-ontologies.patch
new file mode 100644
index 000000000000..f034fd36cea8
--- /dev/null
+++ b/app-misc/localsearch/files/localsearch-3.8.2-ontologies.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/957768
+https://gitlab.gnome.org/GNOME/localsearch/-/commit/4be90dc041e6e83bcffbc8db6f1a17dceaf0c65c
+
+From 4be90dc041e6e83bcffbc8db6f1a17dceaf0c65c Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <[email protected]>
+Date: Sat, 28 Dec 2024 23:52:51 +0100
+Subject: [PATCH] extract: Fix build issue in libav extractor
+
+No individual headers from the SPARQL library should be
+accessed, and it is not necessary either.
+---
+ src/tracker-extract/tracker-extract-libav.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/tracker-extract/tracker-extract-libav.c 
b/src/tracker-extract/tracker-extract-libav.c
+index b17e4a04e4..f53371574d 100644
+--- a/src/tracker-extract/tracker-extract-libav.c
++++ b/src/tracker-extract/tracker-extract-libav.c
+@@ -21,7 +21,6 @@
+ 
+ #include <glib.h>
+ 
+-#include <libtracker-sparql/tracker-ontologies.h>
+ #include <libtracker-miners-common/tracker-file-utils.h>
+ 
+ #include <libtracker-extract/tracker-extract.h>
+-- 
+GitLab

diff --git a/app-misc/localsearch/localsearch-3.8.2.ebuild 
b/app-misc/localsearch/localsearch-3.8.2.ebuild
index 9646ab639d59..d324010e5f03 100644
--- a/app-misc/localsearch/localsearch-3.8.2.ebuild
+++ b/app-misc/localsearch/localsearch-3.8.2.ebuild
@@ -19,6 +19,8 @@ RESTRICT="!test? ( test )"
 
 PATCHES=(
        "${FILESDIR}/Disable-the-examples-test-suite.patch"
+       "${FILESDIR}/localsearch-3.8.2-ontologies.patch"
+       "${FILESDIR}/localsearch-3.8.2-ffmpeg-7.patch"
 )
 
 # tracker-2.1.7 currently always depends on ICU (theoretically could be 
libunistring instead);

Reply via email to