aboutsummaryrefslogtreecommitdiff
path: root/net/mediastreamer/Makefile
blob: aa782d979b39c7de3001250cda2b3604cdba3db2 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
# $FreeBSD$

PORTNAME=	mediastreamer
PORTVERSION=	2.14.0
PORTREVISION=	1
CATEGORIES=	net
MASTER_SITES=	SAVANNAH/linphone/mediastreamer

MAINTAINER=	tijl@FreeBSD.org
COMMENT=	Real-time audio and video streaming and processing

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libbctoolbox.so:net/bctoolbox \
		libortp.so:net/ortp \
		libsrtp.so:net/libsrtp \
		libbzrtp.so:security/bzrtp

CONFLICTS_INSTALL=	linphone-base-[0-9]*

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-alsa --disable-documentation --disable-matroska \
		--disable-pulseaudio --disable-strict \
		--with-gsm=${LOCALBASE} --with-srtp=${LOCALBASE} \
		xxd_found=yes
CPPFLAGS+=	-I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip
USES=		gettext-tools gmake libtool pathfix pkgconfig
USE_GNOME=	intlhack
USE_LDCONFIG=	yes

OPTIONS_DEFINE=		NLS UPNP VIDEO
OPTIONS_GROUP=		AUDIOOPT VIDEOOPT
OPTIONS_GROUP_AUDIOOPT=	GSM OPUS SPANDSP SPEEX
OPTIONS_GROUP_VIDEOOPT=	FFMPEG GLX THEORA V4L VPX XVIDEO
OPTIONS_DEFAULT=	UPNP VIDEO \
			GSM OPUS SPANDSP SPEEX \
			FFMPEG GLX THEORA V4L VPX XVIDEO
OPTIONS_SUB=		yes

AUDIOOPT_DESC=		Audio options

FFMPEG_CONFIGURE_ENABLE=ffmpeg
FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg

GLX_CONFIGURE_ENABLE=	glx
GLX_USE=		GL=glew

GSM_CONFIGURE_ENABLE=	gsm
GSM_LIB_DEPENDS=	libgsm.so:audio/gsm

NLS_CONFIGURE_ENABLE=	nls
NLS_USES=		gettext-runtime

OPUS_CONFIGURE_ENABLE=	opus
OPUS_LIB_DEPENDS=	libopus.so:audio/opus

SPANDSP_CONFIGURE_ENABLE=	spandsp
SPANDSP_LIB_DEPENDS=	libspandsp.so:comms/spandsp

SPEEX_CONFIGURE_ENABLE=	speex
SPEEX_LIB_DEPENDS=	libspeex.so:audio/speex

THEORA_CONFIGURE_ENABLE=theora
THEORA_LIB_DEPENDS=	libtheora.so:multimedia/libtheora

UPNP_CONFIGURE_ENABLE=	upnp
UPNP_LIB_DEPENDS=	libupnp.so:devel/upnp

V4L_CONFIGURE_ENABLE=	v4l
V4L_BUILD_DEPENDS=	v4l_compat>=1.0.20120501:multimedia/v4l_compat
V4L_LIB_DEPENDS=	libv4l2.so:multimedia/libv4l

VIDEOOPT_DESC=		Video options

VIDEO_CONFIGURE_ENABLE=	video

VPX_CONFIGURE_ENABLE=	vp8
VPX_LIB_DEPENDS=	libvpx.so:multimedia/libvpx

XVIDEO_CONFIGURE_ENABLE=x11 xv
XVIDEO_USE=		XORG=videoproto,x11,xv

.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif

post-patch:
	@${REINPLACE_CMD} 's,gsm/gsm\.h,gsm.h,' \
		${WRKSRC}/configure ${WRKSRC}/src/audiofilters/gsm.c

pre-build:
# Transform file to C array (similar to xxd -i from editors/vim)
.for i in yuv2rgb.fs yuv2rgb.vs
	(cd ${WRKSRC}/src && { \
		${ECHO_CMD} 'unsigned char ${i:S/./_/}[] = {' && \
		/usr/bin/hexdump -v -e '" " 12/1 " 0x%02x," "\n" \
		"  0x00 };\nunsigned int ${i:S/./_/}_len = %_Ad;"' ${i} | \
		${SED} 's/ 0x  ,//g' ; } > ${i}.h)
.endfor

.include <bsd.port.mk>