From 78b18923657d53f92f2c2f066f853357b6bf3d89 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2021 11:48:09 +0100 Subject: [PATCH] d/patches: Print 2-digit lcms minor versions correctly Related to #900819, #986192. --- ...t-LittleCMS-minor-versions-correctly.patch | 41 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 42 insertions(+) create mode 100644 debian/patches/app-Print-2-digit-LittleCMS-minor-versions-correctly.patch diff --git a/debian/patches/app-Print-2-digit-LittleCMS-minor-versions-correctly.patch b/debian/patches/app-Print-2-digit-LittleCMS-minor-versions-correctly.patch new file mode 100644 index 0000000000..7f8055fa4c --- /dev/null +++ b/debian/patches/app-Print-2-digit-LittleCMS-minor-versions-correctly.patch @@ -0,0 +1,41 @@ +From: Simon McVittie +Date: Sat, 3 Apr 2021 11:18:30 +0100 +Subject: app: Print 2-digit LittleCMS minor versions correctly + +LittleCMS 2.12.0 defines LCMS_VERSION as 2120. We want to print that +as 2.12.0, not 2.2.0. + +Bug: https://gitlab.gnome.org/GNOME/gimp/-/issues/6505 +Bug-Debian: https://bugs.debian.org/900819 +Bug-Debian: https://bugs.debian.org/986192 +Signed-off-by: Simon McVittie +Forwarded: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/429 +--- + app/sanity.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/app/sanity.c b/app/sanity.c +index 0ad044a..7360fd0 100644 +--- a/app/sanity.c ++++ b/app/sanity.c +@@ -402,16 +402,16 @@ sanity_check_lcms (void) + "built against.\n\n" + "Please make sure that the installed LittleCMS version\n" + "is at least %d.%d and that headers and library match.", +- LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10, +- lcms_version / 1000, lcms_version % 100 / 10, +- LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10); ++ LCMS_VERSION / 1000, LCMS_VERSION % 1000 / 10, ++ lcms_version / 1000, lcms_version % 1000 / 10, ++ LCMS_VERSION / 1000, LCMS_VERSION % 1000 / 10); + } + + if (lcms_version < (LCMS_REQUIRED_MAJOR * 1000 + + LCMS_REQUIRED_MINOR * 10)) + { + const gint lcms_major_version = lcms_version / 1000; +- const gint lcms_minor_version = lcms_version % 100 / 10; ++ const gint lcms_minor_version = lcms_version % 1000 / 10; + + return g_strdup_printf + ("Liblcms2 version too old!\n\n" diff --git a/debian/patches/series b/debian/patches/series index 3aa35acfb7..8c89ccceff 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +app-Print-2-digit-LittleCMS-minor-versions-correctly.patch 01_hurd_ftbfs.patch 02_hurd_ftbfs.patch