pkgsrc-WIP-changes archive

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

rtaudio: add options.mk



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Sun Dec 26 13:14:59 2021 +0100
Changeset:	f5b15465cb6c2d32801e160b1469fb43c8cba47e

Modified Files:
	rtaudio/Makefile
Added Files:
	rtaudio/options.mk

Log Message:
rtaudio: add options.mk

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

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

diffstat:
 rtaudio/Makefile   |  5 +++--
 rtaudio/options.mk | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 2 deletions(-)

diffs:
diff --git a/rtaudio/Makefile b/rtaudio/Makefile
index 4567bc7516..e6259d498c 100644
--- a/rtaudio/Makefile
+++ b/rtaudio/Makefile
@@ -18,6 +18,7 @@ CMAKE_ARGS+=	-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON
 
 PKGCONFIG_OVERRIDE+=	rtaudio.pc.in
 
-.include "../../audio/jack/buildlink3.mk"
-.include "../../audio/pulseaudio/buildlink3.mk"
+.include "options.mk"
+
+.include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/rtaudio/options.mk b/rtaudio/options.mk
new file mode 100644
index 0000000000..26f1384e20
--- /dev/null
+++ b/rtaudio/options.mk
@@ -0,0 +1,52 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.rtaudio
+PKG_OPTIONS_SET.driver=		alsa coreaudio jack oss pulseaudio
+PKG_OPTIONS_NONEMPTY_SETS=	driver
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SUGGESTED_OPTIONS=	jack pulseaudio
+
+.if ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+=	alsa
+.endif
+
+.if ${OPSYS} == "Darwin"
+PKG_SUGGESTED_OPTIONS+=	coreaudio
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CMAKE_ARGS+=	-DRTAUDIO_API_ALSA=ON
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DRTAUDIO_API_ALSA=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mcoreaudio)
+CMAKE_ARGS+=	-DRTAUDIO_API_CORE=ON
+.else
+CMAKE_ARGS+=	-DRTAUDIO_API_CORE=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+CMAKE_ARGS+=	-DRTAUDIO_API_JACK=ON
+.include "../../audio/jack/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DRTAUDIO_API_JACK=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Moss)
+CMAKE_ARGS+=	-DRTAUDIO_API_OSS=ON
+.else
+CMAKE_ARGS+=	-DRTAUDIO_API_OSS=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CMAKE_ARGS+=	-DRTAUDIO_API_PULSE=ON
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DRTAUDIO_API_PULSE=OFF
+.endif


Home | Main Index | Thread Index | Old Index