diff options
author | Ben Woods <woodsb02@FreeBSD.org> | 2016-08-03 13:30:27 +0000 |
---|---|---|
committer | Ben Woods <woodsb02@FreeBSD.org> | 2016-08-03 13:30:27 +0000 |
commit | 2e175d02e899134d7520138d47d4fe9d8cebdba4 (patch) | |
tree | 3c38c5a9a58ac9d8aa77b77c324cbe26a80e41c5 /audio | |
parent | Update to latest snapshot. (diff) |
audio/cplay: Update to 1.50
- Switch to GH account used by Debian
- Update patch-cplay to remove upstreamed changes and add mpv support
- Add off-by-default dependency options for supported audio players
- Change to USES=python:-2.7; runtime testing with python3 failed
- shebangfix added to remove need for ${LOCALBASE}/bin/python symlink
- Add patch-po_fr.po to fix build error fr.po:78: 'msgid' and 'msgstr'
entries do not both end with '\n'
Reviewed by: adamw
Approved by: koobs, mat (mentors)
Relnotes: https://github.com/hukka/cplay/blob/v1.50/ChangeLog
Differential Revision: https://reviews.freebsd.org/D7200
Notes
Notes:
svn path=/head/; revision=419523
Diffstat (limited to 'audio')
-rw-r--r-- | audio/cplay/Makefile | 37 | ||||
-rw-r--r-- | audio/cplay/distinfo | 5 | ||||
-rw-r--r-- | audio/cplay/files/patch-Makefile | 4 | ||||
-rw-r--r-- | audio/cplay/files/patch-cplay | 133 | ||||
-rw-r--r-- | audio/cplay/files/patch-po_fr.po | 11 | ||||
-rw-r--r-- | audio/cplay/pkg-descr | 6 | ||||
-rw-r--r-- | audio/cplay/pkg-message | 4 | ||||
-rw-r--r-- | audio/cplay/pkg-plist | 3 |
8 files changed, 73 insertions, 130 deletions
diff --git a/audio/cplay/Makefile b/audio/cplay/Makefile index a19ca72ad8b8..ae472c7786ed 100644 --- a/audio/cplay/Makefile +++ b/audio/cplay/Makefile @@ -2,19 +2,21 @@ # $FreeBSD$ PORTNAME= cplay -PORTVERSION= 1.49 -PORTREVISION= 5 +PORTVERSION= 1.50 +DISTVERSIONPREFIX= v CATEGORIES= audio -MASTER_SITES= DEBIAN -DISTFILES= ${DISTNAME:S/-/_/}.orig${EXTRACT_SUFX} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= woodsb02@FreeBSD.org COMMENT= Curses-based front-end for various audio players LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gettext gmake python:2 +USE_GITHUB= yes +GH_ACCOUNT= hukka + +USES= gettext gmake python:-2.7 shebangfix +SHEBANG_FILES= ${WRKSRC}/cplay MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}" NO_ARCH= yes @@ -23,6 +25,29 @@ PORTDOCS= README OPTIONS_DEFINE= DOCS +OPTIONS_GROUP= PLAYERS +OPTIONS_GROUP_PLAYERS= MADPLAY MIKMOD MPG123 MPG321 MPLAYER MPV OGG123 SOX SPEEX SPLAY XMP + +MADPLAY_DESC= MPEG audio playback support via madplay +MPG321_DESC= MP3 decoding support via mpg321 +MPV_DESC= mpv media player support +OGG123_DESC= Ogg Vorbis audio decoding support via ogg123 +SOX_DESC= Audio playback support via SOund eXchange +SPLAY_DESC= MPEG and WAV playback support via Splay +XMP_DESC= Audio playback support via the Extended Module Player + +MADPLAY_RUN_DEPENDS= madplay:audio/madplay +MIKMOD_RUN_DEPENDS= mikmod:audio/mikmod +MPG123_RUN_DEPENDS= mpg123:audio/mpg123 +MPG321_RUN_DEPENDS= mpg321:audio/mpg321 +MPLAYER_RUN_DEPENDS= mplayer:multimedia/mplayer +MPV_RUN_DEPENDS= mpv:multimedia/mpv +OGG123_RUN_DEPENDS= ogg123:audio/vorbis-tools +SOX_RUN_DEPENDS= play:audio/sox +SPEEX_RUN_DEPENDS= speexdec:audio/speex +SPLAY_RUN_DEPENDS= splay:audio/splay +XMP_RUN_DEPENDS= xmp:audio/xmp + post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR} diff --git a/audio/cplay/distinfo b/audio/cplay/distinfo index 43984d236fa8..1c7e8a25b087 100644 --- a/audio/cplay/distinfo +++ b/audio/cplay/distinfo @@ -1,2 +1,3 @@ -SHA256 (cplay_1.49.orig.tar.gz) = 4c624a7e5839b1523418b0b898dc300c571099a7e7252265ee79f7adbed0a80d -SIZE (cplay_1.49.orig.tar.gz) = 36400 +TIMESTAMP = 1468368675 +SHA256 (hukka-cplay-v1.50_GH0.tar.gz) = a3ad98a1648453dd591529f9783d4b7669241d2dfa681793a95bbcb0c2ea6780 +SIZE (hukka-cplay-v1.50_GH0.tar.gz) = 43904 diff --git a/audio/cplay/files/patch-Makefile b/audio/cplay/files/patch-Makefile index 40a7e47f5f9f..347f642ae3f1 100644 --- a/audio/cplay/files/patch-Makefile +++ b/audio/cplay/files/patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2003-08-28 12:22:48 UTC +--- Makefile.orig 2011-04-27 16:33:40 UTC +++ Makefile -@@ -14,7 +14,7 @@ clean: recursive-clean +@@ -15,7 +15,7 @@ clean: recursive-clean recursive-all recursive-install recursive-clean: @target=$@; \ for i in $(SUBDIRS); do \ diff --git a/audio/cplay/files/patch-cplay b/audio/cplay/files/patch-cplay index 426d77d07b9d..dbe1fe9fad97 100644 --- a/audio/cplay/files/patch-cplay +++ b/audio/cplay/files/patch-cplay @@ -1,42 +1,9 @@ ---- cplay.orig 2003-12-05 08:20:56 UTC +--- cplay.orig 2011-04-27 16:33:40 UTC +++ cplay -@@ -63,7 +63,7 @@ except: - - # ------------------------------------------ - XTERM = re.search("rxvt|xterm", os.environ["TERM"]) --CONTROL_FIFO = "/var/tmp/cplay_control" -+CONTROL_FIFO = "%s/cplay-control-%s" % (os.environ.get("TMPDIR", "/tmp"), os.environ["USER"]) - - # ------------------------------------------ - def which(program): -@@ -906,11 +906,20 @@ class PlaylistWindow(TagListWindow): - - def command_change_viewpoint(self, klass=PlaylistEntry): - if not globals().get("ID3"): -+ global ID3, ogg, codecs -+ have_meta = 0 - try: -- global ID3, ogg, codecs -- import ID3, ogg.vorbis, codecs -+ import ID3 -+ have_meta = 1 -+ except ImportError: -+ pass -+ try: -+ import ogg.vorbis, codecs -+ have_meta = 1 -+ except ImportError: -+ pass -+ if have_meta: - klass.vps.append([_("metadata"), klass.vp_metadata]) -- except ImportError: pass - TagListWindow.command_change_viewpoint(self, klass) - - def get_title(self): -@@ -962,9 +971,11 @@ class PlaylistWindow(TagListWindow): +@@ -967,9 +967,11 @@ class PlaylistWindow(TagListWindow): try: if os.path.isdir(pathname): - app.status(_("Working...")) + quiet or app.status(_("Working...")) - self.add_dir(pathname) + self.add_dir(os.path.abspath(pathname)) elif VALID_PLAYLIST(pathname): @@ -46,87 +13,13 @@ else: pathname = self.fix_url(pathname) self.append(PlaylistEntry(pathname)) -@@ -1301,6 +1312,17 @@ class TimeOffsetPlayer(Player): - self.set_position(head, head+tail, [head, tail]) - - # ------------------------------------------ -+class MplayerOffsetPlayer(Player): -+ re_progress = re.compile("(\d+).*\sof (\d+)") -+ -+ def parse_buf(self): -+ match = self.re_progress.search(self.buf) -+ if match: -+ s1, s2 = map(string.atoi, match.groups()) -+ head, tail = s1, s2-s1 -+ self.set_position(head, head+tail, [head,tail]) -+ -+# ------------------------------------------ - class NoOffsetPlayer(Player): - - def parse_buf(self): -@@ -1334,8 +1356,6 @@ class Timeout: - # ------------------------------------------ - class FIFOControl: - def __init__(self): -- try: self.fd = open(CONTROL_FIFO, "rb+", 0) -- except: self.fd = None - self.commands = {"pause" : app.toggle_pause, - "next" : app.next_song, - "prev" : app.prev_song, -@@ -1346,6 +1366,15 @@ class FIFOControl: - "volup" : app.inc_volume, - "voldown" : app.dec_volume, - "quit" : app.quit} -+ self.fd = None -+ try: -+ if os.path.exists(CONTROL_FIFO): -+ os.unlink(CONTROL_FIFO) -+ os.mkfifo(CONTROL_FIFO, 0600) -+ self.fd = open(CONTROL_FIFO, "rb+", 0) -+ except IOError: -+ # warn that we're disabling the fifo because someone raced us? -+ return - - def handle_command(self): - command = string.strip(self.fd.readline()) -@@ -1419,6 +1448,11 @@ class Application: - XTERM and sys.stderr.write("\033]0;%s\a" % "xterm") - tty and tty.tcsetattr(sys.stdin.fileno(), tty.TCSADRAIN, self.tcattr) - print -+ # remove temporary files -+ try: -+ if os.path.exists(CONTROL_FIFO): os.unlink(CONTROL_FIFO) -+ except IOError: -+ pass - - def run(self): - while 1: -@@ -1615,7 +1649,7 @@ def main(): - if opt == "-v": app.mixer("toggle") - if args or playlist: - for i in args or playlist: -- app.win_playlist.add(os.path.abspath(i)) -+ app.win_playlist.add(i) - app.win_tab.change_window() - app.run() - except SystemExit: -@@ -1627,15 +1661,17 @@ def main(): - - # ------------------------------------------ - PLAYERS = [ -- FrameOffsetPlayer("ogg123 -q -v -k %d %s", "\.ogg$"), -+ FrameOffsetPlayer("ogg123 -q -v -k %d %s", "\.(ogg|flac)$"), - FrameOffsetPlayer("splay -f -k %d %s", "(^http://|\.mp[123]$)", 38.28), - FrameOffsetPlayer("mpg123 -q -v -k %d %s", "(^http://|\.mp[123]$)", 38.28), - FrameOffsetPlayer("mpg321 -q -v -k %d %s", "(^http://|\.mp[123]$)", 38.28), - TimeOffsetPlayer("madplay -v --display-time=remaining -s %d %s", "\.mp[123]$"), -+ MplayerOffsetPlayer("mplayer -vo null -noconsolecontrols -ss %d %s", "\.(mp[123]|ogg|flac|wav|aiff|wma)$"), - NoOffsetPlayer("mikmod -q -p0 %s", "\.(mod|xm|fm|s3m|med|col|669|it|mtm)$"), - NoOffsetPlayer("xmp -q %s", "\.(mod|xm|fm|s3m|med|col|669|it|mtm|stm)$"), - NoOffsetPlayer("play %s", "\.(aiff|au|cdr|mp3|ogg|wav)$"), -- NoOffsetPlayer("speexdec %s", "\.spx$") -+ NoOffsetPlayer("speexdec %s", "\.spx$"), -+ NoOffsetPlayer("mplayer -noconsolecontrols -playlist %s", "\.(ram|pls|asx)$") - ] - - def VALID_SONG(name): +@@ -1837,6 +1839,9 @@ PLAYERS = [ + MPlayer("mplayer -slave -vc null -vo null {file}", + "^http://|\.(mp[123]|ogg|oga|flac|spx|mp[cp+]|mod|xm|fm|s3m|" + + "med|col|669|it|mtm|stm|aiff|au|cdr|wav|wma|m4a|m4b)$"), ++ MPlayer("mpv -vo null {file}", ++ "^http://|\.(mp[123]|ogg|oga|flac|spx|mp[cp+]|mod|xm|fm|s3m|" + ++ "med|col|669|it|mtm|stm|aiff|au|cdr|wav|wma|m4a|m4b)$"), + FrameOffsetPlayer("ogg123 -q -v -k {offset} {file}", "\.(ogg|flac|spx)$"), + FrameOffsetPlayer("splay -f -k {offset} {file}", "(^http://|\.mp[123]$)", 38.28), + FrameOffsetPlayer("mpg123 -q -v -k {offset} {file}", "(^http://|\.mp[123]$)", 38.28), diff --git a/audio/cplay/files/patch-po_fr.po b/audio/cplay/files/patch-po_fr.po new file mode 100644 index 000000000000..ce25fcc73c63 --- /dev/null +++ b/audio/cplay/files/patch-po_fr.po @@ -0,0 +1,11 @@ +--- po/fr.po.orig 2016-08-03 10:34:18 UTC ++++ po/fr.po +@@ -74,7 +74,7 @@ msgid "" + " c, v : counter/volume mode r, R : toggle repeat/Random mode\n" + " <, > : horizontal scrolling s, S : shuffle/Sort playlist\n" + " C-l, l : refresh, list mode w, @ : write playlist, jump to active\n" +-" h, q, Q : help, quit?, Quit! X : stop playlist after each track\n" ++" h, q, Q : help, quit?, Quit! X : stop playlist after each track" + msgstr "" + " Navigation au sein de l'application\n" + " ------------------------------------\n" diff --git a/audio/cplay/pkg-descr b/audio/cplay/pkg-descr index 8a17946b63b6..81a0f9208317 100644 --- a/audio/cplay/pkg-descr +++ b/audio/cplay/pkg-descr @@ -1,9 +1,15 @@ cplay is a curses-based front-end to various audio players. Supported players currently include: + - mplayer + - mpv + - mpg321 - mpg123 - ogg123 - madplay - mikmod - mpg321 - splay + - xmp + - sox + - speex diff --git a/audio/cplay/pkg-message b/audio/cplay/pkg-message index 0e55154841b5..f535bfcb0b75 100644 --- a/audio/cplay/pkg-message +++ b/audio/cplay/pkg-message @@ -6,8 +6,12 @@ * audio/mikmod * * audio/mpg123 * * audio/mpg321 * +* audio/sox * +* audio/speex * * audio/splay * * audio/vorbis-tools * +* audio/xmp * * multimedia/mplayer * +* multimedia/mpv * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/audio/cplay/pkg-plist b/audio/cplay/pkg-plist index 6c890b3f5689..753bfb397924 100644 --- a/audio/cplay/pkg-plist +++ b/audio/cplay/pkg-plist @@ -1,6 +1,9 @@ +bin/cnq bin/cplay man/man1/cplay.1.gz share/locale/da/LC_MESSAGES/cplay.mo share/locale/de/LC_MESSAGES/cplay.mo +share/locale/fr/LC_MESSAGES/cplay.mo share/locale/hu/LC_MESSAGES/cplay.mo share/locale/pl/LC_MESSAGES/cplay.mo +share/locale/pt_BR/LC_MESSAGES/cplay.mo |