pkgsrc-WIP-changes archive

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

pulseaudio-git: Revamp patches for SunOS regarding OSS support



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Dec 20 15:39:55 2015 +0100
Changeset:	cf5cc26c5c9d6f16e3016ad3f07d95f8c8c866d4

Modified Files:
	pulseaudio-git/distinfo
	pulseaudio-git/patches/patch-aa
	pulseaudio-git/patches/patch-configure.ac

Log Message:
pulseaudio-git: Revamp patches for SunOS regarding OSS support

Prepare changes for upstreaming.

Proposed COMMIT_MSG for upstream:
    SunOS: Illumos does not ship with SOUND_PCM* functionality

    Code reference:
    https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h

    Add autoconf checks for:
    - SOUND_PCM_READ_RATE
    - SOUND_PCM_READ_CHANNELS
    - SOUND_PCM_READ_BITS

    Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality

    Thanks to Jonathan Perkin (Joyent) for Illumos code reference.

And
    SunOS: Catch up with newer API

    Patch from pkgsrc by Jonathan Perkin (Joyent).

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cf5cc26c5c9d6f16e3016ad3f07d95f8c8c866d4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pulseaudio-git/distinfo                   |  4 ++--
 pulseaudio-git/patches/patch-aa           | 28 ++++++++++++++++++++++++----
 pulseaudio-git/patches/patch-configure.ac | 22 ++++++++++++++++++----
 3 files changed, 44 insertions(+), 10 deletions(-)

diffs:
diff --git a/pulseaudio-git/distinfo b/pulseaudio-git/distinfo
index b50838d..e361021 100644
--- a/pulseaudio-git/distinfo
+++ b/pulseaudio-git/distinfo
@@ -4,8 +4,8 @@ SHA1 (pulseaudio-7.1.tar.gz) = e7b8e2d3e3a384379f3d99458f9ff9cff56b709b
 RMD160 (pulseaudio-7.1.tar.gz) = f6138695f1cfddfcb72654e8b204b0731c8a2234
 SHA512 (pulseaudio-7.1.tar.gz) = c2b8946a4dfb4fa2a8c7a504d9375bd51086c0f2f40aa6ddbb56115815a01665f491507d367baa375bc9595e31bb0d88f15208a1c2ad507bfa40e1bde1213091
 Size (pulseaudio-7.1.tar.gz) = 2686090 bytes
-SHA1 (patch-aa) = b4143badf668a0887c903971bf26cd4d5b1604b4
-SHA1 (patch-configure.ac) = 00a2389db09c58d5a81404e1a2e612960c9e9178
+SHA1 (patch-aa) = bef8282af4a2051d9421c2bdc8e652254beeddd7
+SHA1 (patch-configure.ac) = 42930c9c8c2dac418630703da9010dd00de23eb8
 SHA1 (patch-src_Makefile.am) = 4533c3123d4beba08165e40137b73ae37ce62b31
 SHA1 (patch-src_daemon_main.c) = d00ea97a3fd6e14976a0cc8eb7f7db811a990fe5
 SHA1 (patch-src_modules_module-detect.c) = 4e1db6d3b3224c097ecd981d3f055880ecff780a
diff --git a/pulseaudio-git/patches/patch-aa b/pulseaudio-git/patches/patch-aa
index 2b30d6c..ce98d4a 100644
--- a/pulseaudio-git/patches/patch-aa
+++ b/pulseaudio-git/patches/patch-aa
@@ -6,7 +6,7 @@ stat() system call has been versioned, use latest version when dlopen()ing.
 Try more typical device names.
 SOUND_PCM_* is not available on SunOS.
 
---- src/utils/padsp.c.orig	2015-11-28 09:05:41.000000000 +0000
+--- src/utils/padsp.c.orig	2015-12-05 22:03:14.000000000 +0000
 +++ src/utils/padsp.c
 @@ -47,6 +47,9 @@
  #ifdef __linux__
@@ -80,11 +80,31 @@ SOUND_PCM_* is not available on SunOS.
              break;
          }
  
-+#ifndef __sun
++#if HAVE_DECL_SOUND_PCM_READ_RATE
          case SOUND_PCM_READ_RATE:
              debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_RATE\n");
  
