aboutsummaryrefslogtreecommitdiffstats
path: root/audio/liba52/Makefile
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2002-05-16 06:54:33 +0800
committerlioux <lioux@FreeBSD.org>2002-05-16 06:54:33 +0800
commit6a662c8cafb6f01099ddc034bbf408b34085764f (patch)
treec562d0c3e39e6eb82190cfc872d95229ecb53237 /audio/liba52/Makefile
parent35f5176c7bb4c8f538644cb1cfd3f62d3da973e9 (diff)
downloadfreebsd-ports-gnome-6a662c8cafb6f01099ddc034bbf408b34085764f.tar.gz
freebsd-ports-gnome-6a662c8cafb6f01099ddc034bbf408b34085764f.tar.zst
freebsd-ports-gnome-6a662c8cafb6f01099ddc034bbf408b34085764f.zip
o Use djbfft optimized FFT routines unless WITHOUT_DJBFFT is defined
o Bump PORTREVISION
Diffstat (limited to 'audio/liba52/Makefile')
-rw-r--r--audio/liba52/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/audio/liba52/Makefile b/audio/liba52/Makefile
index 8e26cabe05b5..94e848dafdab 100644
--- a/audio/liba52/Makefile
+++ b/audio/liba52/Makefile
@@ -7,6 +7,7 @@
PORTNAME= liba52
PORTVERSION= 0.7.3
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= http://liba52.sourceforge.net/files/
DISTNAME= a52dec-${PORTVERSION:S/.b/b/}
@@ -18,6 +19,14 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-oss --enable-shared
USE_LIBTOOL= yes
+.ifndef(WITHOUT_DJBFFT)
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft
+
+CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
+CONFIGURE_ARGS+= --enable-djbfft
+.endif
+
MAN1= a52dec.1 extract_a52.1
HEADER_FILES= liba52/a52_internal.h
@@ -29,12 +38,21 @@ pre-everything::
@${ECHO_MSG} ">>> For example, 'make WITH_OPTIMIZED_CFLAGS=yes'"
@${ECHO_MSG} ">>>"
.endif
+.ifndef(WITHOUT_DJBFFT)
+ @${ECHO_MSG} '>>>'
+ @${ECHO_MSG} '>>> You can disable djbfft optimized FFT routines by defining WITHOUT_DJBFFT.'
+ @${ECHO_MSG} ">>> For example, 'make WITHOUT_DJBFFT=yes'"
+ @${ECHO_MSG} '>>>'
+.endif
post-patch:
.ifndef(WITH_OPTIMIZED_CFLAGS)
@${PERL} -pi.orig -e 's!-O3!${CFLAGS}!;s!-mcpu=[^"]+"!"!' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
+.ifndef(WITHOUT_DJBFFT)
+ @${PERL} -pi -e 's|(fftc4.h)|djbfft/\1|' ${WRKSRC}/liba52/imdct.c
+.endif
post-configure:
@${LN} -sf ${LOCALBASE}/bin/libtool ${WRKSRC}