mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/libcdio: added extra/libcdio
This commit is contained in:
parent
fd38b4289b
commit
2ba3412b90
4 changed files with 178 additions and 0 deletions
16
extra/libcdio/.SRCINFO
Normal file
16
extra/libcdio/.SRCINFO
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
pkgbase = libcdio
|
||||||
|
pkgdesc = GNU Compact Disc Input and Control Library
|
||||||
|
pkgver = 2.1.0
|
||||||
|
pkgrel = 4
|
||||||
|
url = https://www.gnu.org/software/libcdio/
|
||||||
|
arch = x86_64
|
||||||
|
license = GPL3
|
||||||
|
makedepends = git
|
||||||
|
makedepends = help2man
|
||||||
|
depends = ncurses
|
||||||
|
depends = gcc-libs
|
||||||
|
source = git+https://git.savannah.gnu.org/git/libcdio.git#commit=9c7a2779846da161279bc1501e83c849cf89a594
|
||||||
|
validpgpkeys = DAA63BC2582034A02B923D521A8DE5008275EC21
|
||||||
|
sha256sums = SKIP
|
||||||
|
|
||||||
|
pkgname = libcdio
|
64
extra/libcdio/PKGBUILD
Normal file
64
extra/libcdio/PKGBUILD
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||||
|
# Contributor: damir <damir@archlinux.org>
|
||||||
|
|
||||||
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
# - patch from Gentoo and set -D_FILE_OFFSET_BITS=64 to fix 32bit FTBFS
|
||||||
|
|
||||||
|
pkgname=libcdio
|
||||||
|
pkgver=2.1.0
|
||||||
|
pkgrel=4
|
||||||
|
pkgdesc="GNU Compact Disc Input and Control Library"
|
||||||
|
url="https://www.gnu.org/software/libcdio/"
|
||||||
|
arch=(x86_64)
|
||||||
|
license=(GPL3)
|
||||||
|
depends=(ncurses gcc-libs)
|
||||||
|
makedepends=(git help2man)
|
||||||
|
_commit=9c7a2779846da161279bc1501e83c849cf89a594 # tags/release-2.1.0
|
||||||
|
source=("git+https://git.savannah.gnu.org/git/libcdio.git#commit=$_commit"
|
||||||
|
"libcdio-2.1.0-no-lfs-shims.patch")
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'c52c1af97c6ba8f6b0bd70020479bffa966ea3d5569f8977354b8bd893d79f9f')
|
||||||
|
validpgpkeys=('DAA63BC2582034A02B923D521A8DE5008275EC21') # R. Bernstein
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd $pkgname
|
||||||
|
git describe --tags | sed 's/^release-//;s/[^-]*-g/r&/;s/-/+/g'
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd $pkgname
|
||||||
|
|
||||||
|
# Format security
|
||||||
|
git cherry-pick -n 2adb43c60afc6e98e94d86dad9f93d3df52862b1
|
||||||
|
|
||||||
|
# realpath test failure
|
||||||
|
git cherry-pick -n 56335fff0f21d294cd0e478d49542a43e9495ed0
|
||||||
|
|
||||||
|
# gentoo patch for 32bit
|
||||||
|
patch -p1 -i ../libcdio-2.1.0-no-lfs-shims.patch
|
||||||
|
|
||||||
|
autoreconf -fvi
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $pkgname
|
||||||
|
CPPFLAGS+=' -D_FILE_OFFSET_BITS=64'
|
||||||
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
|
||||||
|
--disable-vcd-info --disable-cddb --enable-cpp-progs --disable-static \
|
||||||
|
--enable-maintainer-mode
|
||||||
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd $pkgname
|
||||||
|
make -C test check
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd $pkgname
|
||||||
|
make DESTDIR="$pkgdir" install
|
||||||
|
|
||||||
|
sed -e "/define CDIO_LIBCDIO_SOURCE_PATH/s|.*|/* #undef CDIO_LIBCDIO_SOURCE_PATH */|" \
|
||||||
|
-i "$pkgdir/usr/include/cdio/cdio_config.h"
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQGiBDs1Z2QRBAClcQILf2cKYMjwgEaQ8wg0smWsfEsit1YEjW0w+PTp67Uz7xSR
|
||||||
|
MhpHGw2vhxT0aStf7SuGJfHTxfte35kEjExNZiaqw1DN/TsOJriLrO10kpbFx8El
|
||||||
|
JIAuhdMhrNoOPrAXUTw6QFijuJZqWzCdwDOlqVcNsZxFMf+AwrLOt6tAvwCgpcZS
|
||||||
|
NLneNOiohbBioaMwkWDmXmsD+gKS+Gq4OANc4x5WjOoYFK+CK2pJhWCIQV9ZL2Gt
|
||||||
|
j/KnoZMR4MdgMaiD5kBpxEJ6FWJa4l5DyA7zq+h2EzlskFAOV2dKSpS1CSOSiGBE
|
||||||
|
8v+J3zhgycz5jWDNBfxY8pCX7ClIItbdGDVt8zQr7bXsS19a5kcKeh7+B+QknqoV
|
||||||
|
YV93A/0b2beR9NOtIrsGvLH8qno7t+CTlwFgBluvSFz/ogxekSl7K11Hgvj8sr/s
|
||||||
|
vBDjPQMSBMI/qs1zSF6YqxaNDWhPLxKJ/ffbo+iRWsq1KHcXsVbxxTNVg4VHKpG3
|
||||||
|
dPZZcomNrdkb515uj5qzyLXG2efisabCWzod4AFnNnQNDMQmaLQeUi4gQmVybnN0
|
||||||
|
ZWluIDxyb2NreUBwYW5peC5jb20+iF8EExECABcFAjs1Z2QFCwcKAwQDFQMCAxYC
|
||||||
|
AQIXgAASCRAajeUAgnXsIQdlR1BHAAEBBnUAniXZlR6mCoYGcSV/oFchS2BXCt0G
|
||||||
|
AJ9gy3XxBcfEvlbtEIy1oYaVOrUJr7kBDQQ7NWdnEAQAnFH06nA/UiLsjbwG7lmw
|
||||||
|
B9xUhSuNziXQkhllD9HPFYCRL+C2JWUcRhb/TUdA9T3EiT40iXbZ9mBztZlTN3oQ
|
||||||
|
NSx3mJ2/FR2Tv2ueRHFLuT823rPi1uFBM7ExNfhglaytFCKdU46mhSUnq050mqvm
|
||||||
|
JRa2N6of5SAfbj0qGRFfCFMAAwUD/RTGkQyd6FZbGQMUWl8MVk5cCk/FLkeLc1NS
|
||||||
|
kgsObO2hvFZ0HHCdJ5mu95oyzsWgEZK6CjhXHKYRYYcXcpV+EkurE+S0jIzSfk7H
|
||||||
|
bgtPFLnFg/w/Kjtu8pW8dfrzsuqXbXHWSdjMkq6K0WZJnzCPlg4+tUmBrosBnnYg
|
||||||
|
Dv/8xJ9riE4EGBECAAYFAjs1Z2cAEgkQGo3lAIJ17CEHZUdQRwABAfEwAJsGJxJM
|
||||||
|
hqduAFvJLfI3kxC9ChdkXwCcDf1kl8pbyhvtB4Nh2q37IJcF2a4=
|
||||||
|
=XDjr
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
75
extra/libcdio/libcdio-2.1.0-no-lfs-shims.patch
Normal file
75
extra/libcdio/libcdio-2.1.0-no-lfs-shims.patch
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
From https://bugs.gentoo.org/918988
|
||||||
|
From: Alfred Wingate <parona@protonmail.com>
|
||||||
|
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 <parona@protonmail.com>
|
||||||
|
--- 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 <io.h>
|
||||||
|
-#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
|
||||||
|
|
Loading…
Reference in a new issue