summaryrefslogtreecommitdiff
path: root/net/asterisk-g72x/Makefile
blob: 5a1bd145b1da0c84f3c193bea26297ed129578a6 (plain)
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

PORTNAME=	g72x
PORTVERSION=	1.4.3
PORTREVISION=	3
CATEGORIES=	net
MASTER_SITES=	http://asterisk.hosting.lv/src/
DISTNAME=	asterisk-${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}

MAINTAINER=	madpilot@FreeBSD.org
COMMENT=	G.729 codec for Asterisk PBX

LIB_DEPENDS=	libbcg729.so:audio/bcg729

FLAVORS=			asterisk16 asterisk18 asterisk13
FLAVOR?=			${FLAVORS:[1]}

asterisk13_PKGNAMEPREFIX=	asterisk13-
asterisk13_CONFLICTS_INSTALL=	asterisk16-g72x asterisk18-g72x
asterisk13_BUILD_DEPENDS=	asterisk:net/asterisk13
asterisk13_RUN_DEPENDS=		asterisk:net/asterisk13
.if ${FLAVOR} == asterisk13
CONFIGURE_ARGS+=		--with-asterisk130
.endif

asterisk16_PKGNAMEPREFIX=	asterisk16-
asterisk16_CONFLICTS_INSTALL=	asterisk13-g72x asterisk18-g72x
asterisk16_BUILD_DEPENDS=	asterisk:net/asterisk16
asterisk16_RUN_DEPENDS=		asterisk:net/asterisk16
.if ${FLAVOR} == asterisk16
CONFIGURE_ARGS+=		--with-asterisk160
.endif

asterisk18_PKGNAMEPREFIX=	asterisk18-
asterisk18_CONFLICTS_INSTALL=	asterisk13-g72x asterisk16-g72x
asterisk18_BUILD_DEPENDS=	asterisk:net/asterisk18
asterisk18_RUN_DEPENDS=		asterisk:net/asterisk18
.if ${FLAVOR} == asterisk18
CONFIGURE_ARGS+=		--with-asterisk160
.endif

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	--with-bcg729
USES=		autoreconf compiler:c11 libtool localbase tar:bzip2

PLIST_FILES=	lib/asterisk/modules/codec_g729.so

.include <bsd.port.pre.mk>

.if ${CHOSEN_COMPILER_TYPE} == clang
CFLAGS+=	-fblocks
.endif

post-build:
	${STRIP_CMD} ${WRKSRC}/.libs/codec_g729.so

.include <bsd.port.post.mk>