diff mbox series

[meta-oe,2/2] gphoto2: Strip --sysroot out of emitted compiler string into binaries

Message ID 20250806034926.3195325-2-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/2] libgphoto2: Upgrade to 2.5.32 | expand

Commit Message

Khem Raj Aug. 6, 2025, 3:49 a.m. UTC
Update patch status
Substitute hardcoding with BP in SRC_URI
Drop sed kludge

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ototypes-of-callbacks-with-libgphoto.patch |  2 +-
 ...figure-Filter-out-buildpaths-from-CC.patch | 26 +++++++++++++++++++
 .../gphoto2/gphoto2_2.5.28.bb                 |  7 ++---
 3 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch
index abe38e12ce..e0c3de469a 100644
--- a/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch
+++ b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch
@@ -8,7 +8,7 @@  we tried to fix by using pthread_t but it also needs to make changes in
 libgphoto and these changes can be invasive, therefore lets revert to
 older types and to fix musl problem fix it via type casts
 
-Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/569]
+Upstream-Status: Backport [https://github.com/gphoto/gphoto2/pull/569]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  gphoto2/main.c | 8 ++++----
diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
new file mode 100644
index 0000000000..3d54d58e18
--- /dev/null
+++ b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch
@@ -0,0 +1,26 @@ 
+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(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,9 @@ AC_PROG_INSTALL
+ AC_SYS_LARGEFILE
+ 
+ GP_CONFIG_MSG([Compiler],[${CC}])
+-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're using])
+ 
+ dnl AC_STRUCT_TIMEZONE
+ 
diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
index 63993bfbeb..40409ed388 100644
--- a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
+++ b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
@@ -6,10 +6,11 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 DEPENDS = "libgphoto2 popt readline"
 RDEPENDS:gphoto2 = "libgphoto2"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \
+SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.bz2;name=gphoto2 \
            file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
            file://0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch \
            file://0001-Match-prototypes-of-callbacks-with-libgphoto.patch \
+           file://0001-configure-Filter-out-buildpaths-from-CC.patch \
 "
 SRC_URI[gphoto2.sha256sum] = "2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375"
 
@@ -18,7 +19,3 @@  inherit autotools pkgconfig gettext
 EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
                  --without-cdk \
 "
-
-do_compile:prepend() {
-	sed -i -e 's/--sysroot=[^ "]*//g' ${B}/config.h
-}