Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2016 14:02:41 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411356 - in head/net/gnu-radius: . files
Message-ID:  <201603181402.u2IE2fOn059279@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Fri Mar 18 14:02:41 2016
New Revision: 411356
URL: https://svnweb.freebsd.org/changeset/ports/411356

Log:
  net/gnu-radius: Modernize port
  
  - OptionsNG
  - LICENSE
  - Whitespace cleanup
  - EXAMPLE rewrite
  - Remove @unexec
  - radiusd.in modification
  - files/patch-dbm -> files/patch-radiusd_builddbm.c move and fix
  
  PR:		206457

Added:
  head/net/gnu-radius/files/patch-radiusd_builddbm.c   (contents, props changed)
Deleted:
  head/net/gnu-radius/files/patch-dbm
Modified:
  head/net/gnu-radius/Makefile
  head/net/gnu-radius/files/patch-configure
  head/net/gnu-radius/files/patch-include-radius_radutmp.h
  head/net/gnu-radius/files/patch-raddb_Makefile.in
  head/net/gnu-radius/files/patch-radwho_radwho.c
  head/net/gnu-radius/files/radiusd.in
  head/net/gnu-radius/pkg-plist

Modified: head/net/gnu-radius/Makefile
==============================================================================
--- head/net/gnu-radius/Makefile	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/Makefile	Fri Mar 18 14:02:41 2016	(r411356)
@@ -11,6 +11,9 @@ DISTNAME=	radius-${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	GNU RADIUS server
 
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 LIB_DEPENDS=	libltdl.so:${PORTSDIR}/devel/libltdl
 
 CONFLICTS=	freeradius-0.* openradius-0.* radiusd-cistron-1.*
@@ -34,89 +37,37 @@ SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFI
 CONFIGURE_ARGS+=--with-include-path="${LOCALBASE}/include/" \
 		--with-lib-path="${LOCALBASE}/lib/"
 
-OPTIONS_DEFINE=	CLIENT EXAMPLES DBM MYSQL PGSQL SNMP EMACS PAM
+OPTIONS_DEFINE=	CLIENT MYSQL PGSQL EXAMPLES DBM SNMP EMACS PAM NLS
 OPTIONS_DEFAULT=MYSQL
+OPTIONS_SUB=	yes
 CLIENT_DESC=	Build client
 EMACS_DESC=	Install Emacs dotfiles
 
-EXAMPLE_FILES=	README ascend.rw c3620.rw cisco.rw comos.rw config.syntax \
-		filter.rw hints-0.96 jetstream.rw nt.rw pam.conf radius.php
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSNMP}
-CONFIGURE_ARGS+=--enable-snmp
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT}
-LIB_DEPENDS+=	libguile.so:${PORTSDIR}/lang/guile
-CONFIGURE_ARGS+=--enable-client
-PLIST_SUB+=	CLIENT=""
-.else
-CONFIGURE_ARGS+=--without-guile
-PLIST_SUB+=	CLIENT="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL=	yes
-CONFIGURE_ARGS+=--with-mysql
-PLIST_SUB+=	MYSQL=""
-.else
-PLIST_SUB+=	MYSQL="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPGSQL}
-USES+=		pgsql
-CONFIGURE_ARGS+=--with-postgres
-PLIST_SUB+=	PGSQL=""
-.else
-PLIST_SUB+=	PGSQL="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL}
-PLIST_SUB+=	MODULES=""
-.else
-PLIST_SUB+=	MODULES="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDBM}
-CONFIGURE_ARGS+=--enable-dbm=ndbm
-.endif
-
-.if ${PORT_OPTIONS:MEMACS}
-.include "${PORTSDIR}/Mk/bsd.emacs.mk"
-USE_EMACS=	yes
-CONFIGURE_ARGS+=--with-lispdir=${PREFIX}/${EMACS_SITE_LISPDIR}
-PLIST_SUB+=	EMACS=""
-.else
-CONFIGURE_ARGS+=--without-lispdir
-PLIST_SUB+=	EMACS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USES+=		gettext
-PLIST_SUB+=	NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+=	NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPAM}
-CONFIGURE_ARGS+=--enable-pam
-.endif
+SNMP_CONFIGURE_ENABLE=		snmp
+CLIENT_CONFIGURE_ENABLE=	client
+CLIENT_LIB_DEPENDS=		libguile.so:${PORTSDIR}/lang/guile
+CLIENT_CONFIGURE_OFF=		--without-guile
+MYSQL_USE=			mysql=yes
+MYSQL_CONFIGURE_WITH=		mysql
+PGSQL_USES=			pgsql
+PGSQL_CONFIGURE_WITH=		postgres
+DBM_CONFIGURE_ENABLE=		dbm=ndbm
+EMACS_USE=			emacs=yes
+EMACS_CONFIGURE_WITH=		lispdir=${PREFIX}/${EMACS_SITE_LISPDIR}
+NLS_USES=			gettext
+NLS_CONFIGURE_OFF=		--disable-nls
+PAM_CONFIGURE_ENABLE=		pam
 
 post-patch:
 	${REINPLACE_CMD} -e 's|extern unsigned scheme_gc_interval;||g' \
 		${WRKSRC}/include/radiusd.h
 	${REINPLACE_CMD} -e 's|int getline|ssize_t getline|' \
