pkgsrc-WIP-changes archive

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

alure: Use build options



Module Name:	pkgsrc-wip
Committed By:	bgermann <bastiangermann%fishpost.de@localhost>
Pushed By:	bgermann
Date:		Fri Aug 31 18:21:50 2018 +0200
Changeset:	927cc6ae2af5e169caf7a132ce223840633b3e0f

Modified Files:
	alure/Makefile
	alure/buildlink3.mk
Added Files:
	alure/options.mk

Log Message:
alure: Use build options

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

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

diffstat:
 alure/Makefile      |  9 ++-------
 alure/buildlink3.mk |  1 +
 alure/options.mk    | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 7 deletions(-)

diffs:
diff --git a/alure/Makefile b/alure/Makefile
index e33d6456a6..53055fb34d 100644
--- a/alure/Makefile
+++ b/alure/Makefile
@@ -12,16 +12,11 @@ LICENSE=	mit
 USE_CMAKE=	yes
 USE_TOOLS+=	pkg-config
 USE_LANGUAGES=	c c++
-CMAKE_ARGS+=	-DDUMB=OFF -DDYNLOAD=OFF -DMODPLUG=ON
+CMAKE_ARGS+=	-DDUMB=OFF -DDYNLOAD=OFF
 
 PKGCONFIG_OVERRIDE+=	alure-static.pc.in
 PKGCONFIG_OVERRIDE+=	alure.pc.in
 
-.include "../../audio/flac/buildlink3.mk"
-.include "../../audio/fluidsynth/buildlink3.mk"
-.include "../../audio/libmodplug/buildlink3.mk"
-.include "../../audio/libsndfile/buildlink3.mk"
-.include "../../audio/libvorbis/buildlink3.mk"
-.include "../../audio/mpg123/buildlink3.mk"
+.include "options.mk"
 .include "../../audio/openal-soft/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/alure/buildlink3.mk b/alure/buildlink3.mk
index 5cb28e6580..f791a99995 100644
--- a/alure/buildlink3.mk
+++ b/alure/buildlink3.mk
@@ -8,6 +8,7 @@ ALURE_BUILDLINK3_MK:=
 BUILDLINK_API_DEPENDS.alure+=	alure>=1.2
 BUILDLINK_PKGSRCDIR.alure?=	../../audio/alure
 
+.include "options.mk"
 .include "../../audio/openal-soft/buildlink3.mk"
 .endif	# ALURE_BUILDLINK3_MK
 
diff --git a/alure/options.mk b/alure/options.mk
new file mode 100644
index 0000000000..6406ff6579
--- /dev/null
+++ b/alure/options.mk
@@ -0,0 +1,48 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.alure
+PKG_SUPPORTED_OPTIONS=	flac fluidsynth modplug mpg123 sndfile vorbis
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mflac)
+CMAKE_ARGS+=	-DFLAC=ON
+.include "../../audio/flac/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DFLAC=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mfluidsynth)
+CMAKE_ARGS+=	-DFLUIDSYNTH=ON
+.include "../../audio/fluidsynth/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DFLUIDSYNTH=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mmodplug)
+CMAKE_ARGS+=	-DMODPLUG=ON
+.include "../../audio/libmodplug/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DMODPLUG=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Msndfile)
+CMAKE_ARGS+=	-DSNDFILE=ON
+.include "../../audio/libsndfile/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DSNDFILE=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mvorbis)
+CMAKE_ARGS+=	-DVORBIS=ON
+.include "../../audio/libvorbis/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DVORBIS=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mmpg123)
+CMAKE_ARGS+=	-DMPG123=ON
+.include "../../audio/mpg123/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DMPG123=OFF
+.endif


Home | Main Index | Thread Index | Old Index