diff mbox series

[meta-gnome,5/5] gimp: Fix buildpaths in binaries and scripts

Message ID 20230525054712.1593592-5-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/5] remmina: Fix buildpaths QA warnings | expand

Commit Message

Khem Raj May 25, 2023, 5:47 a.m. UTC
Fixes

WARNING: gimp-2.10.34-r0 do_package_qa: QA Issue: File /usr/libexec/gimp-debug-tool-2.0 in package gimp contains reference to TMPDIR
File /usr/bin/gimp-console-2.10 in package gimp contains reference to TMPDIR
File /usr/bin/gimptool-2.0 in package gimp contains reference to TMPDIR
File /usr/bin/gimp-2.10 in package gimp contains reference to TMPDIR [buildpaths]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...irst-line-of-compiler-version-string.patch | 30 ++++++++++++++++
 ...dd-build-time-library-paths-to-LD_LI.patch | 34 +++++++++++++++++++
 meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb  |  4 ++-
 3 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch
 create mode 100644 meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch b/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch
new file mode 100644
index 0000000000..618b4cc7a7
--- /dev/null
+++ b/meta-gnome/recipes-gimp/gimp/gimp/0001-configure-Keep-first-line-of-compiler-version-string.patch
@@ -0,0 +1,30 @@ 
+From 5711ccfab40e304ced7f5be39a4083e3fcecff91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 22:22:41 -0700
+Subject: [PATCH] configure: Keep first line of compiler version string
+
+Full output of cc -v may contain additional information which could
+contain build path information, which is unnessasary
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/926]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c25415d..68707a0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -599,7 +599,7 @@ fi
+ for CC_VERSION_OPT in $CC_VERSION_OPTS; do
+   # We run $CC, and escape and format its output, in a single step,
+   # since some shells expand escape sequences in "echo" arguments.
+-  CC_VERSION="`$CC $CC_VERSION_OPT 2>&1 | sed -e 's/\\\\/\\\\\\\\\\\\\\\\/g;s/^/\\\\t/;s/$/\\\\n/' | tr -d '\n'`"
++  CC_VERSION="`$CC $CC_VERSION_OPT 2>&1 | head -1 | sed -e 's/\\\\/\\\\\\\\\\\\\\\\/g;s/^/\\\\t/;s/$/\\\\n/' | tr -d '\n'`"
+   if test $? -eq 0; then
+     break
+   fi
+-- 
+2.40.1
+
diff --git a/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch b/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch
new file mode 100644
index 0000000000..cec0055284
--- /dev/null
+++ b/meta-gnome/recipes-gimp/gimp/gimp/0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch
@@ -0,0 +1,34 @@ 
+From c720df90dfe3a3e92e34bfb36a04cc792064a501 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 24 May 2023 22:39:02 -0700
+Subject: [PATCH] libtool: Do not add build time library paths to
+ LD_LIBRARY_PATH
+
+This does not serve much purpose on cross builds as it will add build
+time paths which are only useful when trying to run these tools from
+build area but when they are cross built this is not possible to run
+them like this.
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 134902c..068d74a 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5748,7 +5748,7 @@ func_exec_program ()
+ 	if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ 	  $ECHO "\
+     # Add our own library path to $shlibpath_var
+-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
++    $shlibpath_var=\"$shlibpath_var\"
+ 
+     # Some systems cannot cope with colon-terminated $shlibpath_var
+     # The second colon is a workaround for a bug in BeOS R4 sed
+-- 
+2.40.1
+
diff --git a/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb b/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
index 76825d96c5..7343036807 100644
--- a/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
+++ b/meta-gnome/recipes-gimp/gimp/gimp_2.10.34.bb
@@ -43,7 +43,9 @@  REQUIRED_DISTRO_FEATURES = "x11"
 
 SHPV = "${@gnome_verdir("${PV}")}"
 
-SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2"
+SRC_URI = "https://download.gimp.org/pub/${BPN}/v${SHPV}/${BP}.tar.bz2 \
+           file://0001-configure-Keep-first-line-of-compiler-version-string.patch \
+           file://0001-libtool-Do-not-add-build-time-library-paths-to-LD_LI.patch"
 SRC_URI[sha256sum] = "84004642d351b398a4293cd7fd3592044a944f05bb52850ee6068f247c657aa3"
 
 EXTRA_OECONF = "--disable-python \