PORTNAME= ringrtc DISTVERSIONPREFIX= v DISTVERSION= 2.48.7 PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= LOCAL/mikael/ringrtc/:base \ LOCAL/mikael/ringrtc/:boringssl \ LOCAL/mikael/ringrtc/:build \ LOCAL/mikael/ringrtc/:buildtools \ LOCAL/mikael/ringrtc/:catapult \ LOCAL/mikael/ringrtc/:icu \ LOCAL/mikael/ringrtc/:nasm \ LOCAL/mikael/ringrtc/:libcubeb \ LOCAL/mikael/ringrtc/:libjpeg_turbo \ LOCAL/mikael/ringrtc/:libsrtp \ LOCAL/mikael/ringrtc/:libvpx \ LOCAL/mikael/ringrtc/:libyuv \ LOCAL/mikael/ringrtc/:opus \ LOCAL/mikael/ringrtc/:perfetto \ LOCAL/mikael/ringrtc/:protobufjs \ LOCAL/mikael/ringrtc/:testing \ LOCAL/mikael/ringrtc/:third_party \ LOCAL/mikael/ringrtc/:tools DISTFILES= base-${BASE_REV}.tar.gz:base \ boringssl-${BORINGSSL_REV}.tar.gz:boringssl \ build-${BUILD_REV}.tar.gz:build \ buildtools-${BUILDTOOLS_REV}.tar.gz:buildtools \ catapult-${CATAPULT_REV}.tar.gz:catapult \ icu-${ICU_REV}.tar.gz:icu \ nasm-${NASM_REV}.tar.gz:nasm \ libcubeb-${LIBCUBEB_VER}.tar.gz:libcubeb \ libjpeg_turbo-${LIBJPEG_TURBO_REV}.tar.gz:libjpeg_turbo \ libsrtp-${LIBSRTP_REV}.tar.gz:libsrtp \ libvpx-${LIBVPX_REV}.tar.gz:libvpx \ libyuv-${LIBYUV_REV}.tar.gz:libyuv \ opus-${OPUS_REV}.tar.gz:opus \ perfetto-${PERFETTO_REV}.tar.gz:perfetto \ protobuf_javascript-${PROTOBUFJS_REV}.tar.gz:protobufjs \ testing-${TESTING_REV}.tar.gz:testing \ third_party-${THIRD_PARTY_REV}.tar.gz:third_party \ tools-${TOOLS_REV}.tar.gz:tools MAINTAINER= mikael@FreeBSD.org COMMENT= Middleware library for Signal-Desktop WWW= https://github.com/signalapp/ringrtc LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 BUILD_DEPENDS= gn:devel/gn \ protoc:devel/protobuf LIB_DEPENDS= libasound.so:audio/alsa-lib \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libpulse.so:audio/pulseaudio USES= cargo gnome jpeg localbase:ldflags ninja pkgconfig python:build \ tar:xz USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= signalapp GH_TUPLE= signalapp:ringrtc:${DISTVERSIONPREFIX}${DISTVERSION} \ signalapp:webrtc:${WEBRTC_REV}:webrtc # sh net-im/signal-desktop/get_deps.sh WEBRTC_REV= 6723a # modify webrtc_fetch.sh, then sh webrtc_fetch.sh BASE_REV= 7f2a56694b330c2cb2954eee78469ffc69952448 BORINGSSL_REV= e724ef02089bf2bb494203231fc5cb62acc2fad6 BUILD_REV= 8e0612cd2c4e4d7c15a456384760815bdbd64ef1 BUILDTOOLS_REV= e4f992c0660e6cee637c7b97aabf04d0a58d5555 CATAPULT_REV= 296226a4a0067c8cffeb8831fb87526a8035f3cc ICU_REV= 9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb LIBCUBEB_VER= 0.17.1 LIBJPEG_TURBO_REV= 927aabfcd26897abb9776ecf2a6c38ea5bb52ab6 LIBSRTP_REV= 000edd791434c8738455f10e0dd6b268a4852c0b LIBVPX_REV= fbf63dff1f528d44f24bd662abb89fd01a4a1c25 LIBYUV_REV= 874f391dbf13dcc84e13a494daed57539ffe2935 NASM_REV= f477acb1049f5e043904b87b825c5915084a9a29 OPUS_REV= 0e30966b198ad28943799eaf5b3b08100b6f70c3 PERFETTO_REV= 97a5d7ed4d7ddb3844a5cbd184e241b99fe6ebcc PROTOBUFJS_REV= e34549db516f8712f678fcd4bc411613b5cc5295 TESTING_REV= 3f4138fcb15362469527d9310e21600dfdfab691 THIRD_PARTY_REV= 27c9b4efc25d7ae5479b884a7d818058c6066d92 TOOLS_REV= 453f7ad001cd0d341ecb437eb164fd6c4b5cc08d BINARY_ALIAS= vpython3=${PYTHON_CMD} # Keep in sync with https://github.com/signalapp/ringrtc/blob/v${DISTVERSION}/bin/build-electron#L101 # Run "gn args out/release --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= rtc_build_examples=false \ rtc_build_tools=false \ rtc_include_tests=false \ rtc_enable_protobuf=false \ rtc_use_x11=false \ rtc_enable_sctp=false \ rtc_libvpx_build_vp9=true \ rtc_include_ilbc=false \ clang_use_chrome_plugins=false \ fatal_linker_warnings=false \ is_clang=true \ treat_warnings_as_errors=false \ use_custom_libcxx=false \ use_custom_libunwind=true \ use_lld=true \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.36.0-67d1b48bd4c1ea31c155ea14a0bd28f04e46eff5-integrity NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.39.1-15b41f15c516ae3eecf8a098a9c9c7aac00444d7-integrity NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.6.0-0413f4d0626b99838cd64ad09c88720aa2bec6ed-integrity SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b MAKE_ARGS= -C out/${BUILDTYPE} WEBRTCDIR= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/src/webrtc/src CARGO_BUILD_ARGS= --package ringrtc --features electron CARGO_INSTALL= no USE_LDCONFIG= yes MAKE_ENV= OUTPUT_DIR=${WEBRTCDIR}/out PLIST_FILES= lib/libringrtc.so post-extract: ${MKDIR} ${WRKDIR}/${PORTNAME}-${DISTVERSION}/src/webrtc ${MV} ${WRKDIR}/webrtc-${WEBRTC_REV} ${WEBRTCDIR} ${MV} ${WRKDIR}/base ${WEBRTCDIR} ${MV} ${WRKDIR}/build ${WEBRTCDIR} ${MV} ${WRKDIR}/buildtools ${WEBRTCDIR} ${MV} ${WRKDIR}/testing ${WEBRTCDIR} ${MV} ${WRKDIR}/third_party ${WEBRTCDIR} ${MV} ${WRKDIR}/catapult ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/boringssl ${WEBRTCDIR}/third_party/boringssl/src ${MV} ${WRKDIR}/icu ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libjpeg_turbo ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libsrtp ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libvpx ${WEBRTCDIR}/third_party/libvpx/source ${MV} ${WRKDIR}/libyuv ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/nasm ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/opus ${WEBRTCDIR}/ringrtc/opus/src ${MV} ${WRKDIR}/perfetto ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/protobuf_javascript ${WEBRTCDIR}/third_party/protobuf-javascript/src ${MV} ${WRKDIR}/tools ${WEBRTCDIR} post-patch: ${REINPLACE_CMD} "s|LOCALBASE|${LOCALBASE}|" \ ${WEBRTCDIR}/build/toolchain/gcc_toolchain.gni \ ${WEBRTCDIR}/buildtools/third_party/libc++/BUILD.gn ${REINPLACE_CMD} "s|WRKDIR|${WRKDIR}|" \ ${WRKSRC}/cargo-crates/cubeb-sys-0.17.0/build.rs ${ECHO_CMD} "# Generated from 'DEPS'" > ${WEBRTCDIR}/build/config/gclient_args.gni ${ECHO_CMD} 1591703586 > ${WEBRTCDIR}/build/util/LASTCHANGE.committime ${ECHO_CMD} "qqchose " > ${WEBRTCDIR}/build/util/LASTCHANGE pre-build: cd ${WEBRTCDIR} && \ ${SETENV} ${CONFIGURE_ENV} gn gen out/release --args='${GN_ARGS}' # build webrtc first, ringrtc needs libwebrtc.a cd ${WEBRTCDIR} \ && ${MAKE_ENV} CC=ccache CXX=ccache ninja -C out/release # it's not intended to be used outside of signal-desktop, put that in # /usr/local/share/ringrtc instead? do-install: ${INSTALL_LIB} ${CARGO_TARGET_DIR}/${CARGO_BUILD_TARGET}/release/libringrtc.so \ ${STAGEDIR}${PREFIX}/lib/ .include