From fa79670c7b3d360c1300e7d97832cc3dab13aabc Mon Sep 17 00:00:00 2001 From: Donald Burr Date: Thu, 9 Sep 1999 09:40:49 +0000 Subject: New port audio/ripit-atapi, a modified version of ports/audio/ripit that uses CDD as the ripper (and thus can deal with ATAPI CD-ROM drives :) ) --- audio/ripit-atapi/Makefile | 27 +++++++++++++ audio/ripit-atapi/distinfo | 1 + audio/ripit-atapi/files/patch-aa | 82 ++++++++++++++++++++++++++++++++++++++++ audio/ripit-atapi/pkg-comment | 1 + audio/ripit-atapi/pkg-descr | 17 +++++++++ audio/ripit-atapi/pkg-plist | 1 + 6 files changed, 129 insertions(+) create mode 100644 audio/ripit-atapi/Makefile create mode 100644 audio/ripit-atapi/distinfo create mode 100644 audio/ripit-atapi/files/patch-aa create mode 100644 audio/ripit-atapi/pkg-comment create mode 100644 audio/ripit-atapi/pkg-descr create mode 100644 audio/ripit-atapi/pkg-plist (limited to 'audio') diff --git a/audio/ripit-atapi/Makefile b/audio/ripit-atapi/Makefile new file mode 100644 index 000000000000..f55ef4e96d4e --- /dev/null +++ b/audio/ripit-atapi/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: ripit-atapi +# Version required: 1.5 +# Date created: 9 Sep 1999 +# Whom: Donald Burr +# +# $Id$ +# + +DISTNAME= ripit-1.5 +PKGNAME= ripit-atapi-1.5 +CATEGORIES= audio +MASTER_SITES= http://www.initio.no/~oyvindmo/distfiles/ + +MAINTAINER= dburr@FreeBSD.ORG + +RUN_DEPENDS= bladeenc:${PORTSDIR}/audio/bladeenc \ + cdd:${PORTSDIR}/audio/cdd \ + cda:${PORTSDIR}/audio/xmcd \ + sox:${PORTSDIR}/audio/sox + +NO_BUILD= yes +USE_PERL5= yes + +do-install: + @ ${INSTALL_SCRIPT} ${WRKSRC}/ripit.pl ${PREFIX}/bin + +.include diff --git a/audio/ripit-atapi/distinfo b/audio/ripit-atapi/distinfo new file mode 100644 index 000000000000..a9d1946ff0e5 --- /dev/null +++ b/audio/ripit-atapi/distinfo @@ -0,0 +1 @@ +MD5 (ripit-1.5.tar.gz) = ad796d63c258a68de7edc800bfc67e9b diff --git a/audio/ripit-atapi/files/patch-aa b/audio/ripit-atapi/files/patch-aa new file mode 100644 index 000000000000..e057ae18d8dc --- /dev/null +++ b/audio/ripit-atapi/files/patch-aa @@ -0,0 +1,82 @@ +--- ripit.pl.old Thu Sep 9 02:26:37 1999 ++++ ripit.pl Thu Sep 9 02:28:45 1999 +@@ -18,6 +18,11 @@ + # --device - CDROM device to rip from + # + # Version 1.5 01/08/99 - Simon Quinn ++# Version 1.5db 09/09/99 - Donald Burr ++# Modified to use cdd instead of tosha, for those of us ++# (unfortunate enough) who have ATAPI/IDE CD-ROMs. Tested ++# on FreeBSD with the FreeBSD cdd port (/usr/ports/audio/cdd), ++# YMMV if you are using a different OS. + # + # Usage: ripit.pl [--halt] [--bitrate rate] + # [--year year] [--device cddevice] [start_track] +@@ -26,10 +31,12 @@ + # User configurable variables + # + +-$cddev = "/dev/cdrom"; # CD Audio device +-$outputdir = "/dosc/cdrip/"; # Where the MP3s should go ++# Note: devices must be specified this way (strip the leading '/dev/' ++# and the trailing partition letter) because this is the way cdd wants it. ++$cddev = "acd1"; # CD Audio device ++$outputdir = "/home/mp3/"; # Where the MP3s should go + $bitrate = 160; # Bitrate for MP3s +-$encoder = 1; # 0 - Bladeenc, 1 - Lame ++$encoder = 0; # 0 - Bladeenc, 1 - Lame + + $use_underscore = 0; # Use _ instead of spaces in filenames (1 yes, 0 no) + +@@ -44,7 +51,7 @@ + + ####################################################################### + # No User configurable parameters below here +-####################################################################### ++###################################################################### + + require "flush.pl"; + use Getopt::Long; +@@ -173,9 +180,9 @@ + + system("rm $tocfile >/dev/null 2>&1"); + +- system("cda -dev $cddev on >/dev/null 2>&1") ; +- system("cda -dev $cddev toc >$tocfile") ; +- system("cda -dev $cddev off >/dev/null 2>&1") ; ++ system("cda -dev /dev/r${cddev}c on >/dev/null 2>&1") ; ++ system("cda -dev /dev/r${cddev}c toc >$tocfile") ; ++ system("cda -dev /dev/r${cddev}c off >/dev/null 2>&1") ; + + if ( ! -r $tocfile ) { die "$tocfile is missing"; } + } +@@ -327,16 +334,14 @@ + $riptrackname = &get_trackname($_, $tracklist[$_ - 1]); + $riptrackno = $_; + ++ print "Ripping track $tracklist[$_ - 1]...\n"; + &printflush(RIPLOG,"Ripping $tracklist[$_ - 1]...\n"); + +- if (system("cdparanoia -d $cddev $riptrackno \"$riptrackname.rip\"")) { +- &printflush(RIPLOG,"cdparanoia failed on $tracklist[$_ - 1]\n"); +- die "cdparanoia failed on $tracklist[$_ - 1]"; ++ if (system("cdd -t $riptrackno -q -f $cddev - 2>/dev/null | sox -t cdr - \"$riptrackname.wav\"")) { ++ &printflush(RIPLOG,"cdd failed on $tracklist[$_ - 1]\n"); ++ die "cdd failed on $tracklist[$_ - 1]"; + } + +- # Rename rip file to a wav for encoder +- rename "$riptrackname.rip","$riptrackname.wav"; +- + &printflush(RIPLOG,"Rip complete $tracklist[$_ - 1]\n"); + + # Start the Encoder in the background. but only once +@@ -367,7 +372,7 @@ + print "\nMP3 Encoding track ".$ncount." of ".($#seltrack + 1)."\n"; + &printflush(RIPLOG,"Encoding $tracklist[$_ - 1]...\n"); + +- # Keep looping until the file appears, ie wait for cdparanoia ++ # Keep looping until the file appears, ie wait for cdd + # timeout after 30 minutes + $x=0; + while( ! -r "$riptrackname.wav" ){ diff --git a/audio/ripit-atapi/pkg-comment b/audio/ripit-atapi/pkg-comment new file mode 100644 index 000000000000..4eecfbf3a74a --- /dev/null +++ b/audio/ripit-atapi/pkg-comment @@ -0,0 +1 @@ +A perl-script frontend for encoding audio CDs to MP3 files (ATAPI) diff --git a/audio/ripit-atapi/pkg-descr b/audio/ripit-atapi/pkg-descr new file mode 100644 index 000000000000..1f9ab1a4a6c5 --- /dev/null +++ b/audio/ripit-atapi/pkg-descr @@ -0,0 +1,17 @@ +ripit +----- + +ripit is a small front-end program written in perl for ripping, +encoding & tagging MP3s. It is a console program that needs no user +intervention. It requires cdd, bladeenc and xmcd (for CDDB access). + +WWW: http://www.netcomuk.co.uk/~squinn/ripit.html + +This version has been modified from the original 'ripit' port to use +CDD (/usr/ports/audio/cdd) to rip the tracks, for those of us (unfortunate +enough) who own ATAPI CD-ROM drives. + +Note: This port also requires sox, the SOund eXchanger (/usr/ports/audio/sox) +as part of the ripping process. +-- +Port by Donald Burr diff --git a/audio/ripit-atapi/pkg-plist b/audio/ripit-atapi/pkg-plist new file mode 100644 index 000000000000..cd38f19aa1f6 --- /dev/null +++ b/audio/ripit-atapi/pkg-plist @@ -0,0 +1 @@ +bin/ripit.pl -- cgit v1.2.3