Skip to contentSkip to conversation

gimp: fix gimptool buildpaths errors

PATCH New Armin Kuster 1 participant 5 messages Jan 10, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 gimp: fix gimptool buildpaths errors

From: Yoann Congal <[email protected]>

gimptool is used in GIMP plugin compilation. It does need a CC definition, provide it as the current CC with "--sysroot=..." removed.

gimptool also need the gimp .pc file which is in gimp-dev. Split gimptool in its own package to avoid circular dependencies.

(cherry picked from commit 061f5c7f82b905f3a75183852b3a8fbff7e50e17)
---
 ...1-gimptool-allow-default-CC-override.patch | 85 +++++++++++++++++++
 meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb  | 21 +++++
 2 files changed, 106 insertions(+)
 create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch
meta-gnome/recipes-gimp/gimp/gimp/0001-gimptool-allow-default-CC-override.patch new file +85 -0
new file mode 100644
index 0000000000..b04a16cec7
@@ -0,0 +1,85 @@
+From 7e5b986cb7797a6535fe2471b9a5fb7c00821f51 Mon Sep 17 00:00:00 2001
+From: Yoann Congal <[email protected]>
+Date: Sun, 13 Oct 2024 01:00:10 +0200
+Subject: [PATCH] gimptool: allow default CC override
+
+From: Yoann Congal <[email protected]>
+
+In OE, CC contains sysroot path. Storing CC in binary then leads to
+non-reproducibility.
+
+This commit add a new configure option "--with-default-cc='cmd'" for
+force the CC stored in gimptool to a reproducible value.
+
+Upstream-Status: Inappropriate [does not apply on master (upstream has moved to meson)]
+Signed-off-by: Yoann Congal <[email protected]>
+---
+ app-tools/Makefile.am |  2 +-
+ configure.ac          | 13 +++++++++++++
+ tools/Makefile.am     |  2 +-
+ tools/gimptool.c      |  2 +-
+ 4 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/app-tools/Makefile.am b/app-tools/Makefile.am
+index a7cd4ce..81a3a00 100644
+--- a/app-tools/Makefile.am
++++ b/app-tools/Makefile.am
+@@ -67,7 +67,7 @@ AM_CPPFLAGS = \
+ 	-DMANDIR=\""$(mandir)"\"				\
+ 	-DGIMPPLUGINDIR=\""$(gimpplugindir)"\"			\
+ 	-DGIMPDATADIR=\""$(gimpdatadir)"\"			\
+-	-DCC=\""$(CC)"\"					\
++	-DDEFAULT_CC=\""@DEFAULT_CC@"\"				\
+ 	-DGIMPDIR=\""$(gimpdir)"\"				\
+ 	-DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\"	\
+ 	-I$(top_srcdir)						\
+diff --git a/configure.ac b/configure.ac
+index a88b7cc..d90b6db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2457,6 +2457,19 @@ fi
+ AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno)
+ AC_SUBST(DESKTOP_DATADIR)
+ 
++######################
++# Determine default CC
++######################
++
++AC_ARG_WITH(default-cc, [ --with-default-cc="cmd" default CC to print in gimptool (default=CC)])
++
++if test "x$with_default_cc" != x; then
++  DEFAULT_CC=$with_default_cc
++else
++  DEFAULT_CC=CC
++fi
++
++AC_SUBST(DEFAULT_CC)
+ 
+ #####################
+ # Check for XML tools
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 420b9b1..ccabde8 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -87,7 +87,7 @@ AM_CPPFLAGS = \
+ 	-DMANDIR=\""$(mandir)"\"				\
+ 	-DGIMPPLUGINDIR=\""$(gimpplugindir)"\"			\
+ 	-DGIMPDATADIR=\""$(gimpdatadir)"\"			\
+-	-DCC=\""$(CC)"\"					\
++	-DDEFAULT_CC=\""@DEFAULT_CC@"\"				\
+ 	-DGIMPDIR=\""$(gimpdir)"\"				\
+ 	-DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\"	\
+ 	-I$(top_srcdir)						\
+diff --git a/tools/gimptool.c b/tools/gimptool.c
+index 21fc043..bbf3fa5 100644
+--- a/tools/gimptool.c
++++ b/tools/gimptool.c
+@@ -280,7 +280,7 @@ find_out_env_flags (void)
+   else if (msvc_syntax)
+     env_cc = "cl -MD";
+   else
+-    env_cc = CC;
++    env_cc = DEFAULT_CC;
+ 
+   if (g_ascii_strncasecmp (env_cc, "cl", 2)    == 0 &&
+       g_ascii_strncasecmp (env_cc, "clang", 5) != 0)
meta-gnome/recipes-gimp/gimp/gimp_2.10.38.bb +21 -0
index a17e03b103..0272e05e96 100644
@@ -49,6 +49,7 @@ SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \
            file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch \
            file://0001-file-tiff-load-fix-mismatching-variable-type.patch \
            file://0001-metadata-shut-up-a-weird-warning.patch \
