gphoto2: Strip --sysroot out of emitted compiler string into binaries

Update patch status
Substitute hardcoding with BP in SRC_URI
Drop sed kludge

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2025-08-05 19:46:05 -07:00
parent 90c47eb0a4
commit dffa7ccc68
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 29 additions and 6 deletions

View File

@ -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 ++++----

View File

@ -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

View File

@ -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
}