+# $NetBSD$
+#
+
+DISTNAME= jack-1.9.5
+CATEGORIES= audio
+MASTER_SITES= http://www.grame.fr/~letz/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= pho@cielonegro.org
+HOMEPAGE= http://jackaudio.org/
+COMMENT= JACK low-latency audio server (JACK2)
+LICENSE= gnu-lgpl-v2.1
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+PKGCONFIG_OVERRIDE+= jack.pc.in
+
+# Only for ./waf
+PYTHON_FOR_BUILD_ONLY= yes
+
+# -----------------------------------------
+# Tweak PLIST depending on the platforms...
+#
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+= darwin
+
+.if ${OPSYS} == "Darwin"
+PLIST.darwin= yes
+.endif
+
+PRINT_PLIST_AWK+= \
+ /^lib\/jack\/jack_core(audio|midi)\.so$$/ { print "$${PLIST.darwin}" $$0; next; } \
+ /\.dylib(\.[0-9]+)*$$/ { print "$${PLIST.darwin}" $$0; next; }
+# -----------------------------------------
+
+# The bundled waf 1.5.0 is too old for Darwin.
+post-extract:
+ ${CP} ${FILESDIR}/waf-1.5.19 ${WRKSRC}/waf
+
+do-configure:
+ ${RUN} cd ${WRKSRC} && \
+ ./waf configure --prefix=${PREFIX:Q}
+
+do-build:
+ ${RUN} cd ${WRKSRC} && \
+ ./waf build
+
+do-install:
+ ${RUN} cd ${WRKSRC} && \
+ ./waf install --destdir=${DESTDIR:Q}
+
+.include "../../audio/celt/buildlink3.mk" #
+.include "../../audio/libsamplerate/buildlink3.mk" #
+.include "../../audio/libsndfile/buildlink3.mk" #
+.include "../../devel/ncurses/buildlink3.mk" #
+.include "../../devel/readline/buildlink3.mk" # make them options (and more)
+.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.pkg.mk"