Sync from SUSE:SLFO:Main cdparanoia revision 6c13c937cb56dd038df2eac4fc6f07d3

This commit is contained in:
Adrian Schröter 2024-05-03 11:32:12 +02:00
commit eeb75c4122
13 changed files with 4833 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

158
010_build_system.patch Normal file
View File

@ -0,0 +1,158 @@
Fix build system to be usable by compiling shared libs as -fPIC and
using DESTDIR for installing. Patch by Samuli Suominen <ssuominen AT
gentoo.org> and Alexis Ballier <aballier AT gentoo.org>. See,
http://trac.xiph.org/ticket/1368 (upstream bug)
diff -ur cdparanoia-III-10.2.orig/interface/Makefile.in cdparanoia-III-10.2/interface/Makefile.in
--- cdparanoia-III-10.2.orig/interface/Makefile.in 2008-08-21 19:08:54.000000000 +0300
+++ cdparanoia-III-10.2/interface/Makefile.in 2009-06-20 20:43:39.000000000 +0300
@@ -10,6 +10,7 @@
FLAGS=@SBPCD_H@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ -DCDDA_TEST
+LIBFLAGS = -fPIC
CC=@CC@
LD=@CC@
LDFLAGS=@LDFLAGS@ $(FLAGS)
@@ -20,6 +21,8 @@
OFILES = scan_devices.o common_interface.o cooked_interface.o interface.o\
scsi_interface.o smallft.o toc.o test_interface.o
+LOFILES = scan_devices.lo common_interface.lo cooked_interface.lo interface.lo\
+ scsi_interface.lo smallft.lo toc.lo test_interface.lo
export VERSION
@@ -32,8 +35,7 @@
$(MAKE) libcdda_interface.a CFLAGS="$(OPT)"
slib:
- $(MAKE) lessmessy
- $(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic"
+ $(MAKE) libcdda_interface.so CFLAGS="$(OPT)"
[ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0
test:
@@ -45,14 +47,17 @@
$(AR) -r 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)
+libcdda_interface.so: $(LOFILES)
+ $(CC) $(LDFLAGS) $(LIBFLAGS) -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(LOFILES) $(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
.c.o:
$(CC) $(CFLAGS) -c $<
+%.lo: %.c
+ $(CC) $(CFLAGS) $(LIBFLAGS) -c $< -o $@
+
lessmessy:
-rm -f *.o core *~ *.out
diff -ur cdparanoia-III-10.2.orig/Makefile.in cdparanoia-III-10.2/Makefile.in
--- cdparanoia-III-10.2.orig/Makefile.in 2008-09-11 23:33:30.000000000 +0300
+++ cdparanoia-III-10.2/Makefile.in 2009-06-20 20:43:17.000000000 +0300
@@ -63,28 +63,28 @@
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) \
diff -ur cdparanoia-III-10.2.orig/paranoia/Makefile.in cdparanoia-III-10.2/paranoia/Makefile.in
--- cdparanoia-III-10.2.orig/paranoia/Makefile.in 2008-09-04 22:02:47.000000000 +0300
+++ cdparanoia-III-10.2/paranoia/Makefile.in 2009-06-20 20:43:39.000000000 +0300
@@ -11,6 +11,7 @@
FLAGS=@TYPESIZES@ @CFLAGS@
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@
+LIBFLAGS = -fPIC
CC=@CC@
LD=@CC@
LDFLAGS=@LDFLAGS@ $(FLAGS)
@@ -20,8 +21,9 @@
OFILES = paranoia.o p_block.o overlap.o gap.o isort.o
#TFILES = isort.t gap.t p_block.t paranoia.t
+LOFILES = paranoia.lo p_block.lo overlap.lo gap.lo isort.lo
-LIBS = ../interface/libcdda_interface.a -lm
+LIBS = ../interface/libcdda_interface.so -lm
export VERSION
all: lib slib
@@ -33,8 +35,7 @@
$(MAKE) libcdda_paranoia.a CFLAGS="$(OPT)"
slib:
- $(MAKE) lessmessy
- $(MAKE) libcdda_paranoia.so CFLAGS="$(OPT) -fpic"
+ $(MAKE) libcdda_paranoia.so CFLAGS="$(OPT)"
#test: $(TFILES)
#
@@ -43,14 +44,17 @@
$(AR) -r 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
+libcdda_paranoia.so: $(LOFILES)
+ $(CC) $(LDFLAGS) $(LIBSFLAGS) -shared -o libcdda_paranoia.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_paranoia.so.0 $(LOFILES) -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
.c.o:
$(CC) $(CFLAGS) -c $<
+%.lo: %.c
+ $(CC) $(CFLAGS) $(LIBFLAGS) -c $< -o $@
+
.c.t:
$(CC) -g -DTEST $(DEBUG) -o $@ $< $(LIBS)
$@

View File

@ -0,0 +1,26 @@
--- Makefile.in
+++ Makefile.in
@@ -41,8 +41,8 @@
all:
- cd interface && $(MAKE) all
- cd paranoia && $(MAKE) all
+ cd interface && $(MAKE) slib
+ cd paranoia && $(MAKE) slib
$(MAKE) cdparanoia CFLAGS="$(OPT)"
debug:
@@ -72,10 +72,10 @@
$(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)/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)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR)
ln -fs libcdda_interface.so.0.$(VERSION) \
$(DESTDIR)$(LIBDIR)/libcdda_interface.so.0

