pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

alsa-lib-git: add package based on audio/alsa-lib, for upstreaming.



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Wed Feb 24 09:42:48 2016 +0100
Changeset:	2b8e460d4350d32ebe64ad59b2453e07657bf2c1

Added Files:
	alsa-lib-git/DESCR
	alsa-lib-git/Makefile
	alsa-lib-git/PLIST
	alsa-lib-git/buildlink3.mk
	alsa-lib-git/builtin.mk
	alsa-lib-git/distinfo
	alsa-lib-git/patches/patch-aa
	alsa-lib-git/patches/patch-ad
	alsa-lib-git/patches/patch-ae
	alsa-lib-git/patches/patch-af
	alsa-lib-git/patches/patch-ag
	alsa-lib-git/patches/patch-ah
	alsa-lib-git/patches/patch-ai
	alsa-lib-git/patches/patch-aj
	alsa-lib-git/patches/patch-ak
	alsa-lib-git/patches/patch-al
	alsa-lib-git/patches/patch-am
	alsa-lib-git/patches/patch-an
	alsa-lib-git/patches/patch-ao
	alsa-lib-git/patches/patch-ap
	alsa-lib-git/patches/patch-aq
	alsa-lib-git/patches/patch-ar
	alsa-lib-git/patches/patch-as
	alsa-lib-git/patches/patch-at
	alsa-lib-git/patches/patch-au
	alsa-lib-git/patches/patch-av
	alsa-lib-git/patches/patch-aw
	alsa-lib-git/patches/patch-ax
	alsa-lib-git/patches/patch-ay
	alsa-lib-git/patches/patch-az
	alsa-lib-git/patches/patch-ba
	alsa-lib-git/patches/patch-bb
	alsa-lib-git/patches/patch-bc
	alsa-lib-git/patches/patch-bd
	alsa-lib-git/patches/patch-be
	alsa-lib-git/patches/patch-bf
	alsa-lib-git/patches/patch-bg
	alsa-lib-git/patches/patch-bh
	alsa-lib-git/patches/patch-bi
	alsa-lib-git/patches/patch-bj
	alsa-lib-git/patches/patch-bk
	alsa-lib-git/patches/patch-configure.ac
	alsa-lib-git/patches/patch-include_iatomic.h
	alsa-lib-git/patches/patch-include_pcm.h
	alsa-lib-git/patches/patch-include_sound_asoc.h
	alsa-lib-git/patches/patch-include_sound_asound.h
	alsa-lib-git/patches/patch-src_conf.c
	alsa-lib-git/patches/patch-src_control_control__hw.c
	alsa-lib-git/patches/patch-src_pcm_pcm__mmap.c
	alsa-lib-git/patches/patch-src_seq_seq__midi__event.c
	alsa-lib-git/patches/patch-src_shmarea.c
	alsa-lib-git/patches/patch-src_topology_tplg__local.h
	alsa-lib-git/patches/patch-src_ucm_parser.c

Log Message:
alsa-lib-git: add package based on audio/alsa-lib, for upstreaming.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2b8e460d4350d32ebe64ad59b2453e07657bf2c1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 alsa-lib-git/DESCR                                 |  12 ++
 alsa-lib-git/Makefile                              |  51 +++++++
 alsa-lib-git/PLIST                                 | 160 +++++++++++++++++++++
 alsa-lib-git/buildlink3.mk                         |  15 ++
 alsa-lib-git/builtin.mk                            |  23 +++
 alsa-lib-git/distinfo                              |  53 +++++++
 alsa-lib-git/patches/patch-aa                      |  15 ++
 alsa-lib-git/patches/patch-ad                      |  27 ++++
 alsa-lib-git/patches/patch-ae                      |  29 ++++
 alsa-lib-git/patches/patch-af                      |  22 +++
 alsa-lib-git/patches/patch-ag                      |  15 ++
 alsa-lib-git/patches/patch-ah                      |  24 ++++
 alsa-lib-git/patches/patch-ai                      |  14 ++
 alsa-lib-git/patches/patch-aj                      |  14 ++
 alsa-lib-git/patches/patch-ak                      |  14 ++
 alsa-lib-git/patches/patch-al                      |  15 ++
 alsa-lib-git/patches/patch-am                      |  14 ++
 alsa-lib-git/patches/patch-an                      |  15 ++
 alsa-lib-git/patches/patch-ao                      |  15 ++
 alsa-lib-git/patches/patch-ap                      |  14 ++
 alsa-lib-git/patches/patch-aq                      |  67 +++++++++
 alsa-lib-git/patches/patch-ar                      |  14 ++
 alsa-lib-git/patches/patch-as                      |  15 ++
 alsa-lib-git/patches/patch-at                      |  14 ++
 alsa-lib-git/patches/patch-au                      |  14 ++
 alsa-lib-git/patches/patch-av                      |  15 ++
 alsa-lib-git/patches/patch-aw                      |  20 +++
 alsa-lib-git/patches/patch-ax                      |  14 ++
 alsa-lib-git/patches/patch-ay                      |  22 +++
 alsa-lib-git/patches/patch-az                      |  25 ++++
 alsa-lib-git/patches/patch-ba                      |  14 ++
 alsa-lib-git/patches/patch-bb                      |  14 ++
 alsa-lib-git/patches/patch-bc                      |  15 ++
 alsa-lib-git/patches/patch-bd                      |  15 ++
 alsa-lib-git/patches/patch-be                      |  15 ++
 alsa-lib-git/patches/patch-bf                      |  14 ++
 alsa-lib-git/patches/patch-bg                      |  42 ++++++
 alsa-lib-git/patches/patch-bh                      |  14 ++
 alsa-lib-git/patches/patch-bi                      |  12 ++
 alsa-lib-git/patches/patch-bj                      |  22 +++
 alsa-lib-git/patches/patch-bk                      |  28 ++++
 alsa-lib-git/patches/patch-configure.ac            |  33 +++++
 alsa-lib-git/patches/patch-include_iatomic.h       |  19 +++
 alsa-lib-git/patches/patch-include_pcm.h           |  32 +++++
 alsa-lib-git/patches/patch-include_sound_asoc.h    |  21 +++
 alsa-lib-git/patches/patch-include_sound_asound.h  |  32 +++++
 alsa-lib-git/patches/patch-src_conf.c              |  36 +++++
 .../patches/patch-src_control_control__hw.c        |  44 ++++++
 alsa-lib-git/patches/patch-src_pcm_pcm__mmap.c     |  13 ++
 .../patches/patch-src_seq_seq__midi__event.c       |  13 ++
 alsa-lib-git/patches/patch-src_shmarea.c           |  13 ++
 .../patches/patch-src_topology_tplg__local.h       |  15 ++
 alsa-lib-git/patches/patch-src_ucm_parser.c        |  35 +++++
 53 files changed, 1292 insertions(+)

