summaryrefslogtreecommitdiff
path: root/audio/pd/patches
diff options
context:
space:
mode:
Diffstat (limited to 'audio/pd/patches')
-rw-r--r--audio/pd/patches/patch-Makefile.am28
-rw-r--r--audio/pd/patches/patch-extra_bonk~_bonk~.c18
-rw-r--r--audio/pd/patches/patch-extra_pd~_pd~.c31
-rw-r--r--audio/pd/patches/patch-extra_sigmund~_sigmund~.c18
-rw-r--r--audio/pd/patches/patch-src_Makefile.am15
-rw-r--r--audio/pd/patches/patch-src_configure15
-rw-r--r--audio/pd/patches/patch-src_d__array.c15
-rw-r--r--audio/pd/patches/patch-src_d__osc.c15
-rw-r--r--audio/pd/patches/patch-src_m__binbuf.c18
-rw-r--r--audio/pd/patches/patch-src_s__audio__oss.c25
-rw-r--r--audio/pd/patches/patch-src_s__file.c15
-rw-r--r--audio/pd/patches/patch-src_s__loader.c19
-rw-r--r--audio/pd/patches/patch-src_s__stuff.h15
-rw-r--r--audio/pd/patches/patch-src_s__utf8.c18
-rw-r--r--audio/pd/patches/patch-src_x__list.c18
-rw-r--r--audio/pd/patches/patch-src_x__misc.c15
16 files changed, 298 insertions, 0 deletions
diff --git a/audio/pd/patches/patch-Makefile.am b/audio/pd/patches/patch-Makefile.am
new file mode 100644
index 00000000000..5bd8434b00e
--- /dev/null
+++ b/audio/pd/patches/patch-Makefile.am
@@ -0,0 +1,28 @@
+$NetBSD: patch-Makefile.am,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Fix path to documentation (installed following pksrc conventions).
+Avoid creating unnecessary(?) empty directory.
+
+--- Makefile.am.orig 2010-08-18 23:42:59.000000000 +0000
++++ Makefile.am
+@@ -37,11 +37,7 @@ endif
+ ## FIXXXME
+ ## $(pkglibdir) is used throughout the other Makefile.amS
+ ## simply ignoring the special case for other OSs...
+-if LINUX
+-libpddir = $(pkglibdir)
+-else
+-libpddir = $(prefix)
+-endif
++libpddir = $(prefix)/share/doc/pd
+
+ # Symlinks don't work on Windows/MinGW but they do on Cygwin.
+ bin:
+@@ -51,6 +47,7 @@ locales:
+ make -C po all
+
+ install-data-local:
++mingw-install-data-local:
+ $(INSTALL) -d $(DESTDIR)$(libpddir)/startup
+ $(INSTALL) -d $(DESTDIR)$(libpddir)/startup/disabled
+
diff --git a/audio/pd/patches/patch-extra_bonk~_bonk~.c b/audio/pd/patches/patch-extra_bonk~_bonk~.c
new file mode 100644
index 00000000000..5d89871d9d6
--- /dev/null
+++ b/audio/pd/patches/patch-extra_bonk~_bonk~.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-extra_bonk~_bonk~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- extra/bonk~/bonk~.c.orig 2010-08-19 01:37:00.000000000 +0000
++++ extra/bonk~/bonk~.c
+@@ -82,11 +82,7 @@ void *bonk_class;
+ static t_class *bonk_class;
+ #endif
+
+-#ifdef _WIN32
+ #include <malloc.h>
+-#elif ! defined(_MSC_VER)
+-#include <alloca.h>
+-#endif
+
+ /* ------------------------ bonk~ ----------------------------- */
+
diff --git a/audio/pd/patches/patch-extra_pd~_pd~.c b/audio/pd/patches/patch-extra_pd~_pd~.c
new file mode 100644
index 00000000000..efaa2b1a246
--- /dev/null
+++ b/audio/pd/patches/patch-extra_pd~_pd~.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-extra_pd~_pd~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Add missing include (for SIGPIPE).
+Define extensions for NetBSD.
+
+--- extra/pd~/pd~.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ extra/pd~/pd~.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <signal.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -56,6 +57,15 @@ static char pd_tilde_dllextent[] = ".l_i
+ pd_tilde_dllextent2[] = ".pd_linux";
+ #endif
+ #endif
++#if defined(__NetBSD__)
++#ifdef __x86_64__
++static char pd_tilde_dllextent[] = ".n_ia64",
++ pd_tilde_dllextent2[] = ".pd_netbsd";
++#else
++static char pd_tilde_dllextent[] = ".n_i386",
++ pd_tilde_dllextent2[] = ".pd_netbsd";
++#endif
++#endif
+ #ifdef __APPLE__
+ static char pd_tilde_dllextent[] = ".d_fat",
+ pd_tilde_dllextent2[] = ".pd_darwin";
diff --git a/audio/pd/patches/patch-extra_sigmund~_sigmund~.c b/audio/pd/patches/patch-extra_sigmund~_sigmund~.c
new file mode 100644
index 00000000000..6e2aa4b2e57
--- /dev/null
+++ b/audio/pd/patches/patch-extra_sigmund~_sigmund~.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-extra_sigmund~_sigmund~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- extra/sigmund~/sigmund~.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ extra/sigmund~/sigmund~.c
+@@ -26,11 +26,7 @@ for example, defines this in the file d_
+ #include <math.h>
+ #include <stdio.h>
+ #include <string.h>
+-#ifdef _WIN32
+ #include <malloc.h>
+-#elif ! defined(_MSC_VER)
+-#include <alloca.h>
+-#endif
+ #include <stdlib.h>
+ #ifdef _MSC_VER
+ #pragma warning( disable : 4244 )
diff --git a/audio/pd/patches/patch-src_Makefile.am b/audio/pd/patches/patch-src_Makefile.am
new file mode 100644
index 00000000000..15f637c9f66
--- /dev/null
+++ b/audio/pd/patches/patch-src_Makefile.am
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Makefile.am,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Add missing libraries to linker line.
+
+--- src/Makefile.am.orig 2011-02-27 03:22:57.000000000 +0000
++++ src/Makefile.am
+@@ -6,7 +6,7 @@ pd_LDFLAGS =
+ pdsend_CFLAGS =
+ pdreceive_CFLAGS =
+ pd_watchdog_CFLAGS =
+-LIBS =
++LIBS = $(LIBOSSAUDIO) $(PTHREAD_LDFLAGS) $(PTHREAD_LIBS) -lm
+ INCLUDES = @INCLUDES@
+
+ SUFFIXES = .@EXTENSION@ .@SHARED_LIB@
diff --git a/audio/pd/patches/patch-src_configure b/audio/pd/patches/patch-src_configure
new file mode 100644
index 00000000000..3f7570350ac
--- /dev/null
+++ b/audio/pd/patches/patch-src_configure
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_configure,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Fix unportable test(1) construct.
+
+--- src/configure.orig 2011-03-21 01:41:34.000000000 +0000
++++ src/configure
+@@ -5407,7 +5407,7 @@ then
+ then
+ fat="no"
+ fi
+- if test "x$fat" == "xyes";
++ if test "x$fat" = "xyes";
+ then
+ MORECFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -arch i386 -arch ppc -Wno-error"
diff --git a/audio/pd/patches/patch-src_d__array.c b/audio/pd/patches/patch-src_d__array.c
new file mode 100644
index 00000000000..c2af6a1c64d
--- /dev/null
+++ b/audio/pd/patches/patch-src_d__array.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_d__array.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Detect endianness on NetBSD.
+
+--- src/d_array.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/d_array.c
+@@ -502,7 +502,7 @@ static void tabread4_tilde_setup(void)
+ #include <sys/endian.h>
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <machine/endian.h>
+ #endif
+
diff --git a/audio/pd/patches/patch-src_d__osc.c b/audio/pd/patches/patch-src_d__osc.c
new file mode 100644
index 00000000000..069dbe40d47
--- /dev/null
+++ b/audio/pd/patches/patch-src_d__osc.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_d__osc.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Detect endianness on NetBSD.
+
+--- src/d_osc.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/d_osc.c
+@@ -15,7 +15,7 @@
+ #include <sys/endian.h>
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <machine/endian.h>
+ #endif
+
diff --git a/audio/pd/patches/patch-src_m__binbuf.c b/audio/pd/patches/patch-src_m__binbuf.c
new file mode 100644
index 00000000000..396705df820
--- /dev/null
+++ b/audio/pd/patches/patch-src_m__binbuf.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_m__binbuf.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/m_binbuf.c.orig 2011-03-10 06:02:41.000000000 +0000
++++ src/m_binbuf.c
+@@ -530,11 +530,7 @@ done:
+
+ #define SMALLMSG 5
+ #define HUGEMSG 1000
+-#ifdef MSW
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+ #if HAVE_ALLOCA
+ #define ATOMS_ALLOCA(x, n) ((x) = (t_atom *)((n) < HUGEMSG ? \
+ alloca((n) * sizeof(t_atom)) : getbytes((n) * sizeof(t_atom))))
diff --git a/audio/pd/patches/patch-src_s__audio__oss.c b/audio/pd/patches/patch-src_s__audio__oss.c
new file mode 100644
index 00000000000..345e21bcd0f
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__audio__oss.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_s__audio__oss.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Use proper soundcard.h include on NetBSD and add missing argument
+to ioctl().
+
+--- src/s_audio_oss.c.orig 2011-03-07 01:33:39.000000000 +0000
++++ src/s_audio_oss.c
+@@ -5,7 +5,7 @@
+
+ /* this file inputs and outputs audio using the OSS API available on linux. */
+
+-#if defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ # include <sys/soundcard.h>
+ #else
+ # include <linux/soundcard.h>
+@@ -120,7 +120,7 @@ typedef struct _multidev {
+
+ int oss_reset(int fd) {
+ int err;
+- if ((err = ioctl(fd,SNDCTL_DSP_RESET)) < 0)
++ if ((err = ioctl(fd,SNDCTL_DSP_RESET,0)) < 0)
+ error("OSS: Could not reset");
+ return err;
+ }
diff --git a/audio/pd/patches/patch-src_s__file.c b/audio/pd/patches/patch-src_s__file.c
new file mode 100644
index 00000000000..adbb3e32159
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__file.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_s__file.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+File handling under NetBSD is the same as under Linux.
+
+--- src/s_file.c.orig 2011-03-19 22:22:27.000000000 +0000
++++ src/s_file.c
+@@ -36,7 +36,7 @@ int sys_defeatrt;
+ t_symbol *sys_flags = &s_;
+ 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__)
+
+ static char *sys_prefbuf;
+ static int sys_prefbufsize;
diff --git a/audio/pd/patches/patch-src_s__loader.c b/audio/pd/patches/patch-src_s__loader.c
new file mode 100644
index 00000000000..21f9da6287f
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__loader.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_s__loader.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Define extensions for NetBSD.
+
+--- 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
+
+ #ifdef __FreeBSD__
+ static char sys_dllextent[] = ".b_i386", sys_dllextent2[] = ".pd_freebsd";
++#elif defined(__NetBSD__)
++# ifdef __x86_64__
++static char sys_dllextent[] = ".n_ia64", sys_dllextent2[] = ".pd_netbsd";
++# else
++static char sys_dllextent[] = ".n_i386", sys_dllextent2[] = ".pd_netbsd";
++# 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
new file mode 100644
index 00000000000..175aa5fc555
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__stuff.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_s__stuff.h,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Use OSS on NetBSD.
+
+--- src/s_stuff.h.orig 2011-03-13 00:19:29.000000000 +0000
++++ src/s_stuff.h
+@@ -204,7 +204,7 @@ void sys_setalarm(int microsec);
+ #define API_DEFAULT API_DUMMY
+ #define API_DEFSTRING "dummy audio"
+ #else
+-#if defined(__linux__) || defined(__FreeBSD_kernel__)
++#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ # define API_DEFAULT API_OSS
+ # define API_DEFSTRING "OSS"
+ #endif
diff --git a/audio/pd/patches/patch-src_s__utf8.c b/audio/pd/patches/patch-src_s__utf8.c
new file mode 100644
index 00000000000..471c45b7c3c
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__utf8.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_s__utf8.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/s_utf8.c.orig 2010-08-18 03:51:01.000000000 +0000
++++ src/s_utf8.c
+@@ -18,11 +18,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
+-#ifdef WIN32
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+
+ #include "s_utf8.h"
+
diff --git a/audio/pd/patches/patch-src_x__list.c b/audio/pd/patches/patch-src_x__list.c
new file mode 100644
index 00000000000..ce4e28568ba
--- /dev/null
+++ b/audio/pd/patches/patch-src_x__list.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_x__list.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/x_list.c.orig 2010-07-21 18:37:47.000000000 +0000
++++ src/x_list.c
+@@ -4,11 +4,7 @@
+
+ #include "m_pd.h"
+ /* #include <string.h> */
+-#ifdef MSW
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+
+ extern t_pd *newest;
+
diff --git a/audio/pd/patches/patch-src_x__misc.c b/audio/pd/patches/patch-src_x__misc.c
new file mode 100644
index 00000000000..56b94dd2133
--- /dev/null
+++ b/audio/pd/patches/patch-src_x__misc.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_x__misc.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Define missing symbol the same as on FreeBSD/Mac OS X.
+
+--- src/x_misc.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/x_misc.c
+@@ -20,7 +20,7 @@
+ #include <unistd.h>
+ #endif /* _WIN32 */
+
+-#if defined (__APPLE__) || defined (__FreeBSD__)
++#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__)
+ #define CLOCKHZ CLK_TCK
+ #endif
+ #if defined (__linux__) || defined (__CYGWIN__) || defined (ANDROID)