aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2005-04-08 17:32:25 +0800
committerjoerg <joerg@FreeBSD.org>2005-04-08 17:32:25 +0800
commiteb3c7b2d950d961814e69ff16950fd93fb984153 (patch)
tree1d659396b82517cd259bd9ce5231a7911d2fb8df /net
parentae282a0e89bd81443a9b0fa67d21837ca70f98a7 (diff)
downloadfreebsd-ports-gnome-eb3c7b2d950d961814e69ff16950fd93fb984153.tar.gz
freebsd-ports-gnome-eb3c7b2d950d961814e69ff16950fd93fb984153.tar.zst
freebsd-ports-gnome-eb3c7b2d950d961814e69ff16950fd93fb984153.zip
Make LDAP support an option.
Previously, it was conditionally compiled into the package depending on whether ${LOCALBASE}/include/ldap.h was present in the host system, but without even considering to also conditionally modify the PLIST. This has been fixed now. Pointed out by: pointyhat's build log
Diffstat (limited to 'net')
-rw-r--r--net/openradius/Makefile15
-rw-r--r--net/openradius/pkg-plist2
-rw-r--r--net/openradius/scripts/configure2
3 files changed, 16 insertions, 3 deletions
diff --git a/net/openradius/Makefile b/net/openradius/Makefile
index 56ce26c935a7..8efd35869373 100644
--- a/net/openradius/Makefile
+++ b/net/openradius/Makefile
@@ -7,6 +7,7 @@
PORTNAME= openradius
PORTVERSION= 0.9.9
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.xs4all.nl/~evbergen/openradius/download/ \
http://www.mirrors.wiretapped.net/security/authentication/radius/openradius/
@@ -20,7 +21,19 @@ CC?= gcc
CXX?= g++
USE_GMAKE= yes
+OPTIONS= LDAP "With LDAP user database" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_LDAP)
+USE_OPENLDAP= YES
+PLIST_SUB+= LDAP=""
+SCRIPTS_ENV+= USE_LDAP=yes
+.else
+PLIST_SUB+= LDAP="@comment "
+.endif
+
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/openradius/pkg-plist b/net/openradius/pkg-plist
index eea128c0c813..a8e963f8580c 100644
--- a/net/openradius/pkg-plist
+++ b/net/openradius/pkg-plist
@@ -40,7 +40,7 @@ etc/openradius/subdicts/dict.ascend
lib/openradius/ascfile
lib/openradius/delay
lib/openradius/radclient
-lib/openradius/radldap
+%%LDAP%%lib/openradius/radldap
lib/openradius/radlogger
lib/openradius/radsql
lib/openradius/unixpasswd
diff --git a/net/openradius/scripts/configure b/net/openradius/scripts/configure
index 1e05a6e1a85a..9ea7457d1dd9 100644
--- a/net/openradius/scripts/configure
+++ b/net/openradius/scripts/configure
@@ -21,7 +21,7 @@ TGT_LIB += modules/delay/delay
TGT_LIB += modules/radsql/radsql
END
-if [ -f $LDAPINCLUDE/usr/local/include/ldap.h ]; then
+if [ x$USE_LDAP != x ]; then
cat >> Makefile << END
TGT_LIB += modules/radldap/radldap
CF_RADLDAP = -I$LDAPINCLUDE/usr/local/include