openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [meta-oe][mickledore][PATCH 33/36] libgphoto2: Edit out sysroot from CC variable in configure
Date: Wed, 31 May 2023 07:13:06 -0400	[thread overview]
Message-ID: <20230531111309.2454603-33-akuster808@gmail.com> (raw)
In-Reply-To: <20230531111309.2454603-1-akuster808@gmail.com>

From: Khem Raj <raj.khem@gmail.com>

Configure emits HAVE_CC variable to be used in sourcecode and its built
from CC env var, CC in OE contains buildpaths in --sysroot option,
therefore edit this option out in configure.ac itself and remove all
other workarounds to fix this issue in recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit c0a344ab713d213933d59875f74ce89612c877c3)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...figure-Filter-out-buildpaths-from-CC.patch | 48 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.30.bb              |  7 +--
 2 files changed, 49 insertions(+), 6 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch

diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch b/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
new file mode 100644
index 0000000000..570bb3e4c1
--- /dev/null
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
@@ -0,0 +1,48 @@
+From 06be633b8f4e2241bd37d4faf62b49606ad778e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 25 May 2023 19:01:36 -0700
+Subject: [PATCH] configure: Filter out buildpaths from CC
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                 | 4 +++-
+ libgphoto2_port/configure.ac | 6 ++++--
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17216b1..39c8cc4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -261,7 +261,9 @@ GP_CONFIG_MSG([Compiler],[${CC}])
+ GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
+ GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
+ 
+-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
++CC_NO_SYSROOT=`echo $CC | sed -e \
++		's|--sysroot=.*\b||g'`
++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
+                    [The C compiler we are using])
+ 
+ 
+diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac
+index 1086b8e..59f3c34 100644
+--- a/libgphoto2_port/configure.ac
++++ b/libgphoto2_port/configure.ac
+@@ -103,8 +103,10 @@ GP_CONFIG_MSG([Compiler],[${CC}])
+ GP_CONFIG_MSG([libltdl includes],[$LTDLINCL])
+ GP_CONFIG_MSG([libltdl library],[$LIBLTDL])
+ 
+-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"],
+-                   [The C compiler we're using])
++CC_NO_SYSROOT=`echo $CC | sed -e \
++		's|--sysroot=.*\b||g'`
++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"],
++                   [The C compiler we are using])
+ 
+ AM_CPPFLAGS=""
+ 
+-- 
+2.40.1
+
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
index 0f2800a95f..b1fb7579ee 100644
--- a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.30.bb
@@ -12,6 +12,7 @@ DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
 SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
            file://40-libgphoto2.rules \
            file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
+           file://0001-configure-Filter-out-buildpaths-from-CC.patch \
 "
 SRC_URI[libgphoto2.sha256sum] = "ee61a1dac6ad5cf711d114e06b90a6d431961a6e7ec59f4b757a7cd77b1c0fb4"
 
@@ -32,12 +33,6 @@ do_configure:append() {
     cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/libgphoto2_port/po/
     cd ${S}/libgphoto2_port/
     autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-
-    # remove WORKDIR information from config to improve reproducibility
-    # libgphoto2_port recheck config will set the WORKDIR info again, so dont do that
-    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h
-    sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/libgphoto2_port/config.status
-    sed -i '/config\.status/ s/\-\-recheck//' ${B}/libgphoto2_port/Makefile
     cd ${S}
 }
 
-- 
2.25.1



  parent reply	other threads:[~2023-05-31 11:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 11:12 [meta-oe][mickledore][PATCH 01/36] libencode-perl: Remove buildpaths from generated .exh files Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 02/36] frr: add CVE_PRODUCT Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 03/36] enca: Remove buildpaths from target scripts Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 04/36] libirecovery: Add missing build dependency on readline Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 05/36] fftw: Remove hardcoded sysroot into binaries Armin Kuster
2023-06-07  7:53   ` [oe] " Böszörményi Zoltán
2023-06-07  8:09     ` Khem Raj
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 06/36] lmdb: Pass CFLAGS to Makefile Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 07/36] postgresql: upgrade 15.2 -> 15.3 Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 08/36] ipmitool: Update links Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 09/36] minicoredumper: correct the sysvinit service file attribute Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 10/36] php: upgrade 8.2.5 -> 8.2.6 Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 11/36] php: Remove buildpaths from scripts and generated headers Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 12/36] libusbgx: drop hard-coded /usr/bin,/etc Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 13/36] libusbgx: check scripts in /etc/usbgx.d Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 14/36] uw-imap: Pass CFLAGS from environment Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 15/36] libmad: Add a patch to pass cflags to build Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 16/36] libpeas: Fix reference to TMPDIR in tests Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 17/36] lirc: Define SH_PATH=/bin/sh Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 18/36] mce-inject: Pass CFLAGS to make Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 19/36] nbdkit: Remove buildpaths from binaries Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 20/36] mpv: Remove references to builddir from mpv binary Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 21/36] libnice: Remove buildpaths from binaries Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 22/36] curlpp: Remove references to buildpaths e.g. TMPDIR Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 23/36] unbound: Remove references to buildpaths Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 24/36] uml-utilities: Fix references to TMPDIR Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 25/36] openct: Fix buildpaths being emitted into generated types.h Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 26/36] minifi-cpp: Remove references to buildpaths in generated files Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 27/36] freerdp: Fix reference to TMPDIR in libfreerdp2.so Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 28/36] nautilus: upgrade 44.0 -> 44.1 Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 29/36] nautilus: Fix buildpath QA errors Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 30/36] cgdb: Fix buildpaths emitted into cgdb binary Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 31/36] ibus: Point python interpreter to target location Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 32/36] gimp: Fix buildpaths in binaries and scripts Armin Kuster
2023-05-31 11:13 ` Armin Kuster [this message]
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 34/36] vlan: Pass CFLAGS via CCFLAGS Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 35/36] sgpio: Pass CFLAGS to make Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 36/36] x265: Pass --debug-prefix-map to nasm Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230531111309.2454603-33-akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).