FreeBSD Bugzilla – Attachment 207990 Details for
Bug 240974
net/kamailio: added Lua and Python support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
kamailio.diff
kamailio.diff (text/plain), 11.70 KB, created by
Dmitry Wagin
on 2019-10-01 17:04:09 UTC
(
hide
)
Description:
kamailio.diff
Filename:
MIME Type:
Creator:
Dmitry Wagin
Created:
2019-10-01 17:04:09 UTC
Size:
11.70 KB
patch
obsolete
>Index: net/kamailio/Makefile >=================================================================== >--- net/kamailio/Makefile (revision 513332) >+++ net/kamailio/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= kamailio > PORTVERSION= 5.2.4 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= net > MASTER_SITES= http://www.kamailio.org/pub/kamailio/${PORTVERSION}/src/ > DISTNAME= ${PORTNAME}-${PORTVERSION}_src >@@ -14,7 +14,7 @@ > LICENSE= GPLv2 > LICENSE_FILE= ${WRKSRC}/COPYING > >-BROKEN_powerpc64=Does not build: /bin/sh: clang: not found >+BROKEN_powerpc64= Does not build: /bin/sh: clang: not found > > LIB_DEPENDS= libexpat.so:textproc/expat2 \ > libxml2.so:textproc/libxml2 \ >@@ -29,39 +29,63 @@ > > CFLAGS+= -Wall > >-USERS= kamailio >-GROUPS= kamailio >+KAMAILIO_USER?= kamailio >+KAMAILIO_GROUP?= kamailio > >+USERS= ${KAMAILIO_USER} >+GROUPS= ${KAMAILIO_GROUP} >+ >+KAMAILIO_RUNDIR?= /var/run/${PORTNAME} >+ > USE_RC_SUBR= kamailio > > WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} > >-RUNDIR?= /var/run/${PORTNAME} >+SUB_LIST= KAMAILIO_USER=${KAMAILIO_USER} \ >+ KAMAILIO_GROUP=${KAMAILIO_GROUP} \ >+ KAMAILIO_RUNDIR=${KAMAILIO_RUNDIR} > >-SUB_LIST= RUNDIR=${RUNDIR} \ >- USERS=${USERS} \ >- GROUPS=${GROUPS} >+OPTIONS_GROUP= DATABASE_DRIVERS KEMI >+OPTIONS_GROUP_KEMI= LUAJIT PYTHON3 >+OPTIONS_GROUP_DATABASE_DRIVERS= MYSQL PGSQL UNIXODBC >+OPTIONS_DEFINE= DATABASE DIALPLAN DOCS PERL PRESENCE RADIUS \ >+ SCTP TLS WEBSOCKET >+OPTIONS_DEFAULT= MYSQL PRESENCE RADIUS TLS >+OPTIONS_SUB= YES > >-OPTIONS_MULTI= DATABASE >-OPTIONS_MULTI_DATABASE=MYSQL PGSQL >-OPTIONS_DEFINE= DATABASE DIALPLAN DOCS JITSI PERL PRESENCE RADIUS \ >- SCTP TLS UNIXODBC WEBSOCKET >-OPTIONS_DEFAULT=MYSQL PRESENCE RADIUS TLS >-OPTIONS_SUB= YES >+DATABASE_DRIVERS_DESC= Database drivers > >-DATABASE_DESC= Database support (select one or more) >+DATABASE_DESC= Database support >+DATABASE_VARS= EXTRA_GROUPS+=db > >-DIALPLAN_DESC= Dialplan support >-DIALPLAN_LIB_DEPENDS=libpcre.so:devel/pcre >-DIALPLAN_VARS= EXTRA_MODULES+=dialplan >- >-JITSI_DESC= VoIP Frontend GUI via Jitsi >-JITSI_RUN_DEPENDS=jitsi:net-im/jitsi >- > MYSQL_IMPLIES= DATABASE > MYSQL_USES= mysql > MYSQL_VARS= EXTRA_GROUPS+=mysql > >+PGSQL_IMPLIES= DATABASE >+PGSQL_USES= pgsql >+PGSQL_VARS= EXTRA_GROUPS+=postgres >+ >+UNIXODBC_IMPLIES= DATABASE >+UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC >+UNIXODBC_VARS= EXTRA_MODULES+=db_unixodbc >+ >+KEMI_DESC= Kamailio Embedded Interface >+ >+LUAJIT_DESC= Execute embedded Lua scripts >+LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit >+LUAJIT_MAKE_ARGS= LUAJIT=yes >+LUAJIT_VARS= EXTRA_MODULES+=app_lua >+ >+PYTHON3_DESC= Execute embedded Python3 scripts >+PYTHON3_USES= python:3.5+ >+PYTHON3_MAKE_ARGS= PYTHON3=${PYTHON_CMD} >+PYTHON3_VARS= EXTRA_MODULES+=app_python3 >+ >+DIALPLAN_DESC= String translations based on rules >+DIALPLAN_LIB_DEPENDS= libpcre.so:devel/pcre >+DIALPLAN_VARS= EXTRA_MODULES+=dialplan >+ > PERL_USES= perl5 > PERL_VARS= EXTRA_MODULES+=app_perl > PERL_MAKE_ENV= PERLLDOPTS="`perl -MExtUtils::Embed -e ldopts`" \ >@@ -68,15 +92,11 @@ > PERLCCOPTS="`perl -MExtUtils::Embed -e ccopts`" \ > TYPEMAP="`perl -MConfig -e 'print $$Config{privlib}'`/ExtUtils/typemap" > >-PGSQL_IMPLIES= DATABASE >-PGSQL_USES= pgsql >-PGSQL_VARS= EXTRA_GROUPS+=postgres >- > PRESENCE_DESC= Presence support > PRESENCE_VARS= EXTRA_GROUPS+=presence > >-RADIUS_LIB_DEPENDS=libradiusclient-ng.so:net/radiusclient >-RADIUS_VARS= EXTRA_GROUPS+=radius >+RADIUS_LIB_DEPENDS= libradiusclient-ng.so:net/radiusclient >+RADIUS_VARS= EXTRA_GROUPS+=radius > > SCTP_DESC= SCTP support > SCTP_VARS= EXTRA_MODULES+=sctp >@@ -84,51 +104,46 @@ > TLS_USES= ssl > TLS_VARS= EXTRA_MODULES+=tls > >-UNIXODBC_LIB_DEPENDS=libodbc.so:databases/unixODBC >-UNIXODBC_VARS= EXTRA_MODULES+=db_unixodbc >+WEBSOCKET_DESC= Websocket support >+WEBSOCKET_LIB_DEPENDS= libunistring.so:devel/libunistring >+WEBSOCKET_VARS= EXTRA_MODULES+=websocket > >-WEBSOCKET_DESC= Websocket support >-WEBSOCKET_LIB_DEPENDS=libunistring.so:devel/libunistring >-WEBSOCKET_VARS= EXTRA_MODULES+=websocket >- > .include <bsd.port.pre.mk> > >-DEFAULT_GROUP_INCLUDE=standard standard-dep >+DEFAULT_GROUPS= standard > > .if !empty (EXTRA_GROUPS) >-MAKE_ARGS+= group_include="${DEFAULT_GROUP_INCLUDE} ${EXTRA_GROUPS}" >+CFG_ARGS+= group_include="${DEFAULT_GROUPS} ${EXTRA_GROUPS}" > .else >-MAKE_ARGS+= group_include="${DEFAULT_GROUP_INCLUDE}" >+CFG_ARGS+= group_include="${DEFAULT_GROUPS}" > .endif > > .if !empty (EXTRA_MODULES) >-MAKE_ARGS+= include_modules="${EXTRA_MODULES}" >+CFG_ARGS+= include_modules="${EXTRA_MODULES}" > .endif > > post-patch: >- ${REINPLACE_CMD} '499s|$$(run_prefix)/$$(run_dir)|${RUNDIR}|' \ >+ ${REINPLACE_CMD} '499s|$$(run_prefix)/$$(run_dir)|${KAMAILIO_RUNDIR}|' \ > ${WRKSRC}/src/Makefile.defs >-.if ! ${PORT_OPTIONS:MDOCS} >- ${REINPLACE_CMD} 's|install-doc install-man|install-man|' \ >+ >+post-patch-DOCS-off: >+ @${REINPLACE_CMD} 's|install-doc install-man|install-man|' \ > ${WRKSRC}/src/Makefile >-.endif > > pre-build: >- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} cfg >+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CFG_ARGS} cfg > >-do-build: >- @cd ${WRKSRC} && ${DO_MAKE_BUILD} ${ALL_TARGET} >- > do-install: >- @${MKDIR} ${STAGEDIR}${RUNDIR} >- @cd ${WRKSRC} && ${MAKE_CMD} ${INSTALL_TARGET} >+ @${MKDIR} ${STAGEDIR}${KAMAILIO_RUNDIR} >+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install > @(cd ${STAGEDIR}${ETCDIR}; for i in `${FIND} . -type f`; do ${MV} $$i $$i.sample; done) > > post-install: >+ @${RMDIR} ${STAGEDIR}${DATADIR} || true > @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/kamailio/*.so.1 > @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/kamailio/modules/*.so > @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/kamailio > @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/kamcmd >- @${ECHO_CMD} "@dir(${USERS},${GROUPS},750) ${RUNDIR}" >> ${TMPPLIST} >+ @${ECHO_CMD} "@dir(${KAMAILIO_USER},${KAMAILIO_GROUP},750) ${KAMAILIO_RUNDIR}" >> ${TMPPLIST} > > .include <bsd.port.post.mk> >Index: net/kamailio/files/kamailio.in >=================================================================== >--- net/kamailio/files/kamailio.in (revision 513332) >+++ net/kamailio/files/kamailio.in (working copy) >@@ -9,8 +9,18 @@ > # Add the following line to /etc/rc.conf to enable this service > # at system startup: > # >-# kamailio_enable (bool): Set to NO by default. >-# Set it to YES to enable kamailio. >+# kamailio_enable (bool): >+# Set to NO by default >+# Set it to YES to enable kamailio >+# kamailio_user (string) >+# Set user to run kamailio >+# Default is "%%KAMAILIO_USER%%" >+# kamailio_group (string) >+# Set group to run kamailio >+# Default is "%%KAMAILIO_GROUP%%" >+# kamailio_pidfile (string) >+# Set full path to pid file >+# Default is "%%KAMAILIO_RUNDIR%%/kamailio.pid" > # > > . /etc/rc.subr >@@ -20,19 +30,20 @@ > > load_rc_config ${name} > >-: ${kamailio_enable:=NO} >-: ${kamailio_user:=%%USERS%%} >-: ${pidfile:=%%RUNDIR%%/kamailio.pid} >+: ${kamailio_enable:="NO"} >+: ${kamailio_user:="%%KAMAILIO_USER%%"} >+: ${kamailio_group:="%%KAMAILIO_GROUP%%"} >+: ${kamailio_pidfile:="%%KAMAILIO_RUNDIR%%/kamailio.pid"} > >+pidfile="${kamailio_pidfile}" >+required_files="%%ETCDIR%%/kamailio.cfg" > command="/usr/local/sbin/kamailio" > command_args="-P ${pidfile}" > >-start_precmd="kamailio_prestart" >+start_precmd="kamailio_start_precmd" > >-required_files="%%ETCDIR%%/kamailio.cfg" >- >-kamailio_prestart() { >- install -d -m 0750 -o %%USERS%% -g %%GROUPS%% %%RUNDIR%% >+kamailio_start_precmd() { >+ install -d -m 0750 -o ${kamailio_user} -g ${kamailio_group} "%%KAMAILIO_RUNDIR%%" > } > > run_rc_command $1 >Index: net/kamailio/pkg-plist >=================================================================== >--- net/kamailio/pkg-plist (revision 513332) >+++ net/kamailio/pkg-plist (working copy) >@@ -143,6 +143,8 @@ > %%DIALPLAN%%lib/kamailio/modules/dialplan.so > %%ETCDIR%%/kamailio.cfg.sample > %%ETCDIR%%/kamctlrc.sample >+%%LUAJIT%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.app_lua >+%%LUAJIT%%lib/kamailio/modules/app_lua.so > %%MYSQL%%%%DATADIR%%/mysql/acc-create.sql > %%MYSQL%%%%DATADIR%%/mysql/alias_db-create.sql > %%MYSQL%%%%DATADIR%%/mysql/auth_db-create.sql >@@ -214,8 +216,8 @@ > %%PERL%%lib/kamailio/perl/Kamailio/VDB/Pair.pm > %%PERL%%lib/kamailio/perl/Kamailio/VDB/ReqCond.pm > %%PERL%%lib/kamailio/perl/Kamailio/VDB/Result.pm >+%%PERL%%lib/kamailio/perl/Kamailio/VDB/VTab.pm > %%PERL%%lib/kamailio/perl/Kamailio/VDB/Value.pm >-%%PERL%%lib/kamailio/perl/Kamailio/VDB/VTab.pm > %%PGSQL%%%%DATADIR%%/postgres/acc-create.sql > %%PGSQL%%%%DATADIR%%/postgres/alias_db-create.sql > %%PGSQL%%%%DATADIR%%/postgres/auth_db-create.sql >@@ -264,6 +266,7 @@ > %%PGSQL%%lib/kamailio/kamctl/kamdbctl.pgsql > %%PGSQL%%lib/kamailio/modules/db_postgres.so > %%PORTDOCS%%%%DOCSDIR%%/INSTALL >+%%PORTDOCS%%%%DOCSDIR%%/README > %%PORTDOCS%%%%DOCSDIR%%/modules/README.acc_diameter > %%PORTDOCS%%%%DOCSDIR%%/modules/README.app_jsdt > %%PORTDOCS%%%%DOCSDIR%%/modules/README.app_sqlang >@@ -350,7 +353,6 @@ > %%PORTDOCS%%%%DOCSDIR%%/modules/README.xhttp_rpc > %%PORTDOCS%%%%DOCSDIR%%/modules/README.xlog > %%PORTDOCS%%%%DOCSDIR%%/modules/README.xprint >-%%PORTDOCS%%%%DOCSDIR%%/README > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.presence > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.presence_conference > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.presence_dialoginfo >@@ -368,6 +370,7 @@ > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.rls > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.xcap_client > %%PRESENCE%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.xcap_server >+%%PRESENCE%%lib/kamailio/modules/presence.so > %%PRESENCE%%lib/kamailio/modules/presence_conference.so > %%PRESENCE%%lib/kamailio/modules/presence_dialoginfo.so > %%PRESENCE%%lib/kamailio/modules/presence_mwi.so >@@ -374,7 +377,7 @@ > %%PRESENCE%%lib/kamailio/modules/presence_profile.so > %%PRESENCE%%lib/kamailio/modules/presence_reginfo.so > %%PRESENCE%%lib/kamailio/modules/presence_xml.so >-%%PRESENCE%%lib/kamailio/modules/presence.so >+%%PRESENCE%%lib/kamailio/modules/pua.so > %%PRESENCE%%lib/kamailio/modules/pua_bla.so > %%PRESENCE%%lib/kamailio/modules/pua_dialoginfo.so > %%PRESENCE%%lib/kamailio/modules/pua_reginfo.so >@@ -381,10 +384,11 @@ > %%PRESENCE%%lib/kamailio/modules/pua_rpc.so > %%PRESENCE%%lib/kamailio/modules/pua_usrloc.so > %%PRESENCE%%lib/kamailio/modules/pua_xmpp.so >-%%PRESENCE%%lib/kamailio/modules/pua.so > %%PRESENCE%%lib/kamailio/modules/rls.so > %%PRESENCE%%lib/kamailio/modules/xcap_client.so > %%PRESENCE%%lib/kamailio/modules/xcap_server.so >+%%PYTHON3%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.app_python3 >+%%PYTHON3%%lib/kamailio/modules/app_python3.so > %%RADIUS%%%%ETCDIR%%/dictionary.kamailio.sample > %%RADIUS%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.acc_radius > %%RADIUS%%%%PORTDOCS%%%%DOCSDIR%%/modules/README.auth_radius >@@ -421,9 +425,9 @@ > lib/kamailio/modules/app_jsdt.so > lib/kamailio/modules/app_sqlang.so > lib/kamailio/modules/async.so >+lib/kamailio/modules/auth.so > lib/kamailio/modules/auth_diameter.so > lib/kamailio/modules/auth_xkeys.so >-lib/kamailio/modules/auth.so > lib/kamailio/modules/avp.so > lib/kamailio/modules/benchmark.so > lib/kamailio/modules/blst.so >@@ -438,8 +442,8 @@ > lib/kamailio/modules/ctl.so > lib/kamailio/modules/debugger.so > lib/kamailio/modules/diversion.so >+lib/kamailio/modules/dmq.so > lib/kamailio/modules/dmq_usrloc.so >-lib/kamailio/modules/dmq.so > lib/kamailio/modules/domainpolicy.so > lib/kamailio/modules/enum.so > lib/kamailio/modules/evrexec.so >@@ -461,8 +465,8 @@ > lib/kamailio/modules/path.so > lib/kamailio/modules/pdb.so > lib/kamailio/modules/pike.so >+lib/kamailio/modules/print.so > lib/kamailio/modules/print_lib.so >-lib/kamailio/modules/print.so > lib/kamailio/modules/pv.so > lib/kamailio/modules/qos.so > lib/kamailio/modules/ratelimit.so >@@ -499,8 +503,8 @@ > lib/kamailio/modules/topos.so > lib/kamailio/modules/tsilo.so > lib/kamailio/modules/uac_redirect.so >+lib/kamailio/modules/xhttp.so > lib/kamailio/modules/xhttp_rpc.so >-lib/kamailio/modules/xhttp.so > lib/kamailio/modules/xlog.so > lib/kamailio/modules/xprint.so > man/man5/kamailio.cfg.5.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240974
:
207990
|
208011
|
208014