audio/wavplay: update 1.4 → 2.0
This commit is contained in:
parent
fe3cd42e3e
commit
4f0caa055d
@ -1,10 +1,9 @@
|
||||
# Created by: greg
|
||||
|
||||
PORTNAME= wavplay
|
||||
PORTVERSION= 1.4
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 2.0
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= SUNSITE/apps/sound/players/
|
||||
MASTER_SITES= SF/${PORTNAME}/Release%20Downloads/
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Wav player and recorder
|
||||
@ -15,13 +14,18 @@ LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386
|
||||
ONLY_FOR_ARCHS_REASON= does not play sound correctly
|
||||
|
||||
CFLAGS+= -D_WANT_SEMUN
|
||||
USES= autoreconf libtool:build
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
INSTALL_TARGET= install PREFIX="${STAGEDIR}${PREFIX}"
|
||||
OPTIONS_DEFINE= X11
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
PLIST_FILES= bin/wavplay bin/wavrec man/man1/${PORTNAME}.1.gz
|
||||
X11_CONFIGURE_OFF= --enable-nox
|
||||
X11_USES= localbase:ldflags xorg
|
||||
X11_USE= XORG=x11,xmu,xt
|
||||
X11_LIB_DEPENDS= libXm.so:x11-toolkits/lesstif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|u_long|u_int|g' ${WRKSRC}/*.c ${WRKSRC}/*.h
|
||||
@${REINPLACE_CMD} -e 's|machine/soundcard|sys/soundcard|g' ${WRKSRC}/src/*.c
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (wavplay-1.4.tar.gz) = 8e77d48b301fe3224006afff79a249142eeafa756e95dfbc08b1c0c873d0821f
|
||||
SIZE (wavplay-1.4.tar.gz) = 63549
|
||||
TIMESTAMP = 1646847643
|
||||
SHA256 (wavplay-2.0.tar.gz) = 256ea0b581d587b482e0c928869e3896845a5299b8e124c01749b4b9edfeb552
|
||||
SIZE (wavplay-2.0.tar.gz) = 368945
|
||||
|
@ -1,148 +0,0 @@
|
||||
--- Makefile.orig 1999-12-04 00:06:42 UTC
|
||||
+++ Makefile
|
||||
@@ -38,7 +38,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
|
||||
@@ -47,7 +47,7 @@ CPU=-m486
|
||||
# adjust the STRIP option to suit compile mode:
|
||||
#
|
||||
#DEBUG=-g
|
||||
-OPT=-O2
|
||||
+#OPT=-O2
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# When using 'DEBUG=-g' above, then comment out the 'strip' line:
|
||||
@@ -59,7 +59,9 @@ STRIP=strip
|
||||
# This parameter indicates where the program binaries should be
|
||||
# placed (wavplay, wavrec, and xltwavplay)
|
||||
#
|
||||
-INSTDIR=/usr/local/bin
|
||||
+PREFIX?=/usr/local
|
||||
+INSTDIR=$(PREFIX)/bin
|
||||
+MANDIR=$(PREFIX)/man/man1
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Uncomment this line if you want to install the xltwavplay.res resource
|
||||
@@ -81,14 +83,14 @@ RESDIR=/usr/X11R6/lib/X11/app-defaults
|
||||
# to disable the EDITRES facility. If you're not compiling xltwavplay
|
||||
# then this setting can be left asis.
|
||||
#
|
||||
-#NOEDITRES=-DNO_EDITRES
|
||||
+NOEDITRES=-DNO_EDITRES
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# If you COMMENTED OUT the NOEDITRES line, then UNCOMMENT this line.
|
||||
# If you UNCOMMENTED the NOEDITRES line, then COMMENT out this line.
|
||||
# (ie. do the opposite of NOEDITRES)
|
||||
#
|
||||
-LIBXMU=-lXmu
|
||||
+#LIBXMU=-lXmu
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# These are the non X load options (for wavplay/wavrec)
|
||||
@@ -106,7 +108,13 @@ XLDOPTS=-L/usr/X11R6/lib/ -L/usr/local/l
|
||||
# only the standard getopt() routine. When commented out, the long options like --help
|
||||
# are recognized, with the help of the getopt_long() routine.
|
||||
#
|
||||
-#STDGETOPTS= -DUSE_GETOPT_STD
|
||||
+STDGETOPTS= -DUSE_GETOPT_STD
|
||||
+
|
||||
+#----------------------------------------------------------------------
|
||||
+#
|
||||
+# Uncomment this when compiling on FreeBSD.
|
||||
+
|
||||
+EXTRAOPTS=-DFREEBSD -D__GNU_LIBRARY__
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# The next option specifies the pathname that the xltwavplay X client should exec
|
||||
@@ -133,7 +141,7 @@ PLAYPATH= -DWAVPLAYPATH=\"$(INSTDIR)/wav
|
||||
# Environment variable DSPPATH will override this value at runtime, if
|
||||
# present.
|
||||
#
|
||||
-#DSPPATH= -DAUDIODEV=\"/dev/dsp\"
|
||||
+DSPPATH= -DAUDIODEV=\"/dev/audio\"
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Semaphore IPC Key for the Play & Record locks (Default is 0x33333333)
|
||||
@@ -163,19 +171,19 @@ INSTALL=install
|
||||
# this should be unecessary if the appropriate symlinks are
|
||||
# installed).
|
||||
#
|
||||
-#CUSTINCL= -I/usr/X11R6/include/X11 -I/usr/local/lesstif/include/Xm
|
||||
+#CUSTINCL= -I${LOCALBASE}/include/X11 -I${LOCALBASE}/include/Xm -I/${LOCALBASE}/include
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Normally, you shouldn't need to change anything beyond this point:
|
||||
#----------------------------------------------------------------------
|
||||
.SUFFIXES: .c .cc .h .o
|
||||
|
||||
-CUSTMOPTS=$(STDGETOPTS) $(PLAYPATH) $(DSPMIN) $(DSPMAX) $(DSPPATH) $(DSPLOCKS) $(USERES) $(NOEDITRES) $(SCHED_PRIORITY)
|
||||
+CUSTMOPTS=$(STDGETOPTS) $(EXTRAOPTS) $(PLAYPATH) $(DSPMIN) $(DSPMAX) $(DSPPATH) $(DSPLOCKS) $(USERES) $(NOEDITRES) $(SCHED_PRIORITY)
|
||||
ELF= # -fPIC
|
||||
INCL= -I. $(CUSTINCL)
|
||||
-CCFLAGS= -c $(DEBUG)$(OPT) $(CPU) $(ELF) -fhandle-exceptions $(CUSTMOPTS) -Wall -Wstrict-prototypes
|
||||
-CFLAGS= -c $(DEBUG)$(OPT) $(CPU) $(ELF) -Wall -Wstrict-prototypes $(CUSTMOPTS)
|
||||
-CC= gcc
|
||||
+CCFLAGS+= -c $(DEBUG)$(OPT) $(CPU) $(ELF) -fhandle-exceptions $(CUSTMOPTS) -Wall -Wstrict-prototypes
|
||||
+CFLAGS+= -c $(DEBUG)$(OPT) $(CPU) $(ELF) -Wall -Wstrict-prototypes $(CUSTMOPTS)
|
||||
+CC?= gcc
|
||||
CP= g++
|
||||
|
||||
HDRFIL= client.h server.h wavfile.h wavplay.h xltwavplay.h xmsprint.h
|
||||
@@ -189,9 +197,9 @@ WVDMPO= wavdump.o
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCL) $<
|
||||
|
||||
-all: wavplay wavrec xltwavplay
|
||||
+all: wavplay wavrec
|
||||
|
||||
-no_x: wavplay wavrec
|
||||
+with_x: wavplay wavrec xltwavplay
|
||||
|
||||
# wavdump: $(WVDMPO)
|
||||
# $(CP) $(WVDMPO) $(LDOPTS) $(DEBUG) -o wavdump -lRIFF
|
||||
@@ -209,18 +217,21 @@ xltwavplay: $(CLNOBJ) xltwavplay.o
|
||||
$(STRIP) xltwavplay
|
||||
ls -l xltwavplay
|
||||
|
||||
-install: install_wavplay install_xltwavplay
|
||||
+install: install_wavplay install_man
|
||||
|
||||
-install_no_x: install_wavplay
|
||||
+install_with_x: install_wavplay install_xltwavplay install_man
|
||||
|
||||
install_wavplay: wavplay wavrec
|
||||
- @[ ! -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)
|
||||
+ mkdir -p $(INSTDIR)
|
||||
+ ${BSD_INSTALL_PROGRAM} wavplay $(INSTDIR)
|
||||
rm -f $(INSTDIR)/wavrec
|
||||
ln $(INSTDIR)/wavplay $(INSTDIR)/wavrec
|
||||
- @[ ! -z "$(SCHED_PRIORITY)" ] && echo "*** DO 'make setuid_root' IF YOU WANT REAL TIME SCHEDULING ***" || :
|
||||
@echo
|
||||
|
||||
+install_man: wavplay.1
|
||||
+ mkdir -p $(MANDIR)
|
||||
+ ${BSD_INSTALL_MAN} wavplay.1 $(MANDIR)
|
||||
+
|
||||
xltwavplay_test: wavplay xltwavplay
|
||||
WAVPLAYPATH=./wavplay ./xltwavplay
|
||||
|
||||
@@ -234,9 +245,9 @@ setuid_root:
|
||||
@echo
|
||||
|
||||
install_xltwavplay: xltwavplay
|
||||
- $(INSTALL) -o root -g root -m 555 xltwavplay $(INSTDIR)
|
||||
+ ${BSD_INSTALL_PROGRAM} xltwavplay $(INSTDIR)
|
||||
@[ ! -z "$(USERES)" ] \
|
||||
- && $(INSTALL) -o root -g root -m 555 xltwavplay.res $(RESDIR)/xltwavplay \
|
||||
+ && ${BSD_INSTALL_DATA} xltwavplay.res $(RESDIR)/xltwavplay \
|
||||
&& ls -dlL $(RESDIR)/xltwavplay/xltwavplay.res \
|
||||
|| rm -f $(RESDIR)/xltwavplay
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- client.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ client.c
|
||||
@@ -47,7 +47,9 @@ static const char rcsid[] = "@(#)client.
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <signal.h>
|
||||
@@ -57,7 +59,11 @@ static const char rcsid[] = "@(#)client.
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <assert.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <linux/soundcard.h>
|
||||
+#else
|
||||
+#include <sys/soundcard.h>
|
||||
+#endif
|
||||
#include "wavplay.h"
|
||||
#include "client.h"
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- file.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ file.c
|
||||
@@ -56,7 +56,9 @@ static const char rcsid[] = "@(#)file.c
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <signal.h>
|
||||
@@ -64,7 +66,11 @@ static const char rcsid[] = "@(#)file.c
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <assert.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <linux/soundcard.h>
|
||||
+#else
|
||||
+#include <sys/soundcard.h>
|
||||
+#endif
|
||||
#include "wavplay.h"
|
||||
|
||||
extern int clntIPC; /* Needed for message passing in PlayDSP */
|
@ -1,45 +0,0 @@
|
||||
--- main.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ main.c
|
||||
@@ -56,7 +56,9 @@ static const char rcsid[] = "@(#)main.c
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <getopt.h>
|
||||
+#endif
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
@@ -82,7 +84,11 @@ usage(const char *cmd,OprMode opr_mode)
|
||||
else printf("Usage:\t%s [options] [files...]\n\n",cmd);
|
||||
|
||||
puts("Options:");
|
||||
+#ifndef FREEBSD
|
||||
printf("\t-%c\tThis info (or use --help)\n",OPF_HELP);
|
||||
+#else
|
||||
+ printf("\t-%c\tThis info\n",OPF_HELP);
|
||||
+#endif
|
||||
printf("\t-%c\tQuiet mode (no messages)\n",OPF_QUIET);
|
||||
printf("\t-%c rate\tSampling rate\n",OPF_SAMPRATE);
|
||||
printf("\t-%c\tDebug mode\n",OPF_DEBUG);
|
||||
@@ -105,7 +111,11 @@ usage(const char *cmd,OprMode opr_mode)
|
||||
if ( opr_mode != OprRecord )
|
||||
printf("\t-%c\tDisplay info about wav file(s) only\n",OPF_INFO);
|
||||
|
||||
+#ifndef FREEBSD
|
||||
printf("\n\t-%c\tDisplay version and Copyright info (or use --version)\n\n",OPF_VERSION);
|
||||
+#else
|
||||
+ printf("\n\t-%c\tDisplay version and Copyright info\n\n",OPF_VERSION);
|
||||
+#endif
|
||||
|
||||
puts("\nWAV parameters are normally taken from the input file(s),\n"
|
||||
"but command line options can override them if required.");
|
||||
@@ -208,6 +218,8 @@ main(int argc,char **argv) {
|
||||
int rc; /* Return code */
|
||||
int fd; /* Temporary file descriptor */
|
||||
double d; /* Temporary double value */
|
||||
+ char *cp; /* Used for env var */
|
||||
+ uid_t uid;
|
||||
static char cmdopts[] = {
|
||||
OPF_INFO, OPF_HELP, OPF_QUIET, OPF_SAMPRATE,':', OPF_STEREO, OPF_MONO,
|
||||
OPF_TIME,':', OPF_DATABITS,':', OPF_IPCKEY,':', OPF_RESET,
|
@ -1,24 +0,0 @@
|
||||
--- msg.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ msg.c
|
||||
@@ -47,7 +47,9 @@ static const char rcsid[] = "@(#)msg.c $
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <signal.h>
|
||||
@@ -56,7 +58,11 @@ static const char rcsid[] = "@(#)msg.c $
|
||||
#include <sys/msg.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <assert.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <linux/soundcard.h>
|
||||
+#else
|
||||
+#include <sys/soundcard.h>
|
||||
+#endif
|
||||
#include "wavplay.h"
|
||||
|
||||
/*
|
@ -1,30 +0,0 @@
|
||||
--- recplay.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ recplay.c
|
||||
@@ -52,12 +52,18 @@ static const char rcsid[] = "@(#)recplay
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <linux/soundcard.h>
|
||||
+#else
|
||||
+#include <sys/soundcard.h>
|
||||
+#endif
|
||||
#include "wavplay.h"
|
||||
#include "server.h"
|
||||
|
||||
@@ -184,7 +190,7 @@ wavrecd(WavPlayOpts *wavopts,char *Pathn
|
||||
wfile = svr.wfile; /* And the file is already opened */
|
||||
}
|
||||
|
||||
- if ( (dfile = OpenDSP(wfile,O_RDWR,v_erf)) == NULL )
|
||||
+ if ( (dfile = OpenDSP(wfile,O_RDONLY,v_erf)) == NULL )
|
||||
goto errxit;
|
||||
|
||||
if ( RecordDSP(dfile,wfile,samples,svr_work_proc,v_erf) )
|
@ -1,24 +0,0 @@
|
||||
--- server.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ server.c
|
||||
@@ -65,7 +65,9 @@ static const char rcsid[] = "@(#)server.
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <malloc.h>
|
||||
+#endif
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <signal.h>
|
||||
@@ -79,7 +81,11 @@ static const char rcsid[] = "@(#)server.
|
||||
#ifdef SCHED_PRIORITY
|
||||
#include <sched.h>
|
||||
#endif
|
||||
+#ifndef FREEBSD
|
||||
#include <linux/soundcard.h>
|
||||
+#else
|
||||
+#include <sys/soundcard.h>
|
||||
+#endif
|
||||
#include "wavplay.h"
|
||||
#include "server.h"
|
||||
|
10
audio/wavplay/files/patch-src_Makefile.am
Normal file
10
audio/wavplay/files/patch-src_Makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/Makefile.am.orig 2011-06-03 00:25:27 UTC
|
||||
+++ src/Makefile.am
|
||||
@@ -1,7 +1,5 @@
|
||||
# src/Makefile.am for z9basic
|
||||
|
||||
-dist_pkgdata_DATA = wavplay.1
|
||||
-
|
||||
man1_MANS = wavplay.1
|
||||
|
||||
if WAVPLAY_NOX
|
@ -1,11 +0,0 @@
|
||||
--- wavplay.h.orig 1999-12-04 00:06:42 UTC
|
||||
+++ wavplay.h
|
||||
@@ -500,7 +500,7 @@ extern int LockDSP(int ipc,int playrecx,
|
||||
extern int UnlockDSP(int ipc,int playrecx,ErrFunc erf);
|
||||
|
||||
extern WAVFILE *WavOpenForRead(const char *Pathname,ErrFunc erf);
|
||||
-extern WAVFILE *WavOpenForWrite(const char *Pathname,OprMode m,UInt32 sample_rate,UInt16 bits,UInt32 samples,ErrFunc erf);
|
||||
+extern WAVFILE *WavOpenForWrite(const char *Pathname,Chan chmode,UInt32 sample_rate,UInt16 bits,UInt32 samples,ErrFunc erf);
|
||||
extern void WavReadOverrides(WAVFILE *wfile,WavPlayOpts *wavopts);
|
||||
extern int WavClose(WAVFILE *wfile,ErrFunc erf);
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- xltwavplay.c.orig 1999-12-04 00:06:42 UTC
|
||||
+++ xltwavplay.c
|
||||
@@ -59,7 +59,9 @@
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
+#ifndef FREEBSD
|
||||
#include <getopt.h>
|
||||
+#endif
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
@ -1,2 +1,4 @@
|
||||
This is a port of wavplay from Linux. It can record from your sound
|
||||
card and play recorded sound.
|
||||
|
||||
WWW: https://sourceforge.net/projects/wavplay/
|
||||
|
5
audio/wavplay/pkg-plist
Normal file
5
audio/wavplay/pkg-plist
Normal file
@ -0,0 +1,5 @@
|
||||
bin/wavplay
|
||||
bin/wavplay-config
|
||||
bin/wavrec
|
||||
%%X11%%bin/xltwavplay
|
||||
man/man1/wavplay.1.gz
|
Loading…
Reference in New Issue
Block a user