[Midnightbsd-cvs] mports [18170] trunk/audio/esound: fixup esound
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Mar 15 16:15:14 EDT 2015
Revision: 18170
http://svnweb.midnightbsd.org/mports/?rev=18170
Author: laffer1
Date: 2015-03-15 16:15:13 -0400 (Sun, 15 Mar 2015)
Log Message:
-----------
fixup esound
Modified Paths:
--------------
trunk/audio/esound/Makefile
trunk/audio/esound/files/patch-audio_oss.c
trunk/audio/esound/files/patch-esddsp.c
trunk/audio/esound/files/patch-esddsp.in
trunk/audio/esound/pkg-plist
Added Paths:
-----------
trunk/audio/esound/files/patch-Makefile.in
trunk/audio/esound/files/patch-esd.c
trunk/audio/esound/files/patch-esdlib.c
trunk/audio/esound/files/patch-esound-increase-timeouts
trunk/audio/esound/pkg-message
Removed Paths:
-------------
trunk/audio/esound/files/patch-aa
trunk/audio/esound/files/patch-ac
trunk/audio/esound/files/patch-ad
Property Changed:
----------------
trunk/audio/esound/files/patch-audio_oss.c
trunk/audio/esound/files/patch-esddsp.c
trunk/audio/esound/files/patch-esddsp.in
Modified: trunk/audio/esound/Makefile
===================================================================
--- trunk/audio/esound/Makefile 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/Makefile 2015-03-15 20:15:13 UTC (rev 18170)
@@ -15,7 +15,7 @@
LIB_DEPENDS= libaudiofile.so:${PORTSDIR}/audio/libaudiofile
-USES= libtool:keepla pathfix pkgconfig:both tar:bzip2
+USES= alias libtool:keepla pathfix pkgconfig:both tar:bzip2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= JW=false
Added: trunk/audio/esound/files/patch-Makefile.in
===================================================================
--- trunk/audio/esound/files/patch-Makefile.in (rev 0)
+++ trunk/audio/esound/files/patch-Makefile.in 2015-03-15 20:15:13 UTC (rev 18170)
@@ -0,0 +1,20 @@
+--- Makefile.in.orig 2008-07-17 13:45:22.000000000 -0400
++++ Makefile.in 2008-07-17 13:45:46.000000000 -0400
+@@ -342,7 +342,7 @@ bin_SCRIPTS = \
+
+ lib_LTLIBRARIES = libesd.la $(libesddsp_la)
+ libesd_la_CFLAGS = $(AM_CFLAGS)
+-libesd_la_LDFLAGS = -version-info $(ESD_VERSION_INFO) -no-undefined
++libesd_la_LDFLAGS = -version-info 2:0:0 -no-undefined
+ libesd_la_LIBADD = $(AUDIOFILE_LIBS) $(SOUND_LIBS)
+ libesd_la_SOURCES = \
+ esdlib.c \
+@@ -373,7 +373,7 @@ AUDIO_BACKENDS = \
+ audio_solaris.c \
+ audio_win32.c
+
+-libesddsp_la_LDFLAGS = -version-info $(ESD_VERSION_INFO)
++libesddsp_la_LDFLAGS = -version-info 2:0:0
+ libesddsp_la_LIBADD = libesd.la $(DL_LIB) -lm
+ libesddsp_la_SOURCES = \
+ esddsp.c
Property changes on: trunk/audio/esound/files/patch-Makefile.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/audio/esound/files/patch-aa
===================================================================
--- trunk/audio/esound/files/patch-aa 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-aa 2015-03-15 20:15:13 UTC (rev 18170)
@@ -1,20 +0,0 @@
---- Makefile.in.orig 2008-07-17 13:45:22.000000000 -0400
-+++ Makefile.in 2008-07-17 13:45:46.000000000 -0400
-@@ -342,7 +342,7 @@ bin_SCRIPTS = \
-
- lib_LTLIBRARIES = libesd.la $(libesddsp_la)
- libesd_la_CFLAGS = $(AM_CFLAGS)
--libesd_la_LDFLAGS = -version-info $(ESD_VERSION_INFO) -no-undefined
-+libesd_la_LDFLAGS = -version-info 2:0:0 -no-undefined
- libesd_la_LIBADD = $(AUDIOFILE_LIBS) $(SOUND_LIBS)
- libesd_la_SOURCES = \
- esdlib.c \
-@@ -373,7 +373,7 @@ AUDIO_BACKENDS = \
- audio_solaris.c \
- audio_win32.c
-
--libesddsp_la_LDFLAGS = -version-info $(ESD_VERSION_INFO)
-+libesddsp_la_LDFLAGS = -version-info 2:0:0
- libesddsp_la_LIBADD = libesd.la $(DL_LIB) -lm
- libesddsp_la_SOURCES = \
- esddsp.c
Deleted: trunk/audio/esound/files/patch-ac
===================================================================
--- trunk/audio/esound/files/patch-ac 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-ac 2015-03-15 20:15:13 UTC (rev 18170)
@@ -1,15 +0,0 @@
---- esd.c.orig Tue Nov 28 13:27:30 2000
-+++ esd.c Fri Dec 1 15:12:41 2000
-@@ -212,8 +212,8 @@
- #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
Deleted: trunk/audio/esound/files/patch-ad
===================================================================
--- trunk/audio/esound/files/patch-ad 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-ad 2015-03-15 20:15:13 UTC (rev 18170)
@@ -1,56 +0,0 @@
---- esdlib.c.orig 2008-11-18 15:35:19.000000000 -0500
-+++ esdlib.c 2008-11-20 14:32:59.000000000 -0500
-@@ -21,6 +21,8 @@
- #include <errno.h>
- #include <sys/wait.h>
- #include <poll.h>
-+#include <pwd.h>
-+#include <limits.h>
-
- #include <sys/un.h>
-
-@@ -928,7 +930,7 @@ int esd_open_sound( const char *rhost )
- putenv(preload2);
- }
- cmd = malloc(strlen(SERVERDIR"/esd -spawnfd 9999999999") + strlen(esd_spawn_options));
-- sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, esd_spawn_options, esd_pipe[1]);
-+ sprintf(cmd, "exec esd %s -spawnfd %d", esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
-
- if(!fork()) {
- /* child of child process. Minimal so startup overhead is
-@@ -1747,3 +1749,34 @@ int esd_close( int esd )
- return close( esd );
- }
-
-+char *
-+esd_unix_socket_dir(void) {
-+ static char *sockdir = NULL, sockdirbuf[PATH_MAX];
-+ struct passwd *pw;
-+
-+ 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);
-+ }
-+ snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
-+ endpwent();
-+ sockdir = sockdirbuf;
-+ return (sockdir);
-+}
-+
-+char *
-+esd_unix_socket_name(void) {
-+ static char *sockname = NULL, socknamebuf[PATH_MAX];
-+
-+ if (sockname != NULL)
-+ return (sockname);
-+ snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
-+ esd_unix_socket_dir());
-+ sockname = socknamebuf;
-+ return (sockname);
-+ }
-+
-+
-
Modified: trunk/audio/esound/files/patch-audio_oss.c
===================================================================
--- trunk/audio/esound/files/patch-audio_oss.c 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-audio_oss.c 2015-03-15 20:15:13 UTC (rev 18170)
@@ -15,4 +15,4 @@
+#ifndef SNDCTL_DSP_SETDUPLEX
#define SNDCTL_DSP_SETDUPLEX DSP_CAP_DUPLEX
#endif
-
+
Property changes on: trunk/audio/esound/files/patch-audio_oss.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Added: trunk/audio/esound/files/patch-esd.c
===================================================================
--- trunk/audio/esound/files/patch-esd.c (rev 0)
+++ trunk/audio/esound/files/patch-esd.c 2015-03-15 20:15:13 UTC (rev 18170)
@@ -0,0 +1,15 @@
+--- esd.c.orig Tue Nov 28 13:27:30 2000
++++ esd.c Fri Dec 1 15:12:41 2000
+@@ -212,8 +212,8 @@
+ #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
Property changes on: trunk/audio/esound/files/patch-esd.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/audio/esound/files/patch-esddsp.c
===================================================================
--- trunk/audio/esound/files/patch-esddsp.c 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-esddsp.c 2015-03-15 20:15:13 UTC (rev 18170)
@@ -1,4 +1,4 @@
-ddsp.c.orig 2008-11-18 15:35:19.000000000 -0500
+--- esddsp.c.orig 2008-11-18 15:35:19.000000000 -0500
+++ esddsp.c 2008-11-20 14:35:02.000000000 -0500
@@ -70,6 +70,7 @@
@@ -83,4 +83,3 @@
return open_wrapper(func, pathname, flags, mode);
}
-
Property changes on: trunk/audio/esound/files/patch-esddsp.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Modified: trunk/audio/esound/files/patch-esddsp.in
===================================================================
--- trunk/audio/esound/files/patch-esddsp.in 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/files/patch-esddsp.in 2015-03-15 20:15:13 UTC (rev 18170)
@@ -1,9 +1,9 @@
---- esddsp.in.orig 2008-07-15 12:05:18.000000000 -0400
-+++ esddsp.in 2008-07-17 13:54:49.000000000 -0400
+--- esddsp.in.orig 2008-07-15 12:05:18.000000000 -0400
++++ esddsp.in 2008-07-17 13:54:49.000000000 -0400
@@ -106,7 +106,7 @@ fi
prefix=@prefix@
exec_prefix=@exec_prefix@
-
+
-LD_PRELOAD="libesddsp.so. at ESD_MAJOR_VERSION@ libesd.so. at ESD_MAJOR_VERSION@ $LD_PRELOAD"
+LD_PRELOAD="libesddsp.so libesd.so $LD_PRELOAD"
export LD_PRELOAD
Property changes on: trunk/audio/esound/files/patch-esddsp.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Added: trunk/audio/esound/files/patch-esdlib.c
===================================================================
--- trunk/audio/esound/files/patch-esdlib.c (rev 0)
+++ trunk/audio/esound/files/patch-esdlib.c 2015-03-15 20:15:13 UTC (rev 18170)
@@ -0,0 +1,55 @@
+--- esdlib.c.orig 2008-11-18 15:35:19.000000000 -0500
++++ esdlib.c 2008-11-20 14:32:59.000000000 -0500
+@@ -21,6 +21,8 @@
+ #include <errno.h>
+ #include <sys/wait.h>
+ #include <poll.h>
++#include <pwd.h>
++#include <limits.h>
+
+ #include <sys/un.h>
+
+@@ -928,7 +930,7 @@ int esd_open_sound( const char *rhost )
+ putenv(preload2);
+ }
+ cmd = malloc(strlen(SERVERDIR"/esd -spawnfd 9999999999") + strlen(esd_spawn_options));
+- sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, esd_spawn_options, esd_pipe[1]);
++ sprintf(cmd, "exec esd %s -spawnfd %d", esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
+
+ if(!fork()) {
+ /* child of child process. Minimal so startup overhead is
+@@ -1747,3 +1749,34 @@ int esd_close( int esd )
+ return close( esd );
+ }
+
++char *
++esd_unix_socket_dir(void) {
++ static char *sockdir = NULL, sockdirbuf[PATH_MAX];
++ struct passwd *pw;
++
++ 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);
++ }
++ snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
++ endpwent();
++ sockdir = sockdirbuf;
++ return (sockdir);
++}
++
++char *
++esd_unix_socket_name(void) {
++ static char *sockname = NULL, socknamebuf[PATH_MAX];
++
++ if (sockname != NULL)
++ return (sockname);
++ snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
++ esd_unix_socket_dir());
++ sockname = socknamebuf;
++ return (sockname);
++ }
++
++
Property changes on: trunk/audio/esound/files/patch-esdlib.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/audio/esound/files/patch-esound-increase-timeouts
===================================================================
--- trunk/audio/esound/files/patch-esound-increase-timeouts (rev 0)
+++ trunk/audio/esound/files/patch-esound-increase-timeouts 2015-03-15 20:15:13 UTC (rev 18170)
@@ -0,0 +1,62 @@
+libesd cannot connect to server if it work on slow hardware and/or on windows due to
+extremely small default read/write timeout = 100ms This patch increases them up to 300ms.
+
+--- esdlib.c.org 2008-11-18 23:35:19.000000000 +0300
++++ esdlib.c 2011-04-29 21:58:56.698001331 +0400
+@@ -30,6 +30,11 @@
+ + strlen ((ptr)->sun_path))
+ #endif
+
++#define TCP_CONNECT_TIMEOUT 1000
++#define UNIX_CONNECT_TIMEOUT 100
++#define SOCKET_READ_TIMEOUT 300
++#define SOCKET_WRITE_TIMEOUT 300
++
+ /*******************************************************************/
+ /* prototypes */
+ int esd_set_socket_buffers( int sock, int src_format,
+@@ -89,7 +94,7 @@
+
+ do {
+ pfd[0].revents = 0;
+- rv = poll (pfd, 1, 100);
++ rv = poll (pfd, 1, SOCKET_READ_TIMEOUT);
+ } while (rv == -1 && (errno == EINTR || errno == EAGAIN));
+
+ if (rv < 1 || !(pfd[0].revents & POLLIN)) {
+@@ -137,7 +142,7 @@
+
+ do {
+ pfd[0].revents = 0;
+- rv = poll (pfd, 1, 100);
++ rv = poll (pfd, 1, SOCKET_WRITE_TIMEOUT);
+ } while (rv == -1 && (errno == EINTR || errno == EAGAIN));
+
+ if (rv < 1 || (pfd[0].revents & (POLLERR | POLLHUP | POLLOUT)) != POLLOUT) {
+@@ -641,7 +646,7 @@
+ goto error_out;
+ }
+
+- if ( connect_timeout ( socket_out, res->ai_addr, res->ai_addrlen, 1000 ) != -1 )
++ if ( connect_timeout ( socket_out, res->ai_addr, res->ai_addrlen, TCP_CONNECT_TIMEOUT ) != -1 )
+ break;
+
+ close ( socket_out );
+@@ -727,7 +732,7 @@
+
+ if ( connect_timeout ( socket_out,
+ (struct sockaddr *) &socket_addr,
+- sizeof(struct sockaddr_in), 1000 ) < 0 )
++ sizeof(struct sockaddr_in), TCP_CONNECT_TIMEOUT ) < 0 )
+ goto error_out;
+
+ }
+@@ -779,7 +784,7 @@
+ socket_unix.sun_family = AF_UNIX;
+ strncpy(socket_unix.sun_path, ESD_UNIX_SOCKET_NAME, sizeof(socket_unix.sun_path));
+
+- if ( connect_timeout ( socket_out, (struct sockaddr *) &socket_unix, SUN_LEN(&socket_unix), 100 ) < 0 )
++ if ( connect_timeout ( socket_out, (struct sockaddr *) &socket_unix, SUN_LEN(&socket_unix), UNIX_CONNECT_TIMEOUT ) < 0 )
+ goto error_out;
+
+ return socket_out;
Property changes on: trunk/audio/esound/files/patch-esound-increase-timeouts
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/audio/esound/pkg-message
===================================================================
--- trunk/audio/esound/pkg-message (rev 0)
+++ trunk/audio/esound/pkg-message 2015-03-15 20:15:13 UTC (rev 18170)
@@ -0,0 +1,6 @@
+The ESounD daemon (esd) must be started on a per-user basis. This is typically
+done by the Session Manager in GNOME. However, if you are not using the
+GNOME Desktop, you will need to add something like the following to your
+X Windows initialization script:
+
+esd -terminate -nobeeps -as 2
Property changes on: trunk/audio/esound/pkg-message
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/audio/esound/pkg-plist
===================================================================
--- trunk/audio/esound/pkg-plist 2015-03-15 20:13:48 UTC (rev 18169)
+++ trunk/audio/esound/pkg-plist 2015-03-15 20:15:13 UTC (rev 18170)
@@ -9,18 +9,18 @@
bin/esdplay
bin/esdrec
bin/esdsample
- at unexec if cmp -s %D/etc/esd.conf %D/etc/esd.conf.sample; then rm -f %D/etc/esd.conf; fi
-etc/esd.conf.sample
- at exec [ -f %B/esd.conf ] || cp %B/%f %B/esd.conf
+ at sample etc/esd.conf.sample
include/esd.h
lib/libesd.a
lib/libesd.la
lib/libesd.so
lib/libesd.so.2
+lib/libesd.so.2.0.0
lib/libesddsp.a
lib/libesddsp.la
lib/libesddsp.so
lib/libesddsp.so.2
+lib/libesddsp.so.2.0.0
libdata/pkgconfig/esound.pc
man/man1/esd-config.1.gz
man/man1/esd.1.gz
More information about the Midnightbsd-cvs
mailing list