rbcdio 0.01 → 0.02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +77 -0
- data/INSTALL +35 -26
- data/Makefile.am +12 -11
- data/Makefile.in +65 -51
- data/NEWS +13 -1
- data/README +10 -9
- data/VERSION +1 -1
- data/config.guess +76 -39
- data/config.sub +71 -31
- data/configure +2361 -1802
- data/configure.ac +4 -4
- data/doc/created.rid +1 -1
- data/doc/fr_file_index.html +1 -0
- data/example/README +6 -1
- data/example/audio.rb +1 -2
- data/example/cd-read.rb +2 -3
- data/example/cdchange.rb +71 -0
- data/example/device.rb +2 -3
- data/example/drivers.rb +2 -3
- data/example/drives.rb +2 -3
- data/example/eject.rb +2 -3
- data/example/iso1.rb +2 -3
- data/example/iso2.rb +2 -3
- data/example/iso3.rb +2 -3
- data/example/tracks.rb +2 -3
- data/ext/cdio/Makefile +30 -16
- data/ext/cdio/extconf.rb +9 -1
- data/ext/cdio/rubycdio_wrap.c +3609 -1892
- data/ext/iso9660/Makefile +29 -15
- data/ext/iso9660/extconf.rb +7 -2
- data/ext/iso9660/rubyiso9660_wrap.c +3347 -1647
- data/install-sh +266 -82
- data/lib/cdio.rb +10 -10
- data/lib/iso9660.rb +5 -5
- data/missing +34 -27
- data/swig/device.swg +2 -2
- data/swig/rubycdio.swg +2 -2
- data/swig/rubyiso9660.swg +3 -3
- data/test/cdiotest.rb +9 -4
- data/test/isotest.rb +4 -2
- metadata +5 -3
data/lib/cdio.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# $Id: cdio.rb,v 1.
|
2
|
+
# $Id: cdio.rb,v 1.19 2007/10/13 23:00:18 rocky Exp $
|
3
3
|
#
|
4
4
|
# Copyright (C) 2006 Rocky Bernstein <rocky@gnu.org>
|
5
5
|
#
|
@@ -119,18 +119,18 @@ class TrackError < DeviceException; end
|
|
119
119
|
# cdio_get_driver_name().
|
120
120
|
def drivers()
|
121
121
|
return {
|
122
|
-
:
|
123
|
-
:
|
124
|
-
:
|
125
|
-
:
|
122
|
+
:Unknown => Rubycdio::DRIVER_UNKNOWN,
|
123
|
+
:AIX => Rubycdio::DRIVER_AIX,
|
124
|
+
:BSDI => Rubycdio::DRIVER_BSDI,
|
125
|
+
:FreeBSD => Rubycdio::DRIVER_FREEBSD,
|
126
126
|
:"GNU/Linux" => Rubycdio::DRIVER_LINUX,
|
127
|
-
:
|
127
|
+
:Solaris => Rubycdio::DRIVER_SOLARIS,
|
128
128
|
:"OS X" => Rubycdio::DRIVER_OSX,
|
129
|
-
:
|
130
|
-
:
|
129
|
+
:WIN32 => Rubycdio::DRIVER_WIN32,
|
130
|
+
:CDRDAO => Rubycdio::DRIVER_CDRDAO,
|
131
131
|
:"BIN/CUE" => Rubycdio::DRIVER_BINCUE,
|
132
|
-
:
|
133
|
-
:
|
132
|
+
:NRG => Rubycdio::DRIVER_NRG,
|
133
|
+
:device => Rubycdio::DRIVER_DEVICE
|
134
134
|
}
|
135
135
|
end
|
136
136
|
|
data/lib/iso9660.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# $Id: iso9660.rb,v 1.
|
2
|
+
# $Id: iso9660.rb,v 1.12 2007/10/13 23:00:18 rocky Exp $
|
3
3
|
#
|
4
4
|
# Copyright (C) 2006 Rocky Bernstein <rocky@gnu.org>
|
5
5
|
#
|
@@ -440,10 +440,10 @@ end # class ISO9660
|
|
440
440
|
|
441
441
|
def ISO9660.check_types()
|
442
442
|
return {
|
443
|
-
:
|
444
|
-
:"7bit"
|
445
|
-
:
|
446
|
-
:
|
443
|
+
:nocheck => Rubyiso9660::NOCHECK,
|
444
|
+
:"7bit" => Rubyiso9660::SEVEN_BIT,
|
445
|
+
:achars => Rubyiso9660::ACHARS,
|
446
|
+
:dchars => Rubyiso9660::DCHARS
|
447
447
|
}
|
448
448
|
end
|
449
449
|
|
data/missing
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#! /bin/sh
|
2
2
|
# Common stub for a few missing GNU programs while installing.
|
3
3
|
|
4
|
-
scriptversion=
|
4
|
+
scriptversion=2006-05-10.23
|
5
5
|
|
6
|
-
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
6
|
+
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
7
7
|
# Free Software Foundation, Inc.
|
8
8
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
9
9
|
|
@@ -33,6 +33,8 @@ if test $# -eq 0; then
|
|
33
33
|
fi
|
34
34
|
|
35
35
|
run=:
|
36
|
+
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
37
|
+
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
36
38
|
|
37
39
|
# In the cases where this matters, `missing' is being run in the
|
38
40
|
# srcdir already.
|
@@ -44,7 +46,7 @@ fi
|
|
44
46
|
|
45
47
|
msg="missing on your system"
|
46
48
|
|
47
|
-
case
|
49
|
+
case $1 in
|
48
50
|
--run)
|
49
51
|
# Try to run requested program, and just exit if it succeeds.
|
50
52
|
run=
|
@@ -77,6 +79,7 @@ Supported PROGRAM values:
|
|
77
79
|
aclocal touch file \`aclocal.m4'
|
78
80
|
autoconf touch file \`configure'
|
79
81
|
autoheader touch file \`config.h.in'
|
82
|
+
autom4te touch the output file, or create a stub one
|
80
83
|
automake touch all \`Makefile.in' files
|
81
84
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
82
85
|
flex create \`lex.yy.c', if possible, from existing .c
|
@@ -106,7 +109,7 @@ esac
|
|
106
109
|
# Now exit if we have it, but it failed. Also exit now if we
|
107
110
|
# don't have it and --version was passed (most likely to detect
|
108
111
|
# the program).
|
109
|
-
case
|
112
|
+
case $1 in
|
110
113
|
lex|yacc)
|
111
114
|
# Not GNU programs, they don't have --version.
|
112
115
|
;;
|
@@ -135,7 +138,7 @@ esac
|
|
135
138
|
|
136
139
|
# If it does not exist, or fails to run (possibly an outdated version),
|
137
140
|
# try to emulate it.
|
138
|
-
case
|
141
|
+
case $1 in
|
139
142
|
aclocal*)
|
140
143
|
echo 1>&2 "\
|
141
144
|
WARNING: \`$1' is $msg. You should only need it if
|
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
|
|
164
167
|
test -z "$files" && files="config.h"
|
165
168
|
touch_files=
|
166
169
|
for f in $files; do
|
167
|
-
case
|
170
|
+
case $f in
|
168
171
|
*:*) touch_files="$touch_files "`echo "$f" |
|
169
172
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
170
173
|
*) touch_files="$touch_files $f.in";;
|
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
|
|
192
195
|
You can get \`$1' as part of \`Autoconf' from any GNU
|
193
196
|
archive site."
|
194
197
|
|
195
|
-
file=`echo "$*" | sed -n
|
196
|
-
test -z "$file" && file=`echo "$*" | sed -n
|
198
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
199
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
197
200
|
if test -f "$file"; then
|
198
201
|
touch $file
|
199
202
|
else
|
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
|
|
214
217
|
in order for those modifications to take effect. You can get
|
215
218
|
\`Bison' from any GNU archive site."
|
216
219
|
rm -f y.tab.c y.tab.h
|
217
|
-
if
|
220
|
+
if test $# -ne 1; then
|
218
221
|
eval LASTARG="\${$#}"
|
219
|
-
case
|
222
|
+
case $LASTARG in
|
220
223
|
*.y)
|
221
224
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
222
|
-
if
|
225
|
+
if test -f "$SRCFILE"; then
|
223
226
|
cp "$SRCFILE" y.tab.c
|
224
227
|
fi
|
225
228
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
226
|
-
if
|
229
|
+
if test -f "$SRCFILE"; then
|
227
230
|
cp "$SRCFILE" y.tab.h
|
228
231
|
fi
|
229
232
|
;;
|
230
233
|
esac
|
231
234
|
fi
|
232
|
-
if
|
235
|
+
if test ! -f y.tab.h; then
|
233
236
|
echo >y.tab.h
|
234
237
|
fi
|
235
|
-
if
|
238
|
+
if test ! -f y.tab.c; then
|
236
239
|
echo 'main() { return 0; }' >y.tab.c
|
237
240
|
fi
|
238
241
|
;;
|
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
|
|
244
247
|
in order for those modifications to take effect. You can get
|
245
248
|
\`Flex' from any GNU archive site."
|
246
249
|
rm -f lex.yy.c
|
247
|
-
if
|
250
|
+
if test $# -ne 1; then
|
248
251
|
eval LASTARG="\${$#}"
|
249
|
-
case
|
252
|
+
case $LASTARG in
|
250
253
|
*.l)
|
251
254
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
252
|
-
if
|
255
|
+
if test -f "$SRCFILE"; then
|
253
256
|
cp "$SRCFILE" lex.yy.c
|
254
257
|
fi
|
255
258
|
;;
|
256
259
|
esac
|
257
260
|
fi
|
258
|
-
if
|
261
|
+
if test ! -f lex.yy.c; then
|
259
262
|
echo 'main() { return 0; }' >lex.yy.c
|
260
263
|
fi
|
261
264
|
;;
|
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
|
|
267
270
|
\`Help2man' package in order for those modifications to take
|
268
271
|
effect. You can get \`Help2man' from any GNU archive site."
|
269
272
|
|
270
|
-
file=`echo "$*" | sed -n
|
271
|
-
|
272
|
-
|
273
|
-
fi
|
274
|
-
if [ -f "$file" ]; then
|
273
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
274
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
275
|
+
if test -f "$file"; then
|
275
276
|
touch $file
|
276
277
|
else
|
277
278
|
test -z "$file" || exec >$file
|
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
|
|
289
290
|
DU, IRIX). You might want to install the \`Texinfo' package or
|
290
291
|
the \`GNU make' package. Grab either from any GNU archive site."
|
291
292
|
# The file to touch is that specified with -o ...
|
292
|
-
file=`echo "$*" | sed -n
|
293
|
+
file=`echo "$*" | sed -n "$sed_output"`
|
294
|
+
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
293
295
|
if test -z "$file"; then
|
294
296
|
# ... or it is the one specified with @setfilename ...
|
295
297
|
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
296
|
-
file=`sed -n '
|
298
|
+
file=`sed -n '
|
299
|
+
/^@setfilename/{
|
300
|
+
s/.* \([^ ]*\) *$/\1/
|
301
|
+
p
|
302
|
+
q
|
303
|
+
}' $infile`
|
297
304
|
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
298
305
|
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
299
306
|
fi
|
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
|
|
317
324
|
fi
|
318
325
|
firstarg="$1"
|
319
326
|
if shift; then
|
320
|
-
case
|
327
|
+
case $firstarg in
|
321
328
|
*o*)
|
322
329
|
firstarg=`echo "$firstarg" | sed s/o//`
|
323
330
|
tar "$firstarg" "$@" && exit 0
|
324
331
|
;;
|
325
332
|
esac
|
326
|
-
case
|
333
|
+
case $firstarg in
|
327
334
|
*h*)
|
328
335
|
firstarg=`echo "$firstarg" | sed s/h//`
|
329
336
|
tar "$firstarg" "$@" && exit 0
|
data/swig/device.swg
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- c -*-
|
2
|
-
$Id: device.swg,v 1.
|
2
|
+
$Id: device.swg,v 1.11 2007/10/14 10:22:28 rocky Exp $
|
3
3
|
|
4
|
-
Copyright (C) 2006 Rocky Bernstein <rocky@gnu.org>
|
4
|
+
Copyright (C) 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
5
5
|
|
6
6
|
This program is free software; you can redistribute it and/or modify
|
7
7
|
it under the terms of the GNU General Public License as published by
|
data/swig/rubycdio.swg
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- c -*-
|
2
|
-
$Id: rubycdio.swg,v 1.
|
2
|
+
$Id: rubycdio.swg,v 1.3 2007/10/14 10:22:28 rocky Exp $
|
3
3
|
|
4
|
-
Copyright (C) 2006 Rocky Bernstein <rocky@
|
4
|
+
Copyright (C) 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
5
5
|
|
6
6
|
This program is free software; you can redistribute it and/or modify
|
7
7
|
it under the terms of the GNU General Public License as published by
|
data/swig/rubyiso9660.swg
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* -*- c -*-
|
2
|
-
$Id: rubyiso9660.swg,v 1.
|
2
|
+
$Id: rubyiso9660.swg,v 1.5 2007/08/01 04:06:39 rocky Exp $
|
3
3
|
|
4
4
|
Copyright (C) 2006 Rocky Bernstein <rocky@gnu.org>
|
5
5
|
|
@@ -434,7 +434,7 @@ char * name_translate(const char *psz_oldname);
|
|
434
434
|
%inline %{
|
435
435
|
char *
|
436
436
|
name_translate(const char *psz_oldname) {
|
437
|
-
char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
|
437
|
+
char *psz_newname=calloc(sizeof(char), strlen(psz_oldname)+1);
|
438
438
|
iso9660_name_translate(psz_oldname, psz_newname);
|
439
439
|
return psz_newname;
|
440
440
|
}
|
@@ -458,7 +458,7 @@ char * name_translate_ext(const char *psz_oldname, uint8_t i_joliet_level);
|
|
458
458
|
%inline %{
|
459
459
|
char *
|
460
460
|
name_translate_ext(const char *psz_oldname, uint8_t i_joliet_level) {
|
461
|
-
char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
|
461
|
+
char *psz_newname=calloc(sizeof(char), strlen(psz_oldname)+1);
|
462
462
|
iso9660_name_translate_ext(psz_oldname, psz_newname, i_joliet_level);
|
463
463
|
return psz_newname;
|
464
464
|
}
|
data/test/cdiotest.rb
CHANGED
@@ -1,17 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# $Id: cdiotest.rb,v 1.
|
2
|
+
# $Id: cdiotest.rb,v 1.14 2007/10/13 09:23:17 rocky Exp $
|
3
3
|
|
4
4
|
# Unit test for cdio
|
5
5
|
#
|
6
6
|
require "test/unit"
|
7
7
|
|
8
|
-
|
8
|
+
unless defined?(Mypath)
|
9
|
+
Mypath = File.expand_path(File.dirname(__FILE__))
|
10
|
+
end
|
9
11
|
old_dir = File.expand_path(Dir.pwd)
|
10
12
|
if old_dir != Mypath
|
11
13
|
Dir.chdir(Mypath)
|
12
14
|
end
|
13
|
-
|
14
|
-
|
15
|
+
|
16
|
+
%w(/../ext/cdio /../lib).each do |src_dir|
|
17
|
+
$: << Mypath + src_dir unless $:.member?(src_dir)
|
18
|
+
end
|
19
|
+
|
15
20
|
require "cdio"
|
16
21
|
|
17
22
|
class CdioTests < Test::Unit::TestCase
|
data/test/isotest.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# $Id: isotest.rb,v 1.
|
2
|
+
# $Id: isotest.rb,v 1.8 2007/10/13 09:23:17 rocky Exp $
|
3
3
|
# Unit test for iso9660
|
4
4
|
|
5
5
|
# Test some low-level ISO9660 routines
|
6
6
|
# This is basically the same thing as libcdio's testiso9660.c
|
7
7
|
|
8
8
|
require "test/unit"
|
9
|
-
|
9
|
+
unless defined?(Mypath)
|
10
|
+
Mypath = File.expand_path(File.dirname(__FILE__))
|
11
|
+
end
|
10
12
|
$: << Mypath + '/../lib'
|
11
13
|
$: << Mypath + '/../ext/cdio'
|
12
14
|
$: << Mypath + '/../ext/iso9660'
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: rbcdio
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0.
|
7
|
-
date:
|
6
|
+
version: "0.02"
|
7
|
+
date: 2007-10-27 07:20:57 -04:00
|
8
8
|
summary: Ruby to libcdio (CD Input and Control library)
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors:
|
29
30
|
- Rocky Bernstein
|
30
31
|
files:
|
@@ -62,6 +63,7 @@ files:
|
|
62
63
|
- example/README
|
63
64
|
- example/cd-read.rb
|
64
65
|
- example/drivers.rb
|
66
|
+
- example/cdchange.rb
|
65
67
|
- example/eject.rb
|
66
68
|
- example/COPYING
|
67
69
|
- example/tracks.rb
|