ports/120666: [patch] net/gnu-radius unbreak fix build with GCC 4.2 + update to latest 1.5 version + adopt maintainship

Pietro Cerutti gahr at gahr.ch
Thu Feb 14 20:00:11 UTC 2008


>Number:         120666
>Category:       ports
>Synopsis:       [patch] net/gnu-radius unbreak fix build with GCC 4.2 + update to latest 1.5 version + adopt maintainship
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 14 20:00:10 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pietro Cerutti
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #4: Wed Feb 13 18:13:34 CET 2008
    root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034



>Description:





>How-To-Repeat:





>Fix:


--- _gnu-radius.diff begins here ---
diff -ruN gnu-radius.orig/Makefile gnu-radius/Makefile
--- gnu-radius.orig/Makefile	2007-08-04 12:21:28.000000000 +0200
+++ gnu-radius/Makefile	2008-02-14 20:50:49.000000000 +0100
@@ -5,25 +5,23 @@
 # $FreeBSD: ports/net/gnu-radius/Makefile,v 1.38 2007/08/04 10:21:28 nobutaka Exp $
 
 PORTNAME=	gnu-radius
-PORTVERSION=	1.3
-PORTREVISION=	3
+PORTVERSION=	1.5
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	radius
 DISTNAME=	radius-${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	gahr at gahr.ch
 COMMENT=	GNU RADIUS server
 
 CONFLICTS=	freeradius-0.* openradius-0.* radiusd-cistron-1.*
-USE_RC_SUBR=	yes
+USE_RC_SUBR=	radiusd.sh
 USE_SUBMAKE=	yes
 USE_GMAKE=	yes
 USE_AUTOTOOLS=	libltdl:15 libtool:15
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
-USE_GETTEXT=	yes
-CONFIGURE_TARGET=	# empty
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 SUB_FILES=	radiusd.sh
@@ -46,7 +44,8 @@
 		POSTGRESQL "Enable PostgreSQL support" off \
 		SNMP "Enable SNMP support" off \
 		NOTIFY "Enable TTL notification" off \
-		EMACS "Enable emacs dotfiles install" off
+		EMACS "Enable emacs dotfiles install" off \
+		NLS	"Enable gettext support" on
 
 CONFIG_FILES=	access.deny client.conf clients config dictionary \
 		hints huntgroups naslist nastypes realms \
@@ -56,10 +55,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 700042
-BROKEN=		Broken with gcc 4.2
-.endif
-
 .if defined(WITH_SNMP)
 CONFIGURE_ARGS+=	--enable-snmp
 .endif
@@ -110,11 +105,25 @@
 CONFIGURE_ARGS+=	--with-lispdir=${PREFIX}/${EMACS_SITE_LISPDIR}
 PLIST_SUB+=	EMACS=""
 .else
-EXTRA_PATCHES+=		${FILESDIR}/extrapatch-emacs
 CONFIGURE_ARGS+=	--without-lispdir
 PLIST_SUB+=	EMACS="@comment "
 .endif
 
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS+=	--disable-nl
+PLIST_SUB+=	NLS="@comment "
+.else
+USE_GETTEXT=	yes
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+PLIST_SUB+=	NLS=""
+.endif
+
+post-patch:
+	${REINPLACE_CMD} -e 's|extern unsigned scheme_gc_interval;||g' \
+		${WRKSRC}/include/radiusd.h
+
 post-install:
 	${INSTALL_SCRIPT} ${WRKDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
 .if !defined(NOPORTDOCS)
diff -ruN gnu-radius.orig/distinfo gnu-radius/distinfo
--- gnu-radius.orig/distinfo	2006-01-22 22:23:06.000000000 +0100
+++ gnu-radius/distinfo	2008-02-14 20:50:49.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (radius-1.3.tar.gz) = ab0223f6504355c4827a7c03cb4e21b0
-SHA256 (radius-1.3.tar.gz) = 3e2bd3f2e6f9b062ccc2fde80fa26e46a2a2f3645227daca427501135e5846c5
-SIZE (radius-1.3.tar.gz) = 2047469
+MD5 (radius-1.5.tar.gz) = 8a33dedd29cec62fc9ba33f04a54bf81
+SHA256 (radius-1.5.tar.gz) = 74f11ed438452fd7b686c9691a466d2b632a9560a7e9a540d82cf716e22d74f8
+SIZE (radius-1.5.tar.gz) = 2490324
diff -ruN gnu-radius.orig/files/patch-intl::Makefile.in gnu-radius/files/patch-intl::Makefile.in
--- gnu-radius.orig/files/patch-intl::Makefile.in	2005-05-05 22:33:27.000000000 +0200
+++ gnu-radius/files/patch-intl::Makefile.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,103 +0,0 @@
---- intl/Makefile.in.orig	Tue May  3 16:14:12 2005
-+++ intl/Makefile.in	Tue May  3 16:22:23 2005
-@@ -123,7 +123,7 @@
-   osdep.$lo \
-   intl-compat.$lo
- DISTFILES.common = Makefile.in \
--config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
-+ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
- DISTFILES.generated = plural.c
- DISTFILES.normal = VERSION
- DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
-@@ -132,7 +132,7 @@
- COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
- 
- all: all- at USE_INCLUDED_LIBINTL@
--all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
-+all-yes: libintl.$la libintl.h ref-add.sed ref-del.sed
- all-no: all-no- at BUILD_INCLUDED_LIBINTL@
- all-no-yes: libgnuintl.$la
- all-no-no:
-@@ -229,10 +229,6 @@
- libintl.h: libgnuintl.h
- 	cp libgnuintl.h libintl.h
- 
--charset.alias: $(srcdir)/config.charset
--	$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
--	mv t-$@ $@
--
- check: all
- 
- # We must not install the libintl.h/libintl.a files if we are on a
-@@ -271,30 +267,6 @@
- 	fi
- 	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
- 	  test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
--	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
--	  dest=$(DESTDIR)$(libdir)/charset.alias; \
--	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
--	    orig=$(DESTDIR)$(libdir)/charset.alias; \
--	    sed -f ref-add.sed $$orig > $$temp; \
--	    $(INSTALL_DATA) $$temp $$dest; \
--	    rm -f $$temp; \
--	  else \
--	    if test @GLIBC21@ = no; then \
--	      orig=charset.alias; \
--	      sed -f ref-add.sed $$orig > $$temp; \
--	      $(INSTALL_DATA) $$temp $$dest; \
--	      rm -f $$temp; \
--	    fi; \
--	  fi; \
--	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
--	  test -f $(DESTDIR)$(localedir)/locale.alias \
--	    && orig=$(DESTDIR)$(localedir)/locale.alias \
--	    || orig=$(srcdir)/locale.alias; \
--	  temp=$(DESTDIR)$(localedir)/t-locale.alias; \
--	  dest=$(DESTDIR)$(localedir)/locale.alias; \
--	  sed -f ref-add.sed $$orig > $$temp; \
--	  $(INSTALL_DATA) $$temp $$dest; \
--	  rm -f $$temp; \
- 	else \
- 	  : ; \
- 	fi
-@@ -308,7 +280,6 @@
- 	    $(INSTALL_DATA) $(srcdir)/$$file \
- 			    $(DESTDIR)$(gettextsrcdir)/$$file; \
- 	  done; \
--	  chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
- 	  dists="$(DISTFILES.generated)"; \
- 	  for file in $$dists; do \
- 	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-@@ -365,32 +336,6 @@
- 	if test "$(PACKAGE)" = "gettext-tools" \
- 	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
- 	  rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
--	else \
--	  : ; \
--	fi
--	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
--	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
--	    temp=$(DESTDIR)$(libdir)/t-charset.alias; \
--	    dest=$(DESTDIR)$(libdir)/charset.alias; \
--	    sed -f ref-del.sed $$dest > $$temp; \
--	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
--	      rm -f $$dest; \
--	    else \
--	      $(INSTALL_DATA) $$temp $$dest; \
--	    fi; \
--	    rm -f $$temp; \
--	  fi; \
--	  if test -f $(DESTDIR)$(localedir)/locale.alias; then \
--	    temp=$(DESTDIR)$(localedir)/t-locale.alias; \
--	    dest=$(DESTDIR)$(localedir)/locale.alias; \
--	    sed -f ref-del.sed $$dest > $$temp; \
--	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
--	      rm -f $$dest; \
--	    else \
--	      $(INSTALL_DATA) $$temp $$dest; \
--	    fi; \
--	    rm -f $$temp; \
--	  fi; \
- 	else \
- 	  : ; \
- 	fi
diff -ruN gnu-radius.orig/pkg-plist gnu-radius/pkg-plist
--- gnu-radius.orig/pkg-plist	2007-05-19 22:18:29.000000000 +0200
+++ gnu-radius/pkg-plist	2008-02-14 20:50:49.000000000 +0100
@@ -46,16 +46,13 @@
 etc/raddb/users-dist
 etc/rc.d/radiusd.sh
 include/radius/argcv.h
-include/radius/argp.h
+include/radius/debug.h
 include/radius/dictionary.h
 include/radius/envar.h
-include/radius/getopt.h
 include/radius/list.h
 include/radius/md4.h
 include/radius/md5.h
 include/radius/mem.h
-include/radius/obstack.h
-include/radius/radargp.h
 include/radius/raddbm.h
 include/radius/radius.h
 include/radius/radpaths.h
@@ -69,20 +66,24 @@
 lib/libgnuradius.la
 lib/libgnuradius.so.0
 %%GUILE%%bin/radsession
-%%GUILE%%lib/libguile-gnuradius-v-1.3.so
+%%GUILE%%lib/libguile-gnuradius-v-1.5.so
 %%GUILE%%lib/libradscm.a
 %%GUILE%%lib/libradscm.la
 %%GUILE%%lib/libradscm.so
-%%GUILE%%lib/libradscm.so.0
+%%GUILE%%lib/libradscm.so.1
 %%GUILE%%lib/libservscm.a
 %%CLIENT%%lib/security/pam_radius.a
 %%CLIENT%%lib/security/pam_radius.la
 %%CLIENT%%lib/security/pam_radius.so
 %%CLIENT%%libexec/nas.scm
-share/locale/ca/LC_MESSAGES/radius.mo
-share/locale/es/LC_MESSAGES/radius.mo
-share/locale/pl/LC_MESSAGES/radius.mo
-share/locale/ru/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/es/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/rw/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/radius.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/radius.mo
 %%GUILE%%%%DATADIR%%/%%PORTVERSION%%/scheme/gnuradius.scm
 %%GUILE%%%%DATADIR%%/%%PORTVERSION%%/scheme/ipalloc.scm
 %%GUILE%%%%DATADIR%%/%%PORTVERSION%%/scheme/radiusd.scm
@@ -122,6 +123,6 @@
 @dirrm %%DATADIR%%/%%PORTVERSION%%
 @dirrm %%DATADIR%%
 @dirrmtry lib/security
- at unexec rm -f /var/run/radiusd.pid
- at unexec rm -rf /var/log/radius
+ at unexec rm -f %B/run/radiusd.pid
+ at 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."
--- _gnu-radius.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list