diff options
author | jmcneill <jmcneill> | 2002-01-06 06:50:35 +0000 |
---|---|---|
committer | jmcneill <jmcneill> | 2002-01-06 06:50:35 +0000 |
commit | e06a2a3076307a7db798d451da90bc0cd6248af2 (patch) | |
tree | 2b47c329159e7db109cd04eb4bd8cb85ccceaf39 /audio | |
parent | 8438dba223ada305b48776ae7f38ab69dc2b19be (diff) | |
download | pkgsrc-e06a2a3076307a7db798d451da90bc0cd6248af2.tar.gz |
Add xmms-fmradio-1.4, a plugin that allowes use of a radio tuner card in XMMS.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/xmms-fmradio/DESCR | 1 | ||||
-rw-r--r-- | audio/xmms-fmradio/Makefile | 21 | ||||
-rw-r--r-- | audio/xmms-fmradio/PLIST | 2 | ||||
-rw-r--r-- | audio/xmms-fmradio/distinfo | 8 | ||||
-rw-r--r-- | audio/xmms-fmradio/patches/patch-aa | 24 | ||||
-rw-r--r-- | audio/xmms-fmradio/patches/patch-ab | 209 | ||||
-rw-r--r-- | audio/xmms-fmradio/patches/patch-ac | 66 | ||||
-rw-r--r-- | audio/xmms-fmradio/patches/patch-ad | 78 |
8 files changed, 409 insertions, 0 deletions
diff --git a/audio/xmms-fmradio/DESCR b/audio/xmms-fmradio/DESCR new file mode 100644 index 00000000000..516dca710c6 --- /dev/null +++ b/audio/xmms-fmradio/DESCR @@ -0,0 +1 @@ +The FM-Radio plugin allows you to use an FM radio tuner card with XMMS. diff --git a/audio/xmms-fmradio/Makefile b/audio/xmms-fmradio/Makefile new file mode 100644 index 00000000000..4a478ae2249 --- /dev/null +++ b/audio/xmms-fmradio/Makefile @@ -0,0 +1,21 @@ +# $NetBSD: Makefile,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ +# + +DISTNAME= xmms-FMRadio-1.4 +PKGNAME= xmms-fmradio-1.4 +CATEGORIES= audio +MASTER_SITES= http://silicone.free.fr/xmms-FMRadio/ +EXTRACT_SUFX= .tgz + +MAINTAINER= jmcneill@invisible.yi.org +HOMEPAGE= http://silicone.free.fr/xmms-FMRadio/ +COMMENT= Use a Radio Tuner card in XMMS + +USE_BUILDLINK_ONLY= YES +BINOWN?= root +BINGRP?= wheel + +.include "../../audio/xmms/buildlink.mk" +.include "../../mk/ossaudio.buildlink.mk" +.include "../../mk/x11.buildlink.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/audio/xmms-fmradio/PLIST b/audio/xmms-fmradio/PLIST new file mode 100644 index 00000000000..4754194e317 --- /dev/null +++ b/audio/xmms-fmradio/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ +lib/xmms/Input/libradio.so diff --git a/audio/xmms-fmradio/distinfo b/audio/xmms-fmradio/distinfo new file mode 100644 index 00000000000..5cad520860d --- /dev/null +++ b/audio/xmms-fmradio/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ + +SHA1 (xmms-FMRadio-1.4.tgz) = 8c22a2532df986f425341295c7b37f7b93d09560 +Size (xmms-FMRadio-1.4.tgz) = 10378 bytes +SHA1 (patch-aa) = 7b572563d6427c791afbc98594582790f0e059e9 +SHA1 (patch-ab) = 8a6411ff75409019b5fde7796866079fef62bf33 +SHA1 (patch-ac) = 945b3c30d80d9602b15223b9852b86d13c5a66fe +SHA1 (patch-ad) = 32daee9f65164ce7560cf2fa92120bdcd8ce32f7 diff --git a/audio/xmms-fmradio/patches/patch-aa b/audio/xmms-fmradio/patches/patch-aa new file mode 100644 index 00000000000..2bbd9b55152 --- /dev/null +++ b/audio/xmms-fmradio/patches/patch-aa @@ -0,0 +1,24 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ + +--- Makefile.orig Sat Dec 15 10:32:11 2001 ++++ Makefile Sun Jan 6 02:18:37 2002 +@@ -1,15 +1,14 @@ + CC?= cc + OBJ=radio.o radio_configure.o radio_file_info.o + CFLAGS?= -O2 -Wall +-CFLAGS+= -fpic -DPIC `gtk-config --cflags` +-LDFLAGS+= --shared -L/usr/local/lib -lxmms `gtk-config --libs` ++CFLAGS+= -fpic -DPIC `xmms-config --cflags` `gtk-config --cflags` ++LDFLAGS+= --shared `xmms-config --libs` `gtk-config --libs` + +-PREFIX?= /usr/local +-XMMS_PLUG_INS_DIR= $(PREFIX)/lib/xmms/Input ++XMMS_PLUG_INS_DIR= `xmms-config --input-plugin-dir` + + # These are for linux, they're defined under BSD + BINOWN?= root +-BINGRP?= root ++BINGRP?= wheel + BINMODE?= 555 + DIRMODE?= 755 + diff --git a/audio/xmms-fmradio/patches/patch-ab b/audio/xmms-fmradio/patches/patch-ab new file mode 100644 index 00000000000..413e70ea57f --- /dev/null +++ b/audio/xmms-fmradio/patches/patch-ab @@ -0,0 +1,209 @@ +$NetBSD: patch-ab,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ + +--- radio.c.orig Sun Jan 6 02:28:50 2002 ++++ radio.c Sun Jan 6 02:34:04 2002 +@@ -25,9 +25,9 @@ + #include "radio.h" + + #include <errno.h> +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <err.h> +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || __NetBSD__ */ + + static void radio_init(void); + static int is_our_file(char *filename); +@@ -72,10 +72,10 @@ + + gint radio_fd = -1; + gint freq,volume; +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + struct radio_info ri; + static mixer_ctrl_t volctl; +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || defined(__NetBSD__) */ + gboolean is_paused,tuned; + + +@@ -110,16 +110,16 @@ + if (!radio_cfg.device) + #ifdef linux + radio_cfg.device = g_strdup("/dev/radio0"); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + radio_cfg.device = g_strdup("/dev/radio"); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + if (!radio_cfg.directory) + radio_cfg.directory = g_strdup(g_get_home_dir()); + + volume=FMR_VOL_DEFAULT; +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + SetGetRadioInfo(GET_INFO); +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || defined(__NetBSD__) */ + } + + static int is_our_file(char *filename) +@@ -161,7 +161,7 @@ + return .016; + return 16; + } +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + int + SetGetRadioInfo(int setinfo) { + int rd; +@@ -182,7 +182,7 @@ + + return 0; + } +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + + static void play_file(char *filename) +@@ -268,7 +268,7 @@ + return ; + } + tuned = ((v.signal != 0) ? TRUE : FALSE); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.freq = (unsigned long)freq; + ri.mute = 0; + ri.volume = volume * (255/(FMR_VOL_MAX - FMR_VOL_MIN)); +@@ -276,7 +276,7 @@ + usleep(50000); + SetGetRadioInfo(GET_INFO); + tuned = ri.info ? TRUE : FALSE; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + if (radioname==NULL) + tmp = g_strdup_printf("FM Radio %6.2fMHz", (float)freq/1000.0); +@@ -316,7 +316,7 @@ + return ; + } + tuned = ((v.signal != 0) ? TRUE : FALSE); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.freq = (unsigned long)freq; + ri.mute = 0; + ri.volume = volume * (255/(FMR_VOL_MAX - FMR_VOL_MIN)); +@@ -324,7 +324,7 @@ + usleep(50000); + SetGetRadioInfo(GET_INFO); + tuned = ri.info ? TRUE : FALSE; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + if (radioname==NULL) + tmp = g_strdup_printf("FM Radio (undefined)"); +@@ -350,10 +350,10 @@ + ioctl (radio_fd, VIDIOCSAUDIO, &va); + close(radio_fd); + radio_fd = -1; +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.mute = 1; + SetGetRadioInfo(SET_INFO); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + + static void radio_pause(short p) +@@ -380,7 +380,7 @@ + is_paused = (p ? TRUE : FALSE); + close(radio_fd); + radio_fd = -2; +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + if (p) { + ri.mute = 1; + is_paused = TRUE; +@@ -389,7 +389,7 @@ + is_paused = FALSE; + } + SetGetRadioInfo(SET_INFO); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + + static void get_song_info(char *filename, char **title, int *len) +@@ -453,9 +453,9 @@ + + static void get_volume(int *l, int *r) + { +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + mixer_devinfo_t devinfo; +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || __NetBSD__ */ + int fd, devs, cmd, v; + + #if defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_MACHINE_SOUNDCARD_H) +@@ -490,7 +490,7 @@ + } else { + printf( "Cannot open /dev/mixer %ld\n", errno ); + } +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + cmd = 1; + fd = open("/dev/mixer", O_RDWR); + if (fd < 0) { +@@ -537,7 +537,7 @@ + + if (close(fd) < 0) + warn("/dev/mixer close error"); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || defined(__NetBSD__) */ + } + else + #endif +@@ -555,9 +555,9 @@ + { + #ifdef linux + struct video_audio va; +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + mixer_devinfo_t devinfo; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || defined(__NetBSD__) */ + int fd, devs, cmd, v; + + #if defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_MACHINE_SOUNDCARD_H) +@@ -590,7 +590,7 @@ + } else { + printf( "Cannot open /dev/mixer %ld\n", errno ); + } +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + cmd = 1; + fd = open("/dev/mixer", O_RDWR); + if (fd < 0) { +@@ -639,7 +639,7 @@ + + if (close(fd) < 0) + warn("/dev/mixer close error"); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + else + #endif +@@ -676,11 +676,11 @@ + } + close(radio_fd); + radio_fd = -2; +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.volume = volume * (255 / (FMR_VOL_MAX - FMR_VOL_MIN)); + ri.mute = is_paused ? 1 : 0; + SetGetRadioInfo(SET_INFO); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + } + diff --git a/audio/xmms-fmradio/patches/patch-ac b/audio/xmms-fmradio/patches/patch-ac new file mode 100644 index 00000000000..6005b11f2e4 --- /dev/null +++ b/audio/xmms-fmradio/patches/patch-ac @@ -0,0 +1,66 @@ +$NetBSD: patch-ac,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ + +--- radio.h.orig Sun Jan 6 02:34:32 2002 ++++ radio.h Sun Jan 6 02:36:15 2002 +@@ -45,11 +45,11 @@ + #include <math.h> + + #ifdef HAVE_SYS_SOUNDCARD_H +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <sys/audioio.h> + #else + #include <sys/soundcard.h> +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || __NetBSD__ */ + #else + #ifdef HAVE_MACHINE_SOUNDCARD_H + #include <machine/soundcard.h> +@@ -58,9 +58,9 @@ + + #ifdef linux + #include <linux/videodev.h> +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + #include <sys/radioio.h> +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + #include <fcntl.h> + +@@ -94,10 +94,10 @@ + + #define STR_LEN_MAX 80 + +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #define GET_INFO 0 + #define SET_INFO 1 +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || __NetBSD__ */ + + typedef struct + { +@@ -108,9 +108,9 @@ + RadioConfig; + + extern RadioConfig radio_cfg; +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + extern struct radio_info ri; +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || defined(__NetBSD__) */ + + extern gint radio_fd; + extern gint freq,volume; +@@ -121,8 +121,8 @@ + + void radio_file_info_box(char *filename); + +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + int SetGetRadioInfo(int); +-#endif /* __OpenBSD__ */ ++#endif /* __OpenBSD__ || __NetBSD__ */ + + #endif /* RADIO_H */ diff --git a/audio/xmms-fmradio/patches/patch-ad b/audio/xmms-fmradio/patches/patch-ad new file mode 100644 index 00000000000..c8fab574c54 --- /dev/null +++ b/audio/xmms-fmradio/patches/patch-ad @@ -0,0 +1,78 @@ +$NetBSD: patch-ad,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $ + +--- radio_file_info.c.orig Sun Jan 6 02:36:53 2002 ++++ radio_file_info.c Sun Jan 6 02:38:25 2002 +@@ -163,7 +163,7 @@ + tuned = ((v.signal != 0) ? TRUE : FALSE); + close(radio_fd); + radio_fd = -2; +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.freq = freq; + ri.volume = volume * (255 / (FMR_VOL_MAX - FMR_VOL_MIN)); + ri.mute = is_paused ? 1 : 0; +@@ -171,7 +171,7 @@ + usleep(50000); + SetGetRadioInfo(GET_INFO); + tuned = ri.info ? TRUE : FALSE; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + + static void scan_cb(GtkWidget * sb, gpointer data){ +@@ -205,12 +205,12 @@ + va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0); + ioctl (radio_fd, VIDIOCSFREQ, &xl_freq); + ioctl (radio_fd, VIDIOCSAUDIO, &va); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.freq = fr; + ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN)); + ri.mute = is_paused ? 1 : 0; + SetGetRadioInfo(SET_INFO); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + for(i=0;(i<tries)&&(tuned);i++){ + usleep (10000); +@@ -218,10 +218,10 @@ + v.tuner = 0; + ioctl (radio_fd, VIDIOCGTUNER, &v); + tuned = ((v.signal != 0) ? TRUE : FALSE); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + SetGetRadioInfo(GET_INFO); + tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + } + +@@ -236,12 +236,12 @@ + va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0); + ioctl (radio_fd, VIDIOCSFREQ, &xl_freq); + ioctl (radio_fd, VIDIOCSAUDIO, &va); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + ri.freq = fr; + ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN)); + ri.mute = is_paused ? 1 : 0; + SetGetRadioInfo(SET_INFO); +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + + for(i=0;(i<tries)&&(!tuned);i++){ + usleep (10000); +@@ -249,10 +249,10 @@ + v.tuner = 0; + ioctl (radio_fd, VIDIOCGTUNER, &v); + tuned = ((v.signal != 0) ? TRUE : FALSE); +-#elif defined __OpenBSD__ ++#elif defined(__OpenBSD__) || defined(__NetBSD__) + SetGetRadioInfo(GET_INFO); + tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0; +-#endif /* linux || __OpenBSD__ */ ++#endif /* linux || __OpenBSD__ || __NetBSD__ */ + } + } + } |