summaryrefslogtreecommitdiff
path: root/audio/ruby-freedb
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2002-10-15 19:15:56 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2002-10-15 19:15:56 +0000
commit30c294fdbecdb560b2555b6a5cb07d4e50d62214 (patch)
tree485c4e50dae903c7b89a8eb676b17f5905b4c729 /audio/ruby-freedb
parentUpdate to 0.7.0. (diff)
Update to 0.4.1. (patches fully integrated)
Notes
Notes: svn path=/head/; revision=68114
Diffstat (limited to 'audio/ruby-freedb')
-rw-r--r--audio/ruby-freedb/Makefile2
-rw-r--r--audio/ruby-freedb/distinfo2
-rw-r--r--audio/ruby-freedb/files/patch-freedb_cdrom.c48
-rw-r--r--audio/ruby-freedb/files/patch-lib::freedb.rb80
4 files changed, 2 insertions, 130 deletions
diff --git a/audio/ruby-freedb/Makefile b/audio/ruby-freedb/Makefile
index 144681215812..fcbc596ced9e 100644
--- a/audio/ruby-freedb/Makefile
+++ b/audio/ruby-freedb/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= freedb
-PORTVERSION= 0.4
+PORTVERSION= 0.4.1
CATEGORIES= audio net ruby
MASTER_SITES= http://davedd.free.fr/%SUBDIR%/
MASTER_SITE_SUBDIR= ruby-${PORTNAME}
diff --git a/audio/ruby-freedb/distinfo b/audio/ruby-freedb/distinfo
index 99f4823bad50..4a59312f07fc 100644
--- a/audio/ruby-freedb/distinfo
+++ b/audio/ruby-freedb/distinfo
@@ -1 +1 @@
-MD5 (ruby/ruby-freedb-0.4.tar.gz) = 4942fc0fe69284482e7f8b15f042e7cb
+MD5 (ruby/ruby-freedb-0.4.1.tar.gz) = 76d5bcd0a738e0b4dad12400c5868181
diff --git a/audio/ruby-freedb/files/patch-freedb_cdrom.c b/audio/ruby-freedb/files/patch-freedb_cdrom.c
deleted file mode 100644
index 14f69a388d7f..000000000000
--- a/audio/ruby-freedb/files/patch-freedb_cdrom.c
+++ /dev/null
@@ -1,48 +0,0 @@
---- freedb_cdrom.c.orig Wed Sep 25 15:05:37 2002
-+++ freedb_cdrom.c Sun Oct 13 03:13:25 2002
-@@ -93,17 +93,18 @@
-
-
- char offsets[1089] = "", buff[255];
--
-- Check_Type(device, T_STRING);
-- drive = open(STR2CSTR(device), O_RDONLY | O_NONBLOCK);
-+
-+ Check_SafeStr(device);
-+ drive = open(RSTRING(device)->ptr, O_RDONLY | O_NONBLOCK);
-
- if (drive < 0) {
-- close(drive);
-- rb_sys_fail("Failed to open device");
-+ rb_sys_fail(RSTRING(device)->ptr);
- }
-
-- if (ioctl(drive,CDROMREADTOCHDR,&hdr) < 0)
-- rb_sys_fail("Failed to read TOC");
-+ if (ioctl(drive,CDROMREADTOCHDR,&hdr) < 0) {
-+ close(drive);
-+ rb_sys_fail("Failed to read TOC entry");
-+ }
-
- first=hdr.cdth_trk0;
- last=hdr.cdth_trk1;
-@@ -126,6 +127,7 @@
- t.data = TocEntry;
-
- if (ioctl(drive, CDIOREADTOCENTRYS, (char *) &t) < 0)
-+ free(TocEntry);
- close(drive);
- rb_sys_fail("Failed to read TOC entry");
- }
-@@ -157,9 +159,11 @@
- TocEntry[last].cdte_format = CDROM_LBA;
- if (ioctl(drive, CDROMREADTOCENTRY, &TocEntry[i]) < 0) {
- free(TocEntry);
-+ close(drive);
- rb_sys_fail("Failed to read TOC entry");
- }
- #endif
-+ close(drive);
-
- #if defined(OS_FREEBSD)
- TocEntry[i].cdte_addr.lba = ntohl(TocEntry[i].cdte_addr.lba);
diff --git a/audio/ruby-freedb/files/patch-lib::freedb.rb b/audio/ruby-freedb/files/patch-lib::freedb.rb
deleted file mode 100644
index 6f3e4562d2e7..000000000000
--- a/audio/ruby-freedb/files/patch-lib::freedb.rb
+++ /dev/null
@@ -1,80 +0,0 @@
---- lib/freedb.rb.orig Wed Sep 25 15:05:37 2002
-+++ lib/freedb.rb Sat Oct 5 00:04:31 2002
-@@ -58,34 +58,53 @@
- # @tracks.clear
- @results[index] =~ /\S+ \S+/
- @handler.send_cmd("read", $&)
-+
-+ # swallow the whole response into a hash
-+ response = Hash.new
-+
- @handler.each_line { |line|
- case line
-- when /^4\d\d (.+)/
-- raise(FreedbError, $1)
-- when /^210 (\S+)/
-- @genre = $1
-- # #or
-- when /^DGENRE=(.+)/
-- @exact_genre = $1
-- when /^DYEAR=(\d+)/
-- @year = $1.to_i
-- when /^DTITLE=(.*)/
-- @artist, @title = $1.split(" / ")
-- @title ||= @artist
-- when /^TTITLE(\d+)=(.*)/
-- h = @tracks_ext[$1.to_i]
-- h["title"] = $2
-- @tracks[$1.to_i] = $2
-- when /^EXTD=(.*)/
-- @ext_infos ||= ""
-- @ext_infos += $1
-- when /^EXTT(\d+)=(.*)/
-- h = @tracks_ext[$1.to_i]
-- h["ext"] = $2
-- #@tracks << md[1]
-- #when /^TTITLE\d+=/
-+ when /^(\d+) (\S+)/, /^([A-Za-z0-9_]+)=(.*)/
-+ key = $1.upcase
-+
-+ val = $2.gsub(/\\(.)/) {
-+ case $1
-+ when "t"
-+ "\t"
-+ when "n"
-+ "\n"
-+ else
-+ $1
-+ end
-+ }
-+
-+ (response[key] ||= '') << val
- end
- }
-+
-+ @genre = response['210']
-+ @exact_genre = response['DGENRE']
-+ @year = response['DYEAR'].to_i
-+ @ext_infos = response['EXTD']
-+
-+ # %r is to avoid ruby >= 1.7 warning
-+ @artist, @title = response['DTITLE'].split(%r" / ", 2)
-+ # A self-titled album may not have a title part
-+ @title ||= @artist
-+
-+ response.each { |key, val|
-+ case key
-+ when /^4\d\d$/
-+ raise(FreedbError, val)
-+ when /^TTITLE(\d+)$/
-+ i = $1.to_i
-+ @tracks_ext[i]["title"] = @tracks[i] = val
-+ when /^EXTT(\d+)$/
-+ i = $1.to_i
-+ @tracks_ext[i]["ext"] = val
-+ end
-+ }
-+
- self
- end
-