summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/tracker/files/3.6.0-configure-c99.patch52
-rw-r--r--app-misc/tracker/tracker-3.6.0.ebuild6
2 files changed, 57 insertions, 1 deletions
diff --git a/app-misc/tracker/files/3.6.0-configure-c99.patch b/app-misc/tracker/files/3.6.0-configure-c99.patch
new file mode 100644
index 000000000000..f5de3e2746ce
--- /dev/null
+++ b/app-misc/tracker/files/3.6.0-configure-c99.patch
@@ -0,0 +1,52 @@
+https://bugs.gentoo.org/919095
+https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/638
+https://gitlab.gnome.org/GNOME/tracker/-/commit/f7393d61803815b19a1f210b197cce423ae3cc01
+
+From f7393d61803815b19a1f210b197cce423ae3cc01 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 3 Dec 2023 12:10:27 +0000
+Subject: [PATCH] build: Fix "4-digit year modifier" test
+
+Upcoming `gcc-14` enabled a few warnings into errors, like
+`-Wincompatible-pointer-types`. This caused `tracker` configure to
+fail as:
+
+ $ ../meson
+ ...
+ Checking if "strftime 4-digit year modifier" runs: DID NOT COMPILE
+
+ ../meson.build:235:2: ERROR: Problem encountered: Libc implementation has broken 4-digit years implementation.
+
+This happens because char buffer had an unusual type:
+
+ testfile.c: In function 'main':
+ testfile.c:16:17: error: passing argument 1 of 'strftime' from incompatible pointer type
+ [-Wincompatible-pointer-types]
+ 16 | strftime (&buf, sizeof buf, modifiers[i], &tm);
+ | ^~~~
+ | |
+ | char * (*)[100]
+--- a/meson.build
++++ b/meson.build
+@@ -215,15 +215,15 @@ result = cc.run('''
+ int main (int argc, char *argv[]) {
+ char *modifiers[] = { "%Y", "%C%y", "%4Y", "%2C%y", NULL };
+ time_t timestamp = -58979923200; /* 0101-01-01T01:01:01Z */
+- char *buf[100];
++ char buf[100];
+ struct tm tm;
+ int i;
+ gmtime_r (&timestamp, &tm);
+ for (i = 0; modifiers[i]; i++) {
+- strftime (&buf, sizeof buf, modifiers[i], &tm);
+- if (strcmp (&buf, "0101") == 0) {
++ strftime (buf, sizeof buf, modifiers[i], &tm);
++ if (strcmp (buf, "0101") == 0) {
+ printf ("%s", modifiers[i]);
+- return 0;
++ return 0;
+ }
+ }
+ return -1;
+--
+GitLab
diff --git a/app-misc/tracker/tracker-3.6.0.ebuild b/app-misc/tracker/tracker-3.6.0.ebuild
index 4df7c34a6c95..c98269f998af 100644
--- a/app-misc/tracker/tracker-3.6.0.ebuild
+++ b/app-misc/tracker/tracker-3.6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -45,6 +45,10 @@ BDEPEND="
"
PDEPEND="miners? ( >=app-misc/tracker-miners-3.6_rc )"
+PATCHES=(
+ "${FILESDIR}"/3.6.0-configure-c99.patch
+)
+
python_check_deps() {
python_has_version -b \
"dev-python/pygobject[${PYTHON_USEDEP}]" \