On Sat, Nov 17, 2012 at 01:26:19PM +0000, Stuart Henderson wrote:
> Here's a diff, which needs the attached cd-discid port. I've patched
> it to use id3tag from audio/id3lib for now, eyed3 could be ported
> separately if wanted (though that requires python, so it might be
> better to just mention it as an option rather than force the
> dependency).

> *Not* tested, as I don't think I have an openbsd machine with a CD
> drive here (who needs them with pxeboot and an internet connection ;)

Close, but didn't work. Scripts depend on /bin/bash so I've added patches
to set the proper path to bash via SUBST_CMD and added shells/bash to
RUN_DEPENDS. Ksh doesn't like the script at all.

And your patch introduced a syntax error in abcde on line 3890:
  else if [ "$ID3TAGV" = "id3tag"; then
should be:
  else if [ "$ID3TAGV" = "id3tag" ]; then

Fixed diff below.

OK for me with those tweaks, also for the new cd-discid port.

Tested by ripping a true classic, legally(!) obtained for IRĀ£10.49 back
in the days when buying CDs and listening to them skipping on a "portable"
CD player that didn't quite fit into any unoccupied coat pocket was still
a fashionable thing to do.
---- James Brown / The Payback ----
1: The Payback
2: Doing The Best I Can
3: Take Some... Leave Some
4: Shoot Your Shot
5: Forever Suffering
6: Time Is Running Out Fast
7: Stone To The Bone
8: Mind Power

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/abcde/Makefile,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile
--- Makefile    17 Oct 2011 12:40:44 -0000      1.18
+++ Makefile    17 Nov 2012 15:12:54 -0000
@@ -2,72 +2,40 @@
 
 COMMENT=       command-line utility to rip and encode audio cds
 
-V=             2.3.0
-# cd-diskid version number
-V2=            0.9
-DISTNAME=      abcde-$V
+DISTNAME=      abcde-2.5.4
 CATEGORIES=    audio
 
-HOMEPAGE=      http://www.hispalinux.es/~data/abcde.php
+HOMEPAGE=      http://code.google.com/p/abcde/
 
-# Artistic and GPL
+# Artistic or GPLv2, but "Copyright for this work is to expire
+# January 1, 2010, after which it shall be public domain."
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               c
 
-MS=            http://www.hispalinux.es/~data/files/ \
-               http://spacehopper.org/mirrors/
-MASTER_SITES=  ${MS}
-MASTER_SITES0= ${MS:=cd-discid/}
-MASTER_SITES1= http://lly.org/~rcw/id3/old/ \
-               http://lly.org/~rcw/id3/
-DISTFILES=     ${DISTNAME:S,-,_,}.orig.tar.gz \
-               cd-discid_${V2}.orig.tar.gz:0
-
-RUN_DEPENDS=   audio/cdparanoia
-
-FLAVORS=       lame
-FLAVOR?=       
+MASTER_SITES=  http://abcde.googlecode.com/files/
+MASTER_SITES0= http://lly.org/~rcw/id3/ \
+               http://lly.org/~rcw/id3/old/
+
+RUN_DEPENDS=   audio/cdparanoia \
+               audio/cd-discid \
+               audio/id3lib \
+               audio/vorbis-tools \
+               shells/bash
 
 NO_REGRESS=    Yes
-USE_GROFF =    Yes
 
-.if ${FLAVOR:Mlame}
-DISTFILES+=    id3_0.12.orig.tar.gz:1
-RUN_DEPENDS+=  audio/lame
-.else
-RUN_DEPENDS+=  audio/vorbis-tools
-.endif
-SUPDISTFILES=  id3_0.12.orig.tar.gz:1
-
-pre-configure:
-.if ${FLAVOR:Mlame}
-       perl -pi -e 's,OUTPUTTYPE=ogg,OUTPUTTYPE=mp3,g' ${WRKSRC}/abcde
-.endif
-
-do-build:
-       cd ${WRKDIR}/cd-discid-${V2} && \
-               ${CC} ${CFLAGS} -o cd-discid cd-discid.c
-.if ${FLAVOR:Mlame}
-       cd ${WRKDIR}/id3-0.12 && \
-               perl -pi -e 's,#include <getopt.h>,/*#include <getopt.h>*/,g' 
id3.c && \
-               ${CC} ${CFLAGS} -o id3 id3.c
-.endif
+do-configure:
+       perl -pi -e 's,/etc/,${SYSCONFDIR}/,' ${WRKSRC}/abcde
+       ${SUBST_CMD} ${WRKSRC}/abcde ${WRKSRC}/cddb-tool
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKSRC}/abcde ${PREFIX}/bin
        ${INSTALL_SCRIPT} ${WRKSRC}/cddb-tool ${PREFIX}/bin
