From 14457931d0a308efa43d848c4a1e962886608559 Mon Sep 17 00:00:00 2001 From: rafael2k Date: Sat, 29 Mar 2008 01:35:22 +0000 Subject: make pwlib see OSSv4 git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1687 370017ae-e619-0410-ac65-c121f96126d4 --- dev/libs/pwlib/pwlib-1.10.10.diff | 11 +++++++++++ dev/libs/pwlib/pwlib-1.10.10.diff.improved | 31 ++++++++++++++++++++++++++++++ dev/libs/pwlib/pwlib.SlackBuild | 4 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 dev/libs/pwlib/pwlib-1.10.10.diff create mode 100644 dev/libs/pwlib/pwlib-1.10.10.diff.improved (limited to 'dev') diff --git a/dev/libs/pwlib/pwlib-1.10.10.diff b/dev/libs/pwlib/pwlib-1.10.10.diff new file mode 100644 index 00000000..2e91b127 --- /dev/null +++ b/dev/libs/pwlib/pwlib-1.10.10.diff @@ -0,0 +1,11 @@ +--- plugins/sound_oss/sound_oss.cxx.orig 2008-03-28 20:17:52.000000000 -0300 ++++ plugins/sound_oss/sound_oss.cxx 2008-03-28 21:06:13.000000000 -0300 +@@ -359,7 +359,7 @@ + struct stat s; + if (lstat(devname, &s) == 0) { + // OSS compatible audio major device numbers (OSS, SAM9407, etc) +- static const unsigned deviceNumbers[] = { 14, 145 }; ++ static const unsigned deviceNumbers[] = { 14, 145, 246 }; + for (PINDEX i = 0; i < PARRAYSIZE(deviceNumbers); i++) { + if ((s.st_rdev >> 8) == deviceNumbers[i]) { + PINDEX cardnum = (s.st_rdev >> 4) & 15; diff --git a/dev/libs/pwlib/pwlib-1.10.10.diff.improved b/dev/libs/pwlib/pwlib-1.10.10.diff.improved new file mode 100644 index 00000000..3774ed64 --- /dev/null +++ b/dev/libs/pwlib/pwlib-1.10.10.diff.improved @@ -0,0 +1,31 @@ +--- plugins/sound_oss/sound_oss.cxx.orig 2008-03-28 20:17:52.000000000 -0300 ++++ plugins/sound_oss/sound_oss.cxx 2008-03-28 21:06:13.000000000 -0300 +@@ -359,7 +359,7 @@ + struct stat s; + if (lstat(devname, &s) == 0) { + // OSS compatible audio major device numbers (OSS, SAM9407, etc) +- static const unsigned deviceNumbers[] = { 14, 145 }; ++ static const unsigned deviceNumbers[] = { 14, 145, 246 }; + for (PINDEX i = 0; i < PARRAYSIZE(deviceNumbers); i++) { + if ((s.st_rdev >> 8) == deviceNumbers[i]) { + PINDEX cardnum = (s.st_rdev >> 4) & 15; +@@ -543,16 +543,13 @@ + + // this is the first time this device has been used + // open the device in read/write mode always +- // open the device in non-blocking mode to avoid hang if already open +- os_handle = ::open((const char *)_device, O_RDWR | O_NONBLOCK); ++ // open the device without non-blocking mode, as documented in ++ // http://manuals.opensound.com/developer/open.html ++ os_handle = ::open((const char *)_device, O_RDWR); + + if ((os_handle < 0) && (errno != EWOULDBLOCK)) + return ConvertOSError(os_handle); + +- // switch to blocking mode +- DWORD cmd = 0; +- ::ioctl(os_handle, FIONBIO, &cmd); +- + // add the device to the dictionary + SoundHandleEntry * entry = PNEW SoundHandleEntry; + handleDict().SetAt(_device, entry); diff --git a/dev/libs/pwlib/pwlib.SlackBuild b/dev/libs/pwlib/pwlib.SlackBuild index 047a0373..a158b7ce 100755 --- a/dev/libs/pwlib/pwlib.SlackBuild +++ b/dev/libs/pwlib/pwlib.SlackBuild @@ -78,10 +78,10 @@ tar xvf$tarflag $SRC_DIR/$SRC cd $PACKAGE-$VERSION if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff + patch -p0 < $CWD/$PACKAGE-$VERSION.diff fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --enable-plugins --enable-oss +./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --enable-plugins make || exit 32 make DESTDIR=$TMP/package-$PACKAGE install -- cgit v1.2.3