git: ce1e733047cf - main - emulators/wine-devel: Allow choosing between OSS and ALSA

From: Gerald Pfeifer <gerald_at_FreeBSD.org>
Date: Mon, 18 Apr 2022 14:57:47 UTC
The branch main has been updated by gerald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ce1e733047cfa6bdea3d1bfb767814c7fa2a9809

commit ce1e733047cfa6bdea3d1bfb767814c7fa2a9809
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2022-04-18 14:18:19 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2022-04-18 14:48:37 +0000

    emulators/wine-devel: Allow choosing between OSS and ALSA
    
    Our Wine ports have solely relied on OSS for sound so far. Add
    support to optionally switch to ALSA by establishing two options,
    OSS and ALSA.
    
    This does not change default behavior (and packages created), rather
    it adds the ability to choose. It particularly may prove beneficial
    for USB MIDI keyboards.
    
    Submitted by:   hselasky
    Approved by:    damjan.jov@gmail.com (maintainer)
---
 emulators/wine-devel/Makefile | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/emulators/wine-devel/Makefile b/emulators/wine-devel/Makefile
index fb7aac124a23..7a798c18eebf 100644
--- a/emulators/wine-devel/Makefile
+++ b/emulators/wine-devel/Makefile
@@ -33,7 +33,6 @@ GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--verbose \
 		--disable-kerberos \
 		--disable-tests \
-		--without-alsa \
 		--without-capi \
 		--without-coreaudio \
 		--without-dbus \
@@ -47,7 +46,6 @@ CONFIGURE_ARGS+=--verbose \
 		--without-netapi \
 		--without-opencl \
 		--without-osmesa \
-		--with-oss \
 		--with-pcap \
 		--with-pthread \
 		--without-pulse \
@@ -72,7 +70,9 @@ SUB_FILES=	pkg-message
 PORTDATA=	wine.inf
 
 OPTIONS_DEFINE=	CUPS DOCS DOSBOX GNUTLS LDAP OPENAL STAGING V4L WINEMAKER X11 GECKO MONO
-OPTIONS_DEFAULT=GNUTLS OPENAL X11
+OPTIONS_DEFAULT=GNUTLS OPENAL OSS X11
+OPTIONS_RADIO=	AUDIO
+OPTIONS_RADIO_AUDIO=	ALSA OSS
 OPTIONS_SUB=	yes
 
 DOSBOX_DESC=	Use DOSBox to run MS-DOS programs
@@ -81,6 +81,9 @@ WINEMAKER_DESC=	Fully support winemaker (requires Perl)
 GECKO_DESC=	Bundle Gecko MSI package for Wine
 MONO_DESC=	Bundle Mono MSI package for Wine
 
+ALSA_CONFIGURE_ON=	--with-alsa --without-oss
+ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
+
 CUPS_CONFIGURE_WITH=	cups
 CUPS_LIB_DEPENDS=	libcups.so:print/cups
 
@@ -99,6 +102,8 @@ MONO_RUN_DEPENDS=	wine-mono-devel>0:emulators/wine-mono-devel
 OPENAL_CONFIGURE_WITH=	openal
 OPENAL_USES=		openal
 
+OSS_CONFIGURE_ON=	--without-alsa --with-oss
+
 STAGING_MASTER_SITES=	https://github.com/wine-staging/wine-staging/archive/:staging
 STAGING_DIST=		v${DISTVERSION}.tar.gz
 STAGING_DISTFILES=	${STAGING_DIST}:staging