diff options
author | jlam <jlam@pkgsrc.org> | 2002-08-22 08:21:26 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-08-22 08:21:26 +0000 |
commit | b119dbc8efa99f4f13917497dfc754c8c6198d85 (patch) | |
tree | 69a889ca0e05738ba516fadb4850a77ad43da185 /mk/ossaudio.buildlink2.mk | |
parent | f53ae645aa36bf9dbeb34fce513f5a6eb2a37fd2 (diff) | |
download | pkgsrc-b119dbc8efa99f4f13917497dfc754c8c6198d85.tar.gz |
Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.
Diffstat (limited to 'mk/ossaudio.buildlink2.mk')
-rw-r--r-- | mk/ossaudio.buildlink2.mk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mk/ossaudio.buildlink2.mk b/mk/ossaudio.buildlink2.mk new file mode 100644 index 00000000000..af3b1991b48 --- /dev/null +++ b/mk/ossaudio.buildlink2.mk @@ -0,0 +1,40 @@ +# $NetBSD: ossaudio.buildlink2.mk,v 1.2 2002/08/22 08:21:27 jlam Exp $ + +.if !defined(OSSAUDIO_BUILDLINK2_MK) +OSSAUDIO_BUILDLINK2_MK= # defined + +.include "../../mk/bsd.prefs.mk" + +.if ${_OPSYS_HAS_OSSAUDIO} == "yes" +BUILDLINK_PREFIX.ossaudio= /usr +BUILDLINK_FILES.ossaudio= lib/libossaudio.* + +BUILDLINK_TARGETS+= ossaudio-buildlink +BUILDLINK_TARGETS+= ossaudio-buildlink-soundcard-h + +LIBOSSAUDIO?= -lossaudio +MAKE_ENV+= LIBOSSAUDIO="${LIBOSSAUDIO}" + +ossaudio-buildlink: _BUILDLINK_USE + +# Many programs expect <soundcard.h> to be found as <sys/soundcard.h>. +# Also include <sys/ioctl.h> prior to include <soundcard.h> since we need +# definitions for _IOWR and friends. +# +ossaudio-buildlink-soundcard-h: + ${_PKG_SILENT}${_PKG_DEBUG} \ + sys_soundcard_h=${BUILDLINK_DIR}/include/sys/soundcard.h; \ + if [ ! -f $${sys_soundcard_h} -a \ + -f ${BUILDLINK_PREFIX.ossaudio}/include/soundcard.h ]; then \ + ${ECHO_BUILDLINK_MSG} "Creating $${sys_soundcard_h}."; \ + ${MKDIR} `${DIRNAME} $${sys_soundcard_h}`; \ + ( ${ECHO} "#ifndef BUILDLINK_SYS_SOUNDCARD_H"; \ + ${ECHO} "#define BUILDLINK_SYS_SOUNDCARD_H"; \ + ${ECHO} "#include <sys/ioctl.h>"; \ + ${ECHO} "#include <soundcard.h>"; \ + ${ECHO} "#endif"; \ + ) > $${sys_soundcard_h}; \ + fi +.endif + +.endif # OSSAUDIO_BUILDLINK2_MK |