summaryrefslogtreecommitdiff
path: root/devel/opal/Makefile
blob: 1f3684030de0e8d3fb1eb7abe2d0b92da15e72b0 (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
57
58
59
60
61
62
63
64
65
# $NetBSD: Makefile,v 1.24 2013/02/06 23:21:30 jperkin Exp $
#

DISTNAME=		opal-3.6.6
PKGREVISION=		6
CATEGORIES=		devel net comms
MASTER_SITES=		${MASTER_SITE_GNOME:=sources/opal/3.6/}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.opalvoip.org/
COMMENT=		Open Phone Abstraction Library
LICENSE=		mpl-1.0

PREV_PKGPATH=		devel/opal-devel

OPALLIBDIR=		${DISTNAME}

USE_LIBTOOL=		yes
USE_PKGLOCALEDIR=	yes
GNU_CONFIGURE=		yes
BUILD_TARGET=		opt

CONFIGURE_ARGS+=	--enable-h264
# ekiga developers say that the ffmpeg-h263 plugin is
# not used and should be disabled in favour of the
# h263+ plugin, so do so
CONFIGURE_ARGS+=	--disable-ffmpeg-h263
CONFIGURE_ARGS+=	--disable-localgsm
CONFIGURE_ARGS+=	--disable-localspeex
CONFIGURE_ARGS+=	--disable-ivr

USE_LANGUAGES=		c c++
USE_TOOLS+=		gmake
USE_TOOLS+=		pkg-config

PLIST_SUBST+=		OPALLIBDIR=${OPALLIBDIR:Q}

.if "${MACHINE_ARCH}" == "i386"
PLIST_SUBST+=		LIBARCH=x86
.else
PLIST_SUBST+=		LIBARCH=${MACHINE_ARCH:Q}
.endif

post-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/opal
	${INSTALL_DATA} ${WRKSRC}/opal_inc.mak ${DESTDIR}${PREFIX}/share/opal
	${INSTALL_DATA} ${WRKSRC}/version.h ${DESTDIR}${PREFIX}/share/opal

# pkgsrc's gsm is shlib, need additional linker flags.
GSM_LIBS=		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.gsm}/lib
GSM_LIBS+=		-L${BUILDLINK_PREFIX.gsm}/lib -lgsm
SUBST_CLASSES+=		gsm
SUBST_STAGE.gsm=	pre-configure
SUBST_FILES.gsm=	plugins/configure
SUBST_SED.gsm=		-e 's;GSM_LIBS="-lgsm";GSM_LIBS="${GSM_LIBS}";g'

#for WAV49
BUILDLINK_API_DEPENDS.gsm+=	gsm>=1.0.12
.include "../../audio/gsm/buildlink3.mk"
.include "../../audio/speex/buildlink3.mk"
.include "../../devel/ptlib/buildlink3.mk"
.include "../../multimedia/ffmpeg010/buildlink3.mk"
.include "../../multimedia/x264-devel/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"