aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2010-11-06 19:13:24 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2010-11-06 19:13:24 +0000
commitd6d9c9ec618ff0e3ac3778608ee3c61a274997ee (patch)
tree3ff98cd64bd6391af30172b061bd71a29d3f5989
parente58358dd0800df6dffac75b9666e925456afa41e (diff)
downloadports-d6d9c9ec618ff0e3ac3778608ee3c61a274997ee.tar.gz
ports-d6d9c9ec618ff0e3ac3778608ee3c61a274997ee.zip
Notes
-rw-r--r--audio/Makefile1
-rw-r--r--audio/rubyripper/Makefile57
-rw-r--r--audio/rubyripper/distinfo2
-rw-r--r--audio/rubyripper/files/patch-rr_lib.rb54
-rw-r--r--audio/rubyripper/files/patch-rubyripper_gtk2.rb27
-rw-r--r--audio/rubyripper/pkg-descr18
-rw-r--r--audio/rubyripper/pkg-plist15
7 files changed, 174 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile
index a850d99380d2..30ba9b7975c0 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -685,6 +685,7 @@
SUBDIR += ruby-xmms2
SUBDIR += rubygem-librmpd
SUBDIR += rubygem-ruby-mp3info
+ SUBDIR += rubyripper
SUBDIR += s3mod
SUBDIR += sbagen
SUBDIR += schism
diff --git a/audio/rubyripper/Makefile b/audio/rubyripper/Makefile
new file mode 100644
index 000000000000..afd2bfdc404e
--- /dev/null
+++ b/audio/rubyripper/Makefile
@@ -0,0 +1,57 @@
+# New ports collection makefile for: Rubyripper
+# Date created: 6 Nov 2010
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= rubyripper
+DISTVERSION= 0.6.0
+CATEGORIES= audio sysutils ruby
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Digital audio CD extraction tool for accurate ripping
+
+LICENSE= GPLv3
+
+# cdparanoia is not really required for build, but it would not configure
+# without it (ideally, configure script should be fixed instead of forcing
+# superfluous build dependency)
+BUILD_DEPENDS= ${RUBY_SITELIBDIR}/gettext.rb:${PORTSDIR}/devel/ruby-gettext \
+ cdparanoia:${PORTSDIR}/audio/cdparanoia
+RUN_DEPENDS:= ${BUILD_DEPENDS} \
+ ${RUBY_SITEARCHLIBDIR}/gtk2.so:${PORTSDIR}/x11-toolkits/ruby-gtk2 \
+ cdrdao:${PORTSDIR}/sysutils/cdrdao \
+ cd-discid:${PORTSDIR}/audio/cd-discid
+
+USE_BZIP2= yes
+USE_GETTEXT= yes
+USE_RUBY= yes
+INSTALLS_ICONS= yes
+
+DESKTOP_ENTRIES="Rubyripper" "Secure Audio Disc Ripper" \
+ "${PORTNAME}.png" "rrip_gtk2" \
+ "Audio;AudioVideo;" ${FALSE}
+
+post-patch:
+# fix an apparent typo
+ @${REINPLACE_CMD} -e 's,cdparanioa,cdparanoia,' \
+ ${WRKSRC}/locale/po/bg/rubyripper.po \
+ ${WRKSRC}/locale/po/ru/rubyripper.po
+
+do-build:
+ cd ${WRKSRC} && ${RUBY} configure --update-lang
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/rr_lib.rb ${RUBY_SITELIBDIR}
+.for frontend in cli gtk2
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}_${frontend}.rb \
+ ${PREFIX}/bin/rrip_${frontend}
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png \
+ ${PREFIX}/share/icons/hicolor/128x128/apps
+ cd ${WRKSRC} && ${FIND} . -type f -name \*.mo | ${XARGS} ${TAR} \
+ cf - | ${TAR} xf - -C ${PREFIX}/share
+
+.include <bsd.port.mk>
diff --git a/audio/rubyripper/distinfo b/audio/rubyripper/distinfo
new file mode 100644
index 000000000000..82f0807585a0
--- /dev/null
+++ b/audio/rubyripper/distinfo
@@ -0,0 +1,2 @@
+SHA256 (rubyripper-0.6.0.tar.bz2) = 073ef04d87f0e74b02f552813e0f826f83a7653212ef6ff030fbf511ab3ca7f4
+SIZE (rubyripper-0.6.0.tar.bz2) = 118807
diff --git a/audio/rubyripper/files/patch-rr_lib.rb b/audio/rubyripper/files/patch-rr_lib.rb
new file mode 100644
index 000000000000..b982f9446957
--- /dev/null
+++ b/audio/rubyripper/files/patch-rr_lib.rb
@@ -0,0 +1,54 @@
+--- rr_lib.rb.orig
++++ rr_lib.rb
+@@ -70,6 +70,7 @@
+ Thread.new do
+ if installed('eject') ; `eject #{cdrom}`
+ elsif installed('diskutil'); `diskutil eject #{cdrom}` #Mac users don't got eject, but diskutil
++ elsif installed('cdcontrol'); `cdcontrol -f #{cdrom} eject` #FreeBSD has cdcontrol(1) in the base system
+ else puts _("No eject utility found!")
+ end
+ end
+@@ -573,15 +574,15 @@
+ end
+ end
+
+- unless File.blockdev?(@cdrom) #is it a real device?
++ unless File.chardev?(@cdrom) #is it a real device?
+ @error = _("Cdrom drive %s does not exist on your system!\n"\
+ "Please configure your cdrom drive first.") % [@cdrom]
+ @query = false
+ return false
+ end
+
+- unless (File.readable?(@cdrom) && File.writable?(@cdrom))
+- @error = _("You don't have read and write permission\n"\
++ unless File.readable?(@cdrom)
++ @error = _("You don't have read permissions\n"\
+ "for device %s on your system! These permissions are\n"\
+ "necessary for cdparanoia to scan your drive.\n\n%s\n"\
+ "You might want to add yourself to the necessary group in /etc/group")\
+@@ -605,13 +606,13 @@
+ return true
+ end
+
+- unless ((File.chardev?(device) || File.blockdev?(device)) && File.readable?(device) && File.writable?(device))
++ unless ((File.chardev?(device) || File.blockdev?(device)) && File.readable?(device))
+ permission = nil
+ if File.chardev?(device) && installed('ls')
+ permission = `ls -l #{device}`
+ end
+
+- @error = _("You don't have read and write permission\n"\
++ @error = _("You don't have read permissions\n"\
+ "for device %s on your system! These permissions are\n"\
+ "necessary for cdparanoia to scan your drive.\n\n%s\n"\
+ "You might want to add yourself to the necessary group in /etc/group")\
+@@ -2524,7 +2525,7 @@
+ # 6) is req_matches_all <= req_matches_errors
+
+ def checkConfig
+- unless File.symlink?(@settings['cdrom']) || File.blockdev?(@settings['cdrom'])
++ unless File.symlink?(@settings['cdrom']) || File.chardev?(@settings['cdrom'])
+ @error = ["error", _("The device %s doesn't exist on your system!") % [@settings['cdrom']]]
+ return false
+ end
diff --git a/audio/rubyripper/files/patch-rubyripper_gtk2.rb b/audio/rubyripper/files/patch-rubyripper_gtk2.rb
new file mode 100644
index 000000000000..c8a3b2784939
--- /dev/null
+++ b/audio/rubyripper/files/patch-rubyripper_gtk2.rb
@@ -0,0 +1,27 @@
+--- rubyripper_gtk2.rb.orig
++++ rubyripper_gtk2.rb
+@@ -248,13 +248,13 @@
+ def handle_tray
+ @buttons.each{|button| button.sensitive = false}
+ Thread.new do
+- if installed('eject')
++ if installed('cdcontrol')
+ if @buttontext[2].text == _("Open tray")
+ @instances['GtkMetadata'] = false
+ @instances['ShortMessage'].open_tray(@settings['cdrom'])
+ change_display(@instances['ShortMessage'])
+ cancelTocScan()
+- `eject #{@settings['cdrom']}` # spit the cd out
++ `cdcontrol -f #{@settings['cdrom']} eject` # spit the cd out
+ @buttontext[2].set_text('_'+_("Close tray"),true)
+ @buttonicons[2].stock = Gtk::Stock::GOTO_TOP
+ @instances['ShortMessage'].ask_for_disc
+@@ -262,7 +262,7 @@
+ else
+ @instances['ShortMessage'].close_tray(@settings['cdrom'])
+ change_display(@instances['ShortMessage'])
+- `eject --trayclose #{@settings['cdrom']}` # close the tray
++ `cdcontrol -f #{@settings['cdrom']} close` # close the tray
+ @buttontext[2].set_text('_'+_("Open tray"),true)
+ @buttonicons[2].stock = Gtk::Stock::GOTO_BOTTOM
+ scan_drive()
diff --git a/audio/rubyripper/pkg-descr b/audio/rubyripper/pkg-descr
new file mode 100644
index 000000000000..2a0b8b4f12c0
--- /dev/null
+++ b/audio/rubyripper/pkg-descr
@@ -0,0 +1,18 @@
+Rubyripper is a digital audio extraction tool that uses cdparanoia error
+correcting power and its own secure ripping algorithm to ensure that the
+rip is done successfully and accurately. It is very similar to and much
+inspired by EAC for Windows, the golden standard of CD ripping software.
+
+Some of the main features:
+
+ - Graphical (GTK+2) and command line interfaces
+ - Secure (accurate) ripping method
+ - Editable FreeDB tag fetching
+ - FLAC, Ogg/Vorbis, MP3, WAV format support; more codecs can be passed
+ - Multiple codec encoding in one run
+ - Drive offset support (http://www.accuraterip.com/driveoffsets.htm)
+ - Playlist and cue sheet creation
+ - Logfile with analysis of corrected and impossible to correct positions
+ - MD5 sum for each track included in the logfile
+
+WWW: http://code.google.com/p/rubyripper/
diff --git a/audio/rubyripper/pkg-plist b/audio/rubyripper/pkg-plist
new file mode 100644
index 000000000000..3582c0883e67
--- /dev/null
+++ b/audio/rubyripper/pkg-plist
@@ -0,0 +1,15 @@
+bin/rrip_cli
+bin/rrip_gtk2
+%%RUBY_SITELIBDIR%%/rr_lib.rb
+share/icons/hicolor/128x128/apps/rubyripper.png
+share/locale/bg/LC_MESSAGES/rubyripper.mo
+share/locale/de/LC_MESSAGES/rubyripper.mo
+share/locale/es/LC_MESSAGES/rubyripper.mo
+share/locale/fr/LC_MESSAGES/rubyripper.mo
+share/locale/hu/LC_MESSAGES/rubyripper.mo
+share/locale/it/LC_MESSAGES/rubyripper.mo
+share/locale/nl/LC_MESSAGES/rubyripper.mo
+share/locale/ru/LC_MESSAGES/rubyripper.mo
+share/locale/se/LC_MESSAGES/rubyripper.mo
+@dirrmtry share/locale/se/LC_MESSAGES
+@dirrmtry share/locale/se