From 2e09f33030bdef672b2598fbff27f9fc20e25d0e Mon Sep 17 00:00:00 2001 From: hans Date: Wed, 15 Feb 2012 22:36:38 +0000 Subject: Fix build on SunOS. --- audio/pd/Makefile | 5 ++++- audio/pd/distinfo | 20 +++++++++++--------- audio/pd/patches/patch-extra_pd~_pd~.c | 13 +++++++++++-- audio/pd/patches/patch-src_d__array.c | 20 +++++++++++++++++++- audio/pd/patches/patch-src_d__osc.c | 20 +++++++++++++++++++- audio/pd/patches/patch-src_d__soundfile.c | 17 +++++++++++++++++ audio/pd/patches/patch-src_s__audio__oss.c | 18 ++++++++++++++---- audio/pd/patches/patch-src_s__file.c | 4 ++-- audio/pd/patches/patch-src_s__inter.c | 15 +++++++++++++++ audio/pd/patches/patch-src_s__loader.c | 10 ++++++++-- audio/pd/patches/patch-src_s__stuff.h | 4 ++-- audio/pd/patches/patch-src_x__misc.c | 4 ++-- 12 files changed, 124 insertions(+), 26 deletions(-) create mode 100644 audio/pd/patches/patch-src_d__soundfile.c create mode 100644 audio/pd/patches/patch-src_s__inter.c (limited to 'audio') diff --git a/audio/pd/Makefile b/audio/pd/Makefile index 16b3143c7a8..5c810941380 100644 --- a/audio/pd/Makefile +++ b/audio/pd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2012/02/05 22:20:42 sbd Exp $ +# $NetBSD: Makefile,v 1.3 2012/02/15 22:36:38 hans Exp $ # DISTNAME= pd-0.43-0.src @@ -22,6 +22,9 @@ USE_TOOLS+= autoconf automake gmake msgfmt pkg-config USE_LANGUAGES= c c++ GNU_CONFIGURE= YES USE_LIBTOOL= YES +REPLACE_SH= tcl/pd-gui.tcl + +LDFLAGS.SunOS+= -lsocket -lnsl PKGCONFIG_OVERRIDE+= pd.pc.in diff --git a/audio/pd/distinfo b/audio/pd/distinfo index fd45f7901e3..c9c88ea41fd 100644 --- a/audio/pd/distinfo +++ b/audio/pd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2012/02/05 21:55:15 sbd Exp $ +$NetBSD: distinfo,v 1.4 2012/02/15 22:36:38 hans Exp $ SHA1 (pd-0.43-0.src.tar.gz) = 9bc4377fe25d034120bd393d63fe4180c7a500bc RMD160 (pd-0.43-0.src.tar.gz) = 6c737e69430180187281747830e655401b803b55 @@ -6,18 +6,20 @@ Size (pd-0.43-0.src.tar.gz) = 2194131 bytes SHA1 (patch-Makefile.am) = 7a8da5f1902dcfb8f49ef9c915ae96a1996bd83d SHA1 (patch-configure.ac) = 31baa676afeea342e3634d6fc2e06b4f61ede9dd SHA1 (patch-extra_bonk~_bonk~.c) = 4b72a2f34c50abcceed7a41f7e2e855abe23f8fa -SHA1 (patch-extra_pd~_pd~.c) = e1c7e4f031dd5236083ba91a902e9551e1a47be0 +SHA1 (patch-extra_pd~_pd~.c) = fd2f6984648ae752667c5e286fd16465fed2ed32 SHA1 (patch-extra_sigmund~_sigmund~.c) = 53017104c6b966f57480ca95db888fae841935c8 SHA1 (patch-src_Makefile.am) = a87c3380b0180a906c0496e743fbece772226da3 SHA1 (patch-src_configure) = 19d9f53db01c426b23679fd3ad6fca3ef426b52b SHA1 (patch-src_configure.in) = 3fc4c5f1d241e233105783ecf40375ca4ad15a36 -SHA1 (patch-src_d__array.c) = 73f62c57d4712746c18ff1227351e2fd7136e3ca -SHA1 (patch-src_d__osc.c) = 74c4180b228ece946e9f01964ce8ed7183c2968f +SHA1 (patch-src_d__array.c) = ab2b0016a46ccc60a31a2631b265af5d98c10121 +SHA1 (patch-src_d__osc.c) = f49281a1b43728f27d9b51439b27d75cb66a9529 +SHA1 (patch-src_d__soundfile.c) = d292b8b39918e76e397b511503ba6dcb7382d433 SHA1 (patch-src_m__binbuf.c) = 29ef42a7505cae668bbb88627b25ae1162f6ec18 -SHA1 (patch-src_s__audio__oss.c) = 8cda1221b84e99ebb480b998ea8db7002c8129dc -SHA1 (patch-src_s__file.c) = c7eddbd9c8aafffaf37490c9f7fa635f697086b3 -SHA1 (patch-src_s__loader.c) = 5a2c0820b408c7819c9433b167d617b365d096e8 -SHA1 (patch-src_s__stuff.h) = c5ad6525b0fd24420c91fe6146e3e75bb7664fb3 +SHA1 (patch-src_s__audio__oss.c) = 322602c9243d3e5fc3a6fdafa93c8670b50a8b27 +SHA1 (patch-src_s__file.c) = fba59996a07d960b879f36ee9508ae420df51838 +SHA1 (patch-src_s__inter.c) = 3fa8a59963753244a641304dcb9e2da8415e5c21 +SHA1 (patch-src_s__loader.c) = 446977bcf1ea5b75ff0ec7de0bf6d32fca0bc6d5 +SHA1 (patch-src_s__stuff.h) = 1ebfb78dd7cfe8d8c7c0e4ecde3d8de814480a96 SHA1 (patch-src_s__utf8.c) = 84b5ccb7a47f2c3c8a56b5f3d78947210cff043e SHA1 (patch-src_x__list.c) = af68452cf181cf83dcc6e119ac9a5f969c6add5a -SHA1 (patch-src_x__misc.c) = 7af3fb796ef64ca401c4a4546b7bc0315ec8cb6b +SHA1 (patch-src_x__misc.c) = f2eccedc7ad297f3358c921b03e9879f5b63f77f 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 #include #include -@@ -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 @@ -26,6 +26,15 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 +static char pd_tilde_dllextent[] = ".n_i386", + 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", 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 #endif +@@ -510,6 +510,17 @@ static void tabread4_tilde_setup(void) + #include + #endif + ++#if defined(__sun) ++#include ++#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 + #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 #endif +@@ -23,6 +23,17 @@ + #include + #endif + ++#if defined(__sun) ++#include ++#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 + #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 #else # include -@@ -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 +@@ -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 + #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"; @@ -14,6 +14,12 @@ https://sourceforge.net/tracker/?func=detail&aid=3411732&group_id=55736&atid=478 +static char sys_dllextent[] = ".n_ia64", sys_dllextent2[] = ".pd_netbsd"; +# 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__ 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) -- cgit v1.2.3