pkgsrc-WIP-changes archive

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

adplay: fix hardcoded audio device, and link ossaudio conditionally.



Module Name:	pkgsrc-wip
Committed By:	Frederic Cambus <fred%statdns.com@localhost>
Pushed By:	fcambus
Date:		Tue Sep 10 10:05:49 2019 +0200
Changeset:	80f2a470acf1ce297920d2a6bd43b504156e103f

Modified Files:
	adplay/Makefile

Log Message:
adplay: fix hardcoded audio device, and link ossaudio conditionally.

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

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

diffstat:
 adplay/Makefile | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diffs:
diff --git a/adplay/Makefile b/adplay/Makefile
index 30202a6fde..ebf959b9e6 100644
--- a/adplay/Makefile
+++ b/adplay/Makefile
@@ -12,18 +12,31 @@ HOMEPAGE=	https://github.com/adplug/adplay-unix
 COMMENT=	Console-based OPL2 audio player
 LICENSE=	gnu-gpl-v2
 
+.include "../../mk/oss.buildlink3.mk"
+
+.if ${OSS_TYPE} != "none"
+SUBST_CLASSES+=		oss
+SUBST_STAGE.oss=	pre-configure
+SUBST_FILES.oss=	src/oss.cc doc/adplay.1
+SUBST_SED.oss=		-e s,/dev/dsp,${DEVOSSAUDIO},g
+SUBST_MESSAGE.oss=	Fixing hardcoded audio device.
+.endif
+
 GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
 USE_LANGUAGES=	c c++
 USE_TOOLS+=	pkg-config
 
-CONFIGURE_ARGS=	--disable-output-ao \
-		--disable-output-esound \
-		--disable-output-alsa \
-		--disable-output-sdl
+CONFIGURE_ARGS+=	--disable-output-ao \
+			--disable-output-esound \
+			--disable-output-alsa \
+			--disable-output-sdl
 
-LDFLAGS+=	-lossaudio
+.if ${OSS_TYPE} != "none"
+LDFLAGS+=		-lossaudio
+.else
+CONFIGURE_ARGS+=	--disable-output-oss
+.endif
 
 .include "../../audio/adplug/buildlink3.mk"
-.include "../../mk/oss.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index