aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2008-03-29 01:35:22 +0000
committerrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2008-03-29 01:35:22 +0000
commit14457931d0a308efa43d848c4a1e962886608559 (patch)
tree95bb495dabed517e57961506910a580a5c2b27d3 /dev
parent2484ce653618e384dc43b413003d64e3dab4f15c (diff)
downloadslackbuilds-14457931d0a308efa43d848c4a1e962886608559.tar.gz
slackbuilds-14457931d0a308efa43d848c4a1e962886608559.tar.bz2
make pwlib see OSSv4
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1687 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev')
-rw-r--r--dev/libs/pwlib/pwlib-1.10.10.diff11
-rw-r--r--dev/libs/pwlib/pwlib-1.10.10.diff.improved31
-rwxr-xr-xdev/libs/pwlib/pwlib.SlackBuild4
3 files changed, 44 insertions, 2 deletions
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