Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2018 07:48:21 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r485845 - in head/net/mpd5: . files
Message-ID:  <201811250748.wAP7mLNX069645@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Sun Nov 25 07:48:21 2018
New Revision: 485845
URL: https://svnweb.freebsd.org/changeset/ports/485845

Log:
  net/mpd5: fix build for systems having libressl installed
  
  Import upstream revisions r2258-r2260: do not use -I${LOCALBASE}/include
  by default when option NG_IPACCT is off. If NG_IPACCT is on,
  use -nostdinc to force needed header inclusion order to force
  usage of base system libssl.
  
  Bump PORTREVISION as package can change if built with default options
  when net-mgmt/ng_ipacct is installed.
  
  PR:	233471

Added:
  head/net/mpd5/files/extra-patch-no-ng_ipacct   (contents, props changed)
  head/net/mpd5/files/patch-configure   (contents, props changed)
Modified:
  head/net/mpd5/Makefile
  head/net/mpd5/files/patch-src-Makefile

Modified: head/net/mpd5/Makefile
==============================================================================
--- head/net/mpd5/Makefile	Sun Nov 25 05:55:05 2018	(r485844)
+++ head/net/mpd5/Makefile	Sun Nov 25 07:48:21 2018	(r485845)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mpd
 DISTVERSION=	5.8
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	net
 MASTER_SITES=	SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
 PKGNAMESUFFIX=	5
@@ -42,6 +42,9 @@ RUN_DEPENDS+=	${KMODDIR}/ng_ipacct.ko:net-mgmt/ng_ipac
 .else
 RUN_DEPENDS+=	/boot/modules/ng_ipacct.ko:net-mgmt/ng_ipacct
 .endif
+.else
+CONFIGURE_ENV+=	USE_NG_IPACCT=no
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-no-ng_ipacct
 .endif
 
 USE_RC_SUBR=	mpd5

Added: head/net/mpd5/files/extra-patch-no-ng_ipacct
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mpd5/files/extra-patch-no-ng_ipacct	Sun Nov 25 07:48:21 2018	(r485845)
@@ -0,0 +1,10 @@
+--- src/Makefile.orig	2018-11-25 14:23:23.317174000 +0700
++++ src/Makefile	2018-11-25 14:26:24.356555000 +0700
+@@ -56,7 +56,6 @@
+ USE_NG_BPF=		yes
+ USE_NG_CAR=		yes
+ USE_NG_DEFLATE=		yes
+-USE_NG_IPACCT=		yes
+ USE_NG_MPPC=		yes
+ USE_NG_NAT=		yes
+ USE_NG_NETFLOW=		yes