-	    ${WRKSRC}/radtest/input.l ${WRKSRC}/radtest/input.c
+		${WRKSRC}/radtest/input.l ${WRKSRC}/radtest/input.c
 
 post-install:
-.if ${PORT_OPTIONS:MEXAMPLES}
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-. for ex_file in ${EXAMPLE_FILES}
-	${INSTALL_DATA} ${WRKSRC}/examples/${ex_file} ${STAGEDIR}${EXAMPLESDIR}
-. endfor
-.endif
+	( cd ${WRKSRC}/examples && ${COPYTREE_SHARE} .\
+		${STAGEDIR}${EXAMPLESDIR}\
+		"! ( -name Makefile -o -name Makefile\.* ) " )
 
 .include <bsd.port.mk>

Modified: head/net/gnu-radius/files/patch-configure
==============================================================================
--- head/net/gnu-radius/files/patch-configure	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/files/patch-configure	Fri Mar 18 14:02:41 2016	(r411356)
@@ -1,6 +1,6 @@
---- configure.orig	Sat Nov 20 21:39:50 2004
-+++ configure	Wed Jul 27 23:13:31 2005
-@@ -22804,7 +22804,7 @@
+--- configure.orig	2008-12-17 11:09:36 UTC
++++ configure
+@@ -36624,7 +36624,7 @@ if test "${ra_cv_lib_mysqlclient+set}" =
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  
@@ -9,7 +9,7 @@
     do
        LIBS="$save_LIBS -lm -L$path -lmysqlclient"
        cat >conftest.$ac_ext <<_ACEOF
-@@ -22925,7 +22925,7 @@
+@@ -36742,7 +36742,7 @@ if test "${ra_cv_lib_pq+set}" = set; the
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
  

Modified: head/net/gnu-radius/files/patch-include-radius_radutmp.h
==============================================================================
--- head/net/gnu-radius/files/patch-include-radius_radutmp.h	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/files/patch-include-radius_radutmp.h	Fri Mar 18 14:02:41 2016	(r411356)
@@ -1,5 +1,5 @@
---- include/radius/radutmp.h.orig	2009-05-07 22:24:02.000000000 +0200
-+++ include/radius/radutmp.h	2009-05-07 22:24:45.000000000 +0200
+--- include/radius/radutmp.h.orig	2008-12-15 08:03:24 UTC
++++ include/radius/radutmp.h
 @@ -30,7 +30,7 @@
  #define P_ACCT_ENABLED  131
  

Modified: head/net/gnu-radius/files/patch-raddb_Makefile.in
==============================================================================
--- head/net/gnu-radius/files/patch-raddb_Makefile.in	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/files/patch-raddb_Makefile.in	Fri Mar 18 14:02:41 2016	(r411356)
@@ -1,6 +1,6 @@
---- raddb/Makefile.in.orig	Wed Jul 27 21:46:31 2005
-+++ raddb/Makefile.in	Wed Jul 27 21:52:38 2005
-@@ -556,10 +556,10 @@
+--- raddb/Makefile.in.orig	2008-12-17 11:09:50 UTC
++++ raddb/Makefile.in
+@@ -893,10 +893,10 @@ install-data-local:
  		echo '================================================================='; \
  	else \
  		for file in $(raddb_files_644); do \