diffs:
diff --git a/alsa-lib-git/DESCR b/alsa-lib-git/DESCR
new file mode 100644
index 0000000..615318b
--- /dev/null
+++ b/alsa-lib-git/DESCR
@@ -0,0 +1,12 @@
+The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
+functionality to the Linux operating system. ALSA has the following
+significant features:
+
+    * Efficient support for all types of audio interfaces, from consumer sound
+      cards to professional multichannel audio interfaces.
+    * Fully modularized sound drivers.
+    * SMP and thread-safe design.
+    * User space library (alsa-lib) to simplify application programming and
+      provide higher level functionality.
+    * Support for the older Open Sound System (OSS) API, providing binary
+      compatibility for most OSS programs.
diff --git a/alsa-lib-git/Makefile b/alsa-lib-git/Makefile
new file mode 100644
index 0000000..1955048
--- /dev/null
+++ b/alsa-lib-git/Makefile
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile,v 1.16 2016/02/18 15:15:57 wiz Exp $
+
+DISTNAME=	alsa-lib-1.1.0
+CATEGORIES=	audio
+MASTER_SITES=	ftp://ftp.alsa-project.org/pub/lib/
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.alsa-project.org/
+COMMENT=	Advanced Linux Sound Architecture (ALSA)
+LICENSE=	gnu-lgpl-v2.1
+
+GIT_REPOSITORIES+=	alsa
+GIT_REPO.alsa=		git://git.alsa-project.org/alsa-lib.git
+
+WRKSRC=		${WRKDIR}/alsa
+
+GNU_CONFIGURE=	yes
+USE_LIBTOOL=	yes
+USE_TOOLS+=	pkg-config gmake autoconf automake
+
+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+=	-D__u32=uint32_t -D__u64=uint64_t
+CPPFLAGS.SunOS+=	-Dbswap_64=BSWAP_64 -Dbswap_32=BSWAP_32 -Dbswap_16=BSWAP_16
+
+CPPFLAGS.NetBSD+=	-D__u32=uint32_t -D__u64=uint64_t -Dbswap_16=bswap16 -Dbswap_32=bswap32 -Dbswap_64=bswap64
+CPPFLAGS.FreeBSD+=	-D__u32=uint32_t -D__u64=uint64_t -Dbswap_16=bswap16 -Dbswap_32=bswap32 -Dbswap_64=bswap64
+
+.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*}
+
+pre-configure:
+	cd ${WRKSRC} && autoreconf -fiv
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/alsa-lib-git/PLIST b/alsa-lib-git/PLIST
new file mode 100644
index 0000000..7b7558b
--- /dev/null
+++ b/alsa-lib-git/PLIST
@@ -0,0 +1,160 @@
+@comment $NetBSD: PLIST,v 1.5 2016/02/18 15:15:57 wiz Exp $
+bin/aserver
+include/alsa/alisp.h
+include/alsa/asoundef.h
+include/alsa/asoundlib.h
+include/alsa/conf.h
+include/alsa/control.h
+include/alsa/control_external.h
+include/alsa/error.h
+include/alsa/global.h
+include/alsa/hwdep.h
+include/alsa/iatomic.h
+include/alsa/input.h
+include/alsa/mixer.h
+include/alsa/mixer_abst.h
+include/alsa/output.h
+include/alsa/pcm.h
+include/alsa/pcm_external.h
+include/alsa/pcm_extplug.h
+include/alsa/pcm_ioplug.h
+include/alsa/pcm_old.h
+include/alsa/pcm_plugin.h
+include/alsa/pcm_rate.h
+include/alsa/rawmidi.h
+include/alsa/seq.h
+include/alsa/seq_event.h
+include/alsa/seq_midi_event.h
+include/alsa/seqmid.h
+include/alsa/sound/asoc.h
+include/alsa/sound/asound_fm.h
+include/alsa/sound/emu10k1.h
+include/alsa/sound/hdsp.h
+include/alsa/sound/hdspm.h
+include/alsa/sound/sb16_csp.h
+include/alsa/sound/sscape_ioctl.h
+include/alsa/sound/tlv.h
+include/alsa/sound/type_compat.h
+include/alsa/timer.h
+include/alsa/topology.h
+include/alsa/use-case.h
+include/alsa/version.h
+include/sys/asoundlib.h
+lib/alsa-lib/smixer/smixer-ac97.la
+lib/alsa-lib/smixer/smixer-hda.la
+lib/alsa-lib/smixer/smixer-sbase.la
+lib/libasound.la
+lib/pkgconfig/alsa.pc
+share/aclocal/alsa.m4
+share/alsa/alsa.conf
+share/alsa/alsa.conf.d/README
+share/alsa/cards/AACI.conf
+share/alsa/cards/ATIIXP-MODEM.conf
+share/alsa/cards/ATIIXP-SPDMA.conf
+share/alsa/cards/ATIIXP.conf
+share/alsa/cards/AU8810.conf
+share/alsa/cards/AU8820.conf
+share/alsa/cards/AU8830.conf
+share/alsa/cards/Audigy.conf
+share/alsa/cards/Audigy2.conf
+share/alsa/cards/Aureon51.conf
+share/alsa/cards/Aureon71.conf
+share/alsa/cards/CA0106.conf
+share/alsa/cards/CMI8338-SWIEC.conf
+share/alsa/cards/CMI8338.conf
+share/alsa/cards/CMI8738-MC6.conf
+share/alsa/cards/CMI8738-MC8.conf
+share/alsa/cards/CMI8788.conf
+share/alsa/cards/CS46xx.conf
+share/alsa/cards/EMU10K1.conf
+share/alsa/cards/EMU10K1X.conf
+share/alsa/cards/ENS1370.conf
+share/alsa/cards/ENS1371.conf
+share/alsa/cards/ES1968.conf
+share/alsa/cards/Echo_Echo3G.conf
+share/alsa/cards/FM801.conf
+share/alsa/cards/FWSpeakers.conf
+share/alsa/cards/FireWave.conf
+share/alsa/cards/GUS.conf
+share/alsa/cards/HDA-Intel.conf
+share/alsa/cards/ICE1712.conf
+share/alsa/cards/ICE1724.conf
+share/alsa/cards/ICH-MODEM.conf
+share/alsa/cards/ICH.conf
+share/alsa/cards/ICH4.conf
+share/alsa/cards/Loopback.conf
+share/alsa/cards/Maestro3.conf
+share/alsa/cards/NFORCE.conf
+share/alsa/cards/PC-Speaker.conf
+share/alsa/cards/PMac.conf
+share/alsa/cards/PMacToonie.conf
+share/alsa/cards/PS3.conf
+share/alsa/cards/RME9636.conf
+share/alsa/cards/RME9652.conf
+share/alsa/cards/SB-XFi.conf
+share/alsa/cards/SI7018.conf
+share/alsa/cards/SI7018/sndoc-mixer.alisp
+share/alsa/cards/SI7018/sndop-mixer.alisp
+share/alsa/cards/TRID4DWAVENX.conf
+share/alsa/cards/USB-Audio.conf
+share/alsa/cards/VIA686A.conf
+share/alsa/cards/VIA8233.conf
+share/alsa/cards/VIA8233A.conf
+share/alsa/cards/VIA8237.conf
+share/alsa/cards/VX222.conf
+share/alsa/cards/VXPocket.conf
+share/alsa/cards/VXPocket440.conf
+share/alsa/cards/YMF744.conf
+share/alsa/cards/aliases.alisp
+share/alsa/cards/aliases.conf
+share/alsa/pcm/center_lfe.conf
+share/alsa/pcm/default.conf
+share/alsa/pcm/dmix.conf
+share/alsa/pcm/dpl.conf
+share/alsa/pcm/dsnoop.conf
+share/alsa/pcm/front.conf
+share/alsa/pcm/hdmi.conf
+share/alsa/pcm/iec958.conf
+share/alsa/pcm/modem.conf
+share/alsa/pcm/rear.conf
+share/alsa/pcm/side.conf
+share/alsa/pcm/surround21.conf
+share/alsa/pcm/surround40.conf
+share/alsa/pcm/surround41.conf
+share/alsa/pcm/surround50.conf
+share/alsa/pcm/surround51.conf
+share/alsa/pcm/surround71.conf
+share/alsa/smixer.conf
+share/alsa/sndo-mixer.alisp
+share/alsa/topology/broadwell/broadwell.conf
+share/alsa/ucm/DAISY-I2S/DAISY-I2S.conf
+share/alsa/ucm/DAISY-I2S/HiFi.conf
+share/alsa/ucm/GoogleNyan/GoogleNyan.conf
+share/alsa/ucm/GoogleNyan/HiFi.conf
+share/alsa/ucm/PAZ00/HiFi.conf
+share/alsa/ucm/PAZ00/PAZ00.conf
+share/alsa/ucm/PAZ00/Record.conf
+share/alsa/ucm/PandaBoard/FMAnalog
+share/alsa/ucm/PandaBoard/PandaBoard.conf
+share/alsa/ucm/PandaBoard/hifi
+share/alsa/ucm/PandaBoard/hifiLP
+share/alsa/ucm/PandaBoard/record
+share/alsa/ucm/PandaBoard/voice
+share/alsa/ucm/PandaBoard/voiceCall
+share/alsa/ucm/PandaBoardES/FMAnalog
+share/alsa/ucm/PandaBoardES/PandaBoardES.conf
+share/alsa/ucm/PandaBoardES/hifi
+share/alsa/ucm/PandaBoardES/hifiLP
+share/alsa/ucm/PandaBoardES/record
+share/alsa/ucm/PandaBoardES/voice
+share/alsa/ucm/PandaBoardES/voiceCall
+share/alsa/ucm/SDP4430/FMAnalog
+share/alsa/ucm/SDP4430/SDP4430.conf
+share/alsa/ucm/SDP4430/hifi
+share/alsa/ucm/SDP4430/hifiLP
+share/alsa/ucm/SDP4430/record
+share/alsa/ucm/SDP4430/voice
+share/alsa/ucm/SDP4430/voiceCall
+share/alsa/ucm/broadwell-rt286/HiFi
+share/alsa/ucm/broadwell-rt286/broadwell-rt286.conf
+share/alsa/ucm/tegraalc5632/tegraalc5632.conf
diff --git a/alsa-lib-git/buildlink3.mk b/alsa-lib-git/buildlink3.mk
new file mode 100644
index 0000000..4a15421
--- /dev/null
+++ b/alsa-lib-git/buildlink3.mk
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.3 2009/03/20 19:23:52 joerg Exp $
+
+BUILDLINK_TREE+=	alsa-lib
+
+.if !defined(ALSA_LIB_BUILDLINK3_MK)
+ALSA_LIB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.alsa-lib+=	alsa-lib>=1.0.18
+BUILDLINK_PKGSRCDIR.alsa-lib?=	../../audio/alsa-lib
+
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.endif # ALSA_LIB_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-alsa-lib
diff --git a/alsa-lib-git/builtin.mk b/alsa-lib-git/builtin.mk
new file mode 100644
index 0000000..96d3196
--- /dev/null
+++ b/alsa-lib-git/builtin.mk
@@ -0,0 +1,23 @@
+# $NetBSD: builtin.mk,v 1.1 2011/02/25 20:17:41 markd Exp $
+
+BUILTIN_PKG:=	alsa-lib
+
+PKGCONFIG_FILE.alsa-lib=	/usr/lib/pkgconfig/alsa.pc
+PKGCONFIG_BASE.alsa-lib=	/usr
+
+.include "../../mk/buildlink3/pkgconfig-builtin.mk"
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+
+CHECK_BUILTIN.alsa-lib?=      no
+.if !empty(CHECK_BUILTIN.alsa-lib:M[nN][oO])
+
+.  if !empty(USE_BUILTIN.alsa-lib:M[yY][eE][sS])
+BUILDLINK_PREFIX.alsa-lib=    /usr
+BUILDLINK_FILES.alsa-lib+=    lib/pkgconfig/alsa.pc
+.  endif
+
+.endif  # CHECK_BUILTIN.alsa-lib
diff --git a/alsa-lib-git/distinfo b/alsa-lib-git/distinfo
new file mode 100644
index 0000000..f4ceabc
--- /dev/null
+++ b/alsa-lib-git/distinfo
@@ -0,0 +1,53 @@
+$NetBSD: distinfo,v 1.20 2016/02/18 15:15:57 wiz Exp $
+
+SHA1 (alsa-lib-1.1.0.tar.bz2) = 94b9af685488221561a73ae285c4fddaa93663e4
+RMD160 (alsa-lib-1.1.0.tar.bz2) = 0a9ecf05c136ae025df7ab749db907ad81c4db8f
+SHA512 (alsa-lib-1.1.0.tar.bz2) = 2939d0b621c1c619b0a492b05f2e84f354d588c9cc982d93dbcf01c582319258dd5f803ff5c10be52343cd8827d690f671ab5b20ad586a0ee371f0949c9e98f4
+Size (alsa-lib-1.1.0.tar.bz2) = 929874 bytes
+SHA1 (patch-aa) = 5a8e9571ac6fb1f1f6cbd18d3859468a7b64076f
+SHA1 (patch-ad) = 43b9a214626bac91cf5b9afb19b6785b100fd7de
+SHA1 (patch-ae) = c2165e3b3d644eb42a6bc9260fb079adcb0da1ba
+SHA1 (patch-af) = b5d0a48da183c0725367b08abb24bf1fed85cb30
+SHA1 (patch-ag) = bea09d714bf75735f5be6d370f7242c34b73cb95
+SHA1 (patch-ah) = 3d2aa98ba2791c2beb152d7e3a454b8d6bb527d3
+SHA1 (patch-ai) = 9eb6c61d013f187267c40fdd4f1f466704507619
+SHA1 (patch-aj) = 82a5b4cf2501c94d4cc5e3275078d84ded1e7a79
+SHA1 (patch-ak) = 39a782c8882a86226f18137d33c70a3736c48cc6
+SHA1 (patch-al) = 76de42304d5ba90bf5e8def57f523c1ee910d9df
+SHA1 (patch-am) = 7b5cf015ec0612c1c4a9a864d42d84bba7a78e47
+SHA1 (patch-an) = c7253acaaf2aeb96310d14c9e03853bc4cd4d0cd
+SHA1 (patch-ao) = 25ac431685e033b165a9abdcd44246772c1f99b5
+SHA1 (patch-ap) = 3a3c8316b56997052d27f084ed178acbc49d1b17
+SHA1 (patch-aq) = 6a6cf97a17997a9ffc5d269ad2231fc0451bd532
+SHA1 (patch-ar) = 8823c573ac4f6ce038b1067f71a8de91e73bea20
+SHA1 (patch-as) = 946a179a675d6c5e03e0f7734ac97b0592806912
+SHA1 (patch-at) = 831c8b94e079a33057effcbee7113dfc3ca5533e
+SHA1 (patch-au) = 3dbf68b4ad655f2b2c91dcce8ca5daac6e80a361
+SHA1 (patch-av) = 5f145c3755bf510be6fb101e30d40e10b8dcbd6d
+SHA1 (patch-aw) = dfad5799001f9e1de7f5892b9a89bc4b6defd9e9
+SHA1 (patch-ax) = cab065c0b4fb697e21c058b3be1fc1665692ffd3
+SHA1 (patch-ay) = 889656f4627c108fdb8f6db7003c8f823efbc1f8
+SHA1 (patch-az) = 6664cb045360c770c80e8d0a7e8e7192d8267487
+SHA1 (patch-ba) = ab5b3fbd497e29c9b1e548e3f510fce7b994f5f3
+SHA1 (patch-bb) = 300c18e806b090cbe6dca1f133bbaace9625fb91
+SHA1 (patch-bc) = 0b034b98d536c4ab7f785420d0d51c3d0763d960
+SHA1 (patch-bd) = 63a102186f4df59da93bedaac772530e166a9fde
+SHA1 (patch-be) = e071d0f3518dac8bbda216d4bd850a2a3557b103
+SHA1 (patch-bf) = 10588dd9f8faac208b8f314676558c2c7da12063
+SHA1 (patch-bg) = 29c0fb6c1fb6a11e7f42778bdd965b9d25ddfd0c
+SHA1 (patch-bh) = a64e54b14946697fdc15b274238851fe8bd32106
+SHA1 (patch-bi) = b5038db277068034281787c0072201beae8df8ff
+SHA1 (patch-bj) = 5b7a36747e57e41eddb05cd1b1d9771a36b0c4f7
+SHA1 (patch-bk) = 55754e4d0ac947c2e7e59b604a21fb5798ae5b39
+SHA1 (patch-configure.ac) = 1c245e2ccd1a71f93847f0f2efab5e0b0c5c46b9
+SHA1 (patch-include_iatomic.h) = 7096f31a6b38c10b2e11a907f8431d33d98cce94
+SHA1 (patch-include_pcm.h) = 9558c5f5c80276632d27e0278cd33ee77d8281a5
+SHA1 (patch-include_sound_asoc.h) = d5c274e838f70c22c9e0ba94ef7b7db6f4310e74
+SHA1 (patch-include_sound_asound.h) = dc11957bc69f59a86284afc81c7719b3a955f7ad
+SHA1 (patch-src_conf.c) = 27795c60a05ced40c42dbfb474eed88f3b284cc6
+SHA1 (patch-src_control_control__hw.c) = 07cfe3abe586b32f6b989403cd162599da07e865
+SHA1 (patch-src_pcm_pcm__mmap.c) = 2d0f05aa53b30cef1ec083aa4f5d559d0a679058
+SHA1 (patch-src_seq_seq__midi__event.c) = 2a5de492d6ca19a0f0c564e8f5a065e5fc57ea5c
+SHA1 (patch-src_shmarea.c) = d6d0876ae7911ff16138bb82a3b1c79e795218cf
+SHA1 (patch-src_topology_tplg__local.h) = 121d138c68b9c1832c4b3cf2f0f24c72623dbce0
+SHA1 (patch-src_ucm_parser.c) = 3c376ae30f11d749ea5e41da89a72269710a3b10
diff --git a/alsa-lib-git/patches/patch-aa b/alsa-lib-git/patches/patch-aa
new file mode 100644
index 0000000..8fe8b59
--- /dev/null
+++ b/alsa-lib-git/patches/patch-aa
@@ -0,0 +1,15 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- aserver/aserver.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ aserver/aserver.c
+@@ -35,6 +35,10 @@
+ 
+ #include "aserver.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ char *command;
+ 
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
diff --git a/alsa-lib-git/patches/patch-ad b/alsa-lib-git/patches/patch-ad
new file mode 100644
index 0000000..e41e2db
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.6 2016/02/18 15:15:57 wiz Exp $
+
+--- include/global.h.orig	2015-11-09 07:39:18.000000000 +0000
++++ include/global.h
+@@ -30,6 +30,13 @@
+ 
+ /* for timeval and timespec */
+ #include <time.h>
++#if defined(__FreeBSD__)
++#include <sys/timespec.h>
++#endif
++
++#ifdef __sun
++#include <alloca.h>
++#endif
+ 
+ #ifdef __cplusplus
+ extern "C" {
+@@ -134,7 +141,7 @@ int snd_shm_area_destroy(struct snd_shm_
+ int snd_user_file(const char *file, char **result);
+ 
+ #ifdef __GLIBC__
+-#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
++#if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ struct timeval {
+ 	time_t		tv_sec;		/* seconds */
+ 	long		tv_usec;	/* microseconds */
diff --git a/alsa-lib-git/patches/patch-ae b/alsa-lib-git/patches/patch-ae
new file mode 100644
index 0000000..a43a0a8
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ae
@@ -0,0 +1,29 @@
+$NetBSD: patch-ae,v 1.7 2016/02/18 15:15:57 wiz Exp $
+
+ - Handle endian detection for assorted operating systems.
+ - Fix up linuxism.
+ - Don't assert GNU ld on Solaris, where it might not be true.
+
+--- include/local.h.orig	2015-11-09 07:39:18.000000000 +0000
++++ include/local.h
+@@ -50,8 +50,10 @@
+ #include <sys/poll.h>
+ #include <sys/types.h>
+ #include <errno.h>
++#if defined(__linux__)
+ #include <linux/types.h>
+ #include <linux/ioctl.h>
++#endif
+ 
+ #ifdef SUPPORT_RESMGR
+ #include <resmgr.h>
+@@ -249,7 +251,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/alsa-lib-git/patches/patch-af b/alsa-lib-git/patches/patch-af
new file mode 100644
index 0000000..a064c18
--- /dev/null
+++ b/alsa-lib-git/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- include/search.h.orig	2008-10-29 08:42:10.000000000 -0400
++++ include/search.h
+@@ -20,7 +20,17 @@
+ #ifndef _SEARCH_H
+ #define	_SEARCH_H 1
+ 
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !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
+ 
+ #define __need_size_t
+ #include <stddef.h>
diff --git a/alsa-lib-git/patches/patch-ag b/alsa-lib-git/patches/patch-ag
new file mode 100644
index 0000000..21d22d6
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ag
@@ -0,0 +1,15 @@
+$NetBSD: patch-ag,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/control/control_shm.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/control/control_shm.c
+@@ -35,6 +35,10 @@
+ #include <netdb.h>
+ #include "aserver.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_control_shm = "";
diff --git a/alsa-lib-git/patches/patch-ah b/alsa-lib-git/patches/patch-ah
new file mode 100644
index 0000000..44cbd8c
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ah
@@ -0,0 +1,24 @@
+$NetBSD: patch-ah,v 1.3 2014/06/09 12:21:07 ryoon Exp $
+
+--- src/pcm/pcm.c.orig	2013-07-08 12:31:36.000000000 +0000
++++ src/pcm/pcm.c
+@@ -630,7 +630,7 @@ playback devices.
+ 
+ #include <stdio.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <stdarg.h>
+ #include <signal.h>
+ #include <ctype.h>
+@@ -640,6 +640,10 @@ playback devices.
+ #include <limits.h>
+ #include "pcm_local.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ /**
+  * \brief get identifier of PCM handle
+  * \param pcm PCM handle
diff --git a/alsa-lib-git/patches/patch-ai b/alsa-lib-git/patches/patch-ai
new file mode 100644
index 0000000..7a21172
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ai
@@ -0,0 +1,14 @@
+$NetBSD: patch-ai,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_adpcm.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_adpcm.c
+@@ -56,7 +56,9 @@ IMA compatibility project proceedings, V
+   come across a good description of XA yet.
+  */
+ 
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-aj b/alsa-lib-git/patches/patch-aj
new file mode 100644
index 0000000..33ed0de
--- /dev/null
+++ b/alsa-lib-git/patches/patch-aj
@@ -0,0 +1,14 @@
+$NetBSD: patch-aj,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_alaw.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_alaw.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-ak b/alsa-lib-git/patches/patch-ak
new file mode 100644
index 0000000..8b3905e
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ak
@@ -0,0 +1,14 @@
+$NetBSD: patch-ak,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_copy.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_copy.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-al b/alsa-lib-git/patches/patch-al
new file mode 100644
index 0000000..209c067
--- /dev/null
+++ b/alsa-lib-git/patches/patch-al
@@ -0,0 +1,15 @@
+$NetBSD: patch-al,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_dmix.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_dmix.c
+@@ -45,6 +45,10 @@
+ #include <sys/mman.h>
+ #include "pcm_direct.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_dmix = "";
diff --git a/alsa-lib-git/patches/patch-am b/alsa-lib-git/patches/patch-am
new file mode 100644
index 0000000..16e2fa8
--- /dev/null
+++ b/alsa-lib-git/patches/patch-am
@@ -0,0 +1,14 @@
+$NetBSD: patch-am,v 1.5 2014/06/09 12:21:07 ryoon Exp $
+
+--- src/pcm/pcm_dmix_generic.c.orig	2013-07-08 12:31:36.000000000 +0000
++++ src/pcm/pcm_dmix_generic.c
+@@ -125,7 +125,9 @@ static void mix_select_callbacks(snd_pcm
+ 	 (1ULL << SND_PCM_FORMAT_S24_LE) | (1ULL << SND_PCM_FORMAT_S24_3LE) | \
+ 	 (1ULL << SND_PCM_FORMAT_U8))
+ 
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ 
+ static void generic_mix_areas_16_native(unsigned int size,
+ 					volatile signed short *dst,
diff --git a/alsa-lib-git/patches/patch-an b/alsa-lib-git/patches/patch-an
new file mode 100644
index 0000000..8417f2d
--- /dev/null
+++ b/alsa-lib-git/patches/patch-an
@@ -0,0 +1,15 @@
+$NetBSD: patch-an,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_dshare.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_dshare.c
+@@ -45,6 +45,10 @@
+ #include <sys/mman.h>
+ #include "pcm_direct.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_dshare = "";
diff --git a/alsa-lib-git/patches/patch-ao b/alsa-lib-git/patches/patch-ao
new file mode 100644
index 0000000..b39488f
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ao
@@ -0,0 +1,15 @@
+$NetBSD: patch-ao,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_dsnoop.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_dsnoop.c
+@@ -45,6 +45,10 @@
+ #include <sys/mman.h>
+ #include "pcm_direct.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_dsnoop = "";
diff --git a/alsa-lib-git/patches/patch-ap b/alsa-lib-git/patches/patch-ap
new file mode 100644
index 0000000..c288315
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ap
@@ -0,0 +1,14 @@
+$NetBSD: patch-ap,v 1.6 2016/02/18 15:15:57 wiz Exp $
+
+--- src/pcm/pcm_file.c.orig	2015-11-09 07:39:18.000000000 +0000
++++ src/pcm/pcm_file.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include <ctype.h>
+ #include <string.h>
+ #include "pcm_local.h"
diff --git a/alsa-lib-git/patches/patch-aq b/alsa-lib-git/patches/patch-aq
new file mode 100644
index 0000000..64f75f2
--- /dev/null
+++ b/alsa-lib-git/patches/patch-aq
@@ -0,0 +1,67 @@
+$NetBSD: patch-aq,v 1.3 2014/06/09 12:21:07 ryoon Exp $
+
+--- src/pcm/pcm_hw.c.orig	2013-07-08 12:31:36.000000000 +0000
++++ src/pcm/pcm_hw.c
+@@ -41,6 +41,10 @@
+ #include "../control/control_local.h"
+ #include "../timer/timer_local.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ //#define DEBUG_RW		/* use to debug readi/writei/readn/writen */
+ //#define DEBUG_MMAP		/* debug mmap_commit */
+ 
+@@ -220,10 +224,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 (%i)", err);
+@@ -238,13 +243,16 @@ static int snd_pcm_hw_async(snd_pcm_t *p
+ 		SYSMSG("F_SETFL for O_ASYNC failed (%i)", err);
+ 		return err;
+ 	}
++#endif
+ 	if (sig < 0)
+ 		return 0;
++#ifndef __sun
+ 	if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
+ 		err = -errno;
+ 		SYSMSG("F_SETSIG failed (%i)", err);
+ 		return err;
+ 	}
++#endif
+ 	if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
+ 		err = -errno;
+ 		SYSMSG("F_SETOWN failed (%i)", err);
+@@ -1407,8 +1415,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;
+@@ -1547,8 +1557,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/alsa-lib-git/patches/patch-ar b/alsa-lib-git/patches/patch-ar
new file mode 100644
index 0000000..ec63247
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ar
@@ -0,0 +1,14 @@
+$NetBSD: patch-ar,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_iec958.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_iec958.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-as b/alsa-lib-git/patches/patch-as
new file mode 100644
index 0000000..b1e4547
--- /dev/null
+++ b/alsa-lib-git/patches/patch-as
@@ -0,0 +1,15 @@
+$NetBSD: patch-as,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_ioplug.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_ioplug.c
+@@ -31,6 +31,10 @@
+ #include "pcm_ext_parm.h"
+ #include "pcm_generic.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_ioplug = "";
diff --git a/alsa-lib-git/patches/patch-at b/alsa-lib-git/patches/patch-at
new file mode 100644
index 0000000..2b258c4
--- /dev/null
+++ b/alsa-lib-git/patches/patch-at
@@ -0,0 +1,14 @@
+$NetBSD: patch-at,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_lfloat.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_lfloat.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-au b/alsa-lib-git/patches/patch-au
new file mode 100644
index 0000000..3d37746
--- /dev/null
+++ b/alsa-lib-git/patches/patch-au
@@ -0,0 +1,14 @@
+$NetBSD: patch-au,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_linear.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_linear.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-av b/alsa-lib-git/patches/patch-av
new file mode 100644
index 0000000..a14a7fc
--- /dev/null
+++ b/alsa-lib-git/patches/patch-av
@@ -0,0 +1,15 @@
+$NetBSD: patch-av,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_local.h.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_local.h
+@@ -393,6 +393,10 @@ int _snd_pcm_poll_descriptor(snd_pcm_t *
+ #define _snd_pcm_link_descriptor _snd_pcm_poll_descriptor /* FIXME */
+ #define _snd_pcm_async_descriptor _snd_pcm_poll_descriptor /* FIXME */
+ 
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
++
+ /* handle special error cases */
+ static inline int snd_pcm_check_error(snd_pcm_t *pcm, int err)
+ {
diff --git a/alsa-lib-git/patches/patch-aw b/alsa-lib-git/patches/patch-aw
new file mode 100644
index 0000000..3317476
--- /dev/null
+++ b/alsa-lib-git/patches/patch-aw
@@ -0,0 +1,20 @@
+$NetBSD: patch-aw,v 1.5 2014/03/25 23:06:07 asau 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,15 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#ifdef __NetBSD__
++#include <sys/bswap.h>
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/endian.h>
++#elif defined (__sun)
++#include <sys/byteorder.h>
++#else
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ 
+ 
diff --git a/alsa-lib-git/patches/patch-ax b/alsa-lib-git/patches/patch-ax
new file mode 100644
index 0000000..c773860
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ax
@@ -0,0 +1,14 @@
+$NetBSD: patch-ax,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_mulaw.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_mulaw.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
diff --git a/alsa-lib-git/patches/patch-ay b/alsa-lib-git/patches/patch-ay
new file mode 100644
index 0000000..4034334
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ay
@@ -0,0 +1,22 @@
+$NetBSD: patch-ay,v 1.5 2016/02/18 15:15:57 wiz Exp $
+
+--- src/pcm/pcm_null.c.orig	2015-11-09 07:39:18.000000000 +0000
++++ src/pcm/pcm_null.c
+@@ -26,11 +26,17 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include <limits.h>
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_null = "";
diff --git a/alsa-lib-git/patches/patch-az b/alsa-lib-git/patches/patch-az
new file mode 100644
index 0000000..3e18c87
--- /dev/null
+++ b/alsa-lib-git/patches/patch-az
@@ -0,0 +1,25 @@
+$NetBSD: patch-az,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_rate.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_rate.c
+@@ -28,7 +28,9 @@
+  *
+  */
+ #include <inttypes.h>
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ #include "pcm_rate.h"
+@@ -36,6 +38,10 @@
+ 
+ #include "plugin_ops.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #if 0
+ #define DEBUG_REFINE
+ #endif
diff --git a/alsa-lib-git/patches/patch-ba b/alsa-lib-git/patches/patch-ba
new file mode 100644
index 0000000..f6d330f
--- /dev/null
+++ b/alsa-lib-git/patches/patch-ba
@@ -0,0 +1,14 @@
+$NetBSD: patch-ba,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_rate_linear.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_rate_linear.c
+@@ -21,7 +21,9 @@
+  */
+ 
+ #include <inttypes.h>
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
+ #include "pcm_rate.h"
diff --git a/alsa-lib-git/patches/patch-bb b/alsa-lib-git/patches/patch-bb
new file mode 100644
index 0000000..e7659db
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bb
@@ -0,0 +1,14 @@
+$NetBSD: patch-bb,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_route.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_route.c
+@@ -26,7 +26,9 @@
+  *
+  */
+   
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include <math.h>
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
diff --git a/alsa-lib-git/patches/patch-bc b/alsa-lib-git/patches/patch-bc
new file mode 100644
index 0000000..0d7454e
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bc
@@ -0,0 +1,15 @@
+$NetBSD: patch-bc,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_share.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_share.c
+@@ -39,6 +39,10 @@
+ #include <pthread.h>
+ #include "pcm_local.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_share = "";
diff --git a/alsa-lib-git/patches/patch-bd b/alsa-lib-git/patches/patch-bd
new file mode 100644
index 0000000..556186d
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bd
@@ -0,0 +1,15 @@
+$NetBSD: patch-bd,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_shm.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_shm.c
+@@ -45,6 +45,10 @@
+ #include <netdb.h>
+ #include "aserver.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifndef PIC
+ /* entry for static linking */
+ const char *_snd_module_pcm_shm = "";
diff --git a/alsa-lib-git/patches/patch-be b/alsa-lib-git/patches/patch-be
new file mode 100644
index 0000000..15126a3
--- /dev/null
+++ b/alsa-lib-git/patches/patch-be
@@ -0,0 +1,15 @@
+$NetBSD: patch-be,v 1.1.1.1 2008/12/19 03:33:00 jmcneill Exp $
+
+--- src/pcm/pcm_simple.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_simple.c
+@@ -25,6 +25,10 @@
+ 
+ #include "pcm_local.h"
+ 
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ static int set_buffer_time(snd_spcm_latency_t latency,
+ 			   unsigned int *buffer_time)
+ {
diff --git a/alsa-lib-git/patches/patch-bf b/alsa-lib-git/patches/patch-bf
new file mode 100644
index 0000000..f9a27ac
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bf
@@ -0,0 +1,14 @@
+$NetBSD: patch-bf,v 1.4 2014/03/25 23:06:07 asau Exp $
+
+--- src/pcm/pcm_softvol.c.orig	2008-10-29 08:42:10.000000000 -0400
++++ src/pcm/pcm_softvol.c
+@@ -26,7 +26,9 @@
+  *
+  */
+ 
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include <math.h>
+ #include "pcm_local.h"
+ #include "pcm_plugin.h"
diff --git a/alsa-lib-git/patches/patch-bg b/alsa-lib-git/patches/patch-bg
new file mode 100644
index 0000000..242ed37
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bg
@@ -0,0 +1,42 @@
+$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
+@@ -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");
+ 		return -errno;
+ 	}
++#else
++	if (fcntl(fd, F_SETFL, O_ASYNC) < 0) {
++		SYSERR("F_SETFL failed");
++		return -errno;
++	}
++#endif
++#endif
+ 	if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
+ 		SYSERR("F_SETOWN failed");
+ 		return -errno;
diff --git a/alsa-lib-git/patches/patch-bh b/alsa-lib-git/patches/patch-bh
new file mode 100644
index 0000000..02bcc58
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bh
@@ -0,0 +1,14 @@
+$NetBSD: patch-bh,v 1.4 2014/03/25 23:06:07 asau 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
+@@ -27,7 +27,9 @@
+  */
+   
+ 
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__sun)
+ #include <byteswap.h>
++#endif
+ #include <time.h>
+ #include <pthread.h>
+ #include <dlfcn.h>
diff --git a/alsa-lib-git/patches/patch-bi b/alsa-lib-git/patches/patch-bi
new file mode 100644
index 0000000..beefafb
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bi
@@ -0,0 +1,12 @@
+$NetBSD: patch-bi,v 1.1 2008/12/19 05:14:00 jmcneill Exp $
+
+--- src/pcm/pcm_ladspa.c.orig	2008-12-19 00:06:18.000000000 -0500
++++ src/pcm/pcm_ladspa.c	2008-12-19 00:06:31.000000000 -0500
+@@ -33,6 +33,7 @@
+  */
+   
+ #include <dirent.h>
++#include <dlfcn.h>
+ #include <locale.h>
+ #include <math.h>
+ #include "pcm_local.h"
diff --git a/alsa-lib-git/patches/patch-bj b/alsa-lib-git/patches/patch-bj
new file mode 100644
index 0000000..d25e0d3
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bj
@@ -0,0 +1,22 @@
+$NetBSD: patch-bj,v 1.1 2008/12/25 13:18:00 hasso Exp $
+
+--- src/pcm/pcm_direct.c.orig	2008-12-25 07:49:08 +0200
++++ src/pcm/pcm_direct.c	2008-12-25 07:48:37 +0200
+@@ -44,7 +44,7 @@
+  *
+  */
+  
+-union semun {
++union semun_l {
+ 	int              val;    /* Value for SETVAL */
+ 	struct semid_ds *buf;    /* Buffer for IPC_STAT, IPC_SET */
+ 	unsigned short  *array;  /* Array for GETALL, SETALL */
+@@ -58,7 +58,7 @@ union semun {
+ 
+ int snd_pcm_direct_semaphore_create_or_connect(snd_pcm_direct_t *dmix)
+ {
+-	union semun s;
++	union semun_l s;
+ 	struct semid_ds buf;
+ 	int i;
+ 
diff --git a/alsa-lib-git/patches/patch-bk b/alsa-lib-git/patches/patch-bk
new file mode 100644
index 0000000..b7d53cc
--- /dev/null
+++ b/alsa-lib-git/patches/patch-bk
@@ -0,0 +1,28 @@
+$NetBSD: patch-bk,v 1.2 2014/03/25 23:06:07 asau Exp $
+
+--- src/async.c.orig	2008-12-25 08:18:22 +0200
++++ src/async.c	2008-12-25 08:20:39 +0200
+@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
+ 
+ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
+ {
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++	/* XXX XXX XXX */
++	struct list_head *i;
++	list_for_each(i, &snd_async_handlers) {
++		snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
++		if (h->callback)
++			h->callback(h);
++	}
++#else
+ 	int fd;
+ 	struct list_head *i;
+ 	//assert(siginfo->si_code == SI_SIGIO);
+@@ -60,6 +69,7 @@ static void snd_async_handler(int signo 
+ 		if (h->fd == fd && h->callback)
+ 			h->callback(h);
+ 	}
++#endif
+ }
+ 
+ /**
diff --git a/alsa-lib-git/patches/patch-configure.ac b/alsa-lib-git/patches/patch-configure.ac
new file mode 100644
index 0000000..f074f8a
--- /dev/null
+++ b/alsa-lib-git/patches/patch-configure.ac
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- configure.ac.orig	2016-02-24 08:33:29.000000000 +0000
++++ configure.ac
+@@ -86,6 +86,12 @@ AC_SUBST(ALSA_CONFIG_DIR)
+ dnl ALSA plugin directory
+ test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+ 
++case $host_os in
++  netbsd*|freebsd*|dragonfly*)
++    DEFS="$DEFS -Dbswap_32=bswap32 -Dbswap_16=bswap16 -Dbswap_64=bswap64"
++    ;;
++esac
++
+ AC_ARG_WITH(plugindir,
+     AS_HELP_STRING([--with-plugindir=dir],
+ 	[path where ALSA plugin files are stored]),
+@@ -665,6 +671,15 @@ AC_OUTPUT(Makefile doc/Makefile doc/pict
+ 	  test/Makefile test/lsb/Makefile \
+ 	  utils/Makefile utils/alsa-lib.spec utils/alsa.pc)
+ 
++case $host_os in
++  netbsd*|freebsd*|dragonfly*)
++    HAVE_LIBDL=yes
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_LIBDL 1
++_ACEOF
++    ;;
++esac
++
+ dnl Create asoundlib.h dynamically according to configure options
+ echo "Creating asoundlib.h..."
+ cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
diff --git a/alsa-lib-git/patches/patch-include_iatomic.h b/alsa-lib-git/patches/patch-include_iatomic.h
new file mode 100644
index 0000000..d112a30
--- /dev/null
+++ b/alsa-lib-git/patches/patch-include_iatomic.h
@@ -0,0 +1,19 @@
+$NetBSD: patch-include_iatomic.h,v 1.2 2016/02/18 15:15:57 wiz Exp $
+
+Use __asm__ and __volatile__
+
+--- include/iatomic.h.orig	2015-11-09 07:39:18.000000000 +0000
++++ include/iatomic.h
+@@ -9,9 +9,9 @@
+ #endif 
+ 
+ #ifdef __x86_64__
+-#define mb() 	asm volatile("mfence":::"memory")
+-#define rmb()	asm volatile("lfence":::"memory")
+-#define wmb()	asm volatile("sfence":::"memory")
++#define mb() 	__asm__ __volatile__ ("mfence":::"memory")
++#define rmb()	__asm__ __volatile__ ("lfence":::"memory")
++#define wmb()	__asm__ __volatile__ ("sfence":::"memory")
+ #define IATOMIC_DEFINED		1
+ #endif
+ 
diff --git a/alsa-lib-git/patches/patch-include_pcm.h b/alsa-lib-git/patches/patch-include_pcm.h
new file mode 100644
index 0000000..d6d44ba
--- /dev/null
+++ b/alsa-lib-git/patches/patch-include_pcm.h
@@ -0,0 +1,32 @@
+$NetBSD: patch-include_pcm.h,v 1.4 2014/06/09 12:21:07 ryoon Exp $
+
+--- include/pcm.h.orig	2013-07-08 12:31:36.000000000 +0000
++++ include/pcm.h
+@@ -579,7 +579,9 @@ int snd_pcm_chmap_print(const snd_pcm_ch
+ unsigned int snd_pcm_chmap_from_string(const char *str);
+ snd_pcm_chmap_t *snd_pcm_chmap_parse_string(const char *str);
+ 
++/*
+ //int snd_pcm_mixer_element(snd_pcm_t *pcm, snd_mixer_t *mixer, snd_mixer_elem_t **elem);
++ */
+ 
+ /*
+  * application helpers - these functions are implemented on top
+@@ -1048,10 +1050,17 @@ 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);
++#ifdef __sun
++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);
++#else
+ 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);
++#endif
+ 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/alsa-lib-git/patches/patch-include_sound_asoc.h b/alsa-lib-git/patches/patch-include_sound_asoc.h
new file mode 100644
index 0000000..860c434
--- /dev/null
+++ b/alsa-lib-git/patches/patch-include_sound_asoc.h
@@ -0,0 +1,21 @@
+$NetBSD: patch-include_sound_asoc.h,v 1.1 2016/02/18 15:15:57 wiz Exp $
+
+--- include/sound/asoc.h.orig	2015-11-09 07:39:18.000000000 +0000
++++ include/sound/asoc.h
+@@ -111,6 +111,16 @@
+  * Block Header.
+  * This header precedes all object and object arrays below.
+  */
++#ifndef __le16
++#define __le16 uint16_t
++#endif
++#ifndef __le32
++#define __le32 uint32_t
++#endif
++#ifndef __le64
++#define __le64 uint64_t
++#endif
++
+ struct snd_soc_tplg_hdr {
+ 	__le32 magic;		/* magic number */
+ 	__le32 abi;		/* ABI version */
diff --git a/alsa-lib-git/patches/patch-include_sound_asound.h b/alsa-lib-git/patches/patch-include_sound_asound.h
new file mode 100644
index 0000000..118cdb6
--- /dev/null
+++ b/alsa-lib-git/patches/patch-include_sound_asound.h
@@ -0,0 +1,32 @@
+$NetBSD: patch-include_sound_asound.h,v 1.2 2016/02/18 15:15:57 wiz Exp $
+
+--- include/sound/asound.h.orig	2015-11-09 07:39:18.000000000 +0000
++++ include/sound/asound.h
+@@ -23,8 +23,14 @@
+ #ifndef _UAPI__SOUND_ASOUND_H
+ #define _UAPI__SOUND_ASOUND_H
+ 
++#if defined(__linux__)
+ #include <linux/types.h>
+-
++#else
++#include <sys/ioctl.h>
++#define __bitwise
++typedef uint32_t __u32;
++typedef int __kernel_pid_t;
++#endif
+ #ifndef __KERNEL__
+ #include <stdlib.h>
+ #endif
+@@ -415,7 +421,11 @@ struct snd_pcm_sw_params {
+ 
+ struct snd_pcm_channel_info {
+ 	unsigned int channel;
++#ifdef __linux__
+ 	__kernel_off_t offset;		/* mmap offset */
++#else
++	off_t offset;		/* mmap offset */
++#endif
+ 	unsigned int first;		/* offset to first sample in bits */
+ 	unsigned int step;		/* samples distance in bits */
+ };
diff --git a/alsa-lib-git/patches/patch-src_conf.c b/alsa-lib-git/patches/patch-src_conf.c
new file mode 100644
index 0000000..d423719
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_conf.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_conf.c,v 1.4 2016/02/18 15:15:57 wiz Exp $
+
+* NetBSD has no PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+* SunOS has no versionsort or dirent d_type
+
+--- src/conf.c.orig	2015-11-09 07:39:18.000000000 +0000
++++ src/conf.c
+@@ -3419,11 +3419,19 @@ static int snd_config_hooks(snd_config_t
+ 
+ static int config_filename_filter(const struct dirent *dirent)
+ {
++#ifdef __sun
++	struct stat s;
++#endif
+ 	size_t flen;
+ 
+ 	if (dirent == NULL)
+ 		return 0;
++#ifdef __sun
++	stat(dirent->d_name, &s);
++	if (s.st_mode & S_IFDIR)
++#else
+ 	if (dirent->d_type == DT_DIR)
++#endif
+ 		return 0;
+ 
+ 	flen = strlen(dirent->d_name);
+@@ -3549,7 +3557,7 @@ int snd_config_hook_load(snd_config_t *r
+ 			int n;
+ 
+ #ifndef DOC_HIDDEN
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
+ #define SORTFUNC	versionsort
+ #else
+ #define SORTFUNC	alphasort
diff --git a/alsa-lib-git/patches/patch-src_control_control__hw.c b/alsa-lib-git/patches/patch-src_control_control__hw.c
new file mode 100644
index 0000000..7d0b15d
--- /dev/null
+++ b/alsa-lib-git/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);
diff --git a/alsa-lib-git/patches/patch-src_pcm_pcm__mmap.c b/alsa-lib-git/patches/patch-src_pcm_pcm__mmap.c
new file mode 100644
index 0000000..95af12a
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_pcm_pcm__mmap.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_pcm_pcm__mmap.c,v 1.2 2016/02/18 15:15:57 wiz Exp $
+
+--- src/pcm/pcm_mmap.c.orig	2015-11-09 07:39:18.000000000 +0000
++++ src/pcm/pcm_mmap.c
+@@ -20,7 +20,7 @@
+ 
+ #include "config.h"
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/poll.h>
+ #include <sys/mman.h>
diff --git a/alsa-lib-git/patches/patch-src_seq_seq__midi__event.c b/alsa-lib-git/patches/patch-src_seq_seq__midi__event.c
new file mode 100644
index 0000000..e11b42b
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_seq_seq__midi__event.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_seq_seq__midi__event.c,v 1.1 2014/03/25 23:06:07 asau Exp $
+
+--- src/seq/seq_midi_event.c.orig	2009-12-16 15:18:51.000000000 +0000
++++ src/seq/seq_midi_event.c
+@@ -28,7 +28,7 @@
+  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+  */
+ 
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "local.h"
+ 
+ #ifndef DOC_HIDDEN
diff --git a/alsa-lib-git/patches/patch-src_shmarea.c b/alsa-lib-git/patches/patch-src_shmarea.c
new file mode 100644
index 0000000..8547999
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_shmarea.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_shmarea.c,v 1.2 2016/02/18 15:15:57 wiz Exp $
+
+--- src/shmarea.c.orig	2015-11-09 07:39:18.000000000 +0000
++++ src/shmarea.c
+@@ -24,7 +24,7 @@
+ #ifdef HAVE_SYS_SHM_H
+ 
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/poll.h>
diff --git a/alsa-lib-git/patches/patch-src_topology_tplg__local.h b/alsa-lib-git/patches/patch-src_topology_tplg__local.h
new file mode 100644
index 0000000..8ecf473
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_topology_tplg__local.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_topology_tplg__local.h,v 1.1 2016/02/18 15:15:57 wiz Exp $
+
+--- src/topology/tplg_local.h.orig	2016-02-24 08:33:29.000000000 +0000
++++ src/topology/tplg_local.h
+@@ -13,8 +13,10 @@
+ #include <limits.h>
+ #include <stdint.h>
+ #include <stdbool.h>
++#ifdef __linux__
+ #include <endian.h>
+ #include <linux/types.h>
++#endif
+ 
+ #include "local.h"
+ #include "list.h"
diff --git a/alsa-lib-git/patches/patch-src_ucm_parser.c b/alsa-lib-git/patches/patch-src_ucm_parser.c
new file mode 100644
index 0000000..e5d2cde
--- /dev/null
+++ b/alsa-lib-git/patches/patch-src_ucm_parser.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_ucm_parser.c,v 1.3 2014/06/26 20:23:14 asau Exp $
+
+* NetBSD has no versionsort
+* FreeBSD doesn't have it either
+* SunOS has no versionsort or dirent d_type
+
+--- src/ucm/parser.c.orig	2013-07-08 12:31:36.000000000 +0000
++++ src/ucm/parser.c
+@@ -1224,9 +1224,17 @@ int uc_mgr_import_master_config(snd_use_
+ 
+ static int filename_filter(const struct dirent *dirent)
+ {
++#ifdef __sun
++	struct stat s;
++#endif
+ 	if (dirent == NULL)
+ 		return 0;
++#ifdef __sun
++	stat(dirent->d_name, &s);
++	if (s.st_mode & S_IFDIR) {
++#else
+ 	if (dirent->d_type == DT_DIR) {
++#endif
+ 		if (dirent->d_name[0] == '.') {
+ 			if (dirent->d_name[1] == '\0')
+ 				return 0;
+@@ -1254,7 +1262,7 @@ int uc_mgr_scan_master_configs(const cha
+ 		"%s", env ? env : ALSA_USE_CASE_DIR);
+ 	filename[MAX_FILE-1] = '\0';
+ 
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
+ #define SORTFUNC	versionsort
+ #else
+ #define SORTFUNC	alphasort


Home | Main Index | Thread Index | Old Index