+           file://0001-gimptool-allow-default-CC-override.patch \
            "
 SRC_URI[sha256sum] = "50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e"
 
@@ -74,6 +75,26 @@ FILES:${PN}  += "${datadir}/metainfo"
 
 RDEPENDS:${PN} += "mypaint-brushes-1.0"
 
+
+# gimptool
+
+# gimptool needs a CC definition, use current CC without sysroot
+python __anonymous() {
+    import shlex
+    CC_WITHOUT_SYSROOT = shlex.join(filter(lambda x: not x.startswith("--sysroot="), shlex.split(d.getVar("CC"))))
+    d.setVar("CC_WITHOUT_SYSROOT", CC_WITHOUT_SYSROOT)
+}
+EXTRA_OECONF += "--with-default-cc='${CC_WITHOUT_SYSROOT}'"
+
+# Split gimptool in its own package
+PACKAGE_BEFORE_PN += "${PN}-gimptool"
+FILES:${PN}-gimptool += "${bindir}/gimptool-2.0"
+
+# gimptool depends on gimp .pc file being installed and tools to build the plugin.
+RDEPENDS:${PN}-gimptool += "${PN}-dev packagegroup-core-buildessential"
+INSANE_SKIP:${PN}-gimptool += "dev-deps"
+
+
 CVE_STATUS[CVE-2007-3741] = "not-applicable-platform: This only applies for Mandriva Linux"
 CVE_STATUS[CVE-2009-0581] = "cpe-incorrect: The current version (2.10.38) is not affected."
 CVE_STATUS[CVE-2009-0723] = "cpe-incorrect: The current version (2.10.38) is not affected."
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/5 mpd: Fix build with icu 76+

From: Khem Raj <[email protected]>

(cherry picked from commit 81a0d778f33fd5716c1c1eb19ffada4b94e1df31)
---
 ...n.build-support-building-with-ICU-76.patch | 52 +++++++++++++++++++
 .../recipes-multimedia/musicpd/mpd_0.23.15.bb |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch
meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch new file +52 -0
new file mode 100644
index 0000000000..8b85f396ca
@@ -0,0 +1,52 @@
+From 1a063fee7ec1077e248ff97ebf1f92c5c5941a67 Mon Sep 17 00:00:00 2001
+From: Michael Cho <[email protected]>
+Date: Sat, 26 Oct 2024 10:29:53 -0400
+Subject: [PATCH] meson.build: support building with ICU 76
+
+ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
+add `icu-uc` when linking to shared libraries. This results in failure:
+```
+src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
+```
+
+[^1]: https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56
+
+Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/1a063fee7ec1077e248ff97ebf1f92c5c5941a67]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lib/icu/meson.build | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build
+index 3ecc0a517..e6cf8cdce 100644
+--- a/src/lib/icu/meson.build
++++ b/src/lib/icu/meson.build
+@@ -1,5 +1,7 @@
+-icu_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
+-conf.set('HAVE_ICU', icu_dep.found())
++icu_i18n_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
++icu_uc_dep = dependency('icu-uc', version: '>= 50', required: get_option('icu'))
++have_icu = icu_i18n_dep.found() and icu_uc_dep.found()
++conf.set('HAVE_ICU', have_icu)
+ 
+ icu_sources = [
+   'Canonicalize.cxx',
+@@ -13,7 +15,7 @@ if is_windows
+ endif
+ 
+ iconv_dep = []
+-if icu_dep.found()
++if have_icu
+   icu_sources += [
+     'Init.cxx',
+     'Util.cxx',
+@@ -31,7 +33,8 @@ icu = static_library(
+   icu_sources,
+   include_directories: inc,
+   dependencies: [
+-    icu_dep,
++    icu_i18n_dep,
++    icu_uc_dep,
+     iconv_dep,
+     fmt_dep,
+   ],
meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.15.bb +1 -0
index f066c405f1..3fa4485a04 100644
@@ -21,6 +21,7 @@ DEPENDS += " \
 PV .= "+git"
 SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \
            file://mpd.conf.in \
+           file://0001-meson.build-support-building-with-ICU-76.patch \
            "
 SRCREV = "965c466e9bda262790e76edd5272e9e74b407ff3"
 S = "${WORKDIR}/git"
Signature · 1 line
2.43.0
#2 lore raw

PATCH 3/5 libhtml-tree-perl: Drop unnecessary SRC_URI md5sum

In reply to Armin Kuster

From: "J. S." <[email protected]>

(cherry picked from commit 877a913c197aee3feca9f1cd93268035fb52706c)
---
 meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb | 1 -
 1 file changed, 1 deletion(-)
meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb +0 -1
index d2c151bf5c..30a8e07811 100644
@@ -14,7 +14,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3eb57a8958cae73cb65e7d0c26339242"
 SRC_URI = "${CPAN_MIRROR}/authors/id/C/CJ/CJM/HTML-Tree-${PV}.tar.gz \
            file://bin-htmltree-fix-shebang.patch \
 "
-SRC_URI[md5sum] = "d9271d60b872ed6fbe68b2d0fe8c450e"
 SRC_URI[sha256sum] = "7d6d73fca622aa74855a8b088faa39454a0f91b7af83c9ec0387f01eefc2148f"
 
 S = "${WORKDIR}/HTML-Tree-${PV}"
Signature · 1 line
2.43.0
#3 lore raw

PATCH 4/5 libhtml-tree-perl: update HOMEPAGE

In reply to Armin Kuster

From: "J. S." <[email protected]>

(cherry picked from commit 6623b2f4eade658d45a0728a3c04ab243b7385de)
---
 meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb +1 -1
index 30a8e07811..f070196606 100644
@@ -6,7 +6,7 @@ libwww-perl distribution, but are now unbundled in order to facilitate \
 a separate development track."
 SECTION = "libs"
 
-HOMEPAGE = "http://www.cpan.org/authors/id/C/CJ/CJM/HTML-Tree-${PV}.readme"
+HOMEPAGE = "https://metacpan.org/release/CJM/HTML-Tree-5.03/source/README"
 
 LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3eb57a8958cae73cb65e7d0c26339242"
Signature · 1 line
2.43.0
#4 lore raw

PATCH 5/5 libhtml-tree-perl: fix QA Issue: TMPDIR [buildpaths]

In reply to Armin Kuster

From: "J. S." <[email protected]>

(cherry picked from commit 5f471132db6df673bbc2c9d7e03f3a049401cfa8)
---
 meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb | 7 +++++++
 1 file changed, 7 insertions(+)
meta-perl/recipes-perl/libhtml/libhtml-tree-perl_5.03.bb +7 -0
index f070196606..7bdebcd37c 100644
@@ -25,6 +25,13 @@ export PERL_USE_UNSAFE_INC = "1"
 DEPENDS += "libmodule-build-perl-native \
 "
 
+do_install:append() {
+  sed -i \
+    -e 's|${TMPDIR}||g' \
+    `find ${D}/usr/share/doc/perl/html/site/lib/HTML/ -type f` \
+    `find ${D}/usr/lib/perl5 -type f -name .packlist`
+}
+
 RPROVIDES:${PN} = " libhtml-element-perl \
     libhtml-tree-assubs-perl \
     libhtml-tree-perl \
Signature · 1 line
2.43.0