-       ${INSTALL_PROGRAM} ${WRKDIR}/cd-discid-${V2}/cd-discid ${PREFIX}/bin
        ${INSTALL_MAN} ${WRKSRC}/abcde.1 ${PREFIX}/man/man1
        ${INSTALL_MAN} ${WRKSRC}/cddb-tool.1 ${PREFIX}/man/man1
-       ${INSTALL_MAN} ${WRKDIR}/cd-discid-${V2}/cd-discid.1 ${PREFIX}/man/man1
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/abcde
        ${INSTALL_DATA} ${WRKSRC}/abcde.conf ${PREFIX}/share/examples/abcde
-.if ${FLAVOR:Mlame}
-       ${INSTALL_PROGRAM} ${WRKDIR}/id3-0.12/id3 ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKDIR}/id3-0.12/id3.1 ${PREFIX}/man/man1
-.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/abcde/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo    5 Apr 2007 15:37:41 -0000       1.7
+++ distinfo    17 Nov 2012 14:56:47 -0000
@@ -1,15 +1,4 @@
-MD5 (abcde_2.3.0.orig.tar.gz) = pT+kF+yV8E7yJdigyU5NUQ==
-MD5 (cd-discid_0.9.orig.tar.gz) = ZGd7i2PR2w2wFQQ/VFUXGg==
-MD5 (id3_0.12.orig.tar.gz) = V5H2NLko857J6qWe+z+TFQ==
-RMD160 (abcde_2.3.0.orig.tar.gz) = pqA8yCjv/uUFtmqqNizj0p66RSM=
-RMD160 (cd-discid_0.9.orig.tar.gz) = WASbp3gkMBmparf42OryE+jspPo=
-RMD160 (id3_0.12.orig.tar.gz) = BLu5B35gbUdo6ToTuPksuSAqj1w=
-SHA1 (abcde_2.3.0.orig.tar.gz) = ocPBebcBsAC9aSZkBgtHpd7mzTU=
-SHA1 (cd-discid_0.9.orig.tar.gz) = OJw7W7+5axE/hajSBvnQ1wUhRqQ=
-SHA1 (id3_0.12.orig.tar.gz) = bnQxP1YhSnPvi1Ttq9aYRE4HCA8=
-SHA256 (abcde_2.3.0.orig.tar.gz) = uaOgZhAL0e2jJH3AHc85K6Jej+hx46Ce8P8y88mY1Zc=
-SHA256 (cd-discid_0.9.orig.tar.gz) = 
SReshec01mnMTiuOBIA6/DvduAn8NrpADvSAdYOfors=
-SHA256 (id3_0.12.orig.tar.gz) = L1etDFynnH3XSqX/dhQ5Kmj3Iy467Em0qHIApEYFgYg=
-SIZE (abcde_2.3.0.orig.tar.gz) = 73066
-SIZE (cd-discid_0.9.orig.tar.gz) = 11217
-SIZE (id3_0.12.orig.tar.gz) = 12492
+SHA256 (abcde-2.5.4.tar.gz) = hbZ5uXDnKKmGSHrcv/fFHrDnL5+hDERQUh+OAp+m5ZE=
+SHA256 (id3_0.15.orig.tar.gz) = KXnFn5P/PPrfaNF4X7xioh8cKW9KRAcqMg8SaEGTbF0=
+SIZE (abcde-2.5.4.tar.gz) = 104229
+SIZE (id3_0.15.orig.tar.gz) = 12871
Index: patches/patch-abcde
===================================================================
RCS file: /cvs/ports/audio/abcde/patches/patch-abcde,v
retrieving revision 1.6
diff -u -p -r1.6 patch-abcde
--- patches/patch-abcde 5 Sep 2010 21:55:42 -0000       1.6
+++ patches/patch-abcde 17 Nov 2012 15:17:35 -0000
@@ -1,29 +1,76 @@
-$OpenBSD: patch-abcde,v 1.6 2010/09/05 21:55:42 sthen Exp $
---- abcde.orig Sun Aug 14 20:51:53 2005
-+++ abcde      Sun Sep  5 22:55:16 2010
-@@ -2058,7 +2058,7 @@ VAPLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}
+$OpenBSD$
+--- abcde.orig Tue Sep 18 15:09:31 2012
++++ abcde      Sat Nov 17 16:09:52 2012
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!${LOCALBASE}/bin/bash
+ # Copyright (c) 1998-2001 Robert Woodcock <r...@debian.org>
+ # Copyright (c) 2003-2006 Jesus Climent <jesus.clim...@hispalinux.es>
+ # Copyright (c) 2009-2012 Colin Tuckley <col...@debian.org>
+@@ -833,6 +833,16 @@ do_tag ()
+                                               
${TPE2:+--set-text-frame=TPE2:"$TPE2"} \
+                                               "$ABCDETEMPDIR/track$1.$OUTPUT"
+                                       ;;
++                              id3tag)
++                                      # FIXME # track numbers in mp3 come 
with 1/10, so we cannot
++                                      # happily substitute them with $TRACKNUM
++                                      run_command tagtrack-$OUTPUT-$1 nice 
$ENCNICE $TAGGER $TAGGEROPTS \
++                                              --comment=::"$COMMENTOUTPUT" -A 
"$DALBUM" \
++                                              -a "$TRACKARTIST" -s 
"$TRACKNAME" -y "$CDYEAR" \
++                                              -g "$GENREID" -t 
"${TRACKNUM:-$1}" \
++                                              ${TRACKNUM:+-T "$TRACKS"} \
++                                              "$ABCDETEMPDIR/track$1.$OUTPUT"
++                                      ;;
+                               # FIXME # Still not activated...
+                               id3ed)
+                                       run_command tagtrack-$OUTPUT-$1 nice 
$ENCNICE \
+@@ -3165,7 +3175,7 @@ VAPLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}
  VAPLAYLISTDATAPREFIX=''
  DOSPLAYLIST=n
  COMMENT=''
 -ID3TAGV=2
