diff --git a/www/Makefile b/www/Makefile index 8a38ae53fa34b..9126f7baa036c 100644 --- a/www/Makefile +++ b/www/Makefile @@ -260,6 +260,7 @@ SUBDIR += ilias6 SUBDIR += interchange SUBDIR += itop + SUBDIR += janus SUBDIR += jericho-html SUBDIR += jesred SUBDIR += jetty8 diff --git a/www/janus/Makefile b/www/janus/Makefile new file mode 100644 index 0000000000000..91994d748e71c --- /dev/null +++ b/www/janus/Makefile @@ -0,0 +1,64 @@ +PORTNAME= janus +DISTVERSIONPREFIX= v +DISTVERSION= 0.11.3 +CATEGORIES= www + +MAINTAINER= vanilla@FreeBSD.org +COMMENT= WebRTC gateway + +LICENSE= GPLv3 + +BUILD_DEPENDS= gengetopt>0:devel/gengetopt +LIB_DEPENDS= libsrtp2.so:net/libsrtp2 \ + libusrsctp.so:net/libusrsctp \ + libjansson.so:devel/jansson \ + libnice.so:net-im/libnice \ + libmicrohttpd.so:www/libmicrohttpd \ + libwebsockets.so:net/libwebsockets \ + libcurl.so:ftp/curl \ + libopus.so:audio/opus \ + libsofia-sip-ua.so:net/sofia-sip \ + libogg.so:audio/libogg \ + libjansson.so:devel/jansson \ + libnice.so:net-im/libnice \ + libmicrohttpd.so:www/libmicrohttpd \ + libwebsockets.so:net/libwebsockets \ + libconfig.so:devel/libconfig + +USES= libtool pkgconfig autoreconf gmake localbase gnome ssl +USE_GNOME= glib20 +USE_GITHUB= yes +GH_ACCOUNT= meetecho +GH_PROJECT= janus-gateway +USE_RC_SUBR= janus +CONFIGURE_ARGS+= --disable-mqtt \ + --disable-rabbitmq \ + --enable-json-logger \ + --enable-data-channels +INSTALL_TARGET=install-strip +CFLAGS+= -I${OPENSSLINC} -I${LOCALBASE}/include/nice +LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl -L${LOCALBASE} -lnice +GNU_CONFIGURE= yes +USE_LDCONFIG= yes +SUB_FILES= pkg-message + +OPTIONS_SUB= yes +OPTIONS_DEFINE= JAVASCRIPT LUA NANOMSG RABBITMQ POSTPROCESSING +JAVASCRIPT_DESC= JavaScript scripting language support +#MQTT_DESC= MQTT integration +NANOMSG_DESC= Nanomsg integration +RABBITMQ_DESC= RabbitMQ integration +POSTPROCESSING_DESC= Post processing integration +JAVASCRIPT_LIB_DEPENDS= libduktape.so:lang/duktape-lib +NANOMSG_LIB_DEPENDS= libnanomsg.so:net/nanomsg +RABBITMQ_LIB_DEPENDS= librabbitmq.so:net/rabbitmq-c +JAVASCRIPT_CONFIGURE_ENABLE= plugin-duktape +NANOMSG_CONFIGURE_ENABLE= nanomsg +RABBITMQ_CONFIGURE_ENABLE= rabbitmq +LUA_CONFIGURE_ENABLE= plugin-lua +LUA_USES= lua +LUA_CONFIGURE_ENV= LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}" +POSTPROCESSING_CONFIGURE_ENABLE= post-processing +POSTPROCESSING_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg + +.include diff --git a/www/janus/distinfo b/www/janus/distinfo new file mode 100644 index 0000000000000..7bb9f048fb615 --- /dev/null +++ b/www/janus/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1625046487 +SHA256 (meetecho-janus-gateway-v0.11.3_GH0.tar.gz) = bfe4bb0f5c1db7ca1ab7e294b377d604b21e5187a35a64ed93536e2da9f0e9db +SIZE (meetecho-janus-gateway-v0.11.3_GH0.tar.gz) = 7080692 diff --git a/www/janus/files/janus.in b/www/janus/files/janus.in new file mode 100644 index 0000000000000..edcb240314550 --- /dev/null +++ b/www/janus/files/janus.in @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: janus +# REQUIRE: NETWORKING syslogd +# BEFORE: DAEMON +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable janus: +# janus_enable="YES" +# janus_flags="" + +. /etc/rc.subr + +name=janus +rcvar=janus_enable + +: ${janus_enable="NO"} +: ${janus_config_dir="%%PREFIX%%/etc/${name}"} +: ${janus_conf="${janus_config_dir}/$name.jcfg"} + +required_files="${janus_conf}" +command="%%PREFIX%%/bin/janus" +command_args="-D -f -o -F ${janus_config_dir} -C ${janus_conf} -b -L /var/log/janus.log" + +load_rc_config $name +run_rc_command "$1" diff --git a/www/janus/files/patch-configure.ac b/www/janus/files/patch-configure.ac new file mode 100644 index 0000000000000..cc0df705b38a8 --- /dev/null +++ b/www/janus/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2021-06-15 12:25:22 UTC ++++ configure.ac +@@ -363,8 +363,6 @@ freebsd*) + libconfig + nice + jansson >= $jansson_version +- libssl >= $ssl_version +- libcrypto + zlib" + esac + PKG_CHECK_MODULES([JANUS],"$PKGCHECKMODULES") diff --git a/www/janus/files/patch-janus.c b/www/janus/files/patch-janus.c new file mode 100644 index 0000000000000..0a67c09d79c84 --- /dev/null +++ b/www/janus/files/patch-janus.c @@ -0,0 +1,10 @@ +--- janus.c.orig 2021-08-02 14:04:13 UTC ++++ janus.c +@@ -4282,6 +4282,7 @@ gint main(int argc, char *argv[]) + if (!event) { + JANUS_LOG(LOG_ERR, "\tCouldn't load logger plugin '%s': %s\n", eventent->d_name, dlerror()); + } else { ++ dlerror(); + create_l *create = (create_l*) dlsym(event, "create"); + const char *dlsym_error = dlerror(); + if (dlsym_error) { diff --git a/www/janus/files/pkg-message.in b/www/janus/files/pkg-message.in new file mode 100644 index 0000000000000..be8f7416f80dc --- /dev/null +++ b/www/janus/files/pkg-message.in @@ -0,0 +1,8 @@ +[ +{ type: install + message: <