From 9389e99a0dc3ac12ce07315d070c4c64eb7232f4 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sun, 16 Mar 2025 22:37:29 -0700 Subject: [PATCH] libcdio: update to 2.2.0, fix build with gcc14 --- common/shlibs | 4 +- srcpkgs/libcdio/patches/gcc14.patch | 76 +++++++++++++++++++++++++++++ srcpkgs/libcdio/template | 8 +-- 3 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/libcdio/patches/gcc14.patch diff --git a/common/shlibs b/common/shlibs index b9c44f7969b..75b02c0a34d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -421,11 +421,11 @@ libtag_c.so.0 taglib-1.6.1_1 libfribidi.so.0 fribidi-0.19.2_1 liba52.so.0 liba52-0.7.4_1 libcddb.so.2 libcddb-1.3.2_1 -libiso9660.so.11 libcdio-2.0.0_1 +libiso9660.so.12 libcdio-2.2.0_1 libudf.so.0 libcdio-0.83_1 libcdio_cdda.so.2 libcdio-paranoia-10.2_1 libcdio_paranoia.so.2 libcdio-paranoia-10.2_1 -libiso9660++.so.0 libcdio-0.83_1 +libiso9660++.so.1 libcdio-2.2.0_1 libcdio++.so.1 libcdio-2.0.0_1 libcdio.so.19 libcdio-2.1.0_1 libmpcdec.so.5 libmpcdec-1.2.6_1 diff --git a/srcpkgs/libcdio/patches/gcc14.patch b/srcpkgs/libcdio/patches/gcc14.patch new file mode 100644 index 00000000000..f725d6b4295 --- /dev/null +++ b/srcpkgs/libcdio/patches/gcc14.patch @@ -0,0 +1,76 @@ +Source: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libcdio/files/libcdio-2.1.0-no-lfs-shims.patch + +From https://bugs.gentoo.org/918988 +From: Alfred Wingate +Date: Mon, 20 May 2024 22:02:08 +0300 +Subject: [PATCH] Do not use LFS shims, rely on _FILE_OFFSET_BITS=64 + +See https://savannah.gnu.org/bugs/?65751 and https://bugs.gentoo.org/918988 + +Setting _FILE_OFFSET_BITS=64 is enough to get the LFS interface, +using LFS shims is unnecessary on 64-bit systems and they may +not be available on 32-bit systems on glibc. + +Signed-off-by: Alfred Wingate +--- a/configure.ac ++++ b/configure.ac +@@ -547,10 +547,10 @@ AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH", + [Full path to libcdio top_sourcedir.]) + AC_SUBST(LIBCDIO_SOURCE_PATH) + +-AC_CHECK_FUNCS( [chdir drand48 fseeko fseeko64 ftruncate geteuid getgid \ +- getuid getpwuid gettimeofday lseek64 lstat memcpy memset mkstemp rand \ +- seteuid setegid snprintf setenv strndup unsetenv tzset sleep \ +- _stati64 usleep vsnprintf readlink realpath gmtime_r localtime_r] ) ++AC_CHECK_FUNCS( [chdir drand48 fseeko ftruncate geteuid getgid getuid \ ++ getpwuid gettimeofday lstat memcpy memset mkstemp rand seteuid \ ++ setegid snprintf setenv strndup unsetenv tzset sleep _stati64 \ ++ usleep vsnprintf readlink realpath gmtime_r localtime_r] ) + + # check for timegm() support + AC_CHECK_FUNC(timegm, AC_DEFINE(HAVE_TIMEGM,1, +--- a/lib/driver/_cdio_generic.c ++++ b/lib/driver/_cdio_generic.c +@@ -55,16 +55,6 @@ + #define PATH_MAX 4096 + #endif + +-/* If available and LFS is enabled, try to use lseek64 */ +-#if defined(HAVE_LSEEK64) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) +-#if defined(_MSC_VER) +-#include +-#endif +-#define CDIO_LSEEK lseek64 +-#else +-#define CDIO_LSEEK lseek +-#endif +- + /*! + Eject media -- there's nothing to do here. We always return -2. + Should we also free resources? +@@ -170,7 +160,7 @@ off_t + cdio_generic_lseek (void *user_data, off_t offset, int whence) + { + generic_img_private_t *p_env = user_data; +- return CDIO_LSEEK(p_env->fd, offset, whence); ++ return lseek(p_env->fd, offset, whence); + } + + /*! +--- a/lib/driver/_cdio_stdio.c ++++ b/lib/driver/_cdio_stdio.c +@@ -47,11 +47,7 @@ + #include "_cdio_stdio.h" + #include "cdio_assert.h" + +-/* On 32 bit platforms, fseek can only access streams of 2 GB or less. +- Prefer fseeko/fseeko64, that take a 64 bit offset when LFS is enabled */ +-#if defined(HAVE_FSEEKO64) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) +-#define CDIO_FSEEK fseeko64 +-#elif defined(HAVE_FSEEKO) ++#if defined(HAVE_FSEEKO) + #define CDIO_FSEEK fseeko + #else + #define CDIO_FSEEK fseek +-- +2.45.1 diff --git a/srcpkgs/libcdio/template b/srcpkgs/libcdio/template index 31cd4cc10c6..dd8748cdabf 100644 --- a/srcpkgs/libcdio/template +++ b/srcpkgs/libcdio/template @@ -1,16 +1,16 @@ # Template file for 'libcdio' pkgname=libcdio -version=2.1.0 +version=2.2.0 revision=1 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" makedepends="ncurses-devel libcddb-devel" short_desc="CD-ROM access library" maintainer="Orphaned " -license="GPL-3" +license="GPL-3.0-or-later" homepage="http://www.gnu.org/software/libcdio/" -distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.bz2" -checksum=8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b +distfiles="https://github.com/libcdio/libcdio/releases/download/${version}/libcdio-${version}.tar.gz" +checksum=1b6c58137f71721ddb78773432d26252ee6500d92d227d4c4892631c30ea7abb pre_configure() { autoreconf -fi