-+ID3TAGV=1
++ID3TAGV=id3tag
  ENCNICE=10
  READNICE=10
  DISTMP3NICE=10
-@@ -2170,7 +2170,7 @@ elif [ X$(uname) = "XDarwin" ] ; then
-       NEEDDISKTOOL=y
+@@ -3207,6 +3217,7 @@ AACENC=faac
+ 
+ ID3=id3
+ ID3V2=id3v2
++ID3TAG=id3tag
+ EYED3=eyeD3
+ VORBISCOMMENT=vorbiscomment
+ METAFLAC=metaflac
+@@ -3259,6 +3270,7 @@ AACENCOPTS=
+ 
+ ID3OPTS=
+ ID3V2OPTS=
++ID3TAGOPTS=
+ CDPARANOIAOPTS=
+ CDDA2WAVOPTS=
+ DAGRABOPTS=
+@@ -3310,7 +3322,7 @@ elif [ X$(uname) = "XDarwin" ] ; then
+       NEEDDISKUTIL=y
        CDROMREADERSYNTAX=cddafs
  elif [ X$(uname) = "XOpenBSD" ] ; then
 -      HTTPGET=wget
 +      HTTPGET=ftp
        MD5SUM=md5
+       OSFLAVOUR=OBSD
+ elif [ X$(uname) = "XNetBSD" ] ; then
+@@ -3875,11 +3887,15 @@ esac
+ if [ "$ID3TAGV" = "1" ]; then
+       TAGGER="$ID3"
+       TAGGEROPTS="$ID3OPTS"
++else if [ "$ID3TAGV" = "id3tag" ]; then
++      TAGGER="$ID3TAG"
++      TAGGEROPTS="$ID3TAGOPTS"
  else
