pkg://wavplay-noX11-1.3-1.src.rpm:66638/wavplay-1.3.patch
info downloads
diff -uNr wavplay-1.3.orig/Makefile wavplay-1.3/Makefile
--- wavplay-1.3.orig/Makefile Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/Makefile Fri Jul 30 16:48:10 1999
@@ -27,7 +27,7 @@
#
# # make install_no_x
-SHELL=/bin/ksh
+SHELL=/bin/bash
#----------------------------------------------------------------------
# C O N F I G U R A T I O N S E C T I O N :
@@ -36,7 +36,7 @@
#----------------------------------------------------------------------
# If you are running a 386 you should comment this line out.
#
-CPU=-m486
+#CPU=-m486
#----------------------------------------------------------------------
# If you are experiencing troubles (like core dumps!), then uncomment
@@ -44,8 +44,8 @@
# turning off debug, you may want to uncomment the OPT= line. Also
# adjust the STRIP option to suit compile mode:
#
-DEBUG=-g
-#OPT=-O2
+#DEBUG=-g
+OPT=-O2
#----------------------------------------------------------------------
# When using 'DEBUG=-g' above, then comment out the 'strip' line:
@@ -57,7 +57,8 @@
# This parameter indicates where the program binaries should be
# placed (wavplay, wavrec, and xltwavplay)
#
-INSTDIR=/usr/local/bin
+INSTDIR=$(RPM_BUILD_ROOT)/usr/bin
+XINSTDIR=$(RPM_BUILD_ROOT)/usr/X11R6/bin
#----------------------------------------------------------------------
# Uncomment this line if you want to install the xltwavplay.res resource
@@ -65,13 +66,13 @@
# builtin fallback resources in the program itself. If you don't know
# what this is all about, then leave the next line commented out.
#
-#USERES=-DINSTALLED_RESOURCE_FILE
+USERES=-DINSTALLED_RESOURCE_FILE
#----------------------------------------------------------------------
# If the resource file is to be installed, indicate where. If the above
# parameter is commented out, then this parameter is ignored.
#
-RESDIR=/usr/X11R6/lib/X11/app-defaults
+RESDIR=$(RPM_BUILD_ROOT)/usr/X11R6/lib/X11/app-defaults
#----------------------------------------------------------------------
# If you don't have libXmu.so (which you should have) or you simply
@@ -113,7 +114,7 @@
# Environment variable WAVPLAYPATH will override this value at runtime, if
# present.
#
-PLAYPATH= -DWAVPLAYPATH=\"$(INSTDIR)/wavplay\"
+PLAYPATH= -DWAVPLAYPATH=\"/usr/bin/wavplay\"
#----------------------------------------------------------------------
# Minimum DSP sampling rate (default is 4000)
@@ -161,7 +162,7 @@
# this should be unecessary if the appropriate symlinks are
# installed).
#
-#CUSTINCL= -I/usr/X11R6/include/X11 -I/usr/local/lesstif/include/Xm
+CUSTINCL= -I/usr/X11R6/include
#----------------------------------------------------------------------
# Normally, you shouldn't need to change anything beyond this point:
@@ -204,7 +205,7 @@
wavrec: wavplay
rm -f wavrec
- ln wavplay wavrec
+ ln -s wavplay wavrec
xltwavplay: $(CLNOBJ) xltwavplay.o
$(CC) $(CLNOBJ) $(XLDOPTS) $(DEBUG) -o xltwavplay
@@ -221,7 +222,7 @@
@[ ! -d "$(INSTDIR)" ] && echo "You do not have a directory $(INSTDIR); Check INSTDIR in make file." && exit 13 || :
$(INSTALL) -o root -g root -m 555 wavplay $(INSTDIR)
rm -f $(INSTDIR)/wavrec
- ln $(INSTDIR)/wavplay $(INSTDIR)/wavrec
+ ln -s wavplay $(INSTDIR)/wavrec
@[ ! -z "$(SCHED_PRIORITY)" ] && echo "*** DO 'make setuid_root' IF YOU WANT REAL TIME SCHEDULING ***" || :
@echo
@@ -239,11 +240,9 @@
sync
install_xltwavplay: xltwavplay
- $(INSTALL) -o root -g root -m 555 xltwavplay $(INSTDIR)
+ $(INSTALL) -o root -g root -m 555 xltwavplay $(XINSTDIR)
@[ ! -z "$(USERES)" ] \
- && $(INSTALL) -o root -g root -m 555 xltwavplay.res $(RESDIR)/xltwavplay \
- && ls -dlL $(RESDIR)/xltwavplay/xltwavplay.res \
- || rm -f $(RESDIR)/xltwavplay
+ && $(INSTALL) -o root -g root -m 555 xltwavplay.res $(RESDIR)/xltwavplay
clean:
rm -f *.o a.out core t.t errs.t
diff -uNr wavplay-1.3.orig/file.c wavplay-1.3/file.c
--- wavplay-1.3.orig/file.c Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/file.c Fri Jul 30 15:35:42 1999
@@ -432,7 +432,7 @@
/*
* Check the range on the buffer sizes:
*/
- if ( dfile->dspblksiz < 4096 || dfile->dspblksiz > 65536 ) {
+ if ( dfile->dspblksiz < 1024 || dfile->dspblksiz > 65536 ) {
err("%s: Audio block size (%d bytes)",
sys_errlist[errno=EINVAL],
(int)dfile->dspblksiz);
diff -uNr wavplay-1.3.orig/locks.c wavplay-1.3/locks.c
--- wavplay-1.3.orig/locks.c Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/locks.c Fri Jul 30 16:08:31 1999
@@ -53,6 +53,7 @@
#include <sys/ipc.h>
#include <sys/sem.h>
#include "wavplay.h"
+#include "semun.h"
static int SemUndo = SEM_UNDO;
static ErrFunc v_erf; /* Error reporting function */
diff -uNr wavplay-1.3.orig/main.c wavplay-1.3/main.c
--- wavplay-1.3.orig/main.c Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/main.c Fri Jul 30 16:08:39 1999
@@ -65,6 +65,7 @@
#include <assert.h>
#include "wavplay.h"
#include "server.h"
+#include "semun.h"
char *env_WAVPLAYPATH = WAVPLAYPATH; /* Default pathname of executable /usr/local/bin/wavplay */
char *env_AUDIODEV = AUDIODEV; /* Default compiled in audio device */
diff -uNr wavplay-1.3.orig/semun.h wavplay-1.3/semun.h
--- wavplay-1.3.orig/semun.h Thu Jan 1 01:00:00 1970
+++ wavplay-1.3/semun.h Fri Jul 30 16:08:01 1999
@@ -0,0 +1,13 @@
+#ifndef _semun_h
+#define _semun_h
+
+#ifdef _SEM_SEMUN_UNDEFINED
+union semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short int *array;
+ struct seminfo *__buf;
+};
+#endif
+
+#endif /* semun_h */
diff -uNr wavplay-1.3.orig/server.c wavplay-1.3/server.c
--- wavplay-1.3.orig/server.c Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/server.c Fri Jul 30 16:08:25 1999
@@ -83,6 +83,7 @@
#include <linux/soundcard.h>
#include "wavplay.h"
#include "server.h"
+#include "semun.h"
static void toclnt_errmsg(int msg_errno,const char *message,int flags);
diff -uNr wavplay-1.3.orig/xltwavplay.res wavplay-1.3/xltwavplay.res
--- wavplay-1.3.orig/xltwavplay.res Thu Sep 17 17:03:41 1998
+++ wavplay-1.3/xltwavplay.res Fri Jul 30 16:53:18 1999
@@ -1,4 +1,4 @@
-! X LessTif WAV Play Version 1.0 Resource File: install as xltwavplay in the resource directory
+! X LessTif WAV Play Version 1.3 Resource File: install as xltwavplay in the resource directory
!
xltwavplay.geometry: +350+250
xltwavplay*background: grey70
@@ -31,17 +31,17 @@
xltwavplay*TimeLbl0.labelString: Duration:
xltwavplay*FileLbl1.labelString: \
xltwavplay*FileLbl1.foreground: black
-xltwavplay*TypeLbl1.labelString:
+xltwavplay*TypeLbl1.labelString: \
xltwavplay*TypeLbl1.foreground: black
-xltwavplay*DateLbl1.labelString:
+xltwavplay*DateLbl1.labelString: \
xltwavplay*DateLbl1.foreground: black
-xltwavplay*SizeLbl1.labelString:
+xltwavplay*SizeLbl1.labelString: \
xltwavplay*SizeLbl1.foreground: black
-xltwavplay*SamplingRateLbl1.labelString:
+xltwavplay*SamplingRateLbl1.labelString: \
xltwavplay*SamplingRateLbl1.foreground: black
-xltwavplay*SamplesLbl1.labelString:
+xltwavplay*SamplesLbl1.labelString: \
xltwavplay*SamplesLbl1.foreground: black
-xltwavplay*TimeLbl1.labelString:
+xltwavplay*TimeLbl1.labelString: \
xltwavplay*TimeLbl1.foreground: black
xltwavplay*Play.labelString: Play
xltwavplay*StopPlay.labelString: Stop