From fb95c1bdf051fc9f654893f774e385fef286daab Mon Sep 17 00:00:00 2001 From: jasper Date: Fri, 26 Oct 2007 20:22:42 +0000 Subject: [PATCH] import xmmsctrl 1.9 xmmsctrl is a small utility to control xmms from the command line. Its goal is to be used coupled with sh to test xmms state and perform an appropriate action, e.g. if playing then pause else play. The interest of this is to bind keys in a window manager to have control over xmms with keys that do play/next/pause, prev, control sound. by Gleydson Soares (MAINTAINER) with tweaks by me --- audio/xmmsctrl/Makefile | 33 +++++++++++++++++++++++ audio/xmmsctrl/distinfo | 5 ++++ audio/xmmsctrl/patches/patch-Makefile | 29 ++++++++++++++++++++ audio/xmmsctrl/patches/patch-removefile_c | 12 +++++++++ audio/xmmsctrl/pkg/DESCR | 5 ++++ audio/xmmsctrl/pkg/PLIST | 15 +++++++++++ 6 files changed, 99 insertions(+) create mode 100644 audio/xmmsctrl/Makefile create mode 100644 audio/xmmsctrl/distinfo create mode 100644 audio/xmmsctrl/patches/patch-Makefile create mode 100644 audio/xmmsctrl/patches/patch-removefile_c create mode 100644 audio/xmmsctrl/pkg/DESCR create mode 100644 audio/xmmsctrl/pkg/PLIST diff --git a/audio/xmmsctrl/Makefile b/audio/xmmsctrl/Makefile new file mode 100644 index 00000000000..98fe51082a3 --- /dev/null +++ b/audio/xmmsctrl/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2007/10/26 20:22:42 jasper Exp $ + +COMMENT= small utility to control XMMS from the command line + +DISTNAME= xmmsctrl-1.9 +CATEGORIES= audio + +HOMEPAGE= http://www.cs.aau.dk/~adavid/utils/ +MASTER_SITES= ${HOMEPAGE} + +MAINTAINER= Gleydson Soares + +# GPLv2 +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +LIB_DEPENDS= xmms::audio/xmms +WANTLIB= X11 Xext Xi c gdk glib gmodule gtk m + +MODULES= devel/gettext + +USE_GMAKE= Yes + +NO_REGRESS= Yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/xmmsctrl ${PREFIX}/bin + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xmmsctrl + ${INSTALL_DATA} ${WRKSRC}/samples/* ${PREFIX}/share/examples/xmmsctrl + +.include diff --git a/audio/xmmsctrl/distinfo b/audio/xmmsctrl/distinfo new file mode 100644 index 00000000000..f2fa67cb024 --- /dev/null +++ b/audio/xmmsctrl/distinfo @@ -0,0 +1,5 @@ +MD5 (xmmsctrl-1.9.tar.gz) = fanLc9ru7Jm/2qk90oYupg== +RMD160 (xmmsctrl-1.9.tar.gz) = 6HjlElMP4DyVaSbdDSBye6GOn4o= +SHA1 (xmmsctrl-1.9.tar.gz) = dxUAq/UEB3yF9AUvCXemByRPguE= +SHA256 (xmmsctrl-1.9.tar.gz) = JrqaS55tvHg5uKb8I0d0+iqcxOiH6UfNZoHT1CZ0sss= +SIZE (xmmsctrl-1.9.tar.gz) = 14336 diff --git a/audio/xmmsctrl/patches/patch-Makefile b/audio/xmmsctrl/patches/patch-Makefile new file mode 100644 index 00000000000..bbceba160d3 --- /dev/null +++ b/audio/xmmsctrl/patches/patch-Makefile @@ -0,0 +1,29 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2007/10/26 20:22:42 jasper Exp $ +--- Makefile.orig Fri Apr 2 16:48:38 2004 ++++ Makefile Fri Oct 26 22:02:38 2007 +@@ -1,22 +1,17 @@ + # The prefix is ignored if you are not the super user and + # xmmsctrl will be installed in your $HOME/bin +-PREFIX := /usr/local + + TARGET := xmmsctrl + VERSION := 1.9 +-DIRNAME := $(shell basename $(PWD)) + +-CC := gcc +-WARN := -Wall -Wshadow -Wmissing-prototypes -W + DEFS := -DPRETTY_PRINT -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" +-CFLAGS := $(WARN) -O2 $(shell xmms-config --cflags) $(DEFS) +-LDFLAGS := $(shell xmms-config --libs) ++CFLAGS += $(shell xmms-config --cflags) $(DEFS) ++LDFLAGS += $(shell xmms-config --libs) + +-all : $(TARGET) HELP ++all : $(TARGET) + + $(TARGET) : xmmsctrl.c removefile.c + $(CC) -o $(TARGET) xmmsctrl.c removefile.c $(CFLAGS) $(LDFLAGS) +- strip xmmsctrl + + HELP : xmmsctrl + ./xmmsctrl > HELP || true diff --git a/audio/xmmsctrl/patches/patch-removefile_c b/audio/xmmsctrl/patches/patch-removefile_c new file mode 100644 index 00000000000..9bbb4df0952 --- /dev/null +++ b/audio/xmmsctrl/patches/patch-removefile_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-removefile_c,v 1.1.1.1 2007/10/26 20:22:42 jasper Exp $ +--- removefile.c.orig Wed Oct 3 17:23:48 2007 ++++ removefile.c Wed Oct 3 17:25:15 2007 +@@ -193,7 +193,7 @@ void remove_file(gint session, char *filename) { + gint *remove_pos = (gint*) malloc(list_size*sizeof(gint)); + + if (remove_pos) { +- char *pwd = get_current_dir_name(); ++ char *pwd = getcwd(NULL,PATH_MAX); + int root_len = strlen(pwd)+1; /* +1: jump appended / */ + gint i; + diff --git a/audio/xmmsctrl/pkg/DESCR b/audio/xmmsctrl/pkg/DESCR new file mode 100644 index 00000000000..0da4ab61552 --- /dev/null +++ b/audio/xmmsctrl/pkg/DESCR @@ -0,0 +1,5 @@ +xmmsctrl is a small utility to control xmms from the command line. Its +goal is to be used coupled with sh to test xmms state and perform an +appropriate action, e.g. if playing then pause else play. The interest +of this is to bind keys in a window manager to have control over xmms +with keys that do play/next/pause, prev, control sound. diff --git a/audio/xmmsctrl/pkg/PLIST b/audio/xmmsctrl/pkg/PLIST new file mode 100644 index 00000000000..a6b0b42ca32 --- /dev/null +++ b/audio/xmmsctrl/pkg/PLIST @@ -0,0 +1,15 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/26 20:22:42 jasper Exp $ +bin/xmmsctrl +share/examples/xmmsctrl/ +share/examples/xmmsctrl/emacs-transcriber +share/examples/xmmsctrl/keylaunchrc +share/examples/xmmsctrl/pause_stop_play.sh +share/examples/xmmsctrl/play_pause.sh +share/examples/xmmsctrl/play_unpause_next.sh +share/examples/xmmsctrl/playlist2html.sh +share/examples/xmmsctrl/twmrc_bindings +share/examples/xmmsctrl/win_playlist.sh +share/examples/xmmsctrl/window_shown.sh +share/examples/xmmsctrl/xmmsnext.sh +share/examples/xmmsctrl/xmmsprev.sh +share/examples/xmmsctrl/xmmsswitch.sh