-       HTTPGET=wget
-@@ -2207,6 +2207,7 @@ if [ "$HTTPGETOPTS" = "" ] ; then
-               wget) HTTPGETOPTS="-q -O -";;
-               curl) HTTPGETOPTS="-f -s";;
-               fetch)HTTPGETOPTS="-q -o -";;
-+              ftp)  HTTPGETOPTS="-V -o -";;
-               *) echo "abcde warning: HTTPGET in non-standard and HTTPGETOPTS 
are not defined." >&2 ;;
-       esac
+       TAGGER="$EYED3"
+       TAGGEROPTS="$ID3V2OPTS"
+       ID3SYNTAX=eyed3
+       TAGGEROPTS="--set-encoding=utf16-LE $ID3V2OPTS"
++fi
  fi
+ 
+ # NOGAP is specific to lame. Other encoders fail ...
Index: patches/patch-cddb-tool
===================================================================
RCS file: patches/patch-cddb-tool
diff -N patches/patch-cddb-tool
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cddb-tool     17 Nov 2012 15:12:11 -0000
@@ -0,0 +1,9 @@
+$OpenBSD$
+--- cddb-tool.orig     Sat Nov 17 16:11:57 2012
++++ cddb-tool  Sat Nov 17 16:12:05 2012
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!${LOCALBASE}/bin/bash
+ 
+ # Copyright (C) 1999 Nathaniel Smith <n...@uclink4.berkeley.edu>
+ # Copyright (C) 1999, 2000, 2001 Robert Woodcock <r...@debian.org>
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/audio/abcde/pkg/DESCR,v
retrieving revision 1.2
diff -u -p -r1.2 DESCR
--- pkg/DESCR   15 Dec 2003 21:42:10 -0000      1.2
+++ pkg/DESCR   17 Nov 2012 14:56:47 -0000
@@ -2,5 +2,5 @@ abcde is a front end command-line utilit
 that grabs tracks off a CD, encodes them to ogg or mp3 format, and
 tags and names them with data from a CDDB server, all in one go.
 
-You may want to copy ${PREFIX}/share/examples/abcde/abcde.conf
-to your homedir as .abcde.conf and adjust it to your needs.
+To use mp3 format, install the lame package, and set OUTPUTTYPE=mp3 in
+${SYSCONFDIR}/abcde.conf (copy this to ~/.abcde.conf for per-user 
configuration).
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/abcde/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   5 Aug 2004 03:28:11 -0000       1.2
+++ pkg/PLIST   17 Nov 2012 14:56:47 -0000
@@ -1,10 +1,9 @@
 @comment $OpenBSD: PLIST,v 1.2 2004/08/05 03:28:11 espie Exp $
+@pkgpath audio/abcde,lame
 bin/abcde
-bin/cd-discid
 bin/cddb-tool
 @man man/man1/abcde.1
-@man man/man1/cd-discid.1
 @man man/man1/cddb-tool.1
 share/examples/abcde/
 share/examples/abcde/abcde.conf
-%%lame%%
+@sample ${SYSCONFDIR}/abcde.conf

Reply via email to