diff options
| -rw-r--r-- | meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch | 85 | ||||
| -rw-r--r-- | meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb | 21 |
2 files changed, 106 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch b/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch new file mode 100644 index 0000000000..b04a16cec7 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | From 7e5b986cb7797a6535fe2471b9a5fb7c00821f51 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yoann Congal <yoann.congal@smile.fr> | ||
| 3 | Date: Sun, 13 Oct 2024 01:00:10 +0200 | ||
| 4 | Subject: [PATCH] gimptool: allow default CC override | ||
| 5 | |||
| 6 | From: Yoann Congal <yoann.congal@smile.fr> | ||
| 7 | |||
| 8 | In OE, CC contains sysroot path. Storing CC in binary then leads to | ||
| 9 | non-reproducibility. | ||
| 10 | |||
| 11 | This commit add a new configure option "--with-default-cc='cmd'" for | ||
| 12 | force the CC stored in gimptool to a reproducible value. | ||
| 13 | |||
| 14 | Upstream-Status: Inappropriate [does not apply on master (upstream has moved to meson)] | ||
| 15 | Signed-off-by: Yoann Congal <yoann.congal@smile.fr> | ||
| 16 | --- | ||
| 17 | app-tools/Makefile.am | 2 +- | ||
| 18 | configure.ac | 13 +++++++++++++ | ||
| 19 | tools/Makefile.am | 2 +- | ||
| 20 | tools/gimptool.c | 2 +- | ||
| 21 | 4 files changed, 16 insertions(+), 3 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/app-tools/Makefile.am b/app-tools/Makefile.am | ||
| 24 | index a7cd4ce..81a3a00 100644 | ||
| 25 | --- a/app-tools/Makefile.am | ||
| 26 | +++ b/app-tools/Makefile.am | ||
| 27 | @@ -67,7 +67,7 @@ AM_CPPFLAGS = \ | ||
| 28 | -DMANDIR=\""$(mandir)"\" \ | ||
| 29 | -DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \ | ||
| 30 | -DGIMPDATADIR=\""$(gimpdatadir)"\" \ | ||
| 31 | - -DCC=\""$(CC)"\" \ | ||
| 32 | + -DDEFAULT_CC=\""@DEFAULT_CC@"\" \ | ||
| 33 | -DGIMPDIR=\""$(gimpdir)"\" \ | ||
| 34 | -DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \ | ||
| 35 | -I$(top_srcdir) \ | ||
| 36 | diff --git a/configure.ac b/configure.ac | ||
| 37 | index a88b7cc..d90b6db 100644 | ||
| 38 | --- a/configure.ac | ||
| 39 | +++ b/configure.ac | ||
| 40 | @@ -2457,6 +2457,19 @@ fi | ||
| 41 | AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno) | ||
| 42 | AC_SUBST(DESKTOP_DATADIR) | ||
| 43 | |||
| 44 | +###################### | ||
| 45 | +# Determine default CC | ||
| 46 | +###################### | ||
| 47 | + | ||
| 48 | +AC_ARG_WITH(default-cc, [ --with-default-cc="cmd" default CC to print in gimptool (default=CC)]) | ||
| 49 | + | ||
| 50 | +if test "x$with_default_cc" != x; then | ||
| 51 | + DEFAULT_CC=$with_default_cc | ||
| 52 | +else | ||
| 53 | + DEFAULT_CC=CC | ||
| 54 | +fi | ||
| 55 | + | ||
| 56 | +AC_SUBST(DEFAULT_CC) | ||
| 57 | |||
| 58 | ##################### | ||
| 59 | # Check for XML tools | ||
| 60 | diff --git a/tools/Makefile.am b/tools/Makefile.am | ||
| 61 | index 420b9b1..ccabde8 100644 | ||
| 62 | --- a/tools/Makefile.am | ||
| 63 | +++ b/tools/Makefile.am | ||
| 64 | @@ -87,7 +87,7 @@ AM_CPPFLAGS = \ | ||
| 65 | -DMANDIR=\""$(mandir)"\" \ | ||
| 66 | -DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \ | ||
| 67 | -DGIMPDATADIR=\""$(gimpdatadir)"\" \ | ||
| 68 | - -DCC=\""$(CC)"\" \ | ||
| 69 | + -DDEFAULT_CC=\""@DEFAULT_CC@"\" \ | ||
| 70 | -DGIMPDIR=\""$(gimpdir)"\" \ | ||
| 71 | -DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \ | ||
| 72 | -I$(top_srcdir) \ | ||
| 73 | diff --git a/tools/gimptool.c b/tools/gimptool.c | ||
| 74 | index 21fc043..bbf3fa5 100644 | ||
| 75 | --- a/tools/gimptool.c | ||
| 76 | +++ b/tools/gimptool.c | ||
| 77 | @@ -280,7 +280,7 @@ find_out_env_flags (void) | ||
| 78 | else if (msvc_syntax) | ||
| 79 | env_cc = "cl -MD"; | ||
| 80 | else | ||
| 81 | - env_cc = CC; | ||
| 82 | + env_cc = DEFAULT_CC; | ||
| 83 | |||
| 84 | if (g_ascii_strncasecmp (env_cc, "cl", 2) == 0 && | ||
| 85 | g_ascii_strncasecmp (env_cc, "clang", 5) != 0) | ||
diff --git a/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb b/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb index a17e03b103..0272e05e96 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb | |||
| @@ -49,6 +49,7 @@ SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \ | |||
| 49 | file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch \ | 49 | file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch \ |
| 50 | file://0001-file-tiff-load-fix-mismatching-variable-type.patch \ | 50 | file://0001-file-tiff-load-fix-mismatching-variable-type.patch \ |
| 51 | file://0001-metadata-shut-up-a-weird-warning.patch \ | 51 | file://0001-metadata-shut-up-a-weird-warning.patch \ |
| 52 | file://0001-gimptool-allow-default-CC-override.patch \ | ||
| 52 | " | 53 | " |
| 53 | SRC_URI[sha256sum] = "50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e" | 54 | SRC_URI[sha256sum] = "50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e" |
| 54 | 55 | ||
| @@ -74,6 +75,26 @@ FILES:${PN} += "${datadir}/metainfo" | |||
| 74 | 75 | ||
| 75 | RDEPENDS:${PN} += "mypaint-brushes-1.0" | 76 | RDEPENDS:${PN} += "mypaint-brushes-1.0" |
| 76 | 77 | ||
| 78 | |||
| 79 | # gimptool | ||
| 80 | |||
| 81 | # gimptool needs a CC definition, use current CC without sysroot | ||
| 82 | python __anonymous() { | ||
| 83 | import shlex | ||
| 84 | CC_WITHOUT_SYSROOT = shlex.join(filter(lambda x: not x.startswith("--sysroot="), shlex.split(d.getVar("CC")))) | ||
| 85 | d.setVar("CC_WITHOUT_SYSROOT", CC_WITHOUT_SYSROOT) | ||
| 86 | } | ||
| 87 | EXTRA_OECONF += "--with-default-cc='${CC_WITHOUT_SYSROOT}'" | ||
| 88 | |||
| 89 | # Split gimptool in its own package | ||
| 90 | PACKAGE_BEFORE_PN += "${PN}-gimptool" | ||
| 91 | FILES:${PN}-gimptool += "${bindir}/gimptool-2.0" | ||
| 92 | |||
| 93 | # gimptool depends on gimp .pc file being installed and tools to build the plugin. | ||
| 94 | RDEPENDS:${PN}-gimptool += "${PN}-dev packagegroup-core-buildessential" | ||
| 95 | INSANE_SKIP:${PN}-gimptool += "dev-deps" | ||
| 96 | |||
| 97 | |||
| 77 | CVE_STATUS[CVE-2007-3741] = "not-applicable-platform: This only applies for Mandriva Linux" | 98 | CVE_STATUS[CVE-2007-3741] = "not-applicable-platform: This only applies for Mandriva Linux" |
| 78 | CVE_STATUS[CVE-2009-0581] = "cpe-incorrect: The current version (2.10.38) is not affected." | 99 | CVE_STATUS[CVE-2009-0581] = "cpe-incorrect: The current version (2.10.38) is not affected." |
| 79 | CVE_STATUS[CVE-2009-0723] = "cpe-incorrect: The current version (2.10.38) is not affected." | 100 | CVE_STATUS[CVE-2009-0723] = "cpe-incorrect: The current version (2.10.38) is not affected." |
