@@ -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 ++++----
new file mode 100644
@@ -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
+
@@ -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
-}
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