* Re: [oe] [meta-gnome][PATCHv3] gthumb: update 3.12.4 -> 3.12.6
[not found] <180E4A02A48FD2BE.8554@lists.openembedded.org>
@ 2024-12-05 13:12 ` Markus Volk
0 siblings, 0 replies; only message in thread
From: Markus Volk @ 2024-12-05 13:12 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 9776 bytes --]
v3: add a backport patch to fix 32-bit
| ../gthumb-3.12.6/gthumb/main-migrate-catalogs.c:316:57: error:
passing argument 1 of 'localtime' from incompatible pointer type
[-Wincompatible-pointer-types]
| 316 | tm = localtime
(&date);
| | ^~~~~
| | |
| | long
int *
| In file included from
/home/flk/poky/build-test/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/gthumb/3.12.6/recipe-sysroot/usr/include/features.h:511,
| from
/home/flk/poky/build-test/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/gthumb/3.12.6/recipe-sysroot/usr/include/bits/libc-header-start.h:33,
| from
/home/flk/poky/build-test/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/gthumb/3.12.6/recipe-sysroot/usr/include/string.h:26,
| from
../gthumb-3.12.6/gthumb/main-migrate-catalogs.c:23:
|
/home/flk/poky/build-test/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/gthumb/3.12.6/recipe-sysroot/usr/include/time.h:141:19:
note: expected 'const time_t *' {aka 'const long long int *'} but
argument is of type 'long int *'
| 141 | extern struct tm *__REDIRECT_NTH (localtime, (const time_t
*__timer),
| | ^~~~~~~~~~~~~~
On Thu, Dec 5 2024 at 02:11:15 PM +01:00:00, Markus Volk
<f_l_k@t-online.de> wrote:
> - add support for jxl, webp, gstreamer
> - add more PACKAGECONFIG options
> - disable webservices to avoid pulling in deprecated libsoup2
> - remove yelp-native dependency
> - build colord dependent on polkit feature
> - drop polkit and gobject-introspection from REQUIRED_DISTRO_FEATURES
> - add backport patch to fix 32-bit
>
> Version 3.12.6
> ~~~~~~~~~~~~~~
> Released: 2024-03-10
>
> Features:
> * WebAlbums: allow Exif image title to be used. (Linas Vepstas)
>
> Bugfixes:
> * Fixed 'could not perform operation' when editing a modified image.
> * Video thumbnailer: use the default thumbnail size if invalid.
> (Linas Vepstas)
> * Video thumbnailer: avoid a null pointer dereference and crash.
> (Linas Vepstas)
>
> Translations:
> * Slovenian (Martin Srebotnjak)
>
> Version 3.12.5
> ~~~~~~~~~~~~~~
> Released: 2024-02-18
>
> Bugfixes:
> * Add to catalog: show the next image only when in viewer mode (!313)
> * jxl: added support for version 0.9.0 (Timo Gurr) (!306)
> * Commenting a picture deletes its Color Profile tag. This only
> happened when the 'Store metadata inside files if possible' option
> was active. (!293)
>
> Translations:
> * Chinese/Traditional (Cheng-Chia Tseng)
> * Turkish (Sabri Ănal)
> * ÄeĹĄtina (Daniel Rusek)
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de
> <mailto:f_l_k@t-online.de>>
> ---
> ...9483afd1215378c8b9871f51cd61770e53e7.patch | 49
> +++++++++++++++++++
> .../recipes-gnome/gthumb/gthumb_3.12.4.bb | 30 ------------
> .../recipes-gnome/gthumb/gthumb_3.12.6.bb | 34 +++++++++++++
> 3 files changed, 83 insertions(+), 30 deletions(-)
> create mode 100644
> meta-gnome/recipes-gnome/gthumb/gthumb/283c9483afd1215378c8b9871f51cd61770e53e7.patch
> delete mode 100644 meta-gnome/recipes-gnome/gthumb/gthumb_3.12.4.bb
> create mode 100644 meta-gnome/recipes-gnome/gthumb/gthumb_3.12.6.bb
>
> diff --git
> a/meta-gnome/recipes-gnome/gthumb/gthumb/283c9483afd1215378c8b9871f51cd61770e53e7.patch
> b/meta-gnome/recipes-gnome/gthumb/gthumb/283c9483afd1215378c8b9871f51cd61770e53e7.patch
> new file mode 100644
> index 000000000..c2dbce0c1
> --- /dev/null
> +++
> b/meta-gnome/recipes-gnome/gthumb/gthumb/283c9483afd1215378c8b9871f51cd61770e53e7.patch
> @@ -0,0 +1,49 @@
> +From b48e34c436eb59877b0fe75ba3bf724c0de4dc36 Mon Sep 17 00:00:00
> 2001
> +From: Pino Toscano <toscano.pino@tiscali.it
> <mailto:toscano.pino@tiscali.it>>
> +Date: Sat, 7 Sep 2024 09:40:49 +0200
> +Subject: [PATCH] migrate-catalogs: properly use time_t for
> localtime()
> +
> +Commit ed219c771bc0c63e1a7847e44c81f43223454eac changed the type of
> the
> +'date' variable from 'time_t' to 'long', to ensure the right type is
> +handled by sscanf(). The problem is that, in case 'time_t' is not the
> +same as 'long', the wrong pointer is passed to localtime(), and more
> +strict build flags (such as the defaults of GCC 14) cause the build
> to
> +fail on such setups.
> +
> +The ideal fix in this case would be to switch back the 'date'
> variable
> +to 'time_t' and use the right format specifier for it in sscanf();
> +however, since this is an helper to convert very old format, this
> +additional code is not much worth it. Hence, use a simpler fix: in
> case
> +a date timestamp was read from the file, set it to a new 'time_t'
> +variable which is then used for localtime(). Since 'time_t' is big at
> +least as much as 'long', there is no precision/value loss.
> +
> +There should be no behaviour change.
> +
> +Upstream-Status: Backport
> [<https://gitlab.gnome.org/GNOME/gthumb/-/commit/283c9483afd1215378c8b9871f51cd61770e53e7>]
> +---
> + gthumb/main-migrate-catalogs.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/gthumb/main-migrate-catalogs.c
> b/gthumb/main-migrate-catalogs.c
> +index 75f5cb11d..e194ed19f 100644
> +--- a/gthumb/main-migrate-catalogs.c
> ++++ b/gthumb/main-migrate-catalogs.c
> +@@ -308,12 +308,13 @@ migration_for_each_file (GFile *file,
> + sscanf (line, "%d", &date_scope);
> +
> + if ((date > 0) && (date_scope >= 1) && (date_scope <= 3)) {
> ++ time_t date_as_time = date;
> + struct tm *tm;
> + GthDateTime *dt;
> + char *exif_date;
> + char *op;
> +
> +- tm = localtime (&date);
> ++ tm = localtime (&date_as_time);
> + dt = gth_datetime_new ();
> + gth_datetime_from_struct_tm (dt, tm);
> + exif_date = gth_datetime_to_exif_date (dt);
> +--
> +GitLab
> +
> diff --git a/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.4.bb
> b/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.4.bb
> deleted file mode 100644
> index 79db8b7d7..000000000
> --- a/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.4.bb
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -SUMMARY = "Image viewer and browser"
> -LICENSE="GPL-2.0-only"
> -LIC_FILES_CHKSUM =
> "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
> <file://copying;md5=59530bdf33659b29e73d4adb9f9f6552/>
> -
> -
> -REQUIRED_DISTRO_FEATURES = "polkit gobject-introspection-data"
> -
> -DEPENDS = " \
> - glib-2.0-native \
> - bison-native \
> - yelp-tools-native \
> - gtk+3 \
> - gsettings-desktop-schemas \
> - zlib \
> - jpeg \
> - exiv2 \
> - colord \
> - lcms \
> - libraw \
> - librsvg \
> - libsoup \
> - json-glib \
> - libsecret \
> -"
> -
> -inherit features_check gnomebase gnome-help gsettings itstool
> mime-xdg
> -
> -SRC_URI[archive.sha256sum] =
> "add693ac0aeb9a30d829ba03a06208289d3f6868dc3b02573549e88190c794e8"
> -
> -FILES:${PN} += "${datadir}/metainfo"
> diff --git a/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.6.bb
> b/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.6.bb
> new file mode 100644
> index 000000000..891717858
> --- /dev/null
> +++ b/meta-gnome/recipes-gnome/gthumb/gthumb_3.12.6.bb
> @@ -0,0 +1,34 @@
> +SUMMARY = "Image viewer and browser"
> +LICENSE="GPL-2.0-only"
> +LIC_FILES_CHKSUM =
> "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
> <file://copying;md5=59530bdf33659b29e73d4adb9f9f6552/>
> +
> +DEPENDS = " \
> + glib-2.0 \
> + glib-2.0-native \
> + bison-native \
> + gtk+3 \
> + gsettings-desktop-schemas \
> + zlib \
> + jpeg \
> + json-glib \
> +"
> +
> +PACKAGECONFIG ?= "${@bb.utils.contains
> <mailto:${@bb.utils.contains>('DISTRO_FEATURES', 'polkit', 'colord',
> '', d)} exiv2 gstreamer lcms libjxl libraw librsvg libwebp"
> +PACKAGECONFIG[gstreamer] =
> "-Dgstreamer=true,-Dgstreamer=false,gstreamer1.0
> gstreamer1.0-plugins-base"
> +PACKAGECONFIG[libwebp] = "-Dlibwebp=true,-Dlibwebp=false,libwebp"
> +PACKAGECONFIG[libjxl] = "-Dlibjxl=true,-Dlibjxl=false,libjxl"
> +PACKAGECONFIG[lcms] = "-Dlcms2=true,-Dlcms2=false,lcms"
> +PACKAGECONFIG[colord] = "-Dcolord=true,-Dcolord=false,colord"
> +PACKAGECONFIG[exiv2] = "-Dexiv2=true,-Dexiv2=false,exiv2"
> +PACKAGECONFIG[librsvg] = "-Dlibrsvg=true,-Dlibrsvg=false,librsvg"
> +PACKAGECONFIG[libraw] = "-Dlibraw=true,-Dlibraw=false,libraw"
> +
> +# webservices would require libsecret and webkitgtk3 built with
> deprecated libsoup2
> +EXTRA_OEMESON += "-Dwebservices=false -Dlibsecret=false"
> +
> +inherit gnomebase gnome-help gsettings itstool mime-xdg
> +
> +SRC_URI += "file://283c9483afd1215378c8b9871f51cd61770e53e7.patch"
> <file://283c9483afd1215378c8b9871f51cd61770e53e7.patch/>
> +SRC_URI[archive.sha256sum] =
> "608770c6c8e73073a1d404b65bd1b761e1ac5dc25e70130ff072488fa92f5c33"
> +
> +FILES:${PN} += "${datadir}/metainfo"
> --
> 2.47.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#114206):
> <https://lists.openembedded.org/g/openembedded-devel/message/114206>
> Mute This Topic: <https://lists.openembedded.org/mt/109938297/3618223>
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> <mailto:openembedded-devel+owner@lists.openembedded.org>
> Unsubscribe:
> <https://lists.openembedded.org/g/openembedded-devel/unsub>
> [f_l_k@t-online.de <mailto:f_l_k@t-online.de>]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 10872 bytes --]
^ permalink raw reply [flat|nested] only message in thread