gphoto2: update to 2.5.32

Fixes compilation with GCC15.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-08-22 19:22:08 -07:00
committed by Tianling Shen
parent 490653e0f0
commit c652fb04c5
4 changed files with 4 additions and 148 deletions

View File

@@ -9,18 +9,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gphoto2
PKG_VERSION:=2.5.28
PKG_RELEASE:=2
PKG_VERSION:=2.5.32
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/gphoto
PKG_HASH:=2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375
PKG_HASH:=4e379a0f12f72b49ee5ee2283ffd806b5d12d099939d75197a3f4bbc7f27a1a1
PKG_MAINTAINER:=Leonardo Medici <leonardo_medici@me.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
@@ -32,7 +31,7 @@ define Package/gphoto2
CATEGORY:=Multimedia
TITLE:=Gphoto Digital Camera Control
URL:=http://www.gphoto.org/
DEPENDS:=+libgphoto2 +libpopt +libpthread +libreadline +libncurses +libexif +libjpeg
DEPENDS:=+libgphoto2 +libpopt +libreadline +libncurses +libexif +libjpeg
endef
define Package/gphoto2/description

View File

@@ -1,66 +0,0 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging po tests
+SUBDIRS = gphoto-m4 contrib doc gphoto2 packaging tests
ACLOCAL_AMFLAGS = -I auto-m4 -I gphoto-m4
EXTRA_DIST = README.md
--- a/configure.ac
+++ b/configure.ac
@@ -46,11 +46,8 @@ dnl i18n support
dnl ---------------------------------------------------------------------------
GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}])
ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
-AM_PO_SUBDIRS()
AM_GNU_GETTEXT_VERSION([0.14.1])
-AM_GNU_GETTEXT([external])
AM_ICONV()
-GP_GETTEXT_FLAGS()
dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
dnl we require make to do insert the proper $(datadir) value
@@ -80,7 +77,7 @@ AC_CHECK_LIB(m,floor)
dnl ---------------------------------------------------------------------------
-dnl pthread: The gphoto2 shell (--shell) keeps up a connection to the
+dnl pthread: The gphoto2 shell (--shell) keeps up a connection to the
dnl camera. Some cameras need to be sent keep-alive-messages
dnl in order to prevent a shut-down. This is what we need
dnl pthread for.
@@ -97,7 +94,7 @@ if $try_pthread; then
AC_DEFINE(HAVE_PTHREAD,1,[Define if we use pthread.h.])
pthread_msg="yes (-lpthread)"
PTHREAD_LIBS="-lpthread"],[
- AC_CHECK_LIB(c_r, pthread_create, [
+ AC_CHECK_LIB(c_r, pthread_create, [
AC_DEFINE(HAVE_PTHREAD,1,[Define if we use pthread.h.])
pthread_msg="yes (-pthread)"
PTHREAD_LIBS="-pthread"
@@ -267,7 +264,7 @@ GP_CONFIG_MSG([JPEG support],[$jpeg_msg]
dnl ---------------------------------------------------------------------------
dnl libexif: The CameraFilesystem can use libexif for extracting thumbnails
dnl out of EXIF data. Similarly, it can extract the mtime of
-dnl a file.
+dnl a file.
dnl libexif is available from
dnl http://www.sourceforge.net/projects/libexif
dnl ---------------------------------------------------------------------------
@@ -327,7 +324,7 @@ AC_MSG_ERROR([pkg-config could not find
dnl ---------------------------------------------------------------------------
dnl readline: Readline is pretty cool - it allows you to use <tab> to complete
-dnl commands in the gphoto2 shell or to use <up> or <down> to
+dnl commands in the gphoto2 shell or to use <up> or <down> to
dnl navigate through the history.
dnl ---------------------------------------------------------------------------
rl_msg="no (http://cnswww.cns.cwru.edu/~chet/readline/rltop.html)"
@@ -396,7 +393,6 @@ AC_SUBST([AM_LDFLAGS])
# Create output files
# ---------------------------------------------------------------------------
AC_CONFIG_FILES([
-po/Makefile.in
Makefile
gphoto2/Makefile
gphoto-m4/Makefile

View File

@@ -1,33 +0,0 @@
From ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 12:59:46 -0700
Subject: [PATCH] gphoto2: Use pthread_t abstract type for thead IDs
This is not a plain old datatype in every libc, e.g. with musl this
would fail in type conversion
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gphoto2/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/gphoto2/main.c
+++ b/gphoto2/main.c
@@ -1198,7 +1198,7 @@ thread_func (void *data)
pthread_cleanup_pop (1);
}
-static unsigned int
+static pthread_t
start_timeout_func (Camera *camera, unsigned int timeout,
CameraTimeoutFunc func, void __unused__ *data)
{
@@ -1219,7 +1219,7 @@ start_timeout_func (Camera *camera, unsi
}
static void
-stop_timeout_func (Camera __unused__ *camera, unsigned int id,
+stop_timeout_func (Camera __unused__ *camera, pthread_t id,
void __unused__ *data)
{
pthread_t tid = id;

View File

@@ -1,44 +0,0 @@
From 366930ccc1a261c3eb883da2bf3c655162ccd75f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 1 Mar 2023 22:58:37 -0800
Subject: [PATCH] Match prototypes of callbacks with libgphoto
In https://github.com/gphoto/gphoto2/pull/535/commits/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gphoto2/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/gphoto2/main.c
+++ b/gphoto2/main.c
@@ -1198,7 +1198,7 @@ thread_func (void *data)
pthread_cleanup_pop (1);
}
-static pthread_t
+static unsigned int
start_timeout_func (Camera *camera, unsigned int timeout,
CameraTimeoutFunc func, void __unused__ *data)
{
@@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsi
pthread_create (&tid, NULL, thread_func, td);
- return (tid);
+ return (unsigned int)tid;
}
static void
-stop_timeout_func (Camera __unused__ *camera, pthread_t id,
+stop_timeout_func (Camera __unused__ *camera, unsigned int id,
void __unused__ *data)
{
- pthread_t tid = id;
+ pthread_t tid = (pthread_t)id;
pthread_cancel (tid);
pthread_join (tid, NULL);