Changeset View
Changeset View
Standalone View
Standalone View
head/net/mpd5/files/patch-src-Makefile
--- src/Makefile.orig 2016-01-06 22:42:06.000000000 +0700 | --- src/Makefile.orig 2019-10-10 18:24:28 UTC | ||||
+++ src/Makefile 2018-11-25 13:48:31.977979000 +0700 | +++ src/Makefile | ||||
@@ -9,10 +9,20 @@ | @@ -9,9 +9,11 @@ | ||||
PROG?= mpd5 | PROG?= mpd5 | ||||
PREFIX?= /usr/local | PREFIX?= /usr/local | ||||
+LOCALBASE?= ${PREFIX} | +LOCALBASE?= ${PREFIX} | ||||
BINDIR?= ${PREFIX}/sbin | BINDIR?= ${PREFIX}/sbin | ||||
VERSION= 5.8 | VERSION= 5.8 | ||||
-NOMAN= | -NOMAN= | ||||
+ | + | ||||
+.if defined(OSVERSION) | |||||
+.if ${OSVERSION} > 1100100 | |||||
+MK_MAN= no | +MK_MAN= no | ||||
+.else | |||||
+NO_MAN= | |||||
+.endif | |||||
+.else | |||||
+MK_MAN= no | |||||
NO_MAN= | NO_MAN= | ||||
+.endif | |||||
BINOWN!= /usr/bin/id -n -u | BINOWN!= /usr/bin/id -n -u | ||||
BINGRP!= /usr/bin/id -n -g | @@ -59,9 +61,6 @@ USE_TCP_WRAP= yes | ||||
@@ -60,9 +70,6 @@ | |||||
USE_AUTH_PAM= yes | USE_AUTH_PAM= yes | ||||
USE_AUTH_SYSTEM= yes | USE_AUTH_SYSTEM= yes | ||||
-# Build with builtin libpdel | -# Build with builtin libpdel | ||||
-NOLIBPDEL= yes | -NOLIBPDEL= yes | ||||
- | - | ||||
# Build without builtin web server. | # Build without builtin web server. | ||||
#NOWEB= yes | #NOWEB= yes | ||||
@@ -72,7 +79,7 @@ | @@ -71,7 +70,7 @@ SYSLOG_FACILITY= LOG_DAEMON | ||||
# Print wide protocol names instead of short names. | # Print wide protocol names instead of short names. | ||||
# Comment this line, to save about 10 KB space | # Comment this line, to save about 10 KB space | ||||
-COPTS+= -DPROTO_NAME_LIST | -COPTS+= -DPROTO_NAME_LIST | ||||
+CFLAGS+= -DPROTO_NAME_LIST | +CFLAGS+= -DPROTO_NAME_LIST | ||||
# Reduce some internal structures size to save more memory | # Reduce some internal structures size to save more memory | ||||
# This is to limit amount of active sessions | # This is to limit amount of active sessions | ||||
@@ -84,27 +91,27 @@ | @@ -83,27 +82,27 @@ COPTS+= -DPROTO_NAME_LIST | ||||
## filter TCP accept connections | ## filter TCP accept connections | ||||
LDADD+= -lwrap | LDADD+= -lwrap | ||||
DPADD+= ${LIBWRAP} | DPADD+= ${LIBWRAP} | ||||
-COPTS+= -DUSE_WRAP | -COPTS+= -DUSE_WRAP | ||||
+CFLAGS+= -DUSE_WRAP | +CFLAGS+= -DUSE_WRAP | ||||
.endif | .endif | ||||
## authentication methods: opie, pam, /etc/password | ## authentication methods: opie, pam, /etc/password | ||||
Show All 15 Lines | |||||
## based on /etc/password | ## based on /etc/password | ||||
LDADD+= -lcrypt | LDADD+= -lcrypt | ||||
DPADD+= ${LIBCRYPT} ${LIBUTIL} | DPADD+= ${LIBCRYPT} ${LIBUTIL} | ||||
-COPTS+= -DUSE_SYSTEM | -COPTS+= -DUSE_SYSTEM | ||||
+CFLAGS+= -DUSE_SYSTEM | +CFLAGS+= -DUSE_SYSTEM | ||||
.endif | .endif | ||||
LDADD+= -lnetgraph -lutil | LDADD+= -lnetgraph -lutil | ||||
@@ -113,19 +120,12 @@ | @@ -112,19 +111,12 @@ DPADD+= ${LIBNETGRAPH} | ||||
LDADD+= -L/usr/lib -lradius | LDADD+= -L/usr/lib -lradius | ||||
DPADD+= ${LIBRADIUS} | DPADD+= ${LIBRADIUS} | ||||
-## libpdel needs ssl and libexpat (libxml2 cannot be used) | -## libpdel needs ssl and libexpat (libxml2 cannot be used) | ||||
-.if !defined ( NOLIBPDEL ) | -.if !defined ( NOLIBPDEL ) | ||||
-LDADD+= -L${PREFIX}/lib | -LDADD+= -L${PREFIX}/lib | ||||
-LDADD+= -lpdel | -LDADD+= -lpdel | ||||
-LDADD+= -lexpat | -LDADD+= -lexpat | ||||
-.endif | -.endif | ||||
- | - | ||||
MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)" | MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)" | ||||
-COPTS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' | -COPTS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' | ||||
-COPTS+= -DMPD_VERSION='"${MPD_VERSION}"' | -COPTS+= -DMPD_VERSION='"${MPD_VERSION}"' | ||||
-COPTS+= -g | -COPTS+= -g | ||||
-COPTS+= -Wall \ | -COPTS+= -Wall \ | ||||
+CFLAGS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' | +CFLAGS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' | ||||
+CFLAGS+= -DMPD_VERSION='"${MPD_VERSION}"' | +CFLAGS+= -DMPD_VERSION='"${MPD_VERSION}"' | ||||
+CFLAGS+= -g | +CFLAGS+= -g | ||||
+CFLAGS+= -Wall \ | +CFLAGS+= -Wall \ | ||||
-Wcast-align \ | -Wcast-align \ | ||||
-Wchar-subscripts \ | -Wchar-subscripts \ | ||||
-Wformat \ | -Wformat \ | ||||
@@ -135,15 +135,14 @@ | @@ -134,15 +126,14 @@ COPTS+= -Wall \ | ||||
-Wnested-externs \ | -Wnested-externs \ | ||||
-Wpointer-arith \ | -Wpointer-arith \ | ||||
-Wwrite-strings \ | -Wwrite-strings \ | ||||
- -pthread \ | - -pthread \ | ||||
- -I${PREFIX}/include | - -I${PREFIX}/include | ||||
+ -pthread | + -pthread | ||||
.if defined ( MPD_VENDOR ) | .if defined ( MPD_VENDOR ) | ||||
-COPTS+= -DMPD_VENDOR='"${MPD_VENDOR}"' | -COPTS+= -DMPD_VENDOR='"${MPD_VENDOR}"' | ||||
+CFLAGS+= -DMPD_VENDOR='"${MPD_VENDOR}"' | +CFLAGS+= -DMPD_VENDOR='"${MPD_VENDOR}"' | ||||
.endif | .endif | ||||
.if defined ( SYSLOG_FACILITY ) | .if defined ( SYSLOG_FACILITY ) | ||||
-COPTS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' | -COPTS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' | ||||
+CFLAGS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' | +CFLAGS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' | ||||
.endif | .endif | ||||
# Standard sources | # Standard sources | ||||
@@ -155,14 +154,13 @@ | @@ -154,14 +145,13 @@ STDSRCS= assert.c auth.c bund.c rep.c ccp.c cha | ||||
util.c vars.c eap.c msoft.c ippool.c | util.c vars.c eap.c msoft.c ippool.c | ||||
.if defined ( NOWEB ) | .if defined ( NOWEB ) | ||||
-COPTS+= -DNOWEB | -COPTS+= -DNOWEB | ||||
+CFLAGS+= -DNOWEB | +CFLAGS+= -DNOWEB | ||||
.else | .else | ||||
STDSRCS+= web.c | STDSRCS+= web.c | ||||
LDADD+= -lssl | LDADD+= -lssl | ||||
.endif | .endif | ||||
-.if defined ( NOLIBPDEL ) | -.if defined ( NOLIBPDEL ) | ||||
-COPTS+= -DNOLIBPDEL -I./contrib/libpdel | -COPTS+= -DNOLIBPDEL -I./contrib/libpdel | ||||
+CFLAGS+= -DNOLIBPDEL -I./contrib/libpdel | +CFLAGS+= -DNOLIBPDEL -I./contrib/libpdel | ||||
PDPATH1= contrib/libpdel/util:contrib/libpdel/structs | PDPATH1= contrib/libpdel/util:contrib/libpdel/structs | ||||
PDPATH2= contrib/libpdel/structs/type | PDPATH2= contrib/libpdel/structs/type | ||||
.if defined ( NOWEB ) | .if defined ( NOWEB ) | ||||
@@ -200,60 +198,59 @@ | @@ -199,60 +189,59 @@ PDELSRCS+= http_connection.c \ | ||||
string_fp.c \ | string_fp.c \ | ||||
timeout_fp.c | timeout_fp.c | ||||
.endif | .endif | ||||
-.endif | -.endif | ||||
# Add sources and flags for the various physical layer types | # Add sources and flags for the various physical layer types | ||||
.if defined ( PHYSTYPE_MODEM ) | .if defined ( PHYSTYPE_MODEM ) | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
-COPTS+= -DCCP_PRED1 | -COPTS+= -DCCP_PRED1 | ||||
+CFLAGS+= -DCCP_PRED1 | +CFLAGS+= -DCCP_PRED1 | ||||
.if defined ( USE_NG_PRED1 ) | .if defined ( USE_NG_PRED1 ) | ||||
-COPTS+= -DUSE_NG_PRED1 | -COPTS+= -DUSE_NG_PRED1 | ||||
+CFLAGS+= -DUSE_NG_PRED1 | +CFLAGS+= -DUSE_NG_PRED1 | ||||
.endif | .endif | ||||
.endif | .endif | ||||
@@ -262,46 +259,46 @@ | @@ -261,46 +250,46 @@ COPTS+= -DUSE_NG_PRED1 | ||||
.if defined ( ECP_DES ) | .if defined ( ECP_DES ) | ||||
SRCS+= ecp_dese.c | SRCS+= ecp_dese.c | ||||
SRCS+= ecp_dese_bis.c | SRCS+= ecp_dese_bis.c | ||||
-COPTS+= -DECP_DES | -COPTS+= -DECP_DES | ||||
+CFLAGS+= -DECP_DES | +CFLAGS+= -DECP_DES | ||||
NEED_DES= yes | NEED_DES= yes | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
DPADD+= ${LIBFETCH} | DPADD+= ${LIBFETCH} | ||||
.endif | .endif | ||||
.if defined ( SMALL_SYSTEM ) | .if defined ( SMALL_SYSTEM ) | ||||
-COPTS+= -DSMALL_SYSTEM | -COPTS+= -DSMALL_SYSTEM | ||||
+CFLAGS+= -DSMALL_SYSTEM | +CFLAGS+= -DSMALL_SYSTEM | ||||
.endif | .endif | ||||
# Add in required support files and libraries | # Add in required support files and libraries | ||||
@@ -310,15 +307,12 @@ | @@ -309,15 +298,12 @@ DPADD+= ${LIBCRYPTO} | ||||
.if exists ( /usr/lib/libexecinfo.so ) | .if exists ( /usr/lib/libexecinfo.so ) | ||||
LDADD+= -lexecinfo | LDADD+= -lexecinfo | ||||
-COPTS+= -DUSE_BACKTRACE | -COPTS+= -DUSE_BACKTRACE | ||||
+CFLAGS+= -DUSE_BACKTRACE | +CFLAGS+= -DUSE_BACKTRACE | ||||
.endif | .endif | ||||
# Now add standard sources | # Now add standard sources | ||||
SRCS+= ${STDSRCS} | SRCS+= ${STDSRCS} | ||||
- | - | ||||
-.if defined ( NOLIBPDEL ) | -.if defined ( NOLIBPDEL ) | ||||
SRCS+= ${PDELSRCS} | SRCS+= ${PDELSRCS} | ||||
-.endif | -.endif | ||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> |