Added: head/net/gnu-radius/files/patch-radiusd_builddbm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/gnu-radius/files/patch-radiusd_builddbm.c	Fri Mar 18 14:02:41 2016	(r411356)
@@ -0,0 +1,11 @@
+--- radiusd/builddbm.c.orig	2008-12-15 08:03:24 UTC
++++ radiusd/builddbm.c
+@@ -58,7 +58,7 @@ append_symbol(DBM_closure *closure, User
+ 
+         if (2 + check_len + reply_len > closure->pair_buffer_size) {
+                 grad_log(GRAD_LOG_ERR, "%s:%d: %s",
+-                         closure->filename, sym->lineno,
++                         closure->filename, sym->loc.line,
+ 		         _("too many attributes"));
+                 return -1;
+         }

Modified: head/net/gnu-radius/files/patch-radwho_radwho.c
==============================================================================
--- head/net/gnu-radius/files/patch-radwho_radwho.c	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/files/patch-radwho_radwho.c	Fri Mar 18 14:02:41 2016	(r411356)
@@ -1,6 +1,6 @@
---- radwho/radwho.c.orig	2010-01-21 22:29:51.000000000 +0100
-+++ radwho/radwho.c	2010-01-21 22:37:37.000000000 +0100
-@@ -41,7 +41,8 @@
+--- radwho/radwho.c.orig	2008-12-15 08:03:24 UTC
++++ radwho/radwho.c
+@@ -41,7 +41,8 @@ void print_header();
  int want_rad_record(struct radutmp *rt);
  
  /* UTMP stuff. Uses utmpx on svr4 */
@@ -10,7 +10,7 @@
  #  include <utmpx.h>
  #  include <sys/fcntl.h>
  #  define utmp utmpx
-@@ -49,7 +50,9 @@
+@@ -49,7 +50,9 @@ int want_rad_record(struct radutmp *rt);
  #  define UT_LINESIZE   32
  #  define UT_HOSTSIZE   257
  #  undef UTMP_FILE
@@ -20,7 +20,7 @@
  #  undef WTMP_FILE
  #  define WTMP_FILE WTMPX_FILE
  #else
-@@ -60,13 +63,19 @@
+@@ -60,13 +63,19 @@ int want_rad_record(struct radutmp *rt);
  #  define UT_LINESIZE   32
  #  define UT_HOSTSIZE   64
  #endif

Modified: head/net/gnu-radius/files/radiusd.in
==============================================================================
--- head/net/gnu-radius/files/radiusd.in	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/files/radiusd.in	Fri Mar 18 14:02:41 2016	(r411356)
@@ -2,7 +2,7 @@
 
 # $FreeBSD$
 #
-# PROVIDE radiusd
+# PROVIDE: radiusd
 # REQUIRE: NETWORKING SERVERS
 # BEFORE: DAEMON
 # KEYWORD: shutdown

Modified: head/net/gnu-radius/pkg-plist
==============================================================================
--- head/net/gnu-radius/pkg-plist	Fri Mar 18 13:57:45 2016	(r411355)
+++ head/net/gnu-radius/pkg-plist	Fri Mar 18 14:02:41 2016	(r411356)
@@ -78,7 +78,6 @@ share/aclocal/radius.m4
 %%NLS%%share/locale/id/LC_MESSAGES/radius.mo
 %%NLS%%share/locale/pl/LC_MESSAGES/radius.mo
 %%NLS%%share/locale/ru/LC_MESSAGES/radius.mo
-@comment %%NLS%%share/locale/rw/LC_MESSAGES/radius.mo
 %%NLS%%share/locale/uk/LC_MESSAGES/radius.mo
 %%NLS%%share/locale/vi/LC_MESSAGES/radius.mo
 %%CLIENT%%%%DATADIR%%/%%PORTVERSION%%/scheme/gnuradius.scm
@@ -109,7 +108,4 @@ share/aclocal/radius.m4
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pam.conf
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/radius.php
 @dir %%DATADIR%%/%%PORTVERSION%%/scheme
-@dir lib/security
-@unexec rm -f %B/run/radiusd.pid
-@unexec rm -rf %B/log/radius 2>&1 >/dev/null || true
-@unexec echo "Leaving /var/run/radutmp, /var/log/radwtmp and /var/log/radstat alone."
+@dir lib/radius/%%PORTVERSION%%/modules



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603181402.u2IE2fOn059279>