diff options
author | hans <hans> | 2012-02-15 22:36:38 +0000 |
---|---|---|
committer | hans <hans> | 2012-02-15 22:36:38 +0000 |
commit | f05d53ddf58de08011d92c4f848b654b12ce43a4 (patch) | |
tree | 042a7bc32635da4bea229a3a6b5540f5baa4665b /audio/pd/patches | |
parent | f15de0f8eac52fddda1b6d8cd2e48b98a0d0b17a (diff) | |
download | pkgsrc-f05d53ddf58de08011d92c4f848b654b12ce43a4.tar.gz |
Fix build on SunOS.
Diffstat (limited to 'audio/pd/patches')
-rw-r--r-- | audio/pd/patches/patch-extra_pd~_pd~.c | 13 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_d__array.c | 20 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_d__osc.c | 20 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_d__soundfile.c | 17 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_s__audio__oss.c | 18 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_s__file.c | 4 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_s__inter.c | 15 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_s__loader.c | 10 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_s__stuff.h | 4 | ||||
-rw-r--r-- | audio/pd/patches/patch-src_x__misc.c | 4 |
10 files changed, 109 insertions, 16 deletions
diff --git a/audio/pd/patches/patch-extra_pd~_pd~.c b/audio/pd/patches/patch-extra_pd~_pd~.c index 9dd1eaa5b0f..e16d5ebbed8 100644 --- a/audio/pd/patches/patch-extra_pd~_pd~.c +++ b/audio/pd/patches/patch-extra_pd~_pd~.c @@ -1,4 +1,4 @@ -$NetBSD: patch-extra_pd~_pd~.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-extra_pd~_pd~.c,v 1.3 2012/02/15 22:36:38 hans Exp $ Add missing include (for SIGPIPE). Define extensions for NetBSD. @@ -14,7 +14,7 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 #include <string.h> #include <unistd.h> #include <stdlib.h> -@@ -56,6 +57,15 @@ static char pd_tilde_dllextent[] = ".l_i +@@ -56,6 +57,24 @@ static char pd_tilde_dllextent[] = ".l_i pd_tilde_dllextent2[] = ".pd_linux"; #endif #endif @@ -27,6 +27,15 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 + pd_tilde_dllextent2[] = ".pd_netbsd"; +#endif +#endif ++#if defined(__sun) ++#ifdef __x86_64__ ++static char pd_tilde_dllextent[] = ".s_ia64", ++ pd_tilde_dllextent2[] = ".pd_sunos"; ++#else ++static char pd_tilde_dllextent[] = ".s_i386", ++ pd_tilde_dllextent2[] = ".pd_sunos"; ++#endif ++#endif #ifdef __APPLE__ static char pd_tilde_dllextent[] = ".d_fat", pd_tilde_dllextent2[] = ".pd_darwin"; diff --git a/audio/pd/patches/patch-src_d__array.c b/audio/pd/patches/patch-src_d__array.c index e11d9c56b45..2878a12a2d1 100644 --- a/audio/pd/patches/patch-src_d__array.c +++ b/audio/pd/patches/patch-src_d__array.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_d__array.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_d__array.c,v 1.3 2012/02/15 22:36:39 hans Exp $ Detect endianness on NetBSD. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 @@ -14,3 +14,21 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 #include <machine/endian.h> #endif +@@ -510,6 +510,17 @@ static void tabread4_tilde_setup(void) + #include <endian.h> + #endif + ++#if defined(__sun) ++#include <sys/byteorder.h> ++#define LITTLE_ENDIAN 1234 ++#define BIG_ENDIAN 4321 ++# ifdef _LITTLE_ENDIAN ++# define BYTE_ORDER LITTLE_ENDIAN ++# else ++# define BYTE_ORDER BIG_ENDIAN ++# endif ++#endif ++ + #ifdef __MINGW32__ + #include <sys/param.h> + #endif diff --git a/audio/pd/patches/patch-src_d__osc.c b/audio/pd/patches/patch-src_d__osc.c index 3b336fc7624..02a0ef89c7b 100644 --- a/audio/pd/patches/patch-src_d__osc.c +++ b/audio/pd/patches/patch-src_d__osc.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_d__osc.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_d__osc.c,v 1.3 2012/02/15 22:36:39 hans Exp $ Detect endianness on NetBSD. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 @@ -14,3 +14,21 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 #include <machine/endian.h> #endif +@@ -23,6 +23,17 @@ + #include <endian.h> + #endif + ++#if defined(__sun) ++#include <sys/byteorder.h> ++#define LITTLE_ENDIAN 1234 ++#define BIG_ENDIAN 4321 ++# ifdef _LITTLE_ENDIAN ++# define BYTE_ORDER LITTLE_ENDIAN ++# else ++# define BYTE_ORDER BIG_ENDIAN ++# endif ++#endif ++ + #ifdef __MINGW32__ + #include <sys/param.h> + #endif diff --git a/audio/pd/patches/patch-src_d__soundfile.c b/audio/pd/patches/patch-src_d__soundfile.c new file mode 100644 index 00000000000..4ab01b75621 --- /dev/null +++ b/audio/pd/patches/patch-src_d__soundfile.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_d__soundfile.c,v 1.1 2012/02/15 22:36:39 hans Exp $ + +--- src/d_soundfile.c.orig 2010-08-03 05:40:14.000000000 +0200 ++++ src/d_soundfile.c 2012-01-02 14:47:53.852302429 +0100 +@@ -30,7 +30,11 @@ objects use Posix-like threads. */ + #ifdef _LARGEFILE64_SOURCE + # define open open64 + # define lseek lseek64 +-#define off_t __off64_t ++# ifndef __sun ++# define off_t __off64_t ++# else ++# define off_t off64_t ++# endif + #endif + #ifdef MSW + #define off_t long diff --git a/audio/pd/patches/patch-src_s__audio__oss.c b/audio/pd/patches/patch-src_s__audio__oss.c index b204d93a6be..f9a919e1624 100644 --- a/audio/pd/patches/patch-src_s__audio__oss.c +++ b/audio/pd/patches/patch-src_s__audio__oss.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_s__audio__oss.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_s__audio__oss.c,v 1.3 2012/02/15 22:36:39 hans Exp $ Use proper soundcard.h include on NetBSD and add missing argument to ioctl(). @@ -6,16 +6,26 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 --- src/s_audio_oss.c.orig 2011-03-07 01:33:39.000000000 +0000 +++ src/s_audio_oss.c -@@ -5,7 +5,7 @@ +@@ -5,12 +5,17 @@ /* this file inputs and outputs audio using the OSS API available on linux. */ -#if defined(__FreeBSD_kernel__) -+#if defined(__FreeBSD_kernel__) || defined(__NetBSD__) ++#if defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__sun) # include <sys/soundcard.h> #else # include <linux/soundcard.h> -@@ -120,7 +120,7 @@ typedef struct _multidev { + #endif + ++#ifdef __sun ++#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE ++#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE ++#endif ++ + #include "m_pd.h" + #include "s_stuff.h" + #include <errno.h> +@@ -120,7 +125,7 @@ typedef struct _multidev { int oss_reset(int fd) { int err; diff --git a/audio/pd/patches/patch-src_s__file.c b/audio/pd/patches/patch-src_s__file.c index 79ca0a001f0..9923dada14e 100644 --- a/audio/pd/patches/patch-src_s__file.c +++ b/audio/pd/patches/patch-src_s__file.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_s__file.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_s__file.c,v 1.3 2012/02/15 22:36:39 hans Exp $ File handling under NetBSD is the same as under Linux. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 @@ -10,7 +10,7 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 void sys_doflags( void); -#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(ANDROID) -+#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(ANDROID) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(ANDROID) || defined(__NetBSD__) || defined(__sun) static char *sys_prefbuf; static int sys_prefbufsize; diff --git a/audio/pd/patches/patch-src_s__inter.c b/audio/pd/patches/patch-src_s__inter.c new file mode 100644 index 00000000000..ae04c9463e4 --- /dev/null +++ b/audio/pd/patches/patch-src_s__inter.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_s__inter.c,v 1.1 2012/02/15 22:36:39 hans Exp $ + +--- src/s_inter.c.orig 2011-03-19 23:22:27.000000000 +0100 ++++ src/s_inter.c 2012-01-02 14:13:33.293463566 +0100 +@@ -52,6 +52,10 @@ typedef int socklen_t; + #include <stdlib.h> + #endif + ++#ifdef __sun ++typedef void (*sig_t)(); ++#endif ++ + #define DEBUG_MESSUP 1 /* messages up from pd to pd-gui */ + #define DEBUG_MESSDOWN 2 /* messages down from pd-gui to pd */ + diff --git a/audio/pd/patches/patch-src_s__loader.c b/audio/pd/patches/patch-src_s__loader.c index 36b369adb5f..186358f52df 100644 --- a/audio/pd/patches/patch-src_s__loader.c +++ b/audio/pd/patches/patch-src_s__loader.c @@ -1,11 +1,11 @@ -$NetBSD: patch-src_s__loader.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_s__loader.c,v 1.3 2012/02/15 22:36:39 hans Exp $ Define extensions for NetBSD. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 --- src/s_loader.c.orig 2010-07-29 03:50:34.000000000 +0000 +++ src/s_loader.c -@@ -38,6 +38,12 @@ a fat binary or an indication of the ins +@@ -38,6 +38,18 @@ a fat binary or an indication of the ins #ifdef __FreeBSD__ static char sys_dllextent[] = ".b_i386", sys_dllextent2[] = ".pd_freebsd"; @@ -15,6 +15,12 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 +# else +static char sys_dllextent[] = ".n_i386", sys_dllextent2[] = ".pd_netbsd"; +# endif ++#elif defined(__sun) ++# ifdef __x86_64__ ++static char sys_dllextent[] = ".s_ia64", sys_dllextent2[] = ".pd_sunos"; ++# elif __i386__ ++static char sys_dllextent[] = ".s_i386", sys_dllextent2[] = ".pd_sunos"; ++# endif #elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) # ifdef __x86_64__ static char sys_dllextent[] = ".l_ia64", sys_dllextent2[] = ".pd_linux"; diff --git a/audio/pd/patches/patch-src_s__stuff.h b/audio/pd/patches/patch-src_s__stuff.h index 5b004f0079d..63c5c623e98 100644 --- a/audio/pd/patches/patch-src_s__stuff.h +++ b/audio/pd/patches/patch-src_s__stuff.h @@ -1,4 +1,4 @@ -$NetBSD: patch-src_s__stuff.h,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_s__stuff.h,v 1.3 2012/02/15 22:36:39 hans Exp $ Use OSS on NetBSD. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 @@ -10,7 +10,7 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 #define API_DEFSTRING "dummy audio" #else -#if defined(__linux__) || defined(__FreeBSD_kernel__) -+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) ++#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__sun) # define API_DEFAULT API_OSS # define API_DEFSTRING "OSS" #endif diff --git a/audio/pd/patches/patch-src_x__misc.c b/audio/pd/patches/patch-src_x__misc.c index 8b909340224..1e0e4504b70 100644 --- a/audio/pd/patches/patch-src_x__misc.c +++ b/audio/pd/patches/patch-src_x__misc.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_x__misc.c,v 1.2 2011/10/05 20:02:48 wiz Exp $ +$NetBSD: patch-src_x__misc.c,v 1.3 2012/02/15 22:36:39 hans Exp $ Define missing symbol the same as on FreeBSD/Mac OS X. https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478072 @@ -10,7 +10,7 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 #endif /* _WIN32 */ -#if defined (__APPLE__) || defined (__FreeBSD__) -+#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) ++#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined(__sun) #define CLOCKHZ CLK_TCK #endif #if defined (__linux__) || defined (__CYGWIN__) || defined (ANDROID) |