Remove EsounD / ESD, old and deprecated sound server
ok aja@, ratchov@, brad@
This commit is contained in:
parent
61c7a99295
commit
b1e17f8402
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.340 2014/10/29 20:56:17 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.341 2014/11/04 19:12:01 armani Exp $
|
||||
|
||||
SUBDIR =
|
||||
SUBDIR += abcde
|
||||
@ -37,7 +37,6 @@
|
||||
SUBDIR += disc-cover
|
||||
SUBDIR += dumb
|
||||
SUBDIR += easytag
|
||||
SUBDIR += esound
|
||||
SUBDIR += espeak
|
||||
SUBDIR += exaile
|
||||
SUBDIR += faac
|
||||
|
@ -1,41 +0,0 @@
|
||||
# $OpenBSD: Makefile,v 1.56 2014/03/23 16:06:37 naddy Exp $
|
||||
|
||||
COMMENT= sound library for Enlightenment
|
||||
|
||||
DISTNAME= esound-0.2.41
|
||||
REVISION= 1
|
||||
EPOCH= 0
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/esound/0.2/}
|
||||
|
||||
SHARED_LIBS += esd 2.40 # .2.38
|
||||
|
||||
HOMEPAGE= http://www.tux.org/~ricdude/EsounD.html
|
||||
|
||||
LIB_DEPENDS= devel/libaudiofile
|
||||
|
||||
# LGPLv2+ and GPLv2+
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
WANTLIB= FLAC audiofile c m ogg sndio
|
||||
|
||||
USE_GROFF= Yes
|
||||
SEPARATE_BUILD= Yes
|
||||
AUTOCONF_VERSION=2.61
|
||||
CONFIGURE_STYLE= autoconf
|
||||
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
|
||||
--disable-alsa \
|
||||
--disable-oss
|
||||
# broken, relies upon v4-mapped addresses
|
||||
CONFIGURE_ARGS+= --disable-ipv6
|
||||
|
||||
FAKE_FLAGS= DESTDIR=${WRKINST} \
|
||||
esdconfdir=${PREFIX}/share/examples/esound
|
||||
|
||||
post-extract:
|
||||
@cp -f ${FILESDIR}/audio_sndio.c ${WRKSRC}
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/test-script
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,5 +0,0 @@
|
||||
MD5 (esound-0.2.41.tar.gz) = PYlz7YcFPXrMH01EryxGiA==
|
||||
RMD160 (esound-0.2.41.tar.gz) = 6TxjJLSj6DIFcCsGLcFKwQ2Kxso=
|
||||
SHA1 (esound-0.2.41.tar.gz) = sq9p63wKBpdyCqGrkoXBbcvYvIY=
|
||||
SHA256 (esound-0.2.41.tar.gz) = KjLev/636gdKZlckHwIq8CrF6xYPiyepmr+qXWnOI84=
|
||||
SIZE (esound-0.2.41.tar.gz) = 518632
|
@ -1,134 +0,0 @@
|
||||
/* $OpenBSD: audio_sndio.c,v 1.1 2008/12/20 08:58:32 jakemsr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Jacob Meuser <jakemsr@sdf.lonestar.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sndio.h>
|
||||
|
||||
struct sio_hdl *hdl = NULL;
|
||||
|
||||
#define ARCH_esd_audio_close
|
||||
void esd_audio_close()
|
||||
{
|
||||
if (hdl != NULL) {
|
||||
sio_close(hdl);
|
||||
hdl = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#define ARCH_esd_audio_open
|
||||
int esd_audio_open()
|
||||
{
|
||||
char *device;
|
||||
struct sio_par par;
|
||||
int mode = SIO_PLAY;
|
||||
|
||||
if (hdl != NULL) {
|
||||
fprintf(stderr, "sndio already opened\n");
|
||||
return(1);
|
||||
}
|
||||
|
||||
sio_initpar(&par);
|
||||
|
||||
if ((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD)
|
||||
mode |= SIO_REC;
|
||||
|
||||
device = esd_audio_device ? esd_audio_device : getenv("AUDIODEVICE");
|
||||
if ((hdl = sio_open(device, mode, 0)) == NULL) {
|
||||
fprintf(stderr, "sio_open failed\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
par.le = (BYTE_ORDER == 4321) ? 0 : 1;
|
||||
if ((esd_audio_format & ESD_MASK_BITS) == ESD_BITS16) {
|
||||
par.bits = 16;
|
||||
par.sig = 1;
|
||||
} else {
|
||||
par.bits = 8;
|
||||
par.sig = 0;
|
||||
}
|
||||
|
||||
par.pchan = (((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO) ? 2 : 1);
|
||||
if (mode & SIO_REC)
|
||||
par.rchan = par.pchan;
|
||||
|
||||
par.appbufsz = ESD_BUF_SIZE;
|
||||
|
||||
par.rate = esd_audio_rate;
|
||||
|
||||
if (!sio_setpar(hdl, &par)) {
|
||||
fprintf(stderr, "sio_setpar failed\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (!sio_getpar(hdl, &par)) {
|
||||
fprintf(stderr, "sio_getpar failed\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
/* check that the actual parameters are what we asked for */
|
||||
if (fabs(par.rate - esd_audio_rate) > esd_audio_rate * 0.05) {
|
||||
fprintf(stderr, "Unsupported rate: %i Hz\n", esd_audio_rate);
|
||||
goto bad;
|
||||
}
|
||||
if ((esd_audio_format & ESD_MASK_BITS) == ESD_BITS16) {
|
||||
if (par.sig != 1 || par.bits != 16) {
|
||||
fprintf(stderr, "Unsupported bits: 16\n");
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
if (par.sig != 0 || par.bits != 8) {
|
||||
fprintf(stderr, "Unsupported bits: 8\n");
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
if ((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO) {
|
||||
if (par.pchan != 2) {
|
||||
fprintf(stderr, "Unsupported channels: 2\n");
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
if (par.pchan != 1) {
|
||||
fprintf(stderr, "Unsupported channels: 1\n");
|
||||
goto bad;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sio_start(hdl)) {
|
||||
fprintf(stderr, "sio_start failed\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
return(1);
|
||||
|
||||
bad:
|
||||
esd_audio_close();
|
||||
return(-1);
|
||||
}
|
||||
|
||||
#define ARCH_esd_audio_write
|
||||
int esd_audio_write(void *buffer, int buf_size)
|
||||
{
|
||||
return sio_write(hdl, buffer, buf_size);
|
||||
}
|
||||
|
||||
#define ARCH_esd_audio_read
|
||||
int esd_audio_read(void *buffer, int buf_size)
|
||||
{
|
||||
return sio_read(hdl, buffer, buf_size);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-audio_c,v 1.6 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- audio.c.orig Sat Dec 20 00:19:22 2008
|
||||
+++ audio.c Sat Dec 20 00:19:22 2008
|
||||
@@ -31,6 +31,8 @@ static int esd_write_size = ESD_BUF_SIZE;
|
||||
# include "audio_alsa.c"
|
||||
#elif defined(DRIVER_OSS)
|
||||
# include "audio_oss.c"
|
||||
+#elif defined(DRIVER_SNDIO)
|
||||
+# include "audio_sndio.c"
|
||||
#elif defined(DRIVER_AIX)
|
||||
# include "audio_aix.c"
|
||||
#elif defined(DRIVER_IRIX)
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-clients_c,v 1.2 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- clients.c.orig Sun Dec 14 13:33:21 2008
|
||||
+++ clients.c Sun Dec 14 13:35:02 2008
|
||||
@@ -143,9 +143,9 @@ int get_new_clients( int listen )
|
||||
struct sockaddr_in incoming;
|
||||
#if defined (ENABLE_IPV6)
|
||||
struct sockaddr_in6 incoming6;
|
||||
- size_t size_in6 = sizeof(struct sockaddr_in6);
|
||||
+ socklen_t size_in6 = sizeof(struct sockaddr_in6);
|
||||
#endif
|
||||
- size_t size_in = sizeof(struct sockaddr_in);
|
||||
+ socklen_t size_in = sizeof(struct sockaddr_in);
|
||||
esd_client_t *new_client = NULL;
|
||||
|
||||
short port;
|
@ -1,64 +0,0 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.4 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- configure.ac.orig Sat Dec 20 00:22:32 2008
|
||||
+++ configure.ac Sat Dec 20 00:22:38 2008
|
||||
@@ -202,6 +202,7 @@ if test "x$enable_local_sound" = "xyes"; then
|
||||
echo "---------------------------------------------------------------------"
|
||||
echo "--- Checking to see which audio header files your system uses.";
|
||||
echo "--- Most of these checks should fail. Do not be alarmed.";
|
||||
+ AC_CHECK_HEADERS(sndio.h)
|
||||
AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h sys/audio.h)
|
||||
AC_CHECK_HEADERS(sys/audioio.h sys/audio.io.h sun/audioio.h)
|
||||
AC_CHECK_HEADERS(dmedia/audio.h sys/soundlib.h sys/asoundlib.h alsa/asoundlib.h)
|
||||
@@ -215,6 +216,12 @@ if test "x$enable_local_sound" = "xyes"; then
|
||||
|
||||
dnl Define the driver needed based on the first header file found
|
||||
|
||||
+ if test "${ac_cv_header_sndio_h}" = "yes"; then
|
||||
+ found_sound=yes
|
||||
+ AC_DEFINE(DRIVER_SNDIO, 1, [Defined if libsndio backend is enabled])
|
||||
+ SOUND_LIBS="-lsndio"
|
||||
+ fi
|
||||
+
|
||||
if test x"$enable_oss" = xyes ; then
|
||||
if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
|
||||
test "${ac_cv_header_soundcard_h}" = "yes" || \
|
||||
@@ -299,7 +306,7 @@ if test "x$enable_local_sound" = "xyes"; then
|
||||
if test "x$HAVE_ARTS" = "xyes"; then
|
||||
found_sound=yes
|
||||
CFLAGS="$CFLAGS $ARTSC_CFLAGS"
|
||||
- LIBS="$LIBS $ARTS_LIBS"
|
||||
+ LIBS="$LIBS $ARTS_LIBS -lstdc++"
|
||||
AC_DEFINE(DRIVER_ARTS, 1, [Defined if Arts backend is enabled])
|
||||
fi
|
||||
fi
|
||||
@@ -313,7 +320,9 @@ if test "x$enable_local_sound" = "xyes"; then
|
||||
echo "---------------------------------------------------------------------"
|
||||
echo "--- Checking to see which audio libraries are required for linking.";
|
||||
echo "--- Most of these checks should also fail. Do not be alarmed.";
|
||||
- AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
|
||||
+ if test "x$enable_oss" = "xyes"; then
|
||||
+ AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
|
||||
+ fi
|
||||
AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
|
||||
if test "x$enable_alsa" = "xyes"; then
|
||||
AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
|
||||
@@ -391,7 +400,8 @@ if test "x$with_libwrap" = "xyes"; then
|
||||
|
||||
wrap_ok=no
|
||||
AC_TRY_LINK(
|
||||
-[#include <tcpd.h>
|
||||
+[#include <stdio.h>
|
||||
+#include <tcpd.h>
|
||||
#include <syslog.h>
|
||||
int allow_severity = LOG_INFO;
|
||||
int deny_severity = LOG_WARNING;],
|
||||
@@ -401,7 +411,8 @@ int deny_severity = LOG_WARNING;],
|
||||
wrap_ok=yes],
|
||||
[LIBS="$LIBS -lnsl"
|
||||
AC_TRY_LINK(
|
||||
-[#include <tcpd.h>
|
||||
+[#include <stdio.h>
|
||||
+#include <tcpd.h>
|
||||
#include <syslog.h>
|
||||
int allow_severity = LOG_INFO;
|
||||
int deny_severity = LOG_WARNING;],
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-esd_c,v 1.4 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- esd.c.orig Tue Nov 18 21:35:19 2008
|
||||
+++ esd.c Sun Dec 14 13:40:03 2008
|
||||
@@ -287,12 +287,12 @@ struct stat dir_stats;
|
||||
|
||||
#if defined(S_ISVTX)
|
||||
#define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
|
||||
- S_IRGRP|S_IWGRP|S_IXGRP|\
|
||||
- S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
|
||||
+ S_IRGRP|S_IXGRP|\
|
||||
+ S_IROTH|S_IXOTH|S_ISVTX)
|
||||
#else
|
||||
#define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
|
||||
- S_IRGRP|S_IWGRP|S_IXGRP|\
|
||||
- S_IROTH|S_IWOTH|S_IXOTH)
|
||||
+ S_IRGRP|S_IXGRP|\
|
||||
+ S_IROTH|S_IXOTH)
|
||||
#endif
|
||||
|
||||
if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-test-script,v 1.6 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- test-script.orig Thu Apr 19 07:43:59 2007
|
||||
+++ test-script Sun Mar 9 16:23:07 2008
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/tcsh
|
||||
+#!${LOCALBASE}/bin/tcsh
|
||||
echo welcome to the test.
|
||||
|
||||
echo ""
|
||||
@@ -40,7 +40,7 @@ echo $< >& /dev/null
|
||||
esdmon > sample.raw &
|
||||
esdcat -b -m -r 11025 test.wav
|
||||
sleep 3
|
||||
-killall esdmon
|
||||
+pkill esdmon
|
||||
|
||||
echo press enter to continue...
|
||||
echo $< >& /dev/null
|
@ -1,68 +0,0 @@
|
||||
$OpenBSD: patch-util_c,v 1.6 2008/12/20 08:58:32 jakemsr Exp $
|
||||
--- util.c.orig Sun Dec 14 13:35:48 2008
|
||||
+++ util.c Sun Dec 14 13:39:45 2008
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "config.h"
|
||||
#include "esd.h"
|
||||
+#include <limits.h>
|
||||
+#include <pwd.h>
|
||||
+#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdlib.h>
|
||||
@@ -24,36 +27,31 @@ have_ipv6(void) {
|
||||
const char*
|
||||
esd_get_socket_dirname (void)
|
||||
{
|
||||
- const char *audiodev = NULL;
|
||||
- static char *dirname = NULL;
|
||||
+ static char *sockdir = NULL, sockdirbuf[PATH_MAX];
|
||||
+ struct passwd *pw;
|
||||
|
||||
- if (dirname == NULL) {
|
||||
- if ((audiodev = getenv("AUDIODEV"))) {
|
||||
- char *newdev = strrchr(audiodev, '/');
|
||||
- if (newdev != NULL) {
|
||||
- audiodev = newdev++;
|
||||
- }
|
||||
- } else
|
||||
- audiodev = "";
|
||||
- dirname = malloc(strlen(audiodev) + 40);
|
||||
- sprintf (dirname, "/tmp/.esd%s-%i", audiodev, getuid());
|
||||
+ if (sockdir != NULL)
|
||||
+ return sockdir;
|
||||
+ pw = getpwuid(getuid());
|
||||
+ if (pw == NULL || pw->pw_dir == NULL) {
|
||||
+ fprintf(stderr, "esd: could not find home directory\n");
|
||||
+ exit(1);
|
||||
}
|
||||
-
|
||||
- return dirname;
|
||||
+ snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
|
||||
+ endpwent();
|
||||
+ sockdir = sockdirbuf;
|
||||
+ return sockdir;
|
||||
}
|
||||
|
||||
const char*
|
||||
esd_get_socket_name (void)
|
||||
{
|
||||
- const char *dirname;
|
||||
- static char *name = NULL;
|
||||
+ static char *sockname = NULL, socknamebuf[PATH_MAX];
|
||||
|
||||
- if (name == NULL) {
|
||||
- dirname = esd_get_socket_dirname();
|
||||
- name = malloc(strlen(dirname) + sizeof("/socket"));
|
||||
- strcpy(name, dirname);
|
||||
- strcat(name, "/socket");
|
||||
- }
|
||||
-
|
||||
- return name;
|
||||
+ if (sockname != NULL)
|
||||
+ return sockname;
|
||||
+ snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
|
||||
+ esd_get_socket_dirname());
|
||||
+ sockname = socknamebuf;
|
||||
+ return sockname;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
Esound is an audio mixing server that allows multiple applications
|
||||
to output sound to the same audio device.
|
||||
|
||||
Esound is seriously lacking in features required for a modern desktop
|
||||
environment, particularly for multi-channel audio and audio/video
|
||||
synchronization.
|
@ -1,2 +0,0 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.10 2005/12/23 16:57:17 espie Exp $
|
||||
@lib lib/libesd.so.${LIBesd_VERSION}
|
@ -1,33 +0,0 @@
|
||||
@comment $OpenBSD: PLIST,v 1.20 2011/10/18 08:44:01 ajacoutot Exp $
|
||||
@pkgpath audio/esound,arts
|
||||
@bin bin/esd
|
||||
bin/esd-config
|
||||
@bin bin/esdcat
|
||||
@bin bin/esdctl
|
||||
@bin bin/esdfilt
|
||||
@bin bin/esdloop
|
||||
@bin bin/esdmon
|
||||
@bin bin/esdplay
|
||||
@bin bin/esdrec
|
||||
@bin bin/esdsample
|
||||
include/esd.h
|
||||
lib/libesd.a
|
||||
lib/libesd.la
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/esound.pc
|
||||
@man man/man1/esd-config.1
|
||||
@man man/man1/esd.1
|
||||
@man man/man1/esdcat.1
|
||||
@man man/man1/esdctl.1
|
||||
@man man/man1/esdfilt.1
|
||||
@man man/man1/esdloop.1
|
||||
@man man/man1/esdmon.1
|
||||
@man man/man1/esdplay.1
|
||||
@man man/man1/esdrec.1
|
||||
@man man/man1/esdsample.1
|
||||
share/aclocal/
|
||||
share/aclocal/esd.m4
|
||||
share/examples/esound/
|
||||
share/examples/esound/esd.conf
|
||||
@sample ${SYSCONFDIR}/esd.conf
|
||||
%%SHARED%%
|
Loading…
x
Reference in New Issue
Block a user