2
baselibs.conf Normal file
View File

@ -0,0 +1,2 @@
libcdda_interface0
libcdda_paranoia0

View File

@ -0,0 +1,356 @@
#!/bin/sh /usr/share/dpatch/dpatch-run
## 01-typos-and-spelling.dpatch by A Costa <agcosta@gis.net>
##
## DP: Fixes some typos and spelling mistakes.
@DPATCH@
================================================================================
--- cdparanoia-III-10.2/cdparanoia.1
+++ cdparanoia-III-10.2/cdparanoia.1
@@ -1,16 +1,17 @@
.TH CDPARANOIA 1 "11 Sep 2008"
.SH NAME
-cdparanoia 10.2 (Paranoia release III) \- an audio CD reading utility which includes extra data verification features
+cdparanoia \- an audio CD reading utility which includes extra data verification features
.SH SYNOPSIS
.B cdparanoia
.RB [ options ]
.B span
.RB [ outfile ]
+.RB | \-B
.SH DESCRIPTION
.B cdparanoia
-retrieves audio tracks from CDDA capable CDROM drives. The data can
+retrieves audio tracks from CDDA-capable CDROM drives. The data can
be saved to a file or directed to standard output in WAV, AIFF, AIFF-C
-or raw format. Most ATAPI, SCSI and several proprietary CDROM drive
+or raw format. Most ATAPI and SCSI and several proprietary CDROM drive
makes are supported;
.B cdparanoia
can determine if the target drive is CDDA capable.
@@ -69,7 +70,7 @@
.TP
.B \-p --output-raw
-Output headerless data as raw 16 bit PCM data with interleaved samples in host byte order. To force little or big endian byte order, use
+Output headerless data as raw 16-bit PCM data with interleaved samples in host byte order. To force little or big endian byte order, use
.B \-r
or
.B \-R
@@ -77,40 +78,46 @@
.TP
.B \-r --output-raw-little-endian
-Output headerless data as raw 16 bit PCM data with interleaved samples in LSB first byte order.
+Output headerless data as raw 16-bit PCM data with interleaved samples in LSB first byte order.
.TP
.B \-R --output-raw-big-endian
-Output headerless data as raw 16 bit PCM data with interleaved samples in MSB first byte order.
+Output headerless data as raw 16-bit PCM data with interleaved samples in MSB first byte order.
.TP
.B \-w --output-wav
Output data in Micro$oft RIFF WAV format (note that WAV data is always
-LSB first byte order).
+LSB-first byte order).
.TP
.B \-f --output-aiff
Output data in Apple AIFF format (note that AIFC data is
-always in MSB first byte order).
+always in MSB-first byte order).
.TP
.B \-a --output-aifc
Output data in uncompressed Apple AIFF-C format (note that AIFF-C data is
-always in MSB first byte order).
+always in MSB-first byte order).
.TP
.BI "\-B --batch "
-Cdda2wav-style batch output flag; cdparanoia will split the output
+Cdda2wav-style batch output flag;
+.B cdparanoia
+will split the output
into multiple files at track boundaries. Output file names are
prepended with 'track#.'
.TP
.B \-c --force-cdrom-little-endian
Some CDROM drives misreport their endianness (or do not report it at
-all); it's possible that cdparanoia will guess wrong. Use
+all); it's possible that
+.B cdparanoia
+will guess wrong. Use
.B \-c
-to force cdparanoia to treat the drive as a little endian device.
+to force
+.B cdparanoia
+to treat the drive as a little endian device.
.TP
.B \-C --force-cdrom-big-endian
@@ -122,7 +129,7 @@
.B n
sectors per read. This number can be misleading; the kernel will often
split read requests into multiple atomic reads (the automated Paranoia
-code is aware of this) or allow reads only wihin a restricted size
+code is aware of this) or allow reads only within a restricted size
range.
.B This option should generally not be used.
@@ -131,7 +138,7 @@
Force the interface backend to read from
.B device
rather than the first readable CDROM drive it finds. This can be used
-to specify devices of any valid interface type (ATAPI, SCSI or
+to specify devices of any valid interface type (ATAPI, SCSI, or
proprietary).
.TP
@@ -158,13 +165,13 @@
may be used with
.B \-d
to explicitly set both the SCSI cdrom and
-generic (sg) devices seperately. This option is only useful on
+generic (sg) devices separately. This option is only useful on
obsolete SCSI setups and when using the generic scsi (sg) driver.
.TP
.BI "\-S --force-read-speed " number
Use this option explicitly to set the read rate of the CD drive (where
-supported). This can reduce underruns on machines with slow disks, or
+supported). This can reduce underruns on machines which have slow disks, or
which are low on memory.
.TP
@@ -184,16 +191,19 @@
and catching a bit of the next track).
.B \-T
accounts for this behavior. Note that this option will cause
-cdparanoia to attempt to read sectors before or past the known user
+.B cdparanoia
+to attempt to read sectors before or past the known user
data area of the disc, resulting in read errors at disc edges on most
drives and possibly even hard lockups on some buggy hardware.
.TP
.BI "\-O --sample-offset " number
Use this option to force the entire disc to shift sample position
-output by the given amount; This can be used to shift track boundaries
+output by the given amount; this can be used to shift track boundaries
for the whole disc manually on sample granularity. Note that this will
-cause cdparanoia to attempt to read partial sectors before or past the
+cause
+.B cdparanoia
+to attempt to read partial sectors before or past the
known user data area of the disc, probably causing read errors on most
drives and possibly even hard lockups on some buggy hardware.
@@ -202,8 +212,11 @@
.B \-Z --disable-paranoia
Disable
.B all
-data verification and correction features. When using -Z, cdparanoia
-reads data exactly as would cdda2wav with an overlap setting of zero.
+data verification and correction features. When using -Z,
+.B cdparanoia
+reads data exactly as would
+.BR cdda2wav (1)
+with an overlap setting of zero.
This option implies that
.B \-Y
is active.
@@ -211,7 +224,9 @@
.TP
.B \-z --never-skip[=max_retries]
Do not accept any skips; retry forever if needed. An optional maximum
-number of retries can be specified; for comparison, default without -z is
+number of retries can be specified; for comparison, default without
+.B -z
+is
currently 20.
.TP
@@ -221,7 +236,7 @@
.TP
.B \-X --abort-on-skip
-If the read skips due to imperfect data, a scratch, whatever, abort reading this track. If output is to a file, delete the partially completed file.
+If the read skips due to imperfect data, a scratch, or whatever, abort reading this track. If output is to a file, delete the partially completed file.
.SH OUTPUT SMILIES
.TP
@@ -282,7 +297,9 @@
.B
!
Errors found after stage 1 correction; the drive is making the
-same error through multiple re-reads, and cdparanoia is having trouble
+same error through multiple re-reads, and
+.B cdparanoia
+is having trouble
detecting them.
.TP
.B
@@ -295,8 +312,9 @@
.SH SPAN ARGUMENT
-The span argument specifies which track, tracks or subsections of
-tracks to read. This argument is required.
+The span argument specifies which track, tracks, or subsections of
+tracks to read. This argument is required,
+unless batch-mode is used (in bach-mode, cdparanoia will rip all traks if no span is given).
.B NOTE:
Unless the span is a simple number, it's generally a good idea to
quote the span argument to protect it from the shell.
@@ -307,7 +325,7 @@
1[ww:xx:yy.zz]-2[aa:bb:cc.dd]
.P
Here, 1 and 2 are track numbers; the numbers in brackets provide a
-finer grained offset within a particular track. [aa:bb:cc.dd] is in
+finer-grained offset within a particular track. [aa:bb:cc.dd] is in
hours/minutes/seconds/sectors format. Zero fields need not be
specified: [::20], [:20], [20], [20.], etc, would be interpreted as
twenty seconds, [10:] would be ten minutes, [.30] would be thirty
@@ -315,7 +333,7 @@
.P
When only a single offset is supplied, it is interpreted as a starting
offset and ripping will continue to the end of the track. If a single
-offset is preceeded or followed by a hyphen, the implicit missing
+offset is preceded or followed by a hyphen, the implicit missing
offset is taken to be the start or end of the disc, respectively. Thus:
.TP
@@ -335,7 +353,7 @@
.B 2-4
Specifies ripping from the beginning of track 2 to the end of track 4.
.P
-Again, don't forget to protect square brackets and preceeding hyphens from
+Again, don't forget to protect square brackets from
the shell.
.SH EXAMPLES
@@ -346,7 +364,7 @@
.P
cdparanoia -vsQ
.TP
-Extract an entire disc, putting each track in a seperate file:
+Extract an entire disc, putting each track in a separate file:
.P
cdparanoia -B
.TP
@@ -354,26 +372,30 @@
.P
cdparanoia "1[:30.12]-1[1:10]"
.TP
-Extract from the beginning of the disc up to track 3:
+Extract from the beginning of the disc up through track 3:
.P
- cdparanoia -- "-3"
+ cdparanoia -- -3
.TP
The "--" above is to distinguish "-3" from an option flag.
.SH OUTPUT
The output file argument is optional; if it is not specified,
-cdparanoia will output samples to one of
+.B cdparanoia
+will output samples to one of
.BR cdda.wav ", " cdda.aifc ", or " cdda.raw
depending on whether
-.BR \-w ", " \-a ", " \-r " or " \-R " is used (" \-w
+.BR \-w ", " \-a ", " \-r " or, " \-R " is used (" \-w
is the implicit default). The output file argument of
.B \-
specifies standard output; all data formats may be piped.
.SH ACKNOWLEDGEMENTS
-Cdparanoia sprang from and once drew heavily from the interface of
+.B cdparanoia
+sprang from and once drew heavily from the interface of
Heiko Eissfeldt's (heiko@colossus.escape.de) 'cdda2wav'
-package. Cdparanoia would not have happened without it.
+package.
+.B cdparanoia
+would not have happened without it.
.P
Joerg Schilling has also contributed SCSI expertise through his
generic SCSI transport library.
@@ -381,5 +403,6 @@
.SH AUTHOR
Monty <monty@xiph.org>
.P
-Cdparanoia's homepage may be found at:
+.B cdparanoia's
+homepage may be found at:
http://www.xiph.org/paranoia/
--- cdparanoia-III-10.2/main.c
+++ cdparanoia-III-10.2/main.c
@@ -51,7 +51,7 @@
if(offset==NULL)return(-1);
- /* seperate track from time offset */
+ /* separate track from time offset */
temp=strchr(offset,']');
if(temp){
*temp='\0';
@@ -221,14 +221,14 @@
" -V --version : print version info and quit\n"
" -Q --query : autosense drive, query disc and quit\n"
" -B --batch : 'batch' mode (saves each track to a\n"
-" seperate file.\n"
+" separate file.\n"
" -s --search-for-drive : do an exhaustive search for drive\n"
" -h --help : print help\n\n"
-" -p --output-raw : output raw 16 bit PCM in host byte \n"
+" -p --output-raw : output raw 16-bit PCM in host byte \n"
" order\n"
-" -r --output-raw-little-endian : output raw 16 bit little-endian PCM\n"
-" -R --output-raw-big-endian : output raw 16 bit big-endian PCM\n"
+" -r --output-raw-little-endian : output raw 16-bit little-endian PCM\n"
+" -R --output-raw-big-endian : output raw 16-bit big-endian PCM\n"
" -w --output-wav : output as WAV file (default)\n"
" -f --output-aiff : output as AIFF file\n"
" -a --output-aifc : output as AIFF-C file\n\n"
@@ -295,7 +295,7 @@
" 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] \n\n"
"Here, 1 and 2 are track numbers; the numbers in brackets provide a\n"
-"finer grained offset within a particular track. [aa:bb:cc.dd] is in\n"
+"finer-grained offset within a particular track. [aa:bb:cc.dd] is in\n"
"hours/minutes/seconds/sectors format. Zero fields need not be\n"
"specified: [::20], [:20], [20], [20.], etc, would be interpreted as\n"
"twenty seconds, [10:] would be ten minutes, [.30] would be thirty\n"
@@ -303,7 +303,7 @@
"When only a single offset is supplied, it is interpreted as a starting\n"
"offset and ripping will continue to the end of he track. If a single\n"
-"offset is preceeded or followed by a hyphen, the implicit missing\n"
+"offset is preceded or followed by a hyphen, the implicit missing\n"
"offset is taken to be the start or end of the disc, respectively. Thus:\n\n"
" 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to \n"
@@ -323,12 +323,15 @@
"Don't forget to protect square brackets and preceeding hyphens from\n"
"the shell...\n\n"
"A few examples, protected from the shell:\n"
+"Don't forget to protect square brackets from the shell...\n\n"
+
+"A few examples, protected from the shell where appropriate:\n"
" A) query only with exhaustive search for a drive and full reporting\n"
" of autosense:\n"
" cdparanoia -vsQ\n\n"
-" B) extract up to and including track 3, putting each track in a seperate\n"
+" B) extract up to and including track 3, putting each track in a separate\n"
" file:\n"
-" cdparanoia -B -- \"-3\"\n\n"
+" cdparanoia -B -- -3\n\n"
" C) extract from track 1, time 0:30.12 to 1:10.00:\n"
" cdparanoia \"1[:30.12]-1[1:10]\"\n\n"

View File

@ -0,0 +1,579 @@
#!/bin/sh /usr/share/dpatch/dpatch-run
## 04-gcc4.3.dpatch by Monty <paranoia@xiph.org>
##
## DP: Changeset 15338: Commit fix for 'private' becoming a reserved keyword as
## DP: of GCC 4.3+ (Closes: #499676).
@DPATCH@
================================================================================
--- cdparanoia-III-10.2/interface/cdda_interface.h
+++ cdparanoia-III-10.2/interface/cdda_interface.h
@@ -84,7 +84,7 @@
int is_atapi;
int is_mmc;
- cdda_private_data_t *private;
+ cdda_private_data_t *private_data;
void *reserved;
unsigned char inqbytes[4];
--- cdparanoia-III-10.2/interface/cooked_interface.c
+++ cdparanoia-III-10.2/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->private_data->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->private_data->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
--- cdparanoia-III-10.2/interface/interface.c
+++ cdparanoia-III-10.2/interface/interface.c
@@ -39,9 +39,9 @@
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->private_data){
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd);
+ free(d->private_data);
}
free(d);
@@ -127,7 +127,7 @@
}
}
}
- if(ms)*ms=d->private->last_milliseconds;
+ if(ms)*ms=d->private_data->last_milliseconds;
return(sectors);
}
--- cdparanoia-III-10.2/interface/scan_devices.c
+++ cdparanoia-III-10.2/interface/scan_devices.c
@@ -270,11 +270,11 @@
d->interface=COOKED_IOCTL;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
}
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -680,15 +680,15 @@
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
d->messagedest = messagedest;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->private_data->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->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
g_fd=d->cdda_fd=dup(d->ioctl_fd);
}else{
version=verify_SG_version(d,messagedest,messages);
@@ -702,8 +702,8 @@
}
/* 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->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
}
{
@@ -778,9 +778,9 @@
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->private_data){
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd);
+ free(d->private_data);
}
free(d);
}
@@ -827,7 +827,7 @@
d->interface=TEST_INTERFACE;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
d->drive_model=copystring("File based test interface");
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
--- cdparanoia-III-10.2/interface/scsi_interface.c
+++ cdparanoia-III-10.2/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->private_data->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->private_data->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
@@ -96,7 +96,7 @@
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->private_data->sg_hd;
int flag=0;
/* clear out any possibly preexisting garbage */
@@ -185,7 +185,7 @@
struct timespec tv2;
int tret1,tret2;
int status = 0;
- struct sg_header *sg_hd=d->private->sg_hd;
+ struct sg_header *sg_hd=d->private_data->sg_hd;
long writebytes=SG_OFF+cmd_len+in_size;
/* generic scsi device services */
@@ -195,7 +195,7 @@
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->private_data->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 @@
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->private_data->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 @@
}
sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
- tret1=clock_gettime(d->private->clock,&tv1);
+ tret1=clock_gettime(d->private_data->clock,&tv1);
errno=0;
status = write(d->cdda_fd, sg_hd, writebytes );
@@ -289,7 +289,7 @@
}
}
- tret2=clock_gettime(d->private->clock,&tv2);
+ tret2=clock_gettime(d->private_data->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 @@
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->private_data->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -326,9 +326,9 @@
errno=0;
if(tret1<0 || tret2<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
}
return(0);
}
@@ -347,7 +347,7 @@
memset(&hdr,0,sizeof(hdr));
memset(sense,0,sizeof(sense));
- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
+ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
hdr.cmdp = cmd;
hdr.cmd_len = cmd_len;
@@ -355,7 +355,7 @@
hdr.mx_sb_len = SG_MAX_SENSE;
hdr.timeout = 50000;
hdr.interface_id = 'S';
- hdr.dxferp = d->private->sg_buffer;
+ hdr.dxferp = d->private_data->sg_buffer;
hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */
/* scary buffer fill hack */
@@ -400,7 +400,7 @@
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->private_data->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -412,7 +412,7 @@
}
/* 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->private_data->last_milliseconds = hdr.duration; */
errno = 0;
return 0;
@@ -445,9 +445,9 @@
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->private_data->sg_buffer[2] & 0xf;
+ ASC = d->private_data->sg_buffer[12];
+ ASCQ = d->private_data->sg_buffer[13];
if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
return 1;
@@ -492,7 +492,7 @@
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->private_data->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 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->private_data->sg_buffer[4];
+ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
}
/* switch CDROM scsi drives to given sector size */
@@ -664,8 +664,8 @@
return(-4);
}
- first=d->private->sg_buffer[2];
- last=d->private->sg_buffer[3];
+ first=d->private_data->sg_buffer[2];
+ last=d->private_data->sg_buffer[3];
tracks=last-first+1;
if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
@@ -683,7 +683,7 @@
return(-5);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=i;
@@ -704,7 +704,7 @@
return(-2);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=0xAA;
@@ -738,7 +738,7 @@
}
/* copy to our structure and convert start sector */
- tracks = d->private->sg_buffer[1];
+ tracks = d->private_data->sg_buffer[1];
if (tracks > MAXTRK) {
cderror(d,"003: CDROM reporting illegal number of tracks\n");
return(-3);
@@ -754,33 +754,33 @@
return(-5);
}
- d->disc_toc[i].bFlags = d->private->sg_buffer[10];
+ d->disc_toc[i].bFlags = d->private_data->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->private_data->sg_buffer[2])<<24) |
+ (d->private_data->sg_buffer[3]<<16)|
+ (d->private_data->sg_buffer[4]<<8)|
+ (d->private_data->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->private_data->sg_buffer+2, 4);
+ memcpy (&bar, d->private_data->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->private_data->sg_buffer[2])<<24) |
+ (d->private_data->sg_buffer[3]<<16)|
+ (d->private_data->sg_buffer[4]<<8)|
+ (d->private_data->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->private_data->sg_buffer[6])<<24) |
+ (d->private_data->sg_buffer[7]<<16)|
+ (d->private_data->sg_buffer[8]<<8)|
+ (d->private_data->sg_buffer[9]))));
d->cd_extra = FixupTOC(d,tracks+1);
@@ -817,7 +817,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -836,7 +836,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -854,7 +854,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -872,7 +872,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -890,7 +890,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -908,7 +908,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -922,7 +922,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -936,7 +936,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -950,7 +950,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -964,7 +964,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -978,7 +978,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -992,7 +992,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1026,7 +1026,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1039,7 +1039,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1052,7 +1052,7 @@
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->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1275,7 +1275,7 @@
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->private_data->sg_buffer[i]!=(unsigned char)'\177')
return(((i+3)>>2)<<2);
return(0);
@@ -1284,7 +1284,7 @@
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->private_data->sg_buffer[i]!=0){
flag=1;
break;
}
@@ -1625,7 +1625,7 @@
d->is_mmc=0;
if(mode_sense(d,22,0x2A)==0){
- b=d->private->sg_buffer;
+ b=d->private_data->sg_buffer;
b+=b[3]+4;
if((b[0]&0x3F)==0x2A){
@@ -1673,7 +1673,7 @@
cderror(d,"008: Unable to identify CDROM model\n");
return(NULL);
}
- return (d->private->sg_buffer);
+ return (d->private_data->sg_buffer);
}
int scsi_init_drive(cdrom_drive *d){
@@ -1742,8 +1742,8 @@
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->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
d->report_all=1;
return(0);
}
--- cdparanoia-III-10.2/interface/test_interface.c
+++ cdparanoia-III-10.2/interface/test_interface.c
@@ -66,9 +66,9 @@
if(!fd)fd=fdopen(d->cdda_fd,"r");
if(begin<lastread)
- d->private->last_milliseconds=20;
+ d->private_data->last_milliseconds=20;
else
- d->private->last_milliseconds=sectors;
+ d->private_data->last_milliseconds=sectors;
#ifdef CDDA_TEST_UNDERRUN
sectors-=1;