-@@ -2301,6 +2328,7 @@ static int dsp_ioctl(fd_info *i, unsigne
+@@ -2285,7 +2312,9 @@ static int dsp_ioctl(fd_info *i, unsigne
+             *(int*) argp = i->sample_spec.rate;
+             pa_threaded_mainloop_unlock(i->mainloop);
+             break;
++#endif
+ 
++#if HAVE_DECL_SOUND_PCM_READ_CHANNELS
+         case SOUND_PCM_READ_CHANNELS:
+             debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_CHANNELS\n");
+ 
+@@ -2293,7 +2322,9 @@ static int dsp_ioctl(fd_info *i, unsigne
+             *(int*) argp = i->sample_spec.channels;
+             pa_threaded_mainloop_unlock(i->mainloop);
+             break;
++#endif
+ 
++#if HAVE_DECL_SOUND_PCM_READ_BITS
+         case SOUND_PCM_READ_BITS:
+             debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_BITS\n");
+ 
+@@ -2301,6 +2332,7 @@ static int dsp_ioctl(fd_info *i, unsigne
              *(int*) argp = pa_sample_size(&i->sample_spec)*8;
              pa_threaded_mainloop_unlock(i->mainloop);
              break;
@@ -92,7 +112,7 @@ SOUND_PCM_* is not available on SunOS.
  
          case SNDCTL_DSP_GETOPTR: {
              count_info *info;
-@@ -2371,21 +2399,35 @@ fail:
+@@ -2371,21 +2403,35 @@ fail:
      return ret;
  }
  
diff --git a/pulseaudio-git/patches/patch-configure.ac b/pulseaudio-git/patches/patch-configure.ac
index abfbfd0..aa5f543 100644
--- a/pulseaudio-git/patches/patch-configure.ac
+++ b/pulseaudio-git/patches/patch-configure.ac
@@ -61,7 +61,21 @@ $NetBSD$
      AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Using clock_gettime() replacement])
      HAVE_BONJOUR=1
  fi
-@@ -1002,7 +1006,7 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DE
+@@ -769,6 +773,13 @@ AM_CONDITIONAL([HAVE_OSS_WRAPPER], [test
+ AS_IF([test "x$HAVE_OSS_OUTPUT" = "x1"], AC_DEFINE([HAVE_OSS_OUTPUT], 1, [Have OSS output?]))
+ AS_IF([test "x$HAVE_OSS_WRAPPER" = "x1"], AC_DEFINE([HAVE_OSS_WRAPPER], 1, [Have OSS wrapper (padsp)?]))
+ 
++# Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality
++if test "x$HAVE_OSS" = "x1"; then
++    AC_CHECK_DECLS([SOUND_PCM_READ_RATE], [], [], [[#include <sys/soundcard.h>]])
++    AC_CHECK_DECLS([SOUND_PCM_READ_CHANNELS], [], [], [[#include <sys/soundcard.h>]])
++    AC_CHECK_DECLS([SOUND_PCM_READ_BITS], [], [], [[#include <sys/soundcard.h>]])
++fi
++
+ #### CoreAudio support (optional) ####
+ 
+ AC_ARG_ENABLE([coreaudio-output],
+@@ -1002,7 +1013,7 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DE
  
  PA_MACHINE_ID="${sysconfdir}/machine-id"
  AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
@@ -70,7 +84,7 @@ $NetBSD$
  AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
  	      [Fallback machine-id file])
  
-@@ -1325,9 +1329,9 @@ fi
+@@ -1325,9 +1336,9 @@ fi
  
  PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
  AX_DEFINE_DIR(PA_SYSTEM_RUNTIME_PATH, PA_SYSTEM_RUNTIME_PATH, [System runtime dir])
@@ -82,7 +96,7 @@ $NetBSD$
  AX_DEFINE_DIR(PA_SYSTEM_STATE_PATH, PA_SYSTEM_STATE_PATH, [System state dir])
  
  PA_BINARY=${bindir}/pulseaudio${EXEEXT}
-@@ -1339,8 +1343,9 @@ AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY
+@@ -1339,8 +1350,9 @@ AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY
  AC_SUBST(PA_SOEXT, [.so])
  AC_DEFINE(PA_SOEXT, [".so"], [Shared object extension])
  
@@ -94,7 +108,7 @@ $NetBSD$
  
  #### Mac OSX specific stuff #####
  
-@@ -1356,17 +1361,6 @@ AC_ARG_WITH(mac-sysroot,
+@@ -1356,17 +1368,6 @@ AC_ARG_WITH(mac-sysroot,
      AS_HELP_STRING([--with-mac-sysroot=<path>], [SDK basedir to use as the logical root directory for headers and libraries.]),
      mac_sysroot=$withval, mac_sysroot="/Developer/SDKs/MacOSX10.5.sdk")
  


Home | Main Index | Thread Index | Old Index