aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwoodsb02 <woodsb02@FreeBSD.org>2017-11-25 09:34:24 +0800
committerwoodsb02 <woodsb02@FreeBSD.org>2017-11-25 09:34:24 +0800
commitd44f9606600106e8de4e2c031ad53fa2aed07b92 (patch)
tree8c11c23f16ad123cc14442bb636f664d76b7644c /audio
parent81b18030b869254905e66118bea4ac15edfb07ef (diff)
downloadfreebsd-ports-gnome-d44f9606600106e8de4e2c031ad53fa2aed07b92.tar.gz
freebsd-ports-gnome-d44f9606600106e8de4e2c031ad53fa2aed07b92.tar.zst
freebsd-ports-gnome-d44f9606600106e8de4e2c031ad53fa2aed07b92.zip
audio/abcde: Add MusicBrainz support
- Make MusicBrainz support an on-by-default option - Add pkg-plist file to allow @sample to be clearly used for the config file - Include patch from upstream bug#54 to fix calculating MusicBrainz discid [1] [1] https://abcde.einval.com/bugzilla/show_bug.cgi?id=54 PR: 223346 Approved by: tz (maintainer timeout)
Diffstat (limited to 'audio')
-rw-r--r--audio/abcde/Makefile23
-rw-r--r--audio/abcde/files/patch-abcde14
-rw-r--r--audio/abcde/pkg-plist6
3 files changed, 33 insertions, 10 deletions
diff --git a/audio/abcde/Makefile b/audio/abcde/Makefile
index c1c3fe691e35..b5b80f72473e 100644
--- a/audio/abcde/Makefile
+++ b/audio/abcde/Makefile
@@ -24,23 +24,26 @@ NO_ARCH= yes
NO_BUILD= yes
USES= python:run shebangfix
-SHEBANG_FILES= abcde cddb-tool
+SHEBANG_FILES= abcde abcde-musicbrainz-tool cddb-tool
SUB_FILES= pkg-message
-PLIST_FILES= bin/abcde bin/cddb-tool etc/abcde.conf.sample \
- man/man1/abcde.1.gz man/man1/cddb-tool.1.gz
-
OPTIONS_GROUP= CODEC RIPPER
OPTIONS_GROUP_CODEC= AAC FLAC MPP OPUS SPEEX
OPTIONS_GROUP_RIPPER= CDDA2WAV DAGRAB
-OPTIONS_DEFINE= NORMALIZE REPLAYGAIN
+OPTIONS_DEFINE= MUSICBRAINZ NORMALIZE REPLAYGAIN
+OPTIONS_DEFAULT= MUSICBRAINZ
AAC_RUN_DEPENDS= faac:audio/faac
CDDA2WAV_RUN_DEPENDS= cdda2wav:sysutils/cdrtools
DAGRAB_RUN_DEPENDS= dagrab:audio/dagrab
FLAC_RUN_DEPENDS= flac:audio/flac
MPP_RUN_DEPENDS= mpcenc:audio/musepack
+MUSICBRAINZ_DESC= Enable MusicBrainz DiscID support
+MUSICBRAINZ_USES= perl5
+MUSICBRAINZ_USE_PERL5= run
+MUSICBRAINZ_RUN_DEPENDS=p5-MusicBrainz-DiscID>=0:audio/p5-MusicBrainz-DiscID \
+ p5-WebService-MusicBrainz0>=0:www/p5-WebService-MusicBrainz0
NORMALIZE_DESC= Enable normalize support
NORMALIZE_RUN_DEPENDS= normalize:audio/normalize
OPUS_RUN_DEPENDS= opusenc:audio/opus-tools
@@ -49,9 +52,6 @@ REPLAYGAIN_RUN_DEPENDS= mp3gain:audio/mp3gain \
vorbisgain:audio/vorbisgain
SPEEX_RUN_DEPENDS= speexenc:audio/speex
-post-extract:
- @${LN} -sf abcde.conf ${WRKSRC}/abcde.conf.sample
-
post-patch:
@${REINPLACE_CMD} -e \
's|\([[:space:]]\)\(/etc/abcde.conf\)|\1${PREFIX}\2|' \
@@ -63,9 +63,12 @@ post-patch:
do-install:
(cd ${WRKSRC} && ${INSTALL_SCRIPT} abcde cddb-tool \
${STAGEDIR}${PREFIX}/bin)
- (cd ${WRKSRC} && ${INSTALL_DATA} abcde.conf.sample \
- ${STAGEDIR}${PREFIX}/etc)
+ (cd ${WRKSRC} && ${INSTALL_DATA} abcde.conf \
+ ${STAGEDIR}${PREFIX}/etc/abcde.conf.sample)
(cd ${WRKSRC} && ${INSTALL_MAN} abcde.1 cddb-tool.1 \
${STAGEDIR}${MANPREFIX}/man/man1)
+post-install-MUSICBRAINZ-on:
+ (cd ${WRKSRC} && ${INSTALL_SCRIPT} abcde-musicbrainz-tool \
+ ${STAGEDIR}${PREFIX}/bin)
.include <bsd.port.mk>
diff --git a/audio/abcde/files/patch-abcde b/audio/abcde/files/patch-abcde
new file mode 100644
index 000000000000..ccb910fa6d5e
--- /dev/null
+++ b/audio/abcde/files/patch-abcde
@@ -0,0 +1,14 @@
+--- abcde.orig 2017-01-18 13:56:14 UTC
++++ abcde
+@@ -2012,7 +2012,10 @@ do_discid ()
+
+ LEADOUT="$(echo "$CDPARANOIAOUTPUT" | grep -Eo '^TOTAL[[:space:]]+([[:digit:]]+)' | get_last)"
+ OFFSETS="$(echo "$CDPARANOIAOUTPUT" | sed -n -e's/^ .* \([0-9]\+\) \[.*/\1/p')"
+- makeids
++ case "$CDDBMETHOD" in
++ cddb) TRACKINFO=$($CDDISCID "$CDROM") ;;
++ musicbrainz) TRACKINFO=$($MUSICBRAINZ --command id --device "$CDROM") ;;
++ esac
+ ;;
+ *)
+ case "$CDDBMETHOD" in
diff --git a/audio/abcde/pkg-plist b/audio/abcde/pkg-plist
new file mode 100644
index 000000000000..5217ceda40fd
--- /dev/null
+++ b/audio/abcde/pkg-plist
@@ -0,0 +1,6 @@
+bin/abcde
+bin/abcde-musicbrainz-tool
+bin/cddb-tool
+@sample etc/abcde.conf.sample
+man/man1/abcde.1.gz
+man/man1/cddb-tool.1.gz