Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 2004 18:46:52 +0400
From:      Roman Bogorodskiy <bogorodskiy@inbox.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/69056: [ maintainer ] audio/wmix: update to 3.1
Message-ID:  <E1Bkl24-0009oV-00.bogorodskiy-inbox-ru@mx2.mail.ru>
Resent-Message-ID: <200407141450.i6EEoJmg084611@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         69056
>Category:       ports
>Synopsis:       [ maintainer ] audio/wmix: update to 3.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 14 14:50:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #5: Sat Jun 19 22:04:33 MSD 2004 root@lame.novel.ru:/usr/obj/usr/src/sys/NOV i386


>Description:
	- Update to 3.1
	- Install documentation
	- Request for maintainership
>How-To-Repeat:
>Fix:

diff -ruN wmix.orig/Makefile wmix/Makefile
--- wmix.orig/Makefile	Wed Jul 14 16:26:11 2004
+++ wmix/Makefile	Wed Jul 14 18:35:46 2004
@@ -6,18 +6,35 @@
 #
 
 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
+
+PORTDOCS=	AUTHORS BUGS INSTALL NEWS README
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|PORT_CC|${CC}|g' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's|PORT_CFLAGS|${CFLAGS} -I${X11BASE}/include|g' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's|PORT_LDFLAGS|${LDFLAGS} -L${X11BASE}/lib|g' ${WRKSRC}/Makefile
 
 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 -ruN wmix.orig/distinfo wmix/distinfo
--- wmix.orig/distinfo	Wed Jul 14 16:26:11 2004
+++ wmix/distinfo	Wed Jul 14 16:26:50 2004
@@ -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 -ruN wmix.orig/files/patch-Makefile wmix/files/patch-Makefile
--- wmix.orig/files/patch-Makefile	Thu Jan  1 03:00:00 1970
+++ wmix/files/patch-Makefile	Wed Jul 14 16:56:45 2004
@@ -0,0 +1,12 @@
+--- Makefile.orig	Wed Jul 14 16:55:24 2004
++++ Makefile	Wed Jul 14 16:56:37 2004
+@@ -1,6 +1,6 @@
+-CC		= gcc
+-CFLAGS		= -O3 -W -Wall
+-LDFLAGS		= -L/usr/X11R6/lib
++CC		= PORT_CC
++CFLAGS		= PORT_CFLAGS
++LDFLAGS		= PORT_LDFLAGS
+ OBJECTS		= misc.o mixer-oss.o ui_x.o wmix.o
+ 
+ # where to install this program (also for packaging stuff)
diff -ruN wmix.orig/files/patch-aa wmix/files/patch-aa
--- wmix.orig/files/patch-aa	Wed Jul 14 16:26:11 2004
+++ wmix/files/patch-aa	Thu Jan  1 03:00:00 1970
@@ -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 -ruN wmix.orig/files/patch-ab wmix/files/patch-ab
--- wmix.orig/files/patch-ab	Wed Jul 14 16:26:11 2004
+++ wmix/files/patch-ab	Thu Jan  1 03:00:00 1970
@@ -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 -ruN wmix.orig/files/patch-ac wmix/files/patch-ac
--- wmix.orig/files/patch-ac	Wed Jul 14 16:26:11 2004
+++ wmix/files/patch-ac	Thu Jan  1 03:00:00 1970
@@ -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 -ruN wmix.orig/files/patch-mixer-oss.c wmix/files/patch-mixer-oss.c
--- wmix.orig/files/patch-mixer-oss.c	Thu Jan  1 03:00:00 1970
+++ wmix/files/patch-mixer-oss.c	Wed Jul 14 18:07:40 2004
@@ -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 -ruN wmix.orig/files/patch-wmix.c wmix/files/patch-wmix.c
--- wmix.orig/files/patch-wmix.c	Thu Jan  1 03:00:00 1970
+++ wmix/files/patch-wmix.c	Wed Jul 14 18:15:55 2004
@@ -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>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Bkl24-0009oV-00.bogorodskiy-inbox-ru>