diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/wmix/Makefile | 24 | ||||
-rw-r--r-- | audio/wmix/distinfo | 4 | ||||
-rw-r--r-- | audio/wmix/files/patch-aa | 20 | ||||
-rw-r--r-- | audio/wmix/files/patch-ab | 146 | ||||
-rw-r--r-- | audio/wmix/files/patch-ac | 29 | ||||
-rw-r--r-- | audio/wmix/files/patch-mixer-oss.c | 69 | ||||
-rw-r--r-- | audio/wmix/files/patch-wmix.c | 10 |
7 files changed, 100 insertions, 202 deletions
diff --git a/audio/wmix/Makefile b/audio/wmix/Makefile index f278ba7a38be..5dc850e25aa0 100644 --- a/audio/wmix/Makefile +++ b/audio/wmix/Makefile @@ -6,18 +6,32 @@ # PORTNAME= wmix -PORTVERSION= 2.20 +PORTVERSION= 3.1 CATEGORIES= audio windowmaker MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/software/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bogorodskiy@inbox.ru COMMENT= An audio mixer for the WindowMaker dock with TV-like OSD +USE_REINPLACE= yes PLIST_FILES= bin/wmix -USE_XPM= YES -USE_X_PREFIX= YES +ALL_TARGET= ${PORTNAME} +USE_XPM= yes +USE_X_PREFIX= yes +MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS} -I${X11BASE}/include" \ + LDFLAGS="${LDFLAGS} -L${X11BASE}/lib" + +PORTDOCS= AUTHORS BUGS INSTALL NEWS README do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/wmix ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/wmix ${PREFIX}/bin + +post-install: +.ifndef (NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for i in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif .include <bsd.port.mk> diff --git a/audio/wmix/distinfo b/audio/wmix/distinfo index 4a58c258320f..c1de9810e282 100644 --- a/audio/wmix/distinfo +++ b/audio/wmix/distinfo @@ -1,2 +1,2 @@ -MD5 (wmix-2.20.tar.gz) = c1d33e155a582cfebdb9ff9caf518c69 -SIZE (wmix-2.20.tar.gz) = 42665 +MD5 (wmix-3.1.tar.gz) = 62f6e86f7558f193e081dc29444a6699 +SIZE (wmix-3.1.tar.gz) = 21344 diff --git a/audio/wmix/files/patch-aa b/audio/wmix/files/patch-aa deleted file mode 100644 index c2a1c060d6fc..000000000000 --- a/audio/wmix/files/patch-aa +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile.orig Thu Mar 29 13:49:38 2001 -+++ Makefile Mon Apr 30 14:49:50 2001 -@@ -1,6 +1,5 @@ --CC = gcc --CFLAGS = -O2 -Wall -I/usr/X11R6/include -DCUSTOM --LIBS = -L/usr/X11R6/lib -lX11 -lXpm -lXext -+CFLAGS += -Wall -I/usr/local/include -I/usr/X11R6/include -DCUSTOM -+LDFLAGS = -L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXpm -lXext - - SRCS = mix.c config.c - OBJS = mix.o config.o -@@ -8,7 +7,7 @@ - all: mixer - - mixer: $(OBJS) -- $(CC) $(CFLAGS) -o wmix $(OBJS) $(LIBS) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o wmix $(OBJS) - - clean: - rm -f *.o *~ wmix trace diff --git a/audio/wmix/files/patch-ab b/audio/wmix/files/patch-ab deleted file mode 100644 index 53619fa0a532..000000000000 --- a/audio/wmix/files/patch-ab +++ /dev/null @@ -1,146 +0,0 @@ -*** mix.c.orig Fri Apr 20 11:52:28 2001 ---- mix.c Sun Jul 22 12:19:34 2001 -*************** -*** 20,26 **** ---- 20,28 ---- - #include <stdlib.h> - #include <string.h> - #include <ctype.h> -+ #ifdef linux - #include <getopt.h> -+ #endif - #include <time.h> - #include <unistd.h> - #include <fcntl.h> -*************** -*** 887,899 **** - #ifdef CUSTOM - #undef SOUND_DEVICE_NAMES - -! #define SOUND_DEVICE_NAMES {"Master Volume", "Bass", "Treble", "FM Synth Volume", "PCM - Wave Volume", "PC Speaker", "Line In Level", \ -! "Microphone Level", "CD Input Volume", "Mixer Level", "PCM2 - Wave Volume", "Recording Volume", "Input Gain", "Output Gain", \ -! "Line1 Input", "Line2 Input", "Line3 Input", "Digital 1", "Digital 2", "Digital 3", \ -! "Phone Input", "Phone Output", "Video Card Volume", "Radio Card volume", "Monitor Volume"} - #endif - char *names[] = SOUND_DEVICE_NAMES; - struct mixer_info mixer_info; - - if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) { - printf("error: cannot open mixer device %s\n", value("mixerdev")); ---- 889,903 ---- - #ifdef CUSTOM - #undef SOUND_DEVICE_NAMES - -! #define SOUND_DEVICE_NAMES {" Master Volume", " Bass", " Treble", " Synth Volume", " Wave Volume", " PC Speaker", " Line In Level", \ -! " Microphone Level", " CD Volume", " Mixer Level", " Wave 2 Volume", " Recording Volume", " Input Gain", " Output Gain", \ -! " Line1 Input", " Line2 Input", " Line3 Input", " Digital 1", " Digital 2", " Digital 3", \ -! " Phone Input", " Phone Output", " Video Card Volume", " Radio Card Volume", " Monitor Volume"} - #endif - char *names[] = SOUND_DEVICE_NAMES; -+ #ifndef __FreeBSD__ - struct mixer_info mixer_info; -+ #endif - - if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) { - printf("error: cannot open mixer device %s\n", value("mixerdev")); -*************** -*** 921,932 **** - exit(1); - } - - if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info) == -1) { - printf("error: cannot get mixer info off mixer\n"); - exit(1); - } -- - printf("%s (%s) [", mixer_info.name, mixer_info.id); - for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { - if ((1 << count) & devmask) { - strcpy(mixer[nchannels].name, names[count]); ---- 925,940 ---- - exit(1); - } - -+ #ifdef __FreeBSD__ -+ printf("["); -+ #else - if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info) == -1) { - printf("error: cannot get mixer info off mixer\n"); - exit(1); - } - printf("%s (%s) [", mixer_info.name, mixer_info.id); -+ #endif -+ - for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { - if ((1 << count) & devmask) { - strcpy(mixer[nchannels].name, names[count]); -*************** -*** 946,951 **** ---- 954,960 ---- - printf("0"); - } - } -+ - printf("]\n"); - } - -*************** -*** 953,971 **** - { - int i; - int left, right, foo; - int retry = 3; - int stat = 1; - struct mixer_info mixer_info; - static int modify_counter; -- static Mixer old_mix[SOUND_MIXER_NRDEVICES]; - - /* check for possible failure here - happens with older kernels */ - if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info)) { - while (retry-- && stat) - stat = ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info); - } - -! if (mixer_info.modify_counter != modify_counter) { - i = 0; - /* this happens if mixer was changed by another program, - * so we need to update the values. We do not know, under OSS, ---- 962,987 ---- - { - int i; - int left, right, foo; -+ char doupdate = 0; -+ static Mixer old_mix[SOUND_MIXER_NRDEVICES]; -+ #ifndef __FreeBSD__ - int retry = 3; - int stat = 1; - struct mixer_info mixer_info; - static int modify_counter; - - /* check for possible failure here - happens with older kernels */ - if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info)) { - while (retry-- && stat) - stat = ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info); - } -+ doupdate = mixer_info.modify_counter != modify_counter; -+ #else -+ /* clearly something better would be nice, but hey, it works! */ -+ doupdate = 1; -+ #endif - -! if (doupdate) { - i = 0; - /* this happens if mixer was changed by another program, - * so we need to update the values. We do not know, under OSS, -*************** -*** 1022,1028 **** ---- 1038,1046 ---- - } - } - } -+ #ifndef __FreeBSD__ - modify_counter = mixer_info.modify_counter; -+ #endif - memcpy(old_mix, mixer, sizeof(mixer)); - } - diff --git a/audio/wmix/files/patch-ac b/audio/wmix/files/patch-ac deleted file mode 100644 index ef03fe07ceff..000000000000 --- a/audio/wmix/files/patch-ac +++ /dev/null @@ -1,29 +0,0 @@ -*** config.c.orig Sun Apr 1 22:43:30 2001 ---- config.c Sun Apr 1 22:43:51 2001 -*************** -*** 135,141 **** - free((struct var *) vars); - vars = vp; - } -! if (vars) - for (new = vars; new->v_next;) - if (!strcmp(new->v_next->v_name, name)) { - vp = new->v_next->v_next; ---- 135,141 ---- - free((struct var *) vars); - vars = vp; - } -! if (vars) { - for (new = vars; new->v_next;) - if (!strcmp(new->v_next->v_name, name)) { - vp = new->v_next->v_next; -*************** -*** 143,148 **** ---- 143,149 ---- - new->v_next = vp; - } else - new = new->v_next; -+ } - } - - char *vcopy(char *str) diff --git a/audio/wmix/files/patch-mixer-oss.c b/audio/wmix/files/patch-mixer-oss.c new file mode 100644 index 000000000000..2046872c80f0 --- /dev/null +++ b/audio/wmix/files/patch-mixer-oss.c @@ -0,0 +1,69 @@ +--- mixer-oss.c.orig Wed Jul 14 18:00:14 2004 ++++ mixer-oss.c Wed Jul 14 17:58:50 2004 +@@ -94,7 +94,9 @@ + + static bool get_mixer_state(void) + { ++#if 0 + struct mixer_info m_info; ++#endif + int dev_lr_volume, dev_left_volume, dev_right_volume; + float left, right; + int srcmask; +@@ -103,14 +105,16 @@ + /* to really keep track of updates */ + static MixerChannel oldmixer[SOUND_MIXER_NRDEVICES]; + ++#if 0 + ioctl(mixer_fd, SOUND_MIXER_INFO, &m_info); + ++ + if (m_info.modify_counter == prev_modify_counter) + /* + * Mixer state has not changed + */ + return false; +- ++#endif + /* Mixer state was changed by another program, so we need + * to update. As OSS cannot tell us specifically which + * channels changed, we read all of them in. +@@ -157,7 +161,7 @@ + } + mixer[ch].is_recording = ((1 << mixer[ch].dev) & srcmask) != 0; + } +- prev_modify_counter = m_info.modify_counter; ++ /* prev_modify_counter = m_info.modify_counter; */ + /* check if this was due to OSS stupidity or if we really changed */ + if (!memcmp(&mixer, &oldmixer, sizeof(mixer))) { + memcpy(&oldmixer, &mixer, sizeof(mixer)); +@@ -224,7 +228,9 @@ + void mixer_init(const char *mixer_device, bool verbose, const char * exclude[]) + { + int devmask, srcmask, recmask, stmask; ++#if 0 + struct mixer_info m_info; ++#endif + int count; + int mask; + +@@ -256,15 +262,19 @@ + exit(EXIT_FAILURE); + } + ++#if 0 + if (ioctl(mixer_fd, SOUND_MIXER_INFO, &m_info) == -1) { + fputs("error: could not read mixer info\n", stderr); ++ perror("ioctl"); + exit(EXIT_FAILURE); + } + ++ + if (verbose) { + printf("%s (%s)\n", m_info.name, m_info.id); + puts("Supported channels:"); + } ++#endif + for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { + mask = 1 << count; + if ((mask & devmask) && (!is_exclude((short_names[count]),exclude))) { diff --git a/audio/wmix/files/patch-wmix.c b/audio/wmix/files/patch-wmix.c new file mode 100644 index 000000000000..6c095f13173b --- /dev/null +++ b/audio/wmix/files/patch-wmix.c @@ -0,0 +1,10 @@ +--- wmix.c.orig Wed Jul 14 18:15:17 2004 ++++ wmix.c Wed Jul 14 18:15:26 2004 +@@ -24,7 +24,6 @@ + #include <string.h> + #include <signal.h> + #include <string.h> +-#include <getopt.h> + #include <unistd.h> + + #include <X11/X.h> |