Skip to contentSkip to conversation

libgphoto2: Upgrade to 2.5.32

PATCH New Khem Raj 1 participant 2 messages Aug 6, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 libgphoto2: Upgrade to 2.5.32

Use xz for archive and drop upstreamed patch

---
 .../libgphoto2/fix-build-with-gcc-14.patch    | 36 -------------------
 ...gphoto2_2.5.31.bb => libgphoto2_2.5.32.bb} |  5 ++-
 2 files changed, 2 insertions(+), 39 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch
 rename meta-oe/recipes-graphics/gphoto2/{libgphoto2_2.5.31.bb => libgphoto2_2.5.32.bb} (85%)
meta-oe/recipes-graphics/gphoto2/libgphoto2/fix-build-with-gcc-14.patch deleted +0 -36
deleted file mode 100644
index 0c2a8d4bd0..0000000000
@@ -1,36 +0,0 @@
-From 721f7f8c3ec8058d504607873e4c317aac0c99c5 Mon Sep 17 00:00:00 2001
-From: Marcus Meissner <[email protected]>
-Date: Mon, 4 Dec 2023 13:26:08 +0100
-Subject: [PATCH] align outlen length with jpeg jeaders. fixes
- https://github.com/gphoto/libgphoto2/issues/941
-
----
-Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/721f7f8c3ec8058d504607873e4c317aac0c99c5]
-
- camlibs/ptp2/chdk.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c
-index e1d898f378..e775ea1d4b 100644
---- a/camlibs/ptp2/chdk.c
-+++ b/camlibs/ptp2/chdk.c
-@@ -1150,7 +1150,7 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
- 	struct		jpeg_error_mgr jerr;
- 	JSAMPROW	row_ptr[1];
- 	uint8_t		*outbuf = NULL, *tmprowbuf = NULL;
--	uint64_t	outlen = 0;
-+	unsigned long	outlen = 0;
- 	unsigned int	row_inc;
- 	int		sshift, dshift, xshift, skip;
- 
-@@ -1161,8 +1161,8 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
- 		sshift = 6;
- 		dshift = (width/height > 2) ? 6 : 12;
- 		xshift = 4;
--	/* Digic 6 cameras: 8 bit per element UYVY,
--	 * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
-+		/* Digic 6 cameras: 8 bit per element UYVY,
-+		 * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
- 	} else {
- 		row_inc = buf_width*2;
- 		sshift = 4;
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.32.bb renamed from meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb +2 -3
similarity index 85%
rename from meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.31.bb
rename to meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.32.bb
index 0b58e8e75f..0fe2feca6e 100644
@@ -9,12 +9,11 @@ DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
 #  libgphoto2-2.5.8/packaging/generic$ qemu-arm -s 1048576 -r 2.6.24 -L /OE/angstrom-dev/staging/armv5te-angstrom-linux-gnueabi/ .libs/print-camera-list
 # They are release specific, so please regen when adding new releases
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 \
+SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://40-libgphoto2.rules \
            file://0001-configure-Filter-out-buildpaths-from-CC.patch \
-           file://fix-build-with-gcc-14.patch \
 "
-SRC_URI[libgphoto2.sha256sum] = "4f81c34c0b812bee67afd5f144940fbcbe01a2055586a6a1fa2d0626024a545b"
+SRC_URI[libgphoto2.sha256sum] = "495a347be21b8f970607a81e739aa91513a8479cbd73b79454a339c73e2b860e"
 
 inherit autotools pkgconfig gettext lib_package
 
author
#1 lore raw

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

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

---
 ...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
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch +1 -1
index abe38e12ce..e0c3de469a 100644
@@ -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 <[email protected]>
 ---
  gphoto2/main.c | 8 ++++----
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch new file +26 -0
new file mode 100644
index 0000000000..3d54d58e18
@@ -0,0 +1,26 @@
+From 06be633b8f4e2241bd37d4faf62b49606ad778e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+ 
meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb +2 -5
index 63993bfbeb..40409ed388 100644
@@ -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
-}