diff options
author | Xylemon <xylem2020@gmail.com> | 2016-01-10 16:15:09 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-17 09:40:16 +0700 |
commit | eda5f68048067523058cb26ba8f82c6456cd6943 (patch) | |
tree | d54cd7bf2353078ee4cf7fcf74531d121a37285e | |
parent | e3f2febfed6b6f58db28aebd07b31f41a28d1a22 (diff) | |
download | slackbuilds-eda5f68048067523058cb26ba8f82c6456cd6943.tar.gz |
audio/oss: Updated for version 4.2.2011.
Patched for building with gcc-5.3.0 and linux-4.1.15.
-rw-r--r-- | audio/oss/gcc-5.patch | 52 | ||||
-rw-r--r-- | audio/oss/oss-v4.2-linux-4.0.patch | 41 | ||||
-rw-r--r-- | audio/oss/oss.SlackBuild | 12 | ||||
-rw-r--r-- | audio/oss/oss.info | 6 |
4 files changed, 106 insertions, 5 deletions
diff --git a/audio/oss/gcc-5.patch b/audio/oss/gcc-5.patch new file mode 100644 index 0000000000..5b303b4975 --- /dev/null +++ b/audio/oss/gcc-5.patch @@ -0,0 +1,52 @@ +--- kernel/OS/Linux/os_linux.h 2015-01-28 08:07:23.000000000 +0000 ++++ kernel/OS/Linux/os_linux.h 2015-06-01 23:12:46.044784820 +0100 +@@ -119,7 +119,7 @@ + /* System wall timer access */ + #define GET_JIFFIES() oss_get_jiffies() + +-extern inline unsigned int ++__attribute__ ((gnu_inline)) extern inline unsigned int + __inb (unsigned short port) + { + unsigned int _v; +@@ -127,7 +127,7 @@ + "0" (0)); + return _v; + } +-extern inline unsigned int ++__attribute__ ((gnu_inline)) extern inline unsigned int + __inw (unsigned short port) + { + unsigned int _v; +@@ -135,7 +135,7 @@ + "0" (0)); + return _v; + } +-extern inline unsigned int ++__attribute__ ((gnu_inline)) extern inline unsigned int + __inl (unsigned short port) + { + unsigned int _v; +@@ -143,19 +143,19 @@ + return _v; + } + +-extern inline void ++__attribute__ ((gnu_inline)) extern inline unsigned int + __outb (unsigned char value, unsigned short port) + { + __asm__ __volatile__ ("out" "b" " %" "b" "0,%" "w" "1"::"a" (value), + "d" (port)); + } +-extern inline void ++__attribute__ ((gnu_inline)) extern inline unsigned int + __outw (unsigned short value, unsigned short port) + { + __asm__ __volatile__ ("out" "w" " %" "w" "0,%" "w" "1"::"a" (value), + "d" (port)); + } +-extern inline void ++__attribute__ ((gnu_inline)) extern inline unsigned int + __outl (unsigned int value, unsigned short port) + { + __asm__ __volatile__ ("out" "l" " %" "0,%" "w" "1"::"a" (value), diff --git a/audio/oss/oss-v4.2-linux-4.0.patch b/audio/oss/oss-v4.2-linux-4.0.patch new file mode 100644 index 0000000000..7bc4ea36d7 --- /dev/null +++ b/audio/oss/oss-v4.2-linux-4.0.patch @@ -0,0 +1,41 @@ +diff -durN oss-v4.2-build2011-src-gpl/setup/Linux/oss/build/osscore.c oss-v4.2-build2011-src-gpl-patched/setup/Linux/oss/build/osscore.c +--- oss-v4.2-build2011-src-gpl/setup/Linux/oss/build/osscore.c 2014-09-04 00:15:31.000000000 +0200 ++++ oss-v4.2-build2011-src-gpl-patched/setup/Linux/oss/build/osscore.c 2015-04-25 23:16:19.502116503 +0200 +@@ -1950,8 +1950,13 @@ + } + else + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) + flags[1] = read_cr4 (); + write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */ ++#else ++ flags[1] = __read_cr4 (); ++ __write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */ ++#endif + FX_SAVE (envbuf); + asm ("fninit"); + asm ("fwait"); +@@ -1971,7 +1976,11 @@ + else + { + FX_RESTORE (envbuf); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) + write_cr4 (flags[1]); /* Restore cr4 */ ++#else ++ __write_cr4 (flags[1]); /* Restore cr4 */ ++#endif + } + write_cr0 (flags[0]); /* Restore cr0 */ + } +diff -durN oss-v4.2-build2011-src-gpl/setup/setupdir.sh oss-v4.2-build2011-src-gpl-patched/setup/setupdir.sh +--- oss-v4.2-build2011-src-gpl/setup/setupdir.sh 2015-04-25 23:03:34.173985609 +0200 ++++ oss-v4.2-build2011-src-gpl-patched/setup/setupdir.sh 2015-04-25 23:03:14.267351737 +0200 +@@ -36,7 +36,7 @@ + # Use Linux24 as the OS name for Linux 2.4.x + if test "$OS " = "Linux " + then +- if test "`uname -r|sed 's/2.//'|sed 's/\..*//'` " = "4 " ++ if test "`uname -r | cut -d '.' -f 1-2` " = "2.4 " + then + OS=Linux24 + fi diff --git a/audio/oss/oss.SlackBuild b/audio/oss/oss.SlackBuild index d4366de93a..4994cbde39 100644 --- a/audio/oss/oss.SlackBuild +++ b/audio/oss/oss.SlackBuild @@ -5,7 +5,7 @@ # Written by Dugan Chen (thedoogster [at] gmail [dot] com). PRGNAM=oss -VERSION=${VERSION:-4.2.2010} +VERSION=${VERSION:-4.2.2011} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -46,7 +46,7 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$SRCVERSION +rm -rf oss-${SRCVERSION} tar xvf $CWD/oss-${SRCVERSION}.tar.bz2 cd oss-${SRCVERSION} chown -R root:root . @@ -60,6 +60,14 @@ if [ $ARCH = "x86_64" ]; then sed -i 's,OSSLIBDIR=\"/usr/lib/oss\",OSSLIBDIR=\"/usr/lib64/oss\",g' configure fi +# Patches from OSS Forums + +# Linux 4.0 and above fix by oss117 +patch -p1 < $CWD/oss-v4.2-linux-4.0.patch + +# GCC 5 fix by alexdw +patch -p0 < $CWD/gcc-5.patch + mkdir build && cd build ../configure CFLAGS="$SLKCFLAGS" make build diff --git a/audio/oss/oss.info b/audio/oss/oss.info index d065998819..1c7637af66 100644 --- a/audio/oss/oss.info +++ b/audio/oss/oss.info @@ -1,8 +1,8 @@ PRGNAM="oss" -VERSION="4.2.2010" +VERSION="4.2.2011" HOMEPAGE="http://www.opensound.com" -DOWNLOAD="http://www.4front-tech.com/developer/sources/stable/gpl/oss-v4.2-build2010-src-gpl.tar.bz2" -MD5SUM="8a3e9c2c5403ceb83bcba94a8732c403" +DOWNLOAD="http://www.4front-tech.com/developer/sources/stable/gpl/oss-v4.2-build2011-src-gpl.tar.bz2" +MD5SUM="68f80d569739a10281a8284dded12acc" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |