aboutsummaryrefslogtreecommitdiffstats
path: root/net/mpd5
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2018-11-25 15:48:21 +0800
committerEugene Grosbein <eugen@FreeBSD.org>2018-11-25 15:48:21 +0800
commit53b8423b549426e9fda100919eeb3f6f968a784c (patch)
treeb2f60e27f2b1760c4ae02c0610e1d257485e9409 /net/mpd5
parent6aecd3e2229db126e268e7d518f7fd54dfd74c90 (diff)
downloadfreebsd-ports-gnome-53b8423b549426e9fda100919eeb3f6f968a784c.tar.gz
freebsd-ports-gnome-53b8423b549426e9fda100919eeb3f6f968a784c.tar.zst
freebsd-ports-gnome-53b8423b549426e9fda100919eeb3f6f968a784c.zip
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
Diffstat (limited to 'net/mpd5')
-rw-r--r--net/mpd5/Makefile5
-rw-r--r--net/mpd5/files/extra-patch-no-ng_ipacct10
-rw-r--r--net/mpd5/files/patch-configure23
-rw-r--r--net/mpd5/files/patch-src-Makefile71
4 files changed, 93 insertions, 16 deletions
diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile
index 3354c4890672..e03e4f43e49d 100644
--- a/net/mpd5/Makefile
+++ b/net/mpd5/Makefile
@@ -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_ipacct
.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
diff --git a/net/mpd5/files/extra-patch-no-ng_ipacct b/net/mpd5/files/extra-patch-no-ng_ipacct
new file mode 100644
index 000000000000..dd8291302d78
--- /dev/null
+++ b/net/mpd5/files/extra-patch-no-ng_ipacct
@@ -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
diff --git a/net/mpd5/files/patch-configure b/net/mpd5/files/patch-configure
new file mode 100644
index 000000000000..03f0ffc28671
--- /dev/null
+++ b/net/mpd5/files/patch-configure
@@ -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 \
diff --git a/net/mpd5/files/patch-src-Makefile b/net/mpd5/files/patch-src-Makefile
index 597b3c550077..6b1e64a4df0f 100644
--- a/net/mpd5/files/patch-src-Makefile
+++ b/net/mpd5/files/patch-src-Makefile
@@ -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,7 +22,17 @@
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
@@ -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,13 +127,19 @@
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
@@ -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>