aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-02-12 14:11:36 +0800
committerwill <will@FreeBSD.org>2001-02-12 14:11:36 +0800
commit875bed125b97cc2db855b153e0aaee9baec48c88 (patch)
tree0c68fc15ec07f262c20d3d2ff6f9647d6b1e6743 /audio
parent4c34a64b53a5456348c4b48fd131258185904d0d (diff)
downloadfreebsd-ports-gnome-875bed125b97cc2db855b153e0aaee9baec48c88.tar.gz
freebsd-ports-gnome-875bed125b97cc2db855b153e0aaee9baec48c88.tar.zst
freebsd-ports-gnome-875bed125b97cc2db855b153e0aaee9baec48c88.zip
Make sure the user doesn't have any stray files from previous attempts to
compile aureal in their kernel statically (yes, having them there does break the aureal module). Modularize the makefile using SRCPREFIX, which can be changed in the environment. Approved in principle by: maintainer (except SRCPREFIX)
Diffstat (limited to 'audio')
-rw-r--r--audio/aureal-kmod/Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/audio/aureal-kmod/Makefile b/audio/aureal-kmod/Makefile
index 1547effd256b..370bd6cd68ab 100644
--- a/audio/aureal-kmod/Makefile
+++ b/audio/aureal-kmod/Makefile
@@ -17,6 +17,8 @@ MAINTAINER= matey@cis.ohio-state.edu
NO_PACKAGE= Should be in sync with the kernel to work correctly
ONLY_FOR_ARCHS= i386
+SRCPREFIX?= /usr/src
+STRAYFILES= au88x0.h au88x0.c asp10.o asp20.o asp30.o
WRKSRC= ${WRKDIR}
@@ -26,9 +28,9 @@ MAKE_ENV= WRKSRC="${WRKSRC}"
.include <bsd.port.pre.mk>
-.if exists(/usr/src/sys/dev/sound/pcm/sound.c)
+.if exists(${SRCPREFIX}/sys/dev/sound/pcm/sound.c)
VERSION_SOUND_C!= ${AWK} '/.*\$$FreeBSD/ { print $$4; exit; }' \
- /usr/src/sys/dev/sound/pcm/sound.c
+ ${SRCPREFIX}/sys/dev/sound/pcm/sound.c
.else
VERSION_SOUND_C=
.endif
@@ -64,7 +66,23 @@ DISTNAME= au88x0-${PORTVERSION}_${PORTREVISION}
.endif
pre-fetch:
- @if [ ! -d /sys -o ! -d /usr/src/sys ]; then \
+.for STRAY in ${STRAYFILES}
+.if exists(${SRCPREFIX}/sys/dev/sound/pci/${STRAY})
+ @${ECHO}
+ @${ECHO} "You have stray code in your tree. Make sure you"
+ @${ECHO} "do not have any of the following:"
+ @${ECHO}
+ @${ECHO} "${SRCPREFIX}/sys/dev/sound/pci/au88x0.c"
+ @${ECHO} "${SRCPREFIX}/sys/dev/sound/pci/au88x0.h"
+ @${ECHO} "${SRCPREFIX}/sys/dev/sound/pci/asp10.o"
+ @${ECHO} "${SRCPREFIX}/sys/dev/sound/pci/asp20.o"
+ @${ECHO} "${SRCPREFIX}/sys/dev/sound/pci/asp30.o"
+ @${ECHO}
+ @${FALSE}
+.endif
+.endfor
+
+ @if [ ! -d /sys -o ! -d ${SRCPREFIX}/sys ]; then \
${ECHO} "****************************************" ; \
${ECHO} " You need to extract kernel source tree" ; \
${ECHO} " before you build this package..." ; \