Improve -STABLE support:

- FreeBSD 4.0 - inform that 4.0 is not supported;
- FreeBSD 4.1.* - use an updated tarball with proper kernel module
  dependencies;
- FreeBSD 4.2 - with recent newpcm kobj MFC commit in mind, add heuristics
  to determine the driver tarball required. Build correctly on both pre-
  and post- kobj MFC systems.

Submitted by:				maintainer
Slightly improved and polished by:	sobomax
This commit is contained in:
Maxim Sobolev 2001-02-05 15:26:13 +00:00
parent 1be0301128
commit f7c61c692b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=37984
3 changed files with 40 additions and 14 deletions

View file

@ -14,7 +14,7 @@ DISTNAME= au88x0-${PORTVERSION}
MAINTAINER= matey@cis.ohio-state.edu
NO_PACKAGE= package doesn't make any sense, because kld's should be in sync with running kernel to work correctly
NO_PACKAGE= Should be in sync with the kernel to work correctly
ONLY_FOR_ARCHS= i386
@ -26,19 +26,44 @@ MAKE_ENV= WRKSRC="${WRKSRC}"
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 400000
BROKEN= "FreeBSD 3.* isn't supported"
.elif ${OSVERSION} < 410002
BROKEN= "Your FreeBSD 4.1 system is too old. Please update it before installing this port"
.elif ${OSVERSION} < 420000
PORTVERSION= 1.1
DISTNAME= au88x0-${PORTVERSION}_1
.elif ${OSVERSION} < 500000
PORTVERSION= 1.3
DISTNAME= au88x0-${PORTVERSION}_1
.if exists(/usr/src/sys/dev/sound/pcm/sound.c)
VERSION_SOUND_C!= ${AWK} '/.*\$$FreeBSD/ { print $$4; exit; }' \
/usr/src/sys/dev/sound/pcm/sound.c
.else
VERSION_SOUND_C=
.endif
pre-build:
VERSION_SOUND_C:= ${VERSION_SOUND_C:S/.//g}
.if ${OSVERSION} < 410000
BROKEN= "FreeBSD 3.*, 4.0 are not supported"
.elif ${OSVERSION} < 420000
# FreeBSD 4.1, 4.1.1
PORTVERSION= 1.1
PORTREVISION= 2
.elif ${OSVERSION} < 500000
# FreeBSD 4.2
PORTVERSION= 1.3
.if ${VERSION_SOUND_C} < 11724
# FreeBSD 4.2 before kobj MFC
PORTREVISION= 1
.else
# FreeBSD 4.2 after kobj MFC
PORTREVISION= 2
MAKE_ENV+= HAVE_KOBJ_PCM=1
.endif
.endif
.if ${OSVERSION} < 500000
DISTNAME= au88x0-${PORTVERSION}_${PORTREVISION}
.endif
pre-fetch:
@if [ ! -d /sys -o ! -d /usr/src/sys ]; then \
${ECHO} "****************************************" ; \
${ECHO} " You need to extract kernel source tree" ; \

View file

@ -1,3 +1,4 @@
MD5 (au88x0-1.1_1.tar.gz) = 50882437af6e79694e0db2f200b30c8a
MD5 (au88x0-1.1_2.tar.gz) = 2a738bb71acd20bee05df758feec8545
MD5 (au88x0-1.3_1.tar.gz) = ec49c6e62847f6a0da318fea8c954917
MD5 (au88x0-1.3_2.tar.gz) = 266a8ba37778bfd1ea4007407f733540
MD5 (au88x0-1.5.tar.gz) = c0e781dde9624eb1213deb84aeb9d099

View file

@ -10,7 +10,7 @@ $FreeBSD$
+KMOD = snd_au88${MODEL}
+SRCS += au88x0.c
+SRCS += device_if.h bus_if.h isa_if.h pci_if.h
+.if ${OSVERSION} > 500000
+.if ${OSVERSION} > 500000 || defined(HAVE_KOBJ_PCM)
+SRCS += ac97_if.h channel_if.h feeder_if.h mixer_if.h
+.endif
+OBJS = ${WRKSRC}/asp${MODEL}.o