diff options
author | jlam <jlam@pkgsrc.org> | 2001-07-14 15:43:18 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-07-14 15:43:18 +0000 |
commit | bca806a5de01694fefb1d48c6c3cc4a5767f4cd8 (patch) | |
tree | ad24fa1081a296f3f6e2445ff52a4b8e4ff33628 /mk/ossaudio.buildlink.mk | |
parent | 50ccd0c170484090feda35b3b22a777809456739 (diff) | |
download | pkgsrc-bca806a5de01694fefb1d48c6c3cc4a5767f4cd8.tar.gz |
Add a buildlink.mk file to put OSS audio headers and libraries into
${BUILDLINK_DIR} in Linuxish locations.
Diffstat (limited to 'mk/ossaudio.buildlink.mk')
-rw-r--r-- | mk/ossaudio.buildlink.mk | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mk/ossaudio.buildlink.mk b/mk/ossaudio.buildlink.mk new file mode 100644 index 00000000000..eca3ce831c3 --- /dev/null +++ b/mk/ossaudio.buildlink.mk @@ -0,0 +1,46 @@ +# $NetBSD: ossaudio.buildlink.mk,v 1.1 2001/07/14 15:43:18 jlam Exp $ +# +# This Makefile fragment is included by packages that use OSS audio. +# +# To use this Makefile fragment, simply: +# +# (1) Include this Makefile fragment in the package Makefile, +# (2) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (3) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(OSSAUDIO_BUILDLINK_MK) +OSSAUDIO_BUILDLINK_MK= # defined + +.include "../../mk/bsd.buildlink.mk" + +BUILDLINK_PREFIX.ossaudio= /usr +BUILDLINK_FILES.ossaudio= lib/libossaudio.* + +BUILDLINK_TARGETS.ossaudio= ossaudio-buildlink +BUILDLINK_TARGETS.ossaudio+= ossaudio-buildlink-soundcard-h +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.ossaudio} + +pre-configure: ${BUILDLINK_TARGETS.ossaudio} +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} ]; then \ + ${ECHO_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 # OSSAUDIO_BUILDLINK_MK |