Added: head/net/mpd5/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mpd5/files/patch-configure	Sun Nov 25 07:48:21 2018	(r485845)
@@ -0,0 +1,23 @@
+Index: configure
+===================================================================
+--- src/configure	(revision 2259)
++++ src/configure	(working copy)
+@@ -33,7 +33,9 @@ else
+ fi
+ 
+ echo -n "Looking for ng_ipacct ..."
+-if [ -e /usr/include/netgraph/ng_ipacct.h \
++if [ "$USE_NG_IPACCT" = no ]; then
++    echo " disabled."
++else if [ -e /usr/include/netgraph/ng_ipacct.h \
+   -o -e /usr/local/include/netgraph/ng_ipacct.h ]
+ then
+     echo " found."
+@@ -41,6 +43,7 @@ then
+ else
+     echo " not found."
+ fi
++fi
+ 
+ echo -n "Looking for ng_mppc ..."
+ if [ -e /usr/include/netgraph/ng_mppc.h \

Modified: head/net/mpd5/files/patch-src-Makefile
==============================================================================
--- head/net/mpd5/files/patch-src-Makefile	Sun Nov 25 05:55:05 2018	(r485844)
+++ head/net/mpd5/files/patch-src-Makefile	Sun Nov 25 07:48:21 2018	(r485845)
@@ -1,7 +1,10 @@
---- src/Makefile	2016-01-06 22:42:06.000000000 +0700
-+++ src/Makefile	2017-07-02 17:48:59.910230000 +0700
-@@ -11,8 +11,17 @@
+--- src/Makefile.orig	2016-01-06 22:42:06.000000000 +0700
++++ src/Makefile	2018-11-25 13:48:31.977979000 +0700
+@@ -9,10 +9,20 @@
+ 
+ PROG?=			mpd5
  PREFIX?=		/usr/local
++LOCALBASE?=		${PREFIX}
  BINDIR?=		${PREFIX}/sbin
  VERSION=		5.8
 -NOMAN=
@@ -19,8 +22,18 @@
  
  BINOWN!=		/usr/bin/id -n -u
  BINGRP!=		/usr/bin/id -n -g
-@@ -72,7 +81,7 @@
+@@ -60,9 +70,6 @@
+ USE_AUTH_PAM=		yes
+ USE_AUTH_SYSTEM=	yes
  
+-# Build with builtin libpdel
+-NOLIBPDEL=		yes
+-
+ # Build without builtin web server.
+ #NOWEB=			yes
+ 
+@@ -72,7 +79,7 @@
+ 
  # Print wide protocol names instead of short names.
  # Comment this line, to save about 10 KB space
 -COPTS+=			-DPROTO_NAME_LIST
@@ -28,7 +41,7 @@
  
  # Reduce some internal structures size to save more memory
  # This is to limit amount of active sessions
-@@ -84,27 +93,27 @@
+@@ -84,27 +91,27 @@
  ## filter TCP accept connections
  LDADD+=		-lwrap
  DPADD+=		${LIBWRAP}
@@ -60,8 +73,17 @@
  .endif
  
  LDADD+=		-lnetgraph -lutil
-@@ -122,10 +131,10 @@
+@@ -113,19 +120,12 @@
+ LDADD+=		-L/usr/lib -lradius
+ DPADD+=		${LIBRADIUS}
  
+-## libpdel needs ssl and libexpat (libxml2 cannot be used)
+-.if !defined ( NOLIBPDEL )
+-LDADD+=		-L${PREFIX}/lib
+-LDADD+=		-lpdel
+-LDADD+=		-lexpat
+-.endif
+-
  MPD_VERSION!=	echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)"
  
 -COPTS+=		-DPATH_CONF_DIR='"${MPD_CONF_DIR}"'
@@ -75,8 +97,13 @@
  		-Wcast-align \
  		-Wchar-subscripts \
  		-Wformat \
-@@ -139,11 +148,11 @@
- 		-I${PREFIX}/include
+@@ -135,15 +135,14 @@
+ 		-Wnested-externs \
+ 		-Wpointer-arith \
+ 		-Wwrite-strings \
+-		-pthread \
+-		-I${PREFIX}/include
++		-pthread
  
  .if defined ( MPD_VENDOR )
 -COPTS+=		-DMPD_VENDOR='"${MPD_VENDOR}"'
@@ -89,7 +116,7 @@
  .endif
  
  # Standard sources
-@@ -155,14 +164,14 @@
+@@ -155,14 +154,13 @@
  		util.c vars.c eap.c msoft.c ippool.c
  
  .if defined ( NOWEB )
@@ -100,14 +127,20 @@
  LDADD+=		-lssl
  .endif
  
- .if defined ( NOLIBPDEL )
+-.if defined ( NOLIBPDEL )
 -COPTS+=		-DNOLIBPDEL -I./contrib/libpdel
-+CFLAGS+=		-DNOLIBPDEL -I./contrib/libpdel
++CFLAGS+=	-DNOLIBPDEL -I./contrib/libpdel
  PDPATH1=	contrib/libpdel/util:contrib/libpdel/structs
  PDPATH2=	contrib/libpdel/structs/type
  .if defined ( NOWEB )
-@@ -206,54 +215,54 @@
+@@ -200,60 +198,59 @@
+ 		string_fp.c \
+ 		timeout_fp.c
+ .endif
+-.endif
  
+ # Add sources and flags for the various physical layer types
+ 
  .if defined ( PHYSTYPE_MODEM )
  SRCS+=		modem.c chat.c
 -COPTS+=		-DPHYSTYPE_MODEM
@@ -176,7 +209,7 @@
  .endif
  .endif
  
-@@ -262,46 +271,46 @@
+@@ -262,46 +259,46 @@
  .if defined ( ECP_DES )
  SRCS+=		ecp_dese.c
  SRCS+=		ecp_dese_bis.c
@@ -199,7 +232,7 @@
  .endif
  .if defined ( USE_NG_IPACCT )
 -COPTS+=         -DUSE_NG_IPACCT
-+CFLAGS+=	-DUSE_NG_IPACCT
++CFLAGS+=	-DUSE_NG_IPACCT -nostdinc -I/usr/include -I${LOCALBASE}/include
  .endif
  .if defined ( USE_NG_NAT )
  SRCS+=		nat.c
@@ -234,7 +267,7 @@
  .endif
  
  # Add in required support files and libraries
-@@ -310,7 +319,7 @@
+@@ -310,15 +307,12 @@
  
  .if exists ( /usr/lib/libexecinfo.so )
  LDADD+=		-lexecinfo
@@ -243,3 +276,11 @@
  .endif
  
  # Now add standard sources
+ 
+ SRCS+=		${STDSRCS}
+-
+-.if defined ( NOLIBPDEL )
+ SRCS+=		${PDELSRCS}
+-.endif
+ 
+ .include <bsd.prog.mk>



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