View File

@ -0,0 +1,22 @@
#!/bin/sh /usr/share/dpatch/dpatch-run
## 06-endian.dpatch by Monty <paranoia@xiph.org>
##
## DP: Changeset 15356: Fix a really stupid oversight that should have been
## DP: tested: forcing a drive/host endian mismatch within the interface lib.
## DP: Doesn't check for null buff before trying a byteswap
## DP: (Closes: #499716, #506337, #507795, #509762).
@DPATCH@
================================================================================
--- cdparanoia-III-10.2/interface/interface.c
+++ cdparanoia-III-10.2/interface/interface.c
@@ -118,7 +118,7 @@
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;

BIN
cdparanoia-III-10.2.src.tgz (Stored with Git LFS) Normal file

Binary file not shown.

23
cdparanoia-III-c++.patch Normal file
View File

@ -0,0 +1,23 @@
--- utils.h
+++ utils.h
@@ -86,7 +86,7 @@
static inline char *copystring(const char *s){
if(s){
- char *ret=malloc((strlen(s)+1)*sizeof(char));
+ char *ret=(char *)malloc((strlen(s)+1)*sizeof(char));
strcpy(ret,s);
return(ret);
}
@@ -96,9 +96,9 @@
static inline char *catstring(char *buff,const char *s){
if(s){
if(buff)
- buff=realloc(buff,strlen(buff)+strlen(s)+1);
+ buff=(char *)realloc(buff,strlen(buff)+strlen(s)+1);
else
- buff=calloc(strlen(s)+1,1);
+ buff=(char *)calloc(strlen(s)+1,1);
strcat(buff,s);
}
return(buff);

View File

@ -0,0 +1,15 @@
--- interface/scan_devices.c
+++ interface/scan_devices.c
@@ -177,6 +177,12 @@
case IDE1_MAJOR:
case IDE2_MAJOR:
case IDE3_MAJOR:
+ case IDE4_MAJOR:
+ case IDE5_MAJOR:
+ case IDE6_MAJOR:
+ case IDE7_MAJOR:
+ case IDE8_MAJOR:
+ case IDE9_MAJOR:
/* Yay, ATAPI... */
/* Ping for CDROM-ness */

273
cdparanoia.changes Normal file
View File

@ -0,0 +1,273 @@
-------------------------------------------------------------------
Wed Apr 18 15:04:41 UTC 2018 - jengelh@inai.de
- Update descriptions.
-------------------------------------------------------------------
Wed Apr 18 14:31:43 UTC 2018 - tchvatal@suse.com
- Do not bother to talk about it being beta release as we
are shipping this since 2008
-------------------------------------------------------------------
Wed Apr 18 09:03:42 UTC 2018 - adam.majer@suse.de
- Adjust licenses to be installed with %license not %doc
- libraries are covered by LGPL-2.1-or-greater and the command-line
tool is GPL-2.0-or-greater
-------------------------------------------------------------------
Tue Apr 17 14:42:49 UTC 2018 - schwab@suse.de
- config-guess-sub-update.diff: update for RISC-V support
-------------------------------------------------------------------
Thu Oct 24 13:00:04 UTC 2013 - tchvatal@suse.com
- Redo the buildsystem to use only shared libs and allow parallel
building to have it faster in obs.
* removed patches:
- cdparanoia-III-dt_needed.patch
- cdparanoia-large-pic.diff
* added patches:
- 010_build_system.patch
- 050_all_build_only_shared_libraries.patch
-------------------------------------------------------------------
Tue May 21 12:51:47 UTC 2013 - dmueller@suse.com
- add config-guess-sub-update.diff:
* configure.guess/sub update for aarch64 support
-------------------------------------------------------------------
Thu Mar 21 09:37:28 UTC 2013 - mmeister@suse.com
- Added url as source.
Please see http://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Sun Jul 15 16:58:15 UTC 2012 - coolo@suse.com
- own directories for japanese man pages, no need to buildrequire man
for that
-------------------------------------------------------------------
Tue Dec 20 20:07:26 UTC 2011 - coolo@suse.com
- remove call to suse_update_config (very old work around)
-------------------------------------------------------------------
Wed Oct 5 14:52:13 UTC 2011 - uli@suse.com
- cross-build fixes: use %configure macro, set bindir and include
dir explicitly when installing
-------------------------------------------------------------------
Thu Jan 7 20:38:06 CET 2010 - jengelh@medozas.de
- Add baselibs.conf as a source
- Switch from -fpic to -fPIC, at least SPARC needs this
-------------------------------------------------------------------
Wed Aug 5 14:21:52 CEST 2009 - vuntz@novell.com
- Make the devel package require libcdda_interface0 and
libcdda_paranoia0 instead of cdparanoia.
-------------------------------------------------------------------
Thu Feb 26 16:27:00 CET 2009 - nadvornik@suse.cz
- updated to III-10.2
* many patches merged upstream
- adapted according to shared library policy
* new subpackage libcdda_interface0
* new subpackage libcdda_paranoia0
* new subpackage cdparanoia-devel
- added debian patches
cdparanoia-III-01-typos-and-spelling.dpatch
cdparanoia-III-05-gcc4.3.dpatch
cdparanoia-III-06-endian.dpatch
-------------------------------------------------------------------
Wed Dec 10 12:34:56 CET 2008 - olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
-------------------------------------------------------------------
Thu Oct 30 12:34:56 CET 2008 - olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
-------------------------------------------------------------------
Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
-------------------------------------------------------------------
Wed Aug 8 11:26:01 CEST 2007 - pgajdos@suse.cz
- solved 'Lack of SG_IO interface support' [#295308]
* shortened gcc34.patch (leaved in hunks for utils.h only, removed
hunks for scsi_interface.c)
* new patch sgio.patch to solve error mentioned above
* new patch gcc34-2.patch (avoid persisting problems with
compilation -- memcpy macro)
-------------------------------------------------------------------
Fri Oct 27 11:54:33 CEST 2006 - lnussel@suse.de
- remove resmgr patch
-------------------------------------------------------------------
Mon Jun 12 12:57:47 CEST 2006 - dmueller@suse.de
- add DT_NEEDED for libcdda_interface to libccda_paranoia (#183849)
-------------------------------------------------------------------
Fri May 26 20:48:00 CEST 2006 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Tue May 23 11:47:16 CEST 2006 - nadvornik@suse.cz
- check for all IDE major numbers
-------------------------------------------------------------------
Wed Jan 25 21:34:53 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Aug 10 12:26:18 CEST 2005 - nadvornik@suse.cz
- use RPM_OPT_FLAGS instead of hardcoded CFLAGS [#93874]
- fixed compiler warnings
-------------------------------------------------------------------
Mon Feb 07 17:36:41 CET 2005 - nadvornik@suse.cz
- do not dereference symlinks in resmgr device name [#44912]
-------------------------------------------------------------------
Wed Sep 15 02:33:16 CEST 2004 - ro@suse.de
- don't use --host for configure
-------------------------------------------------------------------
Wed Jan 28 16:01:13 CET 2004 - schwab@suse.de
- Fix missing library dependency.
-------------------------------------------------------------------
Sat Jan 17 12:26:35 CET 2004 - meissner@suse.de
- fixed labels at end of compound statement problem.
-------------------------------------------------------------------
Sun Jan 11 09:22:14 CET 2004 - adrian@suse.de
- add %run_ldconfig
-------------------------------------------------------------------
Mon May 19 13:09:04 CEST 2003 - meissner@suse.de
- remove .a files, they are not packaged.
-------------------------------------------------------------------
Fri Feb 28 17:59:17 CET 2003 - meissner@suse.de
- Added resmgr support so cdparanoia can read audio CDs on
SCSI CD-ROMs (and ide-scsi based IDE CD-ROMs).
-------------------------------------------------------------------
Tue Sep 24 15:48:11 CEST 2002 - nadvornik@suse.cz
- fixed crash with k3b [#18282]
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Thu Apr 25 16:24:10 CEST 2002 - coolo@suse.de
- use %_libdir
-------------------------------------------------------------------
Wed Jun 13 17:37:58 CEST 2001 - schwab@suse.de
- Fix stupid file names.
-------------------------------------------------------------------
Tue Apr 3 00:54:32 MEST 2001 - bk@suse.de
- update to III-alpha9.8
- remove of static libs from filelist(shared libs are used by e.g. kde)
-------------------------------------------------------------------
Thu Nov 9 11:01:24 CET 2000 - nadvornik@suse.cz
- renamed cdparano -> cdparanoia
-------------------------------------------------------------------
Wed Apr 26 15:10:45 MEST 2000 - nadvornik@suse.cz
- changed Group
-------------------------------------------------------------------
Mon Apr 10 11:00:45 CEST 2000 - nadvornik@suse.cz
- added BuildRoot
- added URL
-------------------------------------------------------------------
Tue Feb 29 16:42:18 CET 2000 - uli@suse.de
- fixed filelist (this time for real)
- now builds with "-O2" instead of "-O20"
-------------------------------------------------------------------
Tue Feb 29 15:21:22 CET 2000 - ro@suse.de
- fixed filelist
-------------------------------------------------------------------
Mon Jan 17 17:59:18 CET 2000 - ro@suse.de
- update to III-alpha9.7
- man to /usr/share/man
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-------------------------------------------------------------------
Fri Sep 3 10:45:58 CEST 1999 - ro@suse.de
- update to III-alpha9.6
-------------------------------------------------------------------
Fri Jul 9 15:05:59 MEST 1999 - ro@suse.de
- update to alpha9.5
-------------------------------------------------------------------
Tue Sep 22 11:29:17 MEST 1998 - ro@suse.de
- update to alpha8 / define _GNU_SOURCE for compiling
-------------------------------------------------------------------
Tue Aug 4 16:54:05 MEST 1998 - ro@suse.de
- update to alpha7
-------------------------------------------------------------------
Fri Apr 24 12:28:05 MEST 1998 - ro@suse.de
- build initial package version 03alpha6

134
cdparanoia.spec Normal file
View File

@ -0,0 +1,134 @@
#
# spec file for package cdparanoia
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define filever III-10.2
Name: cdparanoia
Version: 3.10.2
Release: 0
Summary: A Program for Extracting, Verifying, and Fixing Audio Tracks from CDs
License: GPL-2.0-or-later
Group: Productivity/Multimedia/CD/Grabbers
URL: http://www.xiph.org/paranoia/index.html
Source: http://downloads.xiph.org/releases/%{name}/%{name}-%{filever}.src.tgz
Source2: baselibs.conf
Patch1: 010_build_system.patch
Patch2: cdparanoia-III-ide_majors.patch
Patch3: cdparanoia-III-c++.patch
Patch4: 050_all_build_only_shared_libraries.patch
Patch10: cdparanoia-III-01-typos-and-spelling.dpatch
Patch11: cdparanoia-III-05-gcc4.3.dpatch
Patch12: cdparanoia-III-06-endian.dpatch
Patch14: config-guess-sub-update.diff
BuildRequires: autoconf
BuildRequires: automake
Provides: cdparano = %{version}
Obsoletes: cdparano < %{version}
%package -n libcdda_interface0
Summary: Library for Extracting, Verifying, and Fixing Audio Tracks from CDs
License: LGPL-2.1-or-later
Group: System/Libraries
Suggests: ImageMagick-extra = %{version}
%package -n libcdda_paranoia0
Summary: Library for Extracting, Verifying, and Fixing Audio Tracks from CDs
License: LGPL-2.1-or-later
Group: System/Libraries
%package devel
Summary: Development files for cdparanoia, a library for extractnig audio tracks from CDs
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: libcdda_interface0 = %{version}
Requires: libcdda_paranoia0 = %{version}
%description
This CDDA reader distribution ('cdparanoia') reads audio from the
CD-ROM directly as data and writes the data to a file or pipe as .wav,
.aifc, or raw 16-bit linear PCM.
%description devel
This CDDA reader distribution ('cdparanoia') reads audio from the
CD-ROM directly as data and writes the data to a file or pipe as .wav,
.aifc, or raw 16-bit linear PCM.
%description -n libcdda_interface0
This CDDA reader distribution ('cdparanoia') reads audio from the
CD-ROM directly as data and writes the data to a file or pipe as .wav,
.aifc, or raw 16-bit linear PCM.
%description -n libcdda_paranoia0
This CDDA reader distribution ('cdparanoia') reads audio from the
CD-ROM directly as data and writes the data to a file or pipe as .wav,
.aifc, or raw 16-bit linear PCM.
%prep
%setup -q -n cdparanoia-%{filever}
%patch1 -p1
%patch2
%patch3
%patch4
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch14
%build
autoreconf -vfi
%configure
%make_build OPT="%{optflags}"
%install
make prefix=%{buildroot}%{_prefix} \
LIBDIR=%{buildroot}%{_libdir} \
MANDIR=%{buildroot}%{_mandir} \
BINDIR=%{buildroot}%{_bindir} \
INCLUDEDIR=%{buildroot}%{_includedir} \
install
JAPN_MANDIR=%{buildroot}%{_mandir}/ja/man1
mkdir -p $JAPN_MANDIR
install -m644 cdparanoia.1.jp $JAPN_MANDIR/cdparanoia.1
%post -n libcdda_interface0 -p /sbin/ldconfig
%postun -n libcdda_interface0 -p /sbin/ldconfig
%post -n libcdda_paranoia0 -p /sbin/ldconfig
%postun -n libcdda_paranoia0 -p /sbin/ldconfig
%files
%doc README
%license COPYING-GPL
%{_mandir}/man1/*
%{_mandir}/ja
%{_bindir}/*
%files -n libcdda_interface0
%license COPYING-LGPL
%{_libdir}/libcdda_interface.so.0
%{_libdir}/libcdda_interface.so.0.*
%files -n libcdda_paranoia0
%license COPYING-LGPL
%{_libdir}/libcdda_paranoia.so.0
%{_libdir}/libcdda_paranoia.so.0.*
%files devel
%{_includedir}/*
%{_libdir}/libcdda_paranoia.so
%{_libdir}/libcdda_interface.so
%changelog

3219
config-guess-sub-update.diff Normal file

File diff suppressed because it is too large Load Diff