pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/pulseaudio Portability fixes to make it compile ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8898845e17aa
branches:  trunk
changeset: 552020:8898845e17aa
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Tue Dec 23 02:15:27 2008 +0000

description:
Portability fixes to make it compile in DragonFly and possibly to help
other platforms.

diffstat:

 audio/pulseaudio/distinfo         |   8 ++-
 audio/pulseaudio/patches/patch-ag |  16 +++++++
 audio/pulseaudio/patches/patch-ah |  85 +++++++++++++++++++++++++++++++++++++++
 audio/pulseaudio/patches/patch-ai |  15 ++++++
 audio/pulseaudio/patches/patch-aj |  15 ++++++
 audio/pulseaudio/patches/patch-ba |  26 ++++++++++-
 6 files changed, 160 insertions(+), 5 deletions(-)

diffs (212 lines):

diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/distinfo
--- a/audio/pulseaudio/distinfo Tue Dec 23 02:08:05 2008 +0000
+++ b/audio/pulseaudio/distinfo Tue Dec 23 02:15:27 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2008/12/20 17:53:51 jmcneill Exp $
+$NetBSD: distinfo,v 1.6 2008/12/23 02:15:27 hasso Exp $
 
 SHA1 (pulseaudio-0.9.13.tar.gz) = c8482f1bb42d5213bfdbe2154e1a55b7bc04c915
 RMD160 (pulseaudio-0.9.13.tar.gz) = 07cea9939dfb4fc76f13bf01dfe22ab6d0fd8459
@@ -9,5 +9,9 @@
 SHA1 (patch-ad) = 40474c4e04dffe836c41ff348d959c821da527fd
 SHA1 (patch-ae) = 1cd31d18c133fdd5e8db59be319ba5b7a45fe0fe
 SHA1 (patch-af) = 31b8564cb91aabb5de5490659e77de984fd1920b
-SHA1 (patch-ba) = 518d23027fc9467a8bae2385233c2991136ee905
+SHA1 (patch-ag) = 67e3330c52c605e1eec505166e4ceed1a1277b11
+SHA1 (patch-ah) = 13cee1dc10be17f51978208843048ba9db7d9a3f
+SHA1 (patch-ai) = b8e9e2dee9d1c5d9de488cfa0d06440eedacb7c6
+SHA1 (patch-aj) = 50edf909d5d7cc35e925685cdf0831e73d06f6ec
+SHA1 (patch-ba) = b3e587cad73564c47ec921cf1c916d89102d36db
 SHA1 (patch-bb) = ded51f4642163dd5f78bb51522df64cb6ef8b985
diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-ag Tue Dec 23 02:15:27 2008 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ag,v 1.1 2008/12/23 02:15:27 hasso Exp $
+
+--- ./src/modules/oss-util.c.orig      2008-12-21 22:03:48 +0200
++++ ./src/modules/oss-util.c   2008-12-21 22:04:31 +0200
+@@ -298,7 +298,11 @@ static int get_device_number(const char 
+     int r;
+ 
+     if (!(p = rp = pa_readlink(dev))) {
++#ifdef ENOLINK
+         if (errno != EINVAL && errno != ENOLINK) {
++#else
++        if (errno != EINVAL) {
++#endif
+             r = -1;
+             goto finish;
+         }
diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-ah Tue Dec 23 02:15:27 2008 +0000
@@ -0,0 +1,85 @@
+$NetBSD: patch-ah,v 1.1 2008/12/23 02:15:27 hasso Exp $
+
+--- src/pulsecore/core-util.c.orig     2008-12-21 23:55:12 +0200
++++ src/pulsecore/core-util.c  2008-12-22 00:26:22 +0200
+@@ -1026,12 +1026,21 @@ int pa_uid_in_group(uid_t uid, const cha
+     char **i;
+     int r = -1;
+ 
++#ifdef _SC_GETGR_R_SIZE_MAX
+     g_n = sysconf(_SC_GETGR_R_SIZE_MAX);
+     g_buf = pa_xmalloc((size_t) g_n);
++#else
++    g_buf = pa_xmalloc(512);
++#endif
+ 
++#ifdef _SC_GETPW_R_SIZE_MAX
+     p_n = sysconf(_SC_GETPW_R_SIZE_MAX);
+     p_buf = pa_xmalloc((size_t) p_n);
++#else
++    p_buf = pa_xmalloc(512);
++#endif
+ 
++#ifdef HAVE_GETGRNAM_R
+     errno = 0;
+     if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr) {
+ 
+@@ -1040,14 +1049,28 @@ int pa_uid_in_group(uid_t uid, const cha
+ 
+         goto finish;
+     }
++#else
++    gr = getgrnam(name);
++
++    if (gr == NULL) {
++        errno = ENOENT;
++        goto finish;
++    }
++#endif
+ 
+     r = 0;
+     for (i = gr->gr_mem; *i; i++) {
+         struct passwd pwbuf, *pw;
+ 
++#ifdef HAVE_GETPWNAM_R
+         errno = 0;
+         if (getpwnam_r(*i, &pwbuf, p_buf, (size_t) p_n, &pw) != 0 || !pw)
+             continue;
++#else
++      pw = getpwnam(*i);
++        if (pw == NULL)
++            continue;
++#endif
+ 
+         if (pw->pw_uid == uid) {
+             r = 1;
+@@ -1069,9 +1092,14 @@ gid_t pa_get_gid_of_group(const char *na
+     long g_n;
+     struct group grbuf, *gr;
+ 
++#ifdef _SC_GETGR_R_SIZE_MAX
+     g_n = sysconf(_SC_GETGR_R_SIZE_MAX);
+     g_buf = pa_xmalloc((size_t) g_n);
++#else
++    g_buf = pa_xmalloc(512);
++#endif
+ 
++#ifdef HAVE_GETGRNAM_R
+     errno = 0;
+     if (getgrnam_r(name, &grbuf, g_buf, (size_t) g_n, &gr) != 0 || !gr) {
+ 
+@@ -1080,6 +1108,14 @@ gid_t pa_get_gid_of_group(const char *na
+ 
+         goto finish;
+     }
++#else
++    gr = getgrnam(name);
++
++    if (gr == NULL) {
++        errno = ENOENT;
++        goto finish;
++    }
++#endif
+ 
+     ret = gr->gr_gid;
+ 
diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-ai Tue Dec 23 02:15:27 2008 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ai,v 1.1 2008/12/23 02:15:27 hasso Exp $
+
+--- src/modules/rtp/rtp.c.orig 2008-12-22 00:50:26 +0200
++++ src/modules/rtp/rtp.c      2008-12-22 00:51:41 +0200
+@@ -35,6 +35,10 @@
+ #include <sys/filio.h>
+ #endif
+ 
++#ifdef HAVE_SYS_UIO_H
++#include <sys/uio.h>
++#endif
++
+ #include <pulsecore/core-error.h>
+ #include <pulsecore/log.h>
+ #include <pulsecore/macro.h>
diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-aj Tue Dec 23 02:15:27 2008 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-aj,v 1.1 2008/12/23 02:15:27 hasso Exp $
+
+--- src/modules/rtp/sap.c.orig 2008-12-22 00:52:17 +0200
++++ src/modules/rtp/sap.c      2008-12-22 00:52:43 +0200
+@@ -38,6 +38,10 @@
+ #include <sys/filio.h>
+ #endif
+ 
++#ifdef HAVE_SYS_UIO_H
++#include <sys/uio.h>
++#endif
++
+ #include <pulse/xmalloc.h>
+ 
+ #include <pulsecore/core-error.h>
diff -r 60c08dc3ed5f -r 8898845e17aa audio/pulseaudio/patches/patch-ba
--- a/audio/pulseaudio/patches/patch-ba Tue Dec 23 02:08:05 2008 +0000
+++ b/audio/pulseaudio/patches/patch-ba Tue Dec 23 02:15:27 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ba,v 1.1 2008/12/20 16:10:25 ahoka Exp $
+$NetBSD: patch-ba,v 1.2 2008/12/23 02:15:27 hasso Exp $
 
---- configure.ac.orig  2008-10-06 02:39:37.000000000 +0200
-+++ configure.ac
+--- configure.ac.orig  2008-10-06 03:39:37 +0300
++++ configure.ac       2008-12-23 03:11:41 +0200
 @@ -125,6 +125,16 @@ AC_ARG_ENABLE([atomic-arm-memory-barrier
                  no) ;;
                  *) AC_MSG_ERROR(bad value ${enableval} for --disable-atomic-arm-linux-helpers) ;;
@@ -45,6 +45,15 @@
          ;;
      esac
  fi
+@@ -263,7 +283,7 @@ AC_HEADER_STDC
+ AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
+     netinet/in_systm.h netinet/tcp.h poll.h pwd.h sched.h \
+     sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
+-    syslog.h sys/dl.h dlfcn.h linux/sockios.h])
++    sys/uio.h syslog.h sys/dl.h dlfcn.h linux/sockios.h])
+ AC_CHECK_HEADERS([netinet/ip.h], [], [],
+                [#include <sys/types.h>
+                 #if HAVE_NETINET_IN_H
 @@ -292,6 +312,9 @@ AC_CHECK_HEADERS([sys/filio.h])
  # Windows
  AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
@@ -55,3 +64,14 @@
  # Other
  AC_CHECK_HEADERS([sys/ioctl.h])
  AC_CHECK_HEADERS([byteswap.h])
+@@ -359,8 +382,8 @@ AC_CHECK_FUNCS([lrintf strtof])
+ AC_FUNC_FORK
+ AC_FUNC_GETGROUPS
+ AC_FUNC_SELECT_ARGTYPES
+-AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r \
+-    getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
++AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
++    getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
+     pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
+     sigaction sleep sysconf])
+ AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])



Home | Main Index | Thread Index | Old Index