diff options
author | hans <hans@pkgsrc.org> | 2012-02-15 19:43:51 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2012-02-15 19:43:51 +0000 |
commit | cbabfe98513393e640349b5afb1e23f68e7fb58e (patch) | |
tree | 72c575e1a4de6bcf7cbd9052e840b51133ed5c40 /audio | |
parent | d02b1ddcf01c7de6803cfd664631d5e75d9555e4 (diff) | |
download | pkgsrc-cbabfe98513393e640349b5afb1e23f68e7fb58e.tar.gz |
Fix build on SunOS.
Inspired by the patches used for the native package in OI.
Diffstat (limited to 'audio')
26 files changed, 265 insertions, 74 deletions
diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile index 1d5454fba90..1ec5113b196 100644 --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2012/01/02 04:06:24 sbd Exp $ +# $NetBSD: Makefile,v 1.9 2012/02/15 19:43:51 hans Exp $ # DISTNAME= alsa-lib-1.0.22 -PKG_REVISION= 1 +PKG_REVISION= 2 CATEGORIES= audio MASTER_SITES= ftp://ftp.alsa-project.org/pub/lib/ EXTRACT_SUFX= .tar.bz2 @@ -22,6 +22,19 @@ PKGCONFIG_OVERRIDE+= utils/alsa.pc.in CONFIGURE_ARGS+= --disable-python +LIBS.SunOS+= -lsocket -lnsl +CPPFLAGS.SunOS+= -std=c99 -D_POSIX_C_SOURCE=200112L +CPPFLAGS.SunOS+= -D__EXTENSIONS__ -DBSD_COMP -DMAP_FILE=0 +CPPFLAGS.SunOS+= -Du_int8_t=uint8_t -Du_int16_t=uint16_t +CPPFLAGS.SunOS+= -Du_int32_t=uint32_t -Du_int64_t=uint64_t +CPPFLAGS.SunOS+= -Dbswap_64=BSWAP_64 -Dbswap_32=BSWAP_32 -Dbswap_16=BSWAP_16 + +.include "../../mk/bsd.prefs.mk" +.if ${OPSYS} == "SunOS" +CONFIGURE_ARGS+= --without-versioned +BUILDLINK_TRANSFORM+= rm:-Wl,--version-script=Versions +.endif + .include "../../mk/dlopen.buildlink3.mk" BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*} diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo index 1d91c05c16a..a446158f5e0 100644 --- a/audio/alsa-lib/distinfo +++ b/audio/alsa-lib/distinfo @@ -1,43 +1,44 @@ -$NetBSD: distinfo,v 1.9 2012/01/02 04:06:24 sbd Exp $ +$NetBSD: distinfo,v 1.10 2012/02/15 19:43:51 hans Exp $ SHA1 (alsa-lib-1.0.22.tar.bz2) = d3b6c740c23b8d113a8d02da2a9fd61f5d1a8a44 RMD160 (alsa-lib-1.0.22.tar.bz2) = 4dbc3f9550f8ba01535ad3cfd8f0a8140f897e81 Size (alsa-lib-1.0.22.tar.bz2) = 808534 bytes SHA1 (patch-aa) = 5a8e9571ac6fb1f1f6cbd18d3859468a7b64076f SHA1 (patch-ab) = d6082e1291992699de86e6f78bf43f4cb476c0c8 -SHA1 (patch-ac) = 2ddf533a998f0c1ee8444e97e401bde1fad344ac -SHA1 (patch-ad) = b643f65f4762128589776953c6a7c52bfc633f6d -SHA1 (patch-ae) = 077cfc93d8168525fc47fc34c7356a30b42e8dae -SHA1 (patch-af) = 2d7aaa4b891dc54d09d121ebc268599d79892ae7 +SHA1 (patch-ac) = 98acc8b37aefedccbfcb4fe11eb7ec5ac6df2f75 +SHA1 (patch-ad) = 29a3515a48f86a482431f8e7835683d9d8572b34 +SHA1 (patch-ae) = 5cc665a10a4835342d9128d295fb81f69caff618 +SHA1 (patch-af) = e4cd89940cd69352ebca13a0834df4e20d1026ce SHA1 (patch-ag) = bea09d714bf75735f5be6d370f7242c34b73cb95 SHA1 (patch-ah) = 05229389b8bda654e8e979029b2bcd3a8050cf48 -SHA1 (patch-ai) = 9f1f5477ef60549c9425bdea9dbf26683c0db4e6 -SHA1 (patch-aj) = 7fbd789a05e8a3db4cb56b0de8a3b6965d17e158 -SHA1 (patch-ak) = 58950410913a3ffd35128dd6628680de70e7e2d7 +SHA1 (patch-ai) = b0bd940be4d0ee960961beaef48fe6742a3b491e +SHA1 (patch-aj) = 7eb3d999b876cd8478e28f26983a8af25c210a55 +SHA1 (patch-ak) = 084b8cd20cd5d322cdb0514d8ca140ca31a12984 SHA1 (patch-al) = 76de42304d5ba90bf5e8def57f523c1ee910d9df -SHA1 (patch-am) = e028c544894720fbe585b938715a4ac01fb5600e +SHA1 (patch-am) = d5b4044c4fa9a459a3bf6952c33a0dd793d5c663 SHA1 (patch-an) = c7253acaaf2aeb96310d14c9e03853bc4cd4d0cd SHA1 (patch-ao) = 25ac431685e033b165a9abdcd44246772c1f99b5 -SHA1 (patch-ap) = 7fcd495dc6f9a3974580a99523de4638c383a940 -SHA1 (patch-aq) = 0e700c7e544fb6245e738a3d2356921484c55242 -SHA1 (patch-ar) = b8ae2c11cc075e5e31766c87c7f805d8202aa9e4 +SHA1 (patch-ap) = cad0c9f1627a38111bbbee3bd82d048db2eb4ca8 +SHA1 (patch-aq) = 17faa322f2272b3c926a0c3610079e9686707248 +SHA1 (patch-ar) = aa1f637c1239332e49366097504a239dba06e0b4 SHA1 (patch-as) = 946a179a675d6c5e03e0f7734ac97b0592806912 -SHA1 (patch-at) = 66da4dfd4c3b43753ed9a220716992bc5adbb49d -SHA1 (patch-au) = 8c5d31fe03bd9c137168d7eb31de2f1c683986e5 +SHA1 (patch-at) = bb0f45f180db0e1a06252b374086ac883a16d790 +SHA1 (patch-au) = 7e4b233c160b2cda8e6cbf581a690e17efeb7667 SHA1 (patch-av) = 5f145c3755bf510be6fb101e30d40e10b8dcbd6d -SHA1 (patch-aw) = 48c9581c38eb38c05c6d8fda4bf46998ff874033 -SHA1 (patch-ax) = 04525af5fc4b4b1a46ebb16c5e897a5b40896b3a -SHA1 (patch-ay) = 370b81790e3a2399edae3c8d906b64c79567aa6a -SHA1 (patch-az) = f49fc2a777fded2707486cd2f615393164ab8d5c -SHA1 (patch-ba) = d9a3edc166bc5f2013bb0ee1317ee404c59bbf82 -SHA1 (patch-bb) = 4af36cefc1d5df489941ef41b4bb6702b8ad45a2 +SHA1 (patch-aw) = 2cc44907d4af446832e1d34cbe4bd704d89f66cb +SHA1 (patch-ax) = cc68d0f358433afdfaac3dfe47d1bf7c985e6427 +SHA1 (patch-ay) = 45ee3c0bca143c70f21079fd79320ed0f28416d9 +SHA1 (patch-az) = 10bcd3364fa4854099075cba065647cd75011369 +SHA1 (patch-ba) = e7280eb04ee7c39a576fea3bc5ca4dc1567310f6 +SHA1 (patch-bb) = 3c3121219846eec100bb6d1c144f03d46f2450ec SHA1 (patch-bc) = 0b034b98d536c4ab7f785420d0d51c3d0763d960 SHA1 (patch-bd) = 63a102186f4df59da93bedaac772530e166a9fde SHA1 (patch-be) = e071d0f3518dac8bbda216d4bd850a2a3557b103 -SHA1 (patch-bf) = f9846b9eae6d9225a45e4a1bdadd983733efa8aa -SHA1 (patch-bg) = 19d678643c68c250eebc75fbe17119d478e738cc -SHA1 (patch-bh) = 4c927eaa0f4fd38934433fe7480b62972ca52634 +SHA1 (patch-bf) = 0c75869d99473349b0470b8ae5ae7b62c76d4593 +SHA1 (patch-bg) = 29c0fb6c1fb6a11e7f42778bdd965b9d25ddfd0c +SHA1 (patch-bh) = f207843f4ce2b20b7e680d4b6e9aebb28c55323e SHA1 (patch-bi) = b5038db277068034281787c0072201beae8df8ff SHA1 (patch-bj) = 5b7a36747e57e41eddb05cd1b1d9771a36b0c4f7 SHA1 (patch-bk) = 7740eea6a0d4a8ce3db3b93b2af5faacdb9424b1 -SHA1 (patch-include_pcm.h) = 46748bcecbe30c9a2e41d91e1196bbecf885c6f4 +SHA1 (patch-include_pcm.h) = 2a7a76aebdea61c34040ce8c7621f2ff978266ad +SHA1 (patch-src_control_control__hw.c) = 07cfe3abe586b32f6b989403cd162599da07e865 diff --git a/audio/alsa-lib/patches/patch-ac b/audio/alsa-lib/patches/patch-ac index 8001b325f25..fcf0488f5fd 100644 --- a/audio/alsa-lib/patches/patch-ac +++ b/audio/alsa-lib/patches/patch-ac @@ -1,13 +1,22 @@ -$NetBSD: patch-ac,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ac,v 1.3 2012/02/15 19:43:51 hans Exp $ --- include/asoundlib-head.h.orig 2008-12-18 22:01:21.000000000 -0500 +++ include/asoundlib-head.h -@@ -34,7 +34,11 @@ +@@ -34,7 +34,20 @@ #include <string.h> #include <fcntl.h> #include <assert.h> +#if defined(__NetBSD__) || defined(__DragonFly__) +#include <sys/endian.h> ++#elif defined(__sun) ++#include <sys/byteorder.h> ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#ifdef _BIG_ENDIAN ++#define __BYTE_ORDER __BIG_ENDIAN ++#else ++#define __BYTE_ORDER __LITTLE_ENDIAN ++#endif +#else #include <endian.h> +#endif diff --git a/audio/alsa-lib/patches/patch-ad b/audio/alsa-lib/patches/patch-ad index dd35627bd9e..2f34ee33beb 100644 --- a/audio/alsa-lib/patches/patch-ad +++ b/audio/alsa-lib/patches/patch-ad @@ -1,13 +1,24 @@ -$NetBSD: patch-ad,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ad,v 1.3 2012/02/15 19:43:51 hans Exp $ --- include/global.h.orig 2008-10-29 08:42:10.000000000 -0400 +++ include/global.h -@@ -133,7 +133,7 @@ int snd_shm_area_destroy(struct snd_shm_ +@@ -31,6 +31,10 @@ + /* for timeval and timespec */ + #include <time.h> + ++#ifdef __sun ++#include <alloca.h> ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -133,7 +137,7 @@ int snd_shm_area_destroy(struct snd_shm_ int snd_user_file(const char *file, char **result); -#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) -+#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ diff --git a/audio/alsa-lib/patches/patch-ae b/audio/alsa-lib/patches/patch-ae index 2727469d13f..b1655eb6cfb 100644 --- a/audio/alsa-lib/patches/patch-ae +++ b/audio/alsa-lib/patches/patch-ae @@ -1,16 +1,35 @@ -$NetBSD: patch-ae,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ae,v 1.3 2012/02/15 19:43:51 hans Exp $ --- include/local.h.orig 2008-10-29 08:42:10.000000000 -0400 +++ include/local.h -@@ -28,7 +28,11 @@ +@@ -28,7 +28,20 @@ #include <string.h> #include <fcntl.h> #include <assert.h> +#if defined(__NetBSD__) || defined(__DragonFly__) +#include <sys/endian.h> ++#elif defined(__sun) ++#include <sys/byteorder.h> ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#ifdef _BIG_ENDIAN ++#define __BYTE_ORDER __BIG_ENDIAN ++#else ++#define __BYTE_ORDER __LITTLE_ENDIAN ++#endif +#else #include <endian.h> +#endif #include <stdarg.h> #include <sys/poll.h> #include <errno.h> +@@ -182,7 +195,9 @@ extern snd_lib_error_handler_t snd_err_m + + /* + */ ++#ifndef __sun + #define HAVE_GNU_LD ++#endif + #define HAVE_ELF + #define HAVE_ASM_PREVIOUS_DIRECTIVE + diff --git a/audio/alsa-lib/patches/patch-af b/audio/alsa-lib/patches/patch-af index 2b8c971ec40..59fda09464b 100644 --- a/audio/alsa-lib/patches/patch-af +++ b/audio/alsa-lib/patches/patch-af @@ -1,14 +1,19 @@ -$NetBSD: patch-af,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-af,v 1.3 2012/02/15 19:43:51 hans Exp $ --- include/search.h.orig 2008-10-29 08:42:10.000000000 -0400 +++ include/search.h -@@ -20,7 +20,12 @@ +@@ -20,7 +20,17 @@ #ifndef _SEARCH_H #define _SEARCH_H 1 -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <features.h> +#else ++#ifdef __sun ++#define __P(x) x ++#define __BEGIN_DECLS ++#define __END_DECLS ++#endif +#define __PMT __P +typedef void * __ptr_t; +#endif diff --git a/audio/alsa-lib/patches/patch-ai b/audio/alsa-lib/patches/patch-ai index 556387dae76..b9241303ace 100644 --- a/audio/alsa-lib/patches/patch-ai +++ b/audio/alsa-lib/patches/patch-ai @@ -1,4 +1,4 @@ -$NetBSD: patch-ai,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ai,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_adpcm.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_adpcm.c @@ -6,7 +6,7 @@ $NetBSD: patch-ai,v 1.2 2008/12/25 13:18:00 hasso Exp $ come across a good description of XA yet. */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-aj b/audio/alsa-lib/patches/patch-aj index 481c101ce00..6388659b1b5 100644 --- a/audio/alsa-lib/patches/patch-aj +++ b/audio/alsa-lib/patches/patch-aj @@ -1,4 +1,4 @@ -$NetBSD: patch-aj,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-aj,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_alaw.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_alaw.c @@ -6,7 +6,7 @@ $NetBSD: patch-aj,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-ak b/audio/alsa-lib/patches/patch-ak index 89530711887..b1eac5ec8d1 100644 --- a/audio/alsa-lib/patches/patch-ak +++ b/audio/alsa-lib/patches/patch-ak @@ -1,4 +1,4 @@ -$NetBSD: patch-ak,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ak,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_copy.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_copy.c @@ -6,7 +6,7 @@ $NetBSD: patch-ak,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-am b/audio/alsa-lib/patches/patch-am index 912b0e590ab..046f4be76b1 100644 --- a/audio/alsa-lib/patches/patch-am +++ b/audio/alsa-lib/patches/patch-am @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-am,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_dmix_generic.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_dmix_generic.c @@ -6,7 +6,7 @@ $NetBSD: patch-am,v 1.2 2008/12/25 13:18:00 hasso Exp $ (1ULL << SND_PCM_FORMAT_S24_3LE) | \ (1ULL << SND_PCM_FORMAT_U8)) -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif diff --git a/audio/alsa-lib/patches/patch-ap b/audio/alsa-lib/patches/patch-ap index 9b08eec7a78..ebe37ff36df 100644 --- a/audio/alsa-lib/patches/patch-ap +++ b/audio/alsa-lib/patches/patch-ap @@ -1,4 +1,4 @@ -$NetBSD: patch-ap,v 1.3 2009/08/31 14:25:49 wiz Exp $ +$NetBSD: patch-ap,v 1.4 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_file.c.orig 2009-05-06 07:07:23.000000000 +0000 +++ src/pcm/pcm_file.c @@ -6,7 +6,7 @@ $NetBSD: patch-ap,v 1.3 2009/08/31 14:25:49 wiz Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <endian.h> #include <byteswap.h> +#endif diff --git a/audio/alsa-lib/patches/patch-aq b/audio/alsa-lib/patches/patch-aq index be7813ab69b..e0d7d8698bc 100644 --- a/audio/alsa-lib/patches/patch-aq +++ b/audio/alsa-lib/patches/patch-aq @@ -1,4 +1,4 @@ -$NetBSD: patch-aq,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $ +$NetBSD: patch-aq,v 1.2 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_hw.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_hw.c @@ -13,3 +13,55 @@ $NetBSD: patch-aq,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $ //#define DEBUG_RW /* use to debug readi/writei/readn/writen */ //#define DEBUG_MMAP /* debug mmap_commit */ +@@ -219,10 +223,11 @@ static int snd_pcm_hw_nonblock(snd_pcm_t + + static int snd_pcm_hw_async(snd_pcm_t *pcm, int sig, pid_t pid) + { +- long flags; + snd_pcm_hw_t *hw = pcm->private_data; + int fd = hw->fd, err; + ++#ifndef __sun ++ long flags; + if ((flags = fcntl(fd, F_GETFL)) < 0) { + err = -errno; + SYSMSG("F_GETFL failed"); +@@ -237,13 +242,16 @@ static int snd_pcm_hw_async(snd_pcm_t *p + SYSMSG("F_SETFL for O_ASYNC failed"); + return err; + } ++#endif + if (sig < 0) + return 0; ++#ifndef __sun + if (fcntl(fd, F_SETSIG, (long)sig) < 0) { + err = -errno; + SYSMSG("F_SETSIG failed"); + return err; + } ++#endif + if (fcntl(fd, F_SETOWN, (long)pid) < 0) { + err = -errno; + SYSMSG("F_SETOWN failed"); +@@ -1141,8 +1149,10 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, + mode = 0; + if (fmode & O_NONBLOCK) + mode |= SND_PCM_NONBLOCK; ++#ifndef __sun + if (fmode & O_ASYNC) + mode |= SND_PCM_ASYNC; ++#endif + + if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) { + ret = -errno; +@@ -1281,8 +1291,10 @@ int snd_pcm_hw_open(snd_pcm_t **pcmp, co + fmode = O_RDWR; + if (mode & SND_PCM_NONBLOCK) + fmode |= O_NONBLOCK; ++#ifndef __sun + if (mode & SND_PCM_ASYNC) + fmode |= O_ASYNC; ++#endif + if (mode & SND_PCM_APPEND) + fmode |= O_APPEND; + fd = snd_open_device(filename, fmode); diff --git a/audio/alsa-lib/patches/patch-ar b/audio/alsa-lib/patches/patch-ar index cfec240d286..7e68d72786a 100644 --- a/audio/alsa-lib/patches/patch-ar +++ b/audio/alsa-lib/patches/patch-ar @@ -1,4 +1,4 @@ -$NetBSD: patch-ar,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ar,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_iec958.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_iec958.c @@ -6,7 +6,7 @@ $NetBSD: patch-ar,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-at b/audio/alsa-lib/patches/patch-at index ed784d6767a..7785e6bb2a6 100644 --- a/audio/alsa-lib/patches/patch-at +++ b/audio/alsa-lib/patches/patch-at @@ -1,4 +1,4 @@ -$NetBSD: patch-at,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-at,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_lfloat.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_lfloat.c @@ -6,7 +6,7 @@ $NetBSD: patch-at,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-au b/audio/alsa-lib/patches/patch-au index 0f686615e48..45fdd02c02a 100644 --- a/audio/alsa-lib/patches/patch-au +++ b/audio/alsa-lib/patches/patch-au @@ -1,4 +1,4 @@ -$NetBSD: patch-au,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-au,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_linear.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_linear.c @@ -6,7 +6,7 @@ $NetBSD: patch-au,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-aw b/audio/alsa-lib/patches/patch-aw index 33f59e13454..068f221aaff 100644 --- a/audio/alsa-lib/patches/patch-aw +++ b/audio/alsa-lib/patches/patch-aw @@ -1,8 +1,8 @@ -$NetBSD: patch-aw,v 1.3 2009/01/28 05:40:11 obache Exp $ +$NetBSD: patch-aw,v 1.4 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_misc.c.orig 2008-10-29 14:42:10 +0200 +++ src/pcm/pcm_misc.c 2008-12-21 17:08:14 +0200 -@@ -23,7 +23,13 @@ +@@ -23,7 +23,15 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> @@ -10,6 +10,8 @@ $NetBSD: patch-aw,v 1.3 2009/01/28 05:40:11 obache Exp $ +#include <sys/bswap.h> +#elif defined(__DragonFly__) +#include <sys/endian.h> ++#elif defined (__sun) ++#include <sys/byteorder.h> +#else #include <byteswap.h> +#endif diff --git a/audio/alsa-lib/patches/patch-ax b/audio/alsa-lib/patches/patch-ax index d8995b299d1..0f2b4e6a421 100644 --- a/audio/alsa-lib/patches/patch-ax +++ b/audio/alsa-lib/patches/patch-ax @@ -1,4 +1,4 @@ -$NetBSD: patch-ax,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ax,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_mulaw.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_mulaw.c @@ -6,7 +6,7 @@ $NetBSD: patch-ax,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-ay b/audio/alsa-lib/patches/patch-ay index 87e51ed9885..81d58aa5c50 100644 --- a/audio/alsa-lib/patches/patch-ay +++ b/audio/alsa-lib/patches/patch-ay @@ -1,4 +1,4 @@ -$NetBSD: patch-ay,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ay,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_null.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_null.c @@ -6,7 +6,7 @@ $NetBSD: patch-ay,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include <limits.h> diff --git a/audio/alsa-lib/patches/patch-az b/audio/alsa-lib/patches/patch-az index bca02685cfa..71be5f15b72 100644 --- a/audio/alsa-lib/patches/patch-az +++ b/audio/alsa-lib/patches/patch-az @@ -1,4 +1,4 @@ -$NetBSD: patch-az,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-az,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_rate.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_rate.c @@ -6,7 +6,7 @@ $NetBSD: patch-az,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ #include <inttypes.h> -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-ba b/audio/alsa-lib/patches/patch-ba index c00f71690e9..0eb0320843c 100644 --- a/audio/alsa-lib/patches/patch-ba +++ b/audio/alsa-lib/patches/patch-ba @@ -1,4 +1,4 @@ -$NetBSD: patch-ba,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-ba,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_rate_linear.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_rate_linear.c @@ -6,7 +6,7 @@ $NetBSD: patch-ba,v 1.2 2008/12/25 13:18:00 hasso Exp $ */ #include <inttypes.h> -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include "pcm_local.h" diff --git a/audio/alsa-lib/patches/patch-bb b/audio/alsa-lib/patches/patch-bb index a73bc2fdcb3..fc7807f987e 100644 --- a/audio/alsa-lib/patches/patch-bb +++ b/audio/alsa-lib/patches/patch-bb @@ -1,4 +1,4 @@ -$NetBSD: patch-bb,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-bb,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_route.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_route.c @@ -6,7 +6,7 @@ $NetBSD: patch-bb,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include <math.h> diff --git a/audio/alsa-lib/patches/patch-bf b/audio/alsa-lib/patches/patch-bf index a97be29c93a..1b35e41fa4a 100644 --- a/audio/alsa-lib/patches/patch-bf +++ b/audio/alsa-lib/patches/patch-bf @@ -1,4 +1,4 @@ -$NetBSD: patch-bf,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-bf,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_softvol.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/pcm/pcm_softvol.c @@ -6,7 +6,7 @@ $NetBSD: patch-bf,v 1.2 2008/12/25 13:18:00 hasso Exp $ * */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include <math.h> diff --git a/audio/alsa-lib/patches/patch-bg b/audio/alsa-lib/patches/patch-bg index 4218e1ab10f..242ed37c0ea 100644 --- a/audio/alsa-lib/patches/patch-bg +++ b/audio/alsa-lib/patches/patch-bg @@ -1,11 +1,30 @@ -$NetBSD: patch-bg,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $ +$NetBSD: patch-bg,v 1.2 2012/02/15 19:43:51 hans Exp $ --- src/timer/timer_hw.c.orig 2008-10-29 08:42:10.000000000 -0400 +++ src/timer/timer_hw.c -@@ -92,10 +92,17 @@ static int snd_timer_hw_async(snd_timer_ +@@ -72,11 +72,14 @@ static int snd_timer_hw_nonblock(snd_tim + + static int snd_timer_hw_async(snd_timer_t *timer, int sig, pid_t pid) + { ++#ifndef __sun + long flags; ++#endif + int fd; + + assert(timer); + fd = timer->poll_fd; ++#ifndef __sun + if ((flags = fcntl(fd, F_GETFL)) < 0) { + SYSERR("F_GETFL failed"); + return -errno; +@@ -89,12 +92,22 @@ static int snd_timer_hw_async(snd_timer_ + SYSERR("F_SETFL for O_ASYNC failed"); + return -errno; } ++#endif if (sig < 0) return 0; ++#ifndef __sun +#ifdef F_SETSIG if (fcntl(fd, F_SETSIG, (long)sig) < 0) { SYSERR("F_SETSIG failed"); @@ -17,6 +36,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $ + return -errno; + } +#endif ++#endif if (fcntl(fd, F_SETOWN, (long)pid) < 0) { SYSERR("F_SETOWN failed"); return -errno; diff --git a/audio/alsa-lib/patches/patch-bh b/audio/alsa-lib/patches/patch-bh index f18f95e7fac..44c9ce9a64f 100644 --- a/audio/alsa-lib/patches/patch-bh +++ b/audio/alsa-lib/patches/patch-bh @@ -1,4 +1,4 @@ -$NetBSD: patch-bh,v 1.2 2008/12/25 13:18:00 hasso Exp $ +$NetBSD: patch-bh,v 1.3 2012/02/15 19:43:51 hans Exp $ --- src/pcm/pcm_meter.c.orig 2008-12-19 00:05:13.000000000 -0500 +++ src/pcm/pcm_meter.c 2008-12-19 00:05:34.000000000 -0500 @@ -6,7 +6,7 @@ $NetBSD: patch-bh,v 1.2 2008/12/25 13:18:00 hasso Exp $ */ -+#if !defined(__NetBSD__) && !defined(__DragonFly__) ++#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__sun) #include <byteswap.h> +#endif #include <time.h> diff --git a/audio/alsa-lib/patches/patch-include_pcm.h b/audio/alsa-lib/patches/patch-include_pcm.h index 27b7deca2c9..f66d5f37553 100644 --- a/audio/alsa-lib/patches/patch-include_pcm.h +++ b/audio/alsa-lib/patches/patch-include_pcm.h @@ -1,7 +1,7 @@ -$NetBSD: patch-include_pcm.h,v 1.1 2012/01/02 04:06:24 sbd Exp $ +$NetBSD: patch-include_pcm.h,v 1.2 2012/02/15 19:43:51 hans Exp $ ---- include/pcm.h.orig 2009-12-16 15:18:51.000000000 +0000 -+++ include/pcm.h +--- include/pcm.h.orig 2009-12-16 16:18:51.000000000 +0100 ++++ include/pcm.h 2012-02-15 14:10:10.589697413 +0100 @@ -456,7 +456,9 @@ int snd_pcm_wait(snd_pcm_t *pcm, int tim int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2); int snd_pcm_unlink(snd_pcm_t *pcm); @@ -12,3 +12,18 @@ $NetBSD: patch-include_pcm.h,v 1.1 2012/01/02 04:06:24 sbd Exp $ /* * application helpers - these functions are implemented on top +@@ -920,10 +922,10 @@ int snd_pcm_format_width(snd_pcm_format_ + int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ + snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian); + ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); +-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format); +-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format); +-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format); +-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format); ++uint8_t snd_pcm_format_silence(snd_pcm_format_t format); ++uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format); ++uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format); ++uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format); + int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples); + + snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes); diff --git a/audio/alsa-lib/patches/patch-src_control_control__hw.c b/audio/alsa-lib/patches/patch-src_control_control__hw.c new file mode 100644 index 00000000000..7d0b15d8705 --- /dev/null +++ b/audio/alsa-lib/patches/patch-src_control_control__hw.c @@ -0,0 +1,44 @@ +$NetBSD: patch-src_control_control__hw.c,v 1.1 2012/02/15 19:43:51 hans Exp $ + +--- src/control/control_hw.c.orig 2009-12-16 16:18:51.000000000 +0100 ++++ src/control/control_hw.c 2012-01-15 01:48:06.780384687 +0100 +@@ -80,10 +80,11 @@ static int snd_ctl_hw_nonblock(snd_ctl_t + + static int snd_ctl_hw_async(snd_ctl_t *ctl, int sig, pid_t pid) + { +- long flags; + snd_ctl_hw_t *hw = ctl->private_data; + int fd = hw->fd; + ++#ifndef __sun ++ long flags; + if ((flags = fcntl(fd, F_GETFL)) < 0) { + SYSERR("F_GETFL failed"); + return -errno; +@@ -96,12 +97,15 @@ static int snd_ctl_hw_async(snd_ctl_t *c + SYSERR("F_SETFL for O_ASYNC failed"); + return -errno; + } ++#endif + if (sig < 0) + return 0; ++#ifndef __sun + if (fcntl(fd, F_SETSIG, (long)sig) < 0) { + SYSERR("F_SETSIG failed"); + return -errno; + } ++#endif + if (fcntl(fd, F_SETOWN, (long)pid) < 0) { + SYSERR("F_SETOWN failed"); + return -errno; +@@ -383,8 +387,10 @@ int snd_ctl_hw_open(snd_ctl_t **handle, + fmode = O_RDWR; + if (mode & SND_CTL_NONBLOCK) + fmode |= O_NONBLOCK; ++#ifndef __sun + if (mode & SND_CTL_ASYNC) + fmode |= O_ASYNC; ++#endif + fd = snd_open_device(filename, fmode); + if (fd < 0) { + snd_card_load(card); |