aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-06-17 03:48:00 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-06-17 04:03:49 +0000
commita91364449db6feed6fd47b86b0dcf4bca300c671 (patch)
tree6e7db3dbe84e773dd11b84cc277d637a20d0676d
parent91d09018332654cd44a9c96d9e2518cf4ec96fc4 (diff)
downloadports-a91364449db6feed6fd47b86b0dcf4bca300c671.tar.gz
ports-a91364449db6feed6fd47b86b0dcf4bca300c671.zip
www/srt: Add options that define what encryption library to use
-rw-r--r--www/srt/Makefile26
1 files changed, 25 insertions, 1 deletions
diff --git a/www/srt/Makefile b/www/srt/Makefile
index 2290a87910b0..c9865437080f 100644
--- a/www/srt/Makefile
+++ b/www/srt/Makefile
@@ -1,6 +1,7 @@
PORTNAME= srt
DISTVERSIONPREFIX= v
DISTVERSION= 1.5.0
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= yuri@FreeBSD.org
@@ -11,7 +12,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= bash:shells/bash
-USES= cmake:testing compiler:c++11-lang shebangfix ssl
+USES= cmake:testing compiler:c++11-lang shebangfix
USE_GITHUB= yes
GH_ACCOUNT= Haivision
@@ -20,4 +21,27 @@ SHEBANG_FILES= scripts/srt-ffplay
CMAKE_TESTING_ON= ENABLE_TESTING ENABLE_UNITTESTS # 2 tests are known to fail: https://github.com/Haivision/srt/issues/2389, https://github.com/Haivision/srt/issues/2390
+OPTIONS_RADIO= ENCRYPTION
+OPTIONS_RADIO_ENCRYPTION= NO_ENCRYPTION OPENSSL GNUTLS MBEDTLS
+OPTIONS_DEFAULT= OPENSSL
+
+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>