summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2002-08-30 12:55:39 +0000
committerknu <knu@FreeBSD.org>2002-08-30 12:55:39 +0000
commit486fb0ec9212522ec6f4e26b795836712400382c (patch)
treefa6b8787ed27f2b58a42927f3a191b70c5df2690
parent730ad803fdfe4e3193c278b5efedc743f1279dba (diff)
downloadFreeBSD-ports-486fb0ec9212522ec6f4e26b795836712400382c.zip
FreeBSD-ports-486fb0ec9212522ec6f4e26b795836712400382c.tar.gz
Fix syntax error and add a new method: Freedb#genre. (both were
submitted to the author)
-rw-r--r--audio/ruby-freedb/Makefile1
-rw-r--r--audio/ruby-freedb/files/patch-freedb_misc.rb26
2 files changed, 27 insertions, 0 deletions
diff --git a/audio/ruby-freedb/Makefile b/audio/ruby-freedb/Makefile
index 0bce821..92a4e2d 100644
--- a/audio/ruby-freedb/Makefile
+++ b/audio/ruby-freedb/Makefile
@@ -7,6 +7,7 @@
PORTNAME= freedb
PORTVERSION= 0.3
+PORTREVISION= 1
CATEGORIES= audio net ruby
MASTER_SITES= http://davedd.free.fr/%SUBDIR%/
MASTER_SITE_SUBDIR= ruby-${PORTNAME}
diff --git a/audio/ruby-freedb/files/patch-freedb_misc.rb b/audio/ruby-freedb/files/patch-freedb_misc.rb
new file mode 100644
index 0000000..4d5318d
--- /dev/null
+++ b/audio/ruby-freedb/files/patch-freedb_misc.rb
@@ -0,0 +1,26 @@
+--- lib/freedb_misc.rb.orig Sun Apr 7 22:40:20 2002
++++ lib/freedb_misc.rb Fri Aug 30 19:58:47 2002
+@@ -4,12 +4,12 @@
+ class Freedb
+ VERSION = "0.3"
+ PROTO_LEVEL = 1
+- attr_reader :results, :artist, :title, :tracks, :discid
++ attr_reader :results, :genre, :artist, :title, :tracks, :discid
+
+ def initialize(param = "/dev/cdrom", is_discid = false)
+ @discid = ( is_discid ? param : get_cdrom(param) )
+ @tracks = Array.new()
+- @hello_str="#{ENV["USER"]} #{`hostname`.strip} ruby-freedb #{VERSION}"
++ @hello_str="#{ENV['USER']} #{`hostname`.strip} ruby-freedb #{VERSION}"
+ end
+
+ def fetch_net(server = "freedb.org", port = 8880)
+@@ -29,6 +29,8 @@
+ lines = getmultiline(@handler)
+ lines.each { |line|
+ case line
++ when /^210 (\S+)/
++ @genre = $1
+ when /^DTITLE=/
+ md = /DTITLE=(.*) \/ (.*)/.match(line)
+ if md.nil? #the DTITLE field is wrong.Should we throw an exception?
OpenPOWER on IntegriCloud