diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile index 7575d7cb2622..82a777576c33 100644 --- a/net/freeradius3/Makefile +++ b/net/freeradius3/Makefile @@ -3,7 +3,7 @@ PORTNAME= freeradius DISTVERSION= 3.0.15 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \ @@ -29,7 +29,7 @@ CONFLICTS_INSTALL= gnu-radius-[0-9].* openradius-[0-9].* radiusd-cistron-[0-9].* USE_RC_SUBR= radiusd -USES= gmake shebangfix ssl tar:bzip2 +USES= gmake readline shebangfix ssl tar:bzip2 SHEBANG_FILES= src/modules/rlm_counter/rad_counter scripts/sql/radsqlrelay GNU_CONFIGURE= yes # Prevent /root/.rnd leftover @@ -41,16 +41,21 @@ LDFLAGS+= -L${LOCALBASE}/lib PLIST_SUB= PORTVERSION=${DISTVERSION} LIBVER=0${PORTVERSION:C/\./0/g} OPTIONS_SUB= yes -OPTIONS_DEFINE= USER KERBEROS HEIMDAL HEIMDAL_PORT LDAP MYSQL \ - PGSQL UNIXODBC FIREBIRD REDIS PYTHON RUBY \ +OPTIONS_DEFINE= USER LDAP MYSQL PGSQL UNIXODBC FIREBIRD REDIS \ EXPERIMENTAL UDPFROMTO DEVELOPER EDIR PERL REST \ - FREETDS IDN DOCS SQLITE3 -OPTIONS_DEFAULT=USER PERL + FREETDS IDN DOCS SQLITE3 PYTHON RUBY UNBOUND +OPTIONS_DEFAULT=USER PERL HEIMDAL UDPFROMTO +OPTIONS_SINGLE= KRB +OPTIONS_SINGLE_KRB= NOKRB HEIMDAL HEIMDAL_PORT MITKRB_PORT USER_DESC= Run as user freeradius, group freeradius +KRB_DESC= ${KERBEROS_DESC} +NOKRB_DESC= Without Kerberos support HEIMDAL_DESC= With Heimdal Kerberos support HEIMDAL_PORT_DESC= With Heimdal Kerberos from ports +MITKRB_PORT_DESC= With MIT Kerberos from ports UNIXODBC_DESC= With unixODBC database support +UNBOUND_DESC= With unbound DNS support FIREBIRD_DESC= With Firebird database support (EXPERIMENTAL) EXPERIMENTAL_DESC= Build experimental modules UDPFROMTO_DESC= Compile in UDPFROMTO support @@ -58,8 +63,60 @@ DEVELOPER_DESC= Enable developer options EDIR_DESC= Enable eDirectory support (implies LDAP) REST_DESC= Enable RESTful API support -SQLITE3_CONFIGURE_WITH=rlm_sql_sqlite -SQLITE3_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +EDIR_CONFIGURE_WITH= edir +EDIR_IMPLIES= LDAP +FREETDS_CONFIGURE_WITH= rlm_freetds +FREETDS_CONFIGURE_OFF= --without-freetds +FREETDS_LIB_DEPENDS= libct.so:databases/freetds +HEIMDAL_CONFIGURE_ON= --with-rlm-krb5-dir=/ +HEIMDAL_PORT_LIB_DEPENDS= libkrb5.so:security/heimdal +HEIMDAL_PORT_CONFIGURE_ON= --with-rlm-krb5-dir=${LOCALBASE} +HEIMDAL_VARS= CONFLICTS_BUILD+=krb5-[0-9].* +IDN_CONFIGURE_WITH= rlm_idn +IDN_LIB_DEPENDS= libidn.so:dns/libidn +FIREBIRD_CONFIGURE_WITH= rlm_sql_firebird +FIREBIRD_VARS= USES+=firebird +LDAP_CONFIGURE_WITH= rlm_ldap +LDAP_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 +LDAP_USE= OPENLDAP +LDAP_VARS= _REQUIRE+=slapd +MITKRB_PORT_CONFIGURE_ON= --with-rlm-krb5-dir=${LOCALBASE} +MITKRB_PORT_LIB_DEPENDS= libkrb5support.so:security/krb5 +MITKRB_VARS= CONFLICTS_BUILD+=heimdal-[0-9].* +MYSQL_CONFIGURE_WITH= rlm_sql_mysql +MYSQL_USE= MYSQL +MYSQL_VARS= _REQUIRE+=mysql +NOKRB_CONFIGURE_ON= --without-rlm_krb5 +NOKRB_VARS= PLIST_SUB+=RLMKRB5="@comment " +NOKRB_VARS_OFF= PLIST_SUB+=RLMKRB5="" +PERL_CONFIGURE_WITH= rlm_perl +PERL_CONFIGURE_OFF= --without-perl +PERL_VARS= USES+=perl5 +PGSQL_VARS= USES+=pgsql _REQUIRE+=postgresql +PGSQL_CONFIGURE_WITH= rlm_sql_postgresql +PYTHON_CONFIGURE_WITH= rlm_python +PYTHON_CONFIGURE_ON= --with-rlm-python-lib-dir=${PYTHON_LIBDIR} \ + --with-rlm-python-include-dir=${PYTHON_INCLUDEDIR} +PYTHON_VARS= USES+=python USES+=gettext-runtime \ + SHEBANG_FILES+=src/modules/rlm_python/*.py +REDIS_CONFIGURE_WITH= rlm_redis rlm_rediswho +REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis +REST_CONFIGURE_WITH= rlm_rest +REST_CONFIGURE_ON= --with-libcurl=${LOCALBASE} \ + --with-jsonc-lib-dir=${LOCALBASE}/lib \ + --with-jsonc-include-dir=${LOCALBASE}/include +REST_LIB_DEPENDS= libcurl.so:ftp/curl \ + libjson-c.so:devel/json-c +RUBY_CONFIGURE_WITH= rlm_ruby +RUBY_USE= RUBY +RUBY_VARS= IGNORE+=with ruby support leaks memory, breaks signal handling. Please disable RUBY support +SQLITE3_CONFIGURE_WITH= rlm_sql_sqlite +SQLITE3_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +UDPFROMTO_CONFIGURE_OFF= --without-udpfromto +UNBOUND_CONFIGURE_WITH= rlm_unbound +UNBOUND_LIB_DEPENDS= libunbound.so:dns/unbound +UNIXODBC_CONFIGURE_WITH= rlm_sql_unixodbc +UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC .include @@ -79,184 +136,32 @@ RADIUS_GROUP= freeradius USERS= ${RADIUS_USER} GROUPS= ${RADIUS_GROUP} -.if ${PORT_OPTIONS:MKERBEROS} || ${PORT_OPTIONS:MHEIMDAL} -.if ${PORT_OPTIONS:MHEIMDAL} -.if ${PORT_OPTIONS:MHEIMDAL_PORT} -LIB_DEPENDS+= libkrb5.so:security/heimdal -.endif -CONFIGURE_ARGS+=--enable-heimdal-krb5 --enable-pthread-support -.else -LIB_DEPENDS+= libkrb5support.so:security/krb5 -.endif -CONFIGURE_ARGS+=--with-rlm_krb5 -.if ${PORT_OPTIONS:MHEIMDAL} && empty(PORT_OPTIONS:MHEIMDAL_PORT) -CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=/usr/lib -CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=/usr/include -CONFIGURE_ENV+= KRB5LIBS="$$(${KRB5_CONFIG})" -.else -CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=${LOCALBASE}/lib -CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=${LOCALBASE}/include -.endif -PLIST_SUB+= KRB5="" -.else -CONFIGURE_ARGS+=--without-rlm_krb5 -PLIST_SUB+= KRB5="@comment " -.endif - -.if ${PORT_OPTIONS:MEDIR} -CONFIGURE_ARGS+=--with-edir -.if empty(PORT_OPTIONS:MLDAP) -PORT_OPTIONS+= LDAP -.endif -.else -CONFIGURE_ARGS+=--without-edir -.endif - -.if ${PORT_OPTIONS:MLDAP} -USE_OPENLDAP= YES -LIB_DEPENDS+= libsasl2.so:security/cyrus-sasl2 -CONFIGURE_ARGS+=--with-rlm_ldap -PLIST_SUB+= LDAP="" -_REQUIRE+= slapd -.else -CONFIGURE_ARGS+=--without-rlm_ldap -PLIST_SUB+= LDAP="@comment " -.endif - -.if ${PORT_OPTIONS:MMYSQL} -USE_MYSQL= YES -CONFIGURE_ARGS+=--with-rlm_sql_mysql -PLIST_SUB+= MYSQL="" -_REQUIRE+= mysql -.else -CONFIGURE_ARGS+=--without-rlm_sql_mysql -PLIST_SUB+= MYSQL="@comment " -.endif - -.if ${PORT_OPTIONS:MPGSQL} -USES+= pgsql -CONFIGURE_ARGS+=--with-rlm_sql_postgresql -PLIST_SUB+= PGSQL="" -_REQUIRE+= postgresql -.else -CONFIGURE_ARGS+=--without-rlm_sql_postgresql -PLIST_SUB+= PGSQL="@comment " -.endif - -.if ${PORT_OPTIONS:MUNIXODBC} -CONFIGURE_ARGS+=--with-rlm_sql_unixodbc -PLIST_SUB+= UNIXODBC="" -LIB_DEPENDS+= libodbc.so:databases/unixODBC -.else -CONFIGURE_ARGS+=--without-rlm_sql_unixodbc -PLIST_SUB+= UNIXODBC="@comment " -.endif - -.if ${PORT_OPTIONS:MFIREBIRD} -USES+= firebird -CONFIGURE_ARGS+=--with-rlm_sql_firebird -PLIST_SUB+= FIREBIRD="" -.else -CONFIGURE_ARGS+=--without-rlm_sql_firebird -PLIST_SUB+= FIREBIRD="@comment " -.endif - # Firebird module is still experimental .if ${PORT_OPTIONS:MFIREBIRD} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif -.if ${PORT_OPTIONS:MPERL} -USES+= perl5 -CONFIGURE_ARGS+=--with-rlm_perl -PLIST_SUB+= RLMPERL="" -.else -CONFIGURE_ARGS+=--without-perl --without-rlm_perl -PLIST_SUB+= RLMPERL="@comment " -.endif - -.if ${PORT_OPTIONS:MPYTHON} -USES+= python -CONFIGURE_ARGS+=--with-rlm_python \ - --with-rlm-python-lib-dir=${PYTHON_LIBDIR} \ - --with-rlm-python-include-dir=${PYTHON_INCLUDEDIR} -PLIST_SUB+= RLMPYTHON="" -.else -CONFIGURE_ARGS+=--without-rlm_python -PLIST_SUB+= RLMPYTHON="@comment " -.endif - -.if ${PORT_OPTIONS:MRUBY} -IGNORE= with ruby support leaks memory, breaks signal handling. Please disable RUBY support -USE_RUBY= yes -CONFIGURE_ARGS+=--with-rlm_ruby -PLIST_SUB+= RLMRUBY="" -.else -CONFIGURE_ARGS+=--without-rlm_ruby --with-ruby=no -PLIST_SUB+= RLMRUBY="@comment " -.endif - # rlm_ruby module is still experimental .if ${PORT_OPTIONS:MRUBY} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif -.if ${PORT_OPTIONS:MREDIS} -LIB_DEPENDS+= libhiredis.so:databases/hiredis -CONFIGURE_ARGS+=--with-rlm_redis --with-rlm_rediswho -PLIST_SUB+= RLMREDIS="" -.else -CONFIGURE_ARGS+=--without-rlm_redis --without-rlm_rediswho -PLIST_SUB+= RLMREDIS="@comment " -.endif - # redis module is still experimental .if ${PORT_OPTIONS:MREDIS} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif -.if ${PORT_OPTIONS:MREST} -LIB_DEPENDS+= libjson-c.so:devel/json-c \ - libcurl.so:ftp/curl -CONFIGURE_ARGS+=--with-rlm_rest \ - --with-libcurl=${LOCALBASE} \ - --with-jsonc-lib-dir=${LOCALBASE}/lib \ - --with-jsonc-include-dir=${LOCALBASE}/include -PLIST_SUB+= RLMREST="" -.else -CONFIGURE_ARGS+=--without-rlm_rest -PLIST_SUB+= RLMREST="@comment " -.endif - # rest module is still experimental .if ${PORT_OPTIONS:MREST} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif -.if ${PORT_OPTIONS:MFREETDS} -LIB_DEPENDS+= libct.so:databases/freetds -CONFIGURE_ARGS+=--with-rlm_freetds -PLIST_SUB+= RLMFREETDS="" -.else -CONFIGURE_ARGS+=--without-rlm_freetds -PLIST_SUB+= RLMFREETDS="@comment " -.endif - # freetds module is still experimental .if ${PORT_OPTIONS:MFREETDS} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif -.if ${PORT_OPTIONS:MIDN} -LIB_DEPENDS+= libidn.so:dns/libidn -CONFIGURE_ARGS+=--with-rlm_idn -PLIST_SUB+= RLMIDN="" -.else -CONFIGURE_ARGS+=--without-rlm_idn -PLIST_SUB+= RLMIDN="@comment " -.endif - -# freetds module is still experimental +# idn module is still experimental .if ${PORT_OPTIONS:MIDN} && empty(PORT_OPTIONS:MEXPERIMENTAL) EXPM= yes .endif @@ -277,11 +182,6 @@ CFLAGS!= ${ECHO} ${CFLAGS} | ${SED} -Ee 's:-O[0-9]?[[:space:]]*::g' CONFIGURE_ARGS+=--quiet .endif -# Compile in UDPFROMTO support -.if ${PORT_OPTIONS:MUDPFROMTO} -CONFIGURE_ARGS+=--with-udpfromto -.endif - .include # if we're installing, place sample configs into ${EXAMPLESDIR} diff --git a/net/freeradius3/pkg-plist b/net/freeradius3/pkg-plist index 088f50d0a89b..c9d33bfc09cd 100644 --- a/net/freeradius3/pkg-plist +++ b/net/freeradius3/pkg-plist @@ -133,9 +133,9 @@ include/freeradius/vqp.h %%LIBDIR%%/rlm_dynamic_clients.a %%LIBDIR%%/rlm_dynamic_clients.la %%LIBDIR%%/rlm_dynamic_clients.so -%%RLMIDN%%%%LIBDIR%%/rlm_idn.a -%%RLMIDN%%%%LIBDIR%%/rlm_idn.la -%%RLMIDN%%%%LIBDIR%%/rlm_idn.so +%%IDN%%%%LIBDIR%%/rlm_idn.a +%%IDN%%%%LIBDIR%%/rlm_idn.la +%%IDN%%%%LIBDIR%%/rlm_idn.so %%LIBDIR%%/rlm_eap.a %%LIBDIR%%/rlm_eap.la %%LIBDIR%%/rlm_eap.so @@ -187,9 +187,9 @@ include/freeradius/vqp.h %%LIBDIR%%/rlm_ippool.a %%LIBDIR%%/rlm_ippool.la %%LIBDIR%%/rlm_ippool.so -%%KRB5%%%%LIBDIR%%/rlm_krb5.a -%%KRB5%%%%LIBDIR%%/rlm_krb5.la -%%KRB5%%%%LIBDIR%%/rlm_krb5.so +%%RLMKRB5%%%%LIBDIR%%/rlm_krb5.a +%%RLMKRB5%%%%LIBDIR%%/rlm_krb5.la +%%RLMKRB5%%%%LIBDIR%%/rlm_krb5.so %%LDAP%%%%LIBDIR%%/rlm_ldap.a %%LDAP%%%%LIBDIR%%/rlm_ldap.la %%LDAP%%%%LIBDIR%%/rlm_ldap.so @@ -214,15 +214,15 @@ include/freeradius/vqp.h %%LIBDIR%%/rlm_passwd.a %%LIBDIR%%/rlm_passwd.la %%LIBDIR%%/rlm_passwd.so -%%RLMPERL%%%%LIBDIR%%/rlm_perl.a -%%RLMPERL%%%%LIBDIR%%/rlm_perl.la -%%RLMPERL%%%%LIBDIR%%/rlm_perl.so +%%PERL%%%%LIBDIR%%/rlm_perl.a +%%PERL%%%%LIBDIR%%/rlm_perl.la +%%PERL%%%%LIBDIR%%/rlm_perl.so %%LIBDIR%%/rlm_preprocess.a %%LIBDIR%%/rlm_preprocess.la %%LIBDIR%%/rlm_preprocess.so -%%RLMPYTHON%%%%LIBDIR%%/rlm_python.a -%%RLMPYTHON%%%%LIBDIR%%/rlm_python.la -%%RLMPYTHON%%%%LIBDIR%%/rlm_python.so +%%PYTHON%%%%LIBDIR%%/rlm_python.a +%%PYTHON%%%%LIBDIR%%/rlm_python.la +%%PYTHON%%%%LIBDIR%%/rlm_python.so %%LIBDIR%%/rlm_radutmp.a %%LIBDIR%%/rlm_radutmp.la %%LIBDIR%%/rlm_radutmp.so @@ -241,24 +241,24 @@ include/freeradius/vqp.h %%LIBDIR%%/rlm_sometimes.a %%LIBDIR%%/rlm_sometimes.la %%LIBDIR%%/rlm_sometimes.so -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_redis.a -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_redis.la -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_redis.so -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_rediswho.a -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_rediswho.la -%%EXPM%%%%RLMREDIS%%%%LIBDIR%%/rlm_rediswho.so -%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.a -%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.la -%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.so +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_redis.a +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_redis.la +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_redis.so +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_rediswho.a +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_rediswho.la +%%EXPM%%%%REDIS%%%%LIBDIR%%/rlm_rediswho.so +%%EXPM%%%%RUBY%%%%LIBDIR%%/rlm_ruby.a +%%EXPM%%%%RUBY%%%%LIBDIR%%/rlm_ruby.la +%%EXPM%%%%RUBY%%%%LIBDIR%%/rlm_ruby.so %%LIBDIR%%/rlm_sql.a %%LIBDIR%%/rlm_sql.la %%LIBDIR%%/rlm_sql.so %%EXPM%%%%FIREBIRD%%%%LIBDIR%%/rlm_sql_firebird.a %%EXPM%%%%FIREBIRD%%%%LIBDIR%%/rlm_sql_firebird.la %%EXPM%%%%FIREBIRD%%%%LIBDIR%%/rlm_sql_firebird.so -%%EXPM%%%%RLMFREETDS%%%%LIBDIR%%/rlm_sql_freetds.a -%%EXPM%%%%RLMFREETDS%%%%LIBDIR%%/rlm_sql_freetds.la -%%EXPM%%%%RLMFREETDS%%%%LIBDIR%%/rlm_sql_freetds.so +%%EXPM%%%%FREETDS%%%%LIBDIR%%/rlm_sql_freetds.a +%%EXPM%%%%FREETDS%%%%LIBDIR%%/rlm_sql_freetds.la +%%EXPM%%%%FREETDS%%%%LIBDIR%%/rlm_sql_freetds.so %%MYSQL%%%%LIBDIR%%/rlm_sql_mysql.a %%MYSQL%%%%LIBDIR%%/rlm_sql_mysql.la %%MYSQL%%%%LIBDIR%%/rlm_sql_mysql.so @@ -268,9 +268,9 @@ include/freeradius/vqp.h %%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.a %%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.la %%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.so -%%EXPM%%%%RLMREST%%%%LIBDIR%%/rlm_rest.a -%%EXPM%%%%RLMREST%%%%LIBDIR%%/rlm_rest.la -%%EXPM%%%%RLMREST%%%%LIBDIR%%/rlm_rest.so +%%EXPM%%%%REST%%%%LIBDIR%%/rlm_rest.a +%%EXPM%%%%REST%%%%LIBDIR%%/rlm_rest.la +%%EXPM%%%%REST%%%%LIBDIR%%/rlm_rest.so %%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.a %%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.la %%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.so @@ -286,6 +286,10 @@ include/freeradius/vqp.h %%SQLITE3%%%%LIBDIR%%/rlm_sql_sqlite.a %%SQLITE3%%%%LIBDIR%%/rlm_sql_sqlite.la %%SQLITE3%%%%LIBDIR%%/rlm_sql_sqlite.so +%%UNBOUND%%%%LIBDIR%%/rlm_unbound.a +%%UNBOUND%%%%LIBDIR%%/rlm_unbound.la +%%UNBOUND%%%%LIBDIR%%/rlm_unbound.so +%%UNBOUND%%man/man5/rlm_unbound.5.gz %%LIBDIR%%/rlm_test.a %%LIBDIR%%/rlm_test.la %%LIBDIR%%/rlm_test.so @@ -590,11 +594,11 @@ sbin/radmin %%EXAMPLESDIR%%/raddb/mods-config/files/accounting %%EXAMPLESDIR%%/raddb/mods-config/files/authorize %%EXAMPLESDIR%%/raddb/mods-config/files/pre-proxy -%%RLMPERL%%%%EXAMPLESDIR%%/raddb/mods-config/perl/example.pl +%%PERL%%%%EXAMPLESDIR%%/raddb/mods-config/perl/example.pl %%EXAMPLESDIR%%/raddb/mods-config/preprocess/hints %%EXAMPLESDIR%%/raddb/mods-config/preprocess/huntgroups -%%RLMPYTHON%%%%EXAMPLESDIR%%/raddb/mods-config/python/example.py -%%RLMPYTHON%%%%EXAMPLESDIR%%/raddb/mods-config/python/radiusd.py +%%PYTHON%%%%EXAMPLESDIR%%/raddb/mods-config/python/example.py +%%PYTHON%%%%EXAMPLESDIR%%/raddb/mods-config/python/radiusd.py %%EXAMPLESDIR%%/raddb/mods-config/sql/counter/mysql/dailycounter.conf %%EXAMPLESDIR%%/raddb/mods-config/sql/counter/mysql/expire_on_login.conf %%EXAMPLESDIR%%/raddb/mods-config/sql/counter/mysql/monthlycounter.conf