diff --git a/audio/shell-fm/Makefile b/audio/shell-fm/Makefile index b40f0f89d3f..9b7b87bb228 100644 --- a/audio/shell-fm/Makefile +++ b/audio/shell-fm/Makefile @@ -1,9 +1,8 @@ -# $OpenBSD: Makefile,v 1.11 2011/04/16 14:57:34 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.12 2011/07/08 18:32:34 dcoppa Exp $ COMMENT= console based player for last.fm radio streams -DISTNAME= shell-fm-0.7 -REVISION= 3 +DISTNAME= shell-fm-0.8 CATEGORIES= audio HOMEPAGE= http://nex.scrapping.cc/shell-fm/ @@ -16,7 +15,7 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB += ao c m mad tag tag_c +WANTLIB += ao c m mad tag tag_c MASTER_SITES= http://distfiles.nl/ @@ -24,10 +23,11 @@ LIB_DEPENDS= audio/libao \ audio/libmad \ audio/taglib -USE_GMAKE= yes -USE_GROFF = Yes -FAKE_FLAGS= DESTDIR="${WRKINST}${PREFIX}" +USE_GMAKE= Yes -NO_REGRESS= yes +FAKE_FLAGS= INSTALL_MAN="${INSTALL_MAN}" \ + INSTALL_PROGRAM="${INSTALL_PROGRAM}" + +NO_REGRESS= Yes .include diff --git a/audio/shell-fm/distinfo b/audio/shell-fm/distinfo index 4d009394f9b..d65320aaaca 100644 --- a/audio/shell-fm/distinfo +++ b/audio/shell-fm/distinfo @@ -1,5 +1,5 @@ -MD5 (shell-fm-0.7.tar.gz) = flbbLd6aOoYDVrXBLpyK8Q== -RMD160 (shell-fm-0.7.tar.gz) = zHPSLJ+gdH2X15psbXbw1mXIZA0= -SHA1 (shell-fm-0.7.tar.gz) = i9c8NeEm9q2WDi1f8idXLkPJCco= -SHA256 (shell-fm-0.7.tar.gz) = e459idGtCQ5d5ZnJaKunKr1iuZnWUhSkBcCrAHIVodM= -SIZE (shell-fm-0.7.tar.gz) = 49214 +MD5 (shell-fm-0.8.tar.gz) = jaAt0bYFIDktT8lp8TNqpA== +RMD160 (shell-fm-0.8.tar.gz) = WjaR53yBIxNWBwGvuyO+t0jSxMg= +SHA1 (shell-fm-0.8.tar.gz) = OwkJrbPokkJqkaoIErO7jmV97rw= +SHA256 (shell-fm-0.8.tar.gz) = wxf33CT31D7Uh5fS1SWZoVTp2H3N4rt0ZrNfcUDozYM= +SIZE (shell-fm-0.8.tar.gz) = 54043 diff --git a/audio/shell-fm/patches/patch-Makefile b/audio/shell-fm/patches/patch-Makefile index 5556fdc1b90..69023cf30c6 100644 --- a/audio/shell-fm/patches/patch-Makefile +++ b/audio/shell-fm/patches/patch-Makefile @@ -1,30 +1,35 @@ -$OpenBSD: patch-Makefile,v 1.2 2010/04/29 07:59:43 jasper Exp $ - -Don't install compressed man pages. - ---- Makefile.orig Sun Aug 30 18:55:07 2009 -+++ Makefile Mon Feb 8 19:07:12 2010 -@@ -1,12 +1,12 @@ +$OpenBSD: patch-Makefile,v 1.3 2011/07/08 18:32:34 dcoppa Exp $ +--- Makefile.orig Wed May 25 12:35:38 2011 ++++ Makefile Fri Jul 8 15:01:18 2011 +@@ -1,12 +1,16 @@ DESTDIR = -PREFIX := /usr -+PREFIX = ++ ++ifeq (${PREFIX},) ++PREFIX = /usr ++endif ++ MANDIR := $(PREFIX)/man DOCDIR := ${PREFIX}/share/doc .PHONY : shell-fm manual all clean tags cscope -all : shell-fm manual -+all : shell-fm ++all : shell-fm shell-fm : $(MAKE) -C source -@@ -18,7 +18,7 @@ install : - install -m 0755 -d $(DESTDIR)$(PREFIX)/bin/ - install -m 0755 -d $(DESTDIR)$(MANDIR)/man1/ - install -m 0755 source/shell-fm $(DESTDIR)$(PREFIX)/bin/ +@@ -15,10 +19,8 @@ manual : + $(MAKE) -C manual + + install : +- install -m 0755 -d $(DESTDIR)$(PREFIX)/bin/ +- install -m 0755 -d $(DESTDIR)$(MANDIR)/man1/ +- install -m 0755 source/shell-fm $(DESTDIR)$(PREFIX)/bin/ - install -m 0644 manual/shell-fm.1.gz $(DESTDIR)$(MANDIR)/man1/ -+ install -m 0644 manual/shell-fm.1 $(DESTDIR)$(MANDIR)/man1 ++ ${INSTALL_PROGRAM} source/shell-fm $(PREFIX)/bin/ ++ ${INSTALL_MAN} manual/shell-fm.1 $(MANDIR)/man1/ install-extras : install -m 0755 -d $(DESTDIR)$(DOCDIR)/shell-fm/ diff --git a/audio/shell-fm/patches/patch-manual_shell-fm_1 b/audio/shell-fm/patches/patch-manual_shell-fm_1 new file mode 100644 index 00000000000..9bb8c0dbf68 --- /dev/null +++ b/audio/shell-fm/patches/patch-manual_shell-fm_1 @@ -0,0 +1,18 @@ +$OpenBSD: patch-manual_shell-fm_1,v 1.1 2011/07/08 18:32:34 dcoppa Exp $ + +Add mute/unmute support using 'm' key +(upstream git commit c94473084607ff5761b1257fb735dd96e14bb016) + +--- manual/shell-fm.1.orig Wed May 25 12:35:38 2011 ++++ manual/shell-fm.1 Fri Jul 8 20:20:12 2011 +@@ -125,7 +125,9 @@ Increase volume. + .TP + .B - + Decrease volume. +-.PP ++.TP ++.B m ++Mute/unmute. + .SH SETUP + Before you start, you should have created the directories + .B ~/.shell-fm diff --git a/audio/shell-fm/patches/patch-source_Makefile b/audio/shell-fm/patches/patch-source_Makefile index 71d0fca8445..aa9b955d0c8 100644 --- a/audio/shell-fm/patches/patch-source_Makefile +++ b/audio/shell-fm/patches/patch-source_Makefile @@ -1,13 +1,12 @@ -$OpenBSD: patch-source_Makefile,v 1.3 2010/04/29 08:27:20 dcoppa Exp $ ---- source/Makefile.orig Thu Apr 29 10:03:38 2010 -+++ source/Makefile Thu Apr 29 10:03:48 2010 -@@ -5,9 +5,6 @@ BINARY := shell-fm +$OpenBSD: patch-source_Makefile,v 1.4 2011/07/08 18:32:34 dcoppa Exp $ +--- source/Makefile.orig Fri Jul 8 14:27:23 2011 ++++ source/Makefile Fri Jul 8 14:28:10 2011 +@@ -5,7 +5,7 @@ DEP := $(subst .c,.d,$(SOURCE)) + BINARY := shell-fm LIB := libshellfm.so STATIC := libshellfm.a +-CFLAGS += -Os -Wall -MD -W -I./include/ ++CFLAGS += -MD -W -I./include/ --ifeq ($(shell uname -s), OpenBSD) -- LDFLAGS += -lossaudio --endif - ifeq ($(shell uname -s), NetBSD) - LDFLAGS += -lossaudio - endif + ifdef EXTERN_ONLY + CFLAGS += -DEXTERN_ONLY diff --git a/audio/shell-fm/patches/patch-source_include_globals_h b/audio/shell-fm/patches/patch-source_include_globals_h new file mode 100644 index 00000000000..fd40b0cabd7 --- /dev/null +++ b/audio/shell-fm/patches/patch-source_include_globals_h @@ -0,0 +1,16 @@ +$OpenBSD: patch-source_include_globals_h,v 1.1 2011/07/08 18:32:34 dcoppa Exp $ + +Add mute/unmute support using 'm' key +(upstream git commit c94473084607ff5761b1257fb735dd96e14bb016) + +--- source/include/globals.h.orig Wed May 25 12:35:38 2011 ++++ source/include/globals.h Fri Jul 8 13:56:03 2011 +@@ -22,6 +22,8 @@ extern pid_t playfork, subfork; + + extern int playpipe; + extern unsigned char volume; ++extern int muted; ++extern unsigned char saved_volume; + + extern char * current_station; /* Name of the current station. */ + diff --git a/audio/shell-fm/patches/patch-source_interface_c b/audio/shell-fm/patches/patch-source_interface_c new file mode 100644 index 00000000000..11d839e3547 --- /dev/null +++ b/audio/shell-fm/patches/patch-source_interface_c @@ -0,0 +1,55 @@ +$OpenBSD: patch-source_interface_c,v 1.1 2011/07/08 18:32:34 dcoppa Exp $ + +Add mute/unmute support using 'm' key +(upstream git commit c94473084607ff5761b1257fb735dd96e14bb016) + +--- source/interface.c.orig Wed May 25 12:35:38 2011 ++++ source/interface.c Fri Jul 8 14:34:48 2011 +@@ -49,6 +49,8 @@ char * shellescape(const char *); + + void print_help(void); + ++void mute(); ++ + void handle_keyboard_input() { + int key, result; + char customkey[8] = { 0 }, * marked = NULL; +@@ -228,6 +230,10 @@ void handle_keyboard_input() { + volume_down(); + break; + ++ case 'm': ++ mute(); ++ break; ++ + case 'u': + preview(playlist); + break; +@@ -586,7 +592,8 @@ void print_help(void) { + "S = stop | s = similiar artist\n" + "T = tag track/artist/album | u = show upcoming tracks in playlist\n" + "U = unlove track | + = increase volume\n" +- "- = decrease volume | C = reload configuration\n", ++ "- = decrease volume | C = reload configuration\n" ++ "m = mute/unmute\n", + stderr + ); + +@@ -612,6 +619,17 @@ void volume_up() { + + void volume_down() { + set_volume(volume - 1); ++} ++ ++void mute() { ++ if(muted) { ++ set_volume(saved_volume); ++ muted = 0; ++ } else { ++ saved_volume = volume; ++ set_volume(0); ++ muted = 1; ++ } + } + + void set_volume(int new_volume) { diff --git a/audio/shell-fm/patches/patch-source_play_c b/audio/shell-fm/patches/patch-source_play_c new file mode 100644 index 00000000000..fef435520aa --- /dev/null +++ b/audio/shell-fm/patches/patch-source_play_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-source_play_c,v 1.1 2011/07/08 18:32:34 dcoppa Exp $ + +Add mute/unmute support using 'm' key +(upstream git commit c94473084607ff5761b1257fb735dd96e14bb016) + +--- source/play.c.orig Wed May 25 12:35:38 2011 ++++ source/play.c Fri Jul 8 13:56:03 2011 +@@ -87,6 +87,8 @@ static int timed_read(int, unsigned char *, int, int); + int killed = 0; + + unsigned char volume = MAX_VOLUME; ++int muted = 0; ++unsigned char saved_volume = MAX_VOLUME; + + static void sighand(int); + diff --git a/audio/shell-fm/patches/patch-source_select_c b/audio/shell-fm/patches/patch-source_select_c new file mode 100644 index 00000000000..49feac6ff53 --- /dev/null +++ b/audio/shell-fm/patches/patch-source_select_c @@ -0,0 +1,10 @@ +$OpenBSD: patch-source_select_c,v 1.1 2011/07/08 18:32:34 dcoppa Exp $ +--- source/select.c.orig Fri Jul 8 14:20:06 2011 ++++ source/select.c Fri Jul 8 14:20:26 2011 +@@ -1,5 +1,6 @@ + + #include ++#include + #include + + #include "select.h"