aboutsummaryrefslogtreecommitdiff
path: root/www/srt/Makefile
blob: deb0c0dd2214b72ee7a384c0ec253edcfc48a948 (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
PORTNAME=	srt
DISTVERSIONPREFIX=	v
DISTVERSION=	1.5.1
CATEGORIES=	www

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Secure Reliable Transport (SRT) Protocol
WWW=		https://www.srtalliance.org/

LICENSE=	LGPL21
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	bash:shells/bash

USES=		cmake:testing compiler:c++11-lang shebangfix

USE_GITHUB=	yes
GH_ACCOUNT=	Haivision

SHEBANG_FILES=	scripts/srt-ffplay

CMAKE_TESTING_ON=	ENABLE_TESTING ENABLE_UNITTESTS # 1 test fails when net.inet6.ip6.v6only=1: https://github.com/Haivision/srt/issues/2389

OPTIONS_DEFINE=			HEAVY_LOGGING
OPTIONS_RADIO=			ENCRYPTION
OPTIONS_RADIO_ENCRYPTION=	NO_ENCRYPTION OPENSSL GNUTLS MBEDTLS
OPTIONS_DEFAULT=		OPENSSL

HEAVY_LOGGING_DESC=		Enable heavy logging (only for debugging)
HEAVY_LOGGING_CMAKE_BOOL=	ENABLE_HEAVY_LOGGING # may also need srt_setloglevel(LOG_DEBUG) in/after srt_startup() call

NO_ENCRYPTION_DESC=		No encryption
NO_ENCRYPTION_CMAKE_ON=		-DENABLE_ENCRYPTION=OFF

OPENSSL_CMAKE_ON=		-DUSE_ENCLIB=openssl
OPENSSL_USES=			ssl

GNUTLS_CMAKE_ON=		-DUSE_ENCLIB=gnutls
GNUTLS_LIB_DEPENDS=		libgnutls.so:security/gnutls \
				libnettle.so:security/nettle

MBEDTLS_CMAKE_ON=		-DUSE_ENCLIB=mbedtls
MBEDTLS_LIB_DEPENDS=		libmbedtls.so:security/mbedtls

post-install-OPENSSL-on:
	# fix .pc files
	@${REINPLACE_CMD} -e 's|Requires.private: openssl libcrypto|Requires.private:|; s|Libs.private:.*|& -lssl -lcrypto|' \
		${STAGEDIR}${PREFIX}/libdata/pkgconfig/srt.pc \
		${STAGEDIR}${PREFIX}/libdata/pkgconfig/haisrt.pc

.include <bsd.port.mk>