Skip to content

Commit

Permalink
www/srt: Add options that define what encryption library to use
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Jun 17, 2022
1 parent 91d0901 commit a913644
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion www/srt/Makefile
@@ -1,6 +1,7 @@
PORTNAME= srt
DISTVERSIONPREFIX= v
DISTVERSION= 1.5.0
PORTREVISION= 1
CATEGORIES= www

MAINTAINER= yuri@FreeBSD.org
Expand All @@ -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
Expand All @@ -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>

0 comments on commit a913644

Please sign in to comment.