added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
SUMMARY = "cdparanoia library"
DESCRIPTION = "library used to read audio CDs, which is able to perform \
error corrections, hence the name paranoia."
HOMEPAGE = "https://www.xiph.org/"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING-LGPL;md5=d370feaa1c9edcdbd29ca27ea3d2304d"
SRC_URI = "http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${PV}.src.tgz \
file://0001-Use-DESTDIR-in-install-Makefile-rule.patch \
file://0002-interface-remove-C-reserved-keyword.patch \
file://0003-Fix-missing-shared-object-LDFLAGS.patch \
file://dont-use-internal-configs.patch \
file://out-of-tree-build.patch \
file://0001-check-for-null-buffer-before-trying-a-byteswap.patch \
file://0002-Fix-printf-format-errors.patch \
file://0001-utils-Use-c99-compiler-independent-types.patch \
"
SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652"
SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df"
# Uppercase letters are not allowed in the recipe name, thus the recipe can not be named cdparanoia-III and
# we need to add the path to the extracted sources explicitely:
S = "${WORKDIR}/cdparanoia-III-${PV}"
# cdparanoia Makefile can not be used with several threads (because the static library target and the shared
# library target use object files which are compiled in the same directory, the object files are just removed
# between the compilation of those two targets)
PARALLEL_MAKE = ""
EXTRA_OECONF = "CC='${CC}' CFLAGS='${CFLAGS}'"
inherit autotools

View File

@@ -0,0 +1,70 @@
From 97c06ae955b270851f4fd2396c715f9c76591f37 Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
Date: Thu, 2 Apr 2015 10:15:08 +0200
Subject: [PATCH] Use DESTDIR in "install" Makefile rule
This change allows to perform installations in a sysroot folder, which is required e.g. by
the recipes inheriting yocto autotool class, and is an autotool standard:
make install DESTDIR=~/mysysroot
Upstream-Status: Inappropriate (the upstream project is dead)
Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
---
Makefile.in | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 3d235ad..df544c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -63,28 +63,28 @@ slib:
cd paranoia && $(MAKE) slib
install:
- $(INSTALL) -d -m 0755 $(BINDIR)
- $(INSTALL) -m 755 $(srcdir)/cdparanoia $(BINDIR)
- $(INSTALL) -d -m 0755 $(MANDIR)
- $(INSTALL) -d -m 0755 $(MANDIR)/man1
- $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1
- $(INSTALL) -d -m 0755 $(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR)
- $(INSTALL) -d -m 0755 $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/utils.h $(INCLUDEDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(srcdir)/cdparanoia $(DESTDIR)$(BINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR)
ln -fs libcdda_interface.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_interface.so.0
+ $(DESTDIR)$(LIBDIR)/libcdda_interface.so.0
ln -fs libcdda_interface.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_interface.so
+ $(DESTDIR)$(LIBDIR)/libcdda_interface.so
ln -fs libcdda_paranoia.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_paranoia.so.0
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so.0
ln -fs libcdda_paranoia.so.0.$(VERSION) \
- $(LIBDIR)/libcdda_paranoia.so
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so
cdparanoia: $(OFILES) $(LIBDEP)
$(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \
--
1.9.1

View File

@@ -0,0 +1,32 @@
From c760c5d31f2412a5be5ac6896e6069d1cea08527 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 26 Jun 2017 22:31:45 -0700
Subject: [PATCH 1/2] check for null buffer before trying a byteswap
Author: Monty <paranoia@xiph.org>
Patch from debian
http://sources.debian.net/src/cdparanoia/3.10.2%2Bdebian-11/debian/patches/04-endian.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface/interface.c b/interface/interface.c
index 526c2a9..763a0ea 100644
--- a/interface/interface.c
+++ b/interface/interface.c
@@ -118,7 +118,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector
if(d->bigendianp==-1) /* not determined yet */
d->bigendianp=data_bigendianp(d);
- if(d->bigendianp!=bigendianp()){
+ if(buffer && d->bigendianp!=bigendianp()){
int i;
u_int16_t *p=(u_int16_t *)buffer;
long els=sectors*CD_FRAMESIZE_RAW/2;
--
2.13.2

View File

@@ -0,0 +1,50 @@
From 89071cbc8d3ab9a15503f397580b7590338e5e91 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 12 Jul 2017 17:23:45 -0700
Subject: [PATCH] utils: Use c99 compiler independent types
Make it portable across different platforms
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
utils.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/utils.h b/utils.h
index 10dce58..73bba92 100644
--- a/utils.h
+++ b/utils.h
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <stdint.h>
extern long buffering_write(int outf, char *buffer, long num);
extern int buffering_close(int fd);
@@ -18,15 +19,15 @@ static inline int bigendianp(void){
}
static inline int32_t swap32(int32_t x){
- return((((u_int32_t)x & 0x000000ffU) << 24) |
- (((u_int32_t)x & 0x0000ff00U) << 8) |
- (((u_int32_t)x & 0x00ff0000U) >> 8) |
- (((u_int32_t)x & 0xff000000U) >> 24));
+ return((((uint32_t)x & 0x000000ffU) << 24) |
+ (((uint32_t)x & 0x0000ff00U) << 8) |
+ (((uint32_t)x & 0x00ff0000U) >> 8) |
+ (((uint32_t)x & 0xff000000U) >> 24));
}
static inline int16_t swap16(int16_t x){
- return((((u_int16_t)x & 0x00ffU) << 8) |
- (((u_int16_t)x & 0xff00U) >> 8));
+ return((((uint16_t)x & 0x00ffU) << 8) |
+ (((uint16_t)x & 0xff00U) >> 8));
}
#if BYTE_ORDER == LITTLE_ENDIAN
--
2.13.2

View File

@@ -0,0 +1,33 @@
From f4f81bdadb9515938b3b5d13707bd4b9322fd967 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 26 Jun 2017 22:37:13 -0700
Subject: [PATCH 2/2] Fix printf format errors
error: format not a string literal and no format arguments
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index 664acac..d568fb1 100644
--- a/main.c
+++ b/main.c
@@ -588,10 +588,10 @@ static void callback(long inpos, int function){
buffer[aheadposition+19]='>';
}
- fprintf(stderr,buffer);
+ fprintf(stderr, "%s", buffer);
if (logfile != NULL && function==-1) {
- fprintf(logfile,buffer+1);
+ fprintf(logfile, "%s", buffer+1);
fprintf(logfile,"\n\n");
fflush(logfile);
}
--
2.13.2

View File

@@ -0,0 +1,605 @@
From 12ea28398f8e5d4a4a23c62d511fc4f53584e51d Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
Date: Tue, 7 Apr 2015 11:07:56 +0200
Subject: [PATCH] interface: remove C++ reserved keyword
Because "private" was used in cdda_interface.h, this header file could not be
compiled in C++.
Upstream-Status: Inappropriate (the upstream project is dead)
Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
---
interface/cdda_interface.h | 2 +-
interface/cooked_interface.c | 8 +--
interface/interface.c | 8 +--
interface/scan_devices.c | 22 ++++----
interface/scsi_interface.c | 128 +++++++++++++++++++++----------------------
interface/test_interface.c | 4 +-
6 files changed, 86 insertions(+), 86 deletions(-)
diff --git a/interface/cdda_interface.h b/interface/cdda_interface.h
index 8487cb7..b738825 100644
--- a/interface/cdda_interface.h
+++ b/interface/cdda_interface.h
@@ -84,7 +84,7 @@ typedef struct cdrom_drive{
int is_atapi;
int is_mmc;
- cdda_private_data_t *private;
+ cdda_private_data_t *priv; /* private is a C++ reserved keyword */
void *reserved;
unsigned char inqbytes[4];
diff --git a/interface/cooked_interface.c b/interface/cooked_interface.c
index de29055..ea9d0fc 100644
--- a/interface/cooked_interface.c
+++ b/interface/cooked_interface.c
@@ -13,13 +13,13 @@
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
struct timespec tv1;
struct timespec tv2;
- int ret1=clock_gettime(d->private->clock,&tv1);
+ int ret1=clock_gettime(d->priv->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->priv->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->priv->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
diff --git a/interface/interface.c b/interface/interface.c
index e8a90cd..526c2a9 100644
--- a/interface/interface.c
+++ b/interface/interface.c
@@ -39,9 +39,9 @@ int cdda_close(cdrom_drive *d){
if(d->drive_model)free(d->drive_model);
if(d->cdda_fd!=-1)close(d->cdda_fd);
if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
- if(d->private){
- if(d->private->sg_hd)free(d->private->sg_hd);
- free(d->private);
+ if(d->priv){
+ if(d->priv->sg_hd)free(d->priv->sg_hd);
+ free(d->priv);
}
free(d);
@@ -127,7 +127,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector
}
}
}
- if(ms)*ms=d->private->last_milliseconds;
+ if(ms)*ms=d->priv->last_milliseconds;
return(sectors);
}
diff --git a/interface/scan_devices.c b/interface/scan_devices.c
index fc58110..5f6c4e3 100644
--- a/interface/scan_devices.c
+++ b/interface/scan_devices.c
@@ -264,11 +264,11 @@ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
d->interface=COOKED_IOCTL;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->priv=calloc(1,sizeof(*d->priv));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
}
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -674,15 +674,15 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device,
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
d->messagedest = messagedest;
- d->private=calloc(1,sizeof(*d->private));
+ d->priv=calloc(1,sizeof(*d->priv));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
}
if(use_sgio){
d->interface=SGIO_SCSI;
- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
+ d->priv->sg_buffer=(unsigned char *)(d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
g_fd=d->cdda_fd=dup(d->ioctl_fd);
}else{
version=verify_SG_version(d,messagedest,messages);
@@ -696,8 +696,8 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device,
}
/* malloc our big buffer for scsi commands */
- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+ d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
+ d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF;
}
{
@@ -772,9 +772,9 @@ cdda_identify_scsi_fail:
if(i_fd!=-1)close(i_fd);
if(g_fd!=-1)close(g_fd);
if(d){
- if(d->private){
- if(d->private->sg_hd)free(d->private->sg_hd);
- free(d->private);
+ if(d->priv){
+ if(d->priv->sg_hd)free(d->priv->sg_hd);
+ free(d->priv);
}
free(d);
}
@@ -821,7 +821,7 @@ cdrom_drive *cdda_identify_test(const char *filename, int messagedest,
d->interface=TEST_INTERFACE;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->priv=calloc(1,sizeof(*d->priv));
d->drive_model=copystring("File based test interface");
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
diff --git a/interface/scsi_interface.c b/interface/scsi_interface.c
index adbb9bf..75d90d4 100644
--- a/interface/scsi_interface.c
+++ b/interface/scsi_interface.c
@@ -15,13 +15,13 @@
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
struct timespec tv1;
struct timespec tv2;
- int ret1=clock_gettime(d->private->clock,&tv1);
+ int ret1=clock_gettime(d->priv->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->priv->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->priv->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
@@ -96,7 +96,7 @@ static void tweak_SG_buffer(cdrom_drive *d) {
static void clear_garbage(cdrom_drive *d){
fd_set fdset;
struct timeval tv;
- struct sg_header *sg_hd=d->private->sg_hd;
+ struct sg_header *sg_hd=d->priv->sg_hd;
int flag=0;
/* clear out any possibly preexisting garbage */
@@ -185,7 +185,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
struct timespec tv2;
int tret1,tret2;
int status = 0;
- struct sg_header *sg_hd=d->private->sg_hd;
+ struct sg_header *sg_hd=d->priv->sg_hd;
long writebytes=SG_OFF+cmd_len+in_size;
/* generic scsi device services */
@@ -195,7 +195,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
memset(sg_hd,0,sizeof(sg_hd));
memset(sense_buffer,0,SG_MAX_SENSE);
- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
+ memcpy(d->priv->sg_buffer,cmd,cmd_len+in_size);
sg_hd->twelve_byte = cmd_len == 12;
sg_hd->result = 0;
sg_hd->reply_len = SG_OFF + out_size;
@@ -209,7 +209,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
tell if the command failed. Scared yet? */
if(bytecheck && out_size>in_size){
- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
+ memset(d->priv->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
/* the size does not remove cmd_len due to the way the kernel
driver copies buffers */
writebytes+=(out_size-in_size);
@@ -243,7 +243,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
}
sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
- tret1=clock_gettime(d->private->clock,&tv1);
+ tret1=clock_gettime(d->priv->clock,&tv1);
errno=0;
status = write(d->cdda_fd, sg_hd, writebytes );
@@ -289,7 +289,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
}
}
- tret2=clock_gettime(d->private->clock,&tv2);
+ tret2=clock_gettime(d->priv->clock,&tv2);
errno=0;
status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
@@ -313,7 +313,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
if(bytecheck && in_size+cmd_len<out_size){
long i,flag=0;
for(i=in_size;i<out_size;i++)
- if(d->private->sg_buffer[i]!=bytefill){
+ if(d->priv->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -326,9 +326,9 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d,
errno=0;
if(tret1<0 || tret2<0){
- d->private->last_milliseconds=-1;
+ d->priv->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
+ d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
}
return(0);
}
@@ -347,7 +347,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
memset(&hdr,0,sizeof(hdr));
memset(sense,0,sizeof(sense));
- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
+ memcpy(d->priv->sg_buffer,cmd+cmd_len,in_size);
hdr.cmdp = cmd;
hdr.cmd_len = cmd_len;
@@ -355,7 +355,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
hdr.mx_sb_len = SG_MAX_SENSE;
hdr.timeout = 50000;
hdr.interface_id = 'S';
- hdr.dxferp = d->private->sg_buffer;
+ hdr.dxferp = d->priv->sg_buffer;
hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */
/* scary buffer fill hack */
@@ -400,7 +400,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
if(bytecheck && in_size<out_size){
long i,flag=0;
for(i=in_size;i<out_size;i++)
- if(d->private->sg_buffer[i]!=bytefill){
+ if(d->priv->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -412,7 +412,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d,
}
/* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
- /* d->private->last_milliseconds = hdr.duration; */
+ /* d->priv->last_milliseconds = hdr.duration; */
errno = 0;
return 0;
@@ -445,9 +445,9 @@ static int test_unit_ready(cdrom_drive *d){
handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
- key = d->private->sg_buffer[2] & 0xf;
- ASC = d->private->sg_buffer[12];
- ASCQ = d->private->sg_buffer[13];
+ key = d->priv->sg_buffer[2] & 0xf;
+ ASC = d->priv->sg_buffer[12];
+ ASCQ = d->priv->sg_buffer[13];
if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
return 1;
@@ -492,7 +492,7 @@ static int mode_sense_atapi(cdrom_drive *d,int size,int page){
if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
{
- unsigned char *b=d->private->sg_buffer;
+ unsigned char *b=d->priv->sg_buffer;
if(b[0])return(1); /* Handles only up to 256 bytes */
if(b[6])return(1); /* Handles only up to 256 bytes */
@@ -604,8 +604,8 @@ static int mode_select(cdrom_drive *d,int density,int secsize){
static unsigned int get_orig_sectorsize(cdrom_drive *d){
if(mode_sense(d,12,0x01))return(-1);
- d->orgdens = d->private->sg_buffer[4];
- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
+ d->orgdens = d->priv->sg_buffer[4];
+ return(d->orgsize = ((int)(d->priv->sg_buffer[10])<<8)+d->priv->sg_buffer[11]);
}
/* switch CDROM scsi drives to given sector size */
@@ -664,8 +664,8 @@ static int scsi_read_toc (cdrom_drive *d){
return(-4);
}
- first=d->private->sg_buffer[2];
- last=d->private->sg_buffer[3];
+ first=d->priv->sg_buffer[2];
+ last=d->priv->sg_buffer[3];
tracks=last-first+1;
if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
@@ -683,7 +683,7 @@ static int scsi_read_toc (cdrom_drive *d){
return(-5);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=i;
@@ -704,7 +704,7 @@ static int scsi_read_toc (cdrom_drive *d){
return(-2);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=0xAA;
@@ -738,7 +738,7 @@ static int scsi_read_toc2 (cdrom_drive *d){
}
/* copy to our structure and convert start sector */
- tracks = d->private->sg_buffer[1];
+ tracks = d->priv->sg_buffer[1];
if (tracks > MAXTRK) {
cderror(d,"003: CDROM reporting illegal number of tracks\n");
return(-3);
@@ -754,33 +754,33 @@ static int scsi_read_toc2 (cdrom_drive *d){
return(-5);
}
- d->disc_toc[i].bFlags = d->private->sg_buffer[10];
+ d->disc_toc[i].bFlags = d->priv->sg_buffer[10];
d->disc_toc[i].bTrack = i + 1;
d->disc_toc[i].dwStartSector= d->adjust_ssize *
- (((signed char)(d->private->sg_buffer[2])<<24) |
- (d->private->sg_buffer[3]<<16)|
- (d->private->sg_buffer[4]<<8)|
- (d->private->sg_buffer[5]));
+ (((signed char)(d->priv->sg_buffer[2])<<24) |
+ (d->priv->sg_buffer[3]<<16)|
+ (d->priv->sg_buffer[4]<<8)|
+ (d->priv->sg_buffer[5]));
}
d->disc_toc[i].bFlags = 0;
d->disc_toc[i].bTrack = i + 1;
- memcpy (&foo, d->private->sg_buffer+2, 4);
- memcpy (&bar, d->private->sg_buffer+6, 4);
+ memcpy (&foo, d->priv->sg_buffer+2, 4);
+ memcpy (&bar, d->priv->sg_buffer+6, 4);
d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
be32_to_cpu(bar));
d->disc_toc[i].dwStartSector= d->adjust_ssize *
- ((((signed char)(d->private->sg_buffer[2])<<24) |
- (d->private->sg_buffer[3]<<16)|
- (d->private->sg_buffer[4]<<8)|
- (d->private->sg_buffer[5]))+
+ ((((signed char)(d->priv->sg_buffer[2])<<24) |
+ (d->priv->sg_buffer[3]<<16)|
+ (d->priv->sg_buffer[4]<<8)|
+ (d->priv->sg_buffer[5]))+
- ((((signed char)(d->private->sg_buffer[6])<<24) |
- (d->private->sg_buffer[7]<<16)|
- (d->private->sg_buffer[8]<<8)|
- (d->private->sg_buffer[9]))));
+ ((((signed char)(d->priv->sg_buffer[6])<<24) |
+ (d->priv->sg_buffer[7]<<16)|
+ (d->priv->sg_buffer[8]<<8)|
+ (d->priv->sg_buffer[9]))));
d->cd_extra = FixupTOC(d,tracks+1);
@@ -817,7 +817,7 @@ static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -836,7 +836,7 @@ static int i_read_A8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -854,7 +854,7 @@ static int i_read_D4_10 (cdrom_drive *d, void *p, long begin, long sectors, unsi
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -872,7 +872,7 @@ static int i_read_D4_12 (cdrom_drive *d, void *p, long begin, long sectors, unsi
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -890,7 +890,7 @@ static int i_read_D5 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -908,7 +908,7 @@ static int i_read_D8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -922,7 +922,7 @@ static int i_read_mmc (cdrom_drive *d, void *p, long begin, long sectors, unsign
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -936,7 +936,7 @@ static int i_read_mmcB (cdrom_drive *d, void *p, long begin, long sectors, unsig
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -950,7 +950,7 @@ static int i_read_mmc2 (cdrom_drive *d, void *p, long begin, long sectors, unsig
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -964,7 +964,7 @@ static int i_read_mmc2B (cdrom_drive *d, void *p, long begin, long sectors, unsi
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -978,7 +978,7 @@ static int i_read_mmc3 (cdrom_drive *d, void *p, long begin, long sectors, unsig
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -992,7 +992,7 @@ static int i_read_mmc3B (cdrom_drive *d, void *p, long begin, long sectors, unsi
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1026,7 +1026,7 @@ static int i_read_msf (cdrom_drive *d, void *p, long begin, long sectors, unsign
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1039,7 +1039,7 @@ static int i_read_msf2 (cdrom_drive *d, void *p, long begin, long sectors, unsig
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1052,7 +1052,7 @@ static int i_read_msf3 (cdrom_drive *d, void *p, long begin, long sectors, unsig
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1275,7 +1275,7 @@ long scsi_read_msf3 (cdrom_drive *d, void *p, long begin,
static int count_2352_bytes(cdrom_drive *d){
long i;
for(i=2351;i>=0;i--)
- if(d->private->sg_buffer[i]!=(unsigned char)'\177')
+ if(d->priv->sg_buffer[i]!=(unsigned char)'\177')
return(((i+3)>>2)<<2);
return(0);
@@ -1284,7 +1284,7 @@ static int count_2352_bytes(cdrom_drive *d){
static int verify_nonzero(cdrom_drive *d){
long i,flag=0;
for(i=0;i<2352;i++)
- if(d->private->sg_buffer[i]!=0){
+ if(d->priv->sg_buffer[i]!=0){
flag=1;
break;
}
@@ -1625,7 +1625,7 @@ static int check_mmc(cdrom_drive *d){
d->is_mmc=0;
if(mode_sense(d,22,0x2A)==0){
- b=d->private->sg_buffer;
+ b=d->priv->sg_buffer;
b+=b[3]+4;
if((b[0]&0x3F)==0x2A){
@@ -1673,7 +1673,7 @@ unsigned char *scsi_inquiry(cdrom_drive *d){
cderror(d,"008: Unable to identify CDROM model\n");
return(NULL);
}
- return (d->private->sg_buffer);
+ return (d->priv->sg_buffer);
}
int scsi_init_drive(cdrom_drive *d){
@@ -1742,8 +1742,8 @@ int scsi_init_drive(cdrom_drive *d){
check_cache(d);
d->error_retry=1;
- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+ d->priv->sg_hd=realloc(d->priv->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+ d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF;
d->report_all=1;
return(0);
}
diff --git a/interface/test_interface.c b/interface/test_interface.c
index 11bec25..e1cefaa 100644
--- a/interface/test_interface.c
+++ b/interface/test_interface.c
@@ -66,9 +66,9 @@ static long test_read(cdrom_drive *d, void *p, long begin, long sectors){
if(!fd)fd=fdopen(d->cdda_fd,"r");
if(begin<lastread)
- d->private->last_milliseconds=20;
+ d->priv->last_milliseconds=20;
else
- d->private->last_milliseconds=sectors;
+ d->priv->last_milliseconds=sectors;
#ifdef CDDA_TEST_UNDERRUN
sectors-=1;
--
1.9.1

View File

@@ -0,0 +1,42 @@
From c0b77aeb2127da821ae1c03c2f98aaf4db65277d Mon Sep 17 00:00:00 2001
From: Carlos Rafael Giani <dv@pseudoterminal.org>
Date: Sat, 10 Sep 2016 21:15:18 +0200
Subject: [PATCH] Fix missing shared object LDFLAGS
Upstream-Status: Inappropriate (the upstream project is dead)
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
interface/Makefile.in | 2 +-
paranoia/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/interface/Makefile.in b/interface/Makefile.in
index 40c6098..020bf2a 100644
--- a/interface/Makefile.in
+++ b/interface/Makefile.in
@@ -46,7 +46,7 @@ libcdda_interface.a: $(OFILES)
$(RANLIB) libcdda_interface.a
libcdda_interface.so: $(OFILES)
- $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES) $(LIBS)
+ $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(LDFLAGS) $(OFILES) $(LIBS)
[ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0
[ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so
diff --git a/paranoia/Makefile.in b/paranoia/Makefile.in
index 89d0328..ffb4e70 100644
--- a/paranoia/Makefile.in
+++ b/paranoia/Makefile.in
@@ -44,7 +44,7 @@ libcdda_paranoia.a: $(OFILES)
$(RANLIB) libcdda_paranoia.a
libcdda_paranoia.so: $(OFILES)
- $(CC) -fpic -shared -o libcdda_paranoia.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_paranoia.so.0 $(OFILES) -L ../interface -lcdda_interface
+ $(CC) -fpic -shared -o libcdda_paranoia.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_paranoia.so.0 $(LDFLAGS) $(OFILES) -L ../interface -lcdda_interface
[ -e libcdda_paranoia.so.0 ] || ln -s libcdda_paranoia.so.0.$(VERSION) libcdda_paranoia.so.0
[ -e libcdda_paranoia.so ] || ln -s libcdda_paranoia.so.0.$(VERSION) libcdda_paranoia.so
--
2.7.4

View File

@@ -0,0 +1,35 @@
Fix build on aarch64
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: cdparanoia-III-10.2/configure.in
===================================================================
--- cdparanoia-III-10.2.orig/configure.in
+++ cdparanoia-III-10.2/configure.in
@@ -1,13 +1,8 @@
AC_INIT(interface/interface.c)
-cp $srcdir/configure.guess $srcdir/config.guess
-cp $srcdir/configure.sub $srcdir/config.sub
-
AC_CANONICAL_HOST
-if test -z "$CC"; then
- AC_PROG_CC
-fi
+AC_PROG_CC
AC_PROG_RANLIB
AC_CHECK_PROG(AR,ar,ar)
AC_CHECK_PROG(INSTALL,install,install)
@@ -44,8 +39,8 @@ case 4 in
$ac_cv_sizeof_long) SIZE32="long";;
esac
-AC_CHECK_TYPE(int16_t,SIZE16="int16_t",,)
-AC_CHECK_TYPE(int32_t,SIZE32="size32_t",,)
+AC_CHECK_TYPES([int16_t], [SIZE16="int16_t"], [], [[#include <stdint.h>]])
+AC_CHECK_TYPES([int32_t], [SIZE32="int32_t"], [], [[#include <stdint.h>]])
if test -z "$SIZE16"; then
AC_MSG_ERROR(No 16 bit type found on this platform!)

View File

@@ -0,0 +1,47 @@
Fix build out of tree builds
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: cdparanoia-III-10.2/Makefile.in
===================================================================
--- cdparanoia-III-10.2.orig/Makefile.in
+++ cdparanoia-III-10.2/Makefile.in
@@ -6,6 +6,8 @@
VERSION=10.2
VPATH=@srcdir@
srcdir=@srcdir@
+top_srcdir=@top_srcdir@
+top_builddir=@top_builddir@
@SET_MAKE@
FLAGS=@TYPESIZES@ @CFLAGS@
@@ -64,19 +66,19 @@ slib:
install:
$(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 $(srcdir)/cdparanoia $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(top_builddir)/cdparanoia $(DESTDIR)$(BINDIR)
$(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)
$(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)/man1
- $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(top_srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1
$(INSTALL) -d -m 0755 $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(top_srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(top_builddir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(top_builddir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(top_srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 0644 $(top_builddir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(top_builddir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $(top_srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR)
ln -fs libcdda_interface.so.0.$(VERSION) \
$(DESTDIR)$(LIBDIR)/libcdda_interface.so.0
ln -fs libcdda_interface.so.0.$(VERSION) \