blob: e08ca119a9c012ff940ebcb18391f1ad385139c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# New ports collection makefile for: liba52
# Date created: Tue Oct 16 10:43:56 BRST 2001
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= liba52
PORTVERSION= 0.7.3
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://liba52.sourceforge.net/files/
DISTNAME= a52dec-${PORTVERSION:S/.b/b/}
MAINTAINER= lioux@FreeBSD.org
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-oss --enable-shared
USE_LIBTOOL= yes
.ifndef(WITHOUT_DJBFFT)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft
RUN_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
pre-everything::
.ifndef(WITH_OPTIMIZED_CFLAGS)
@${ECHO_MSG} ">>>"
@${ECHO_MSG} ">>> You can enable extra optimizations by defining WITH_OPTIMIZED_CFLAGS."
@${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}
post-install:
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/liba52.txt ${DOCSDIR}
.endif
.for file in ${HEADER_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/include/a52dec
.endfor
.include <bsd.port.mk>
|