Update to shell-fm-0.8
ok jasper@
This commit is contained in:
parent
ba616abd32
commit
b497b9a390
@ -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 <bsd.port.mk>
|
||||
|
@ -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
|
||||
|
@ -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/
|
||||
|
18
audio/shell-fm/patches/patch-manual_shell-fm_1
Normal file
18
audio/shell-fm/patches/patch-manual_shell-fm_1
Normal file
@ -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
|
@ -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
|
||||
|
16
audio/shell-fm/patches/patch-source_include_globals_h
Normal file
16
audio/shell-fm/patches/patch-source_include_globals_h
Normal file
@ -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. */
|
||||
|
55
audio/shell-fm/patches/patch-source_interface_c
Normal file
55
audio/shell-fm/patches/patch-source_interface_c
Normal file
@ -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) {
|
16
audio/shell-fm/patches/patch-source_play_c
Normal file
16
audio/shell-fm/patches/patch-source_play_c
Normal file
@ -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);
|
||||
|
10
audio/shell-fm/patches/patch-source_select_c
Normal file
10
audio/shell-fm/patches/patch-source_select_c
Normal file
@ -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 <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include "select.h"
|
Loading…
Reference in New Issue
Block a user