aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2021-10-24 07:47:14 +0000
committerXin LI <delphij@FreeBSD.org>2021-10-24 07:53:09 +0000
commit7988695148ca15fb1e8aa498b032d4facf1cf05e (patch)
tree0b7dca3e7397c69ac170bbbbd954968297fe38bd
parent069de9cc7922058c9521a63f1414bacdc8249217 (diff)
downloadports-7988695148ca15fb1e8aa498b032d4facf1cf05e.tar.gz
ports-7988695148ca15fb1e8aa498b032d4facf1cf05e.zip
net/openldap2[45]-server: Fix build on systems WITHOUT_KERBEROS when FETCH is on.
PR: ports/259345 Reported by: mi
-rw-r--r--net/openldap24-server/Makefile7
-rw-r--r--net/openldap24-server/files/patch-ITS887420
-rw-r--r--net/openldap25-server/Makefile11
-rw-r--r--net/openldap25-server/files/patch-ITS887420
4 files changed, 52 insertions, 6 deletions
diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile
index fc33844d3489..55186932c24c 100644
--- a/net/openldap24-server/Makefile
+++ b/net/openldap24-server/Makefile
@@ -49,8 +49,8 @@ WANT_OPENLDAP_VER?= 24
BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}
.endif
-PORTREVISION_CLIENT= 2
-PORTREVISION_SERVER= 5
+PORTREVISION_CLIENT= 3
+PORTREVISION_SERVER= 6
OPENLDAP_SHLIB_MAJOR= 2
OPENLDAP_SHLIB_MINOR= 11.7
OPENLDAP_MAJOR= ${DISTVERSION:R}
@@ -59,6 +59,7 @@ OPTIONS_DEFINE= DEBUG FETCH GSSAPI
OPTIONS_DEFAULT= DEBUG
FETCH_DESC= Enable fetch(3) support
+FETCH_BUILD_DEPENDS= autoconf>0:devel/autoconf
GSSAPI_DESC= With GSSAPI support
FETCH_CONFIGURE_WITH= fetch
@@ -586,7 +587,7 @@ pre-configure:
${ECHO_CMD} "${PKGNAME}: bind installed with PORT_REPLACES_BASE_BIND causes build problems."; \
${FALSE}; \
fi
-.if ${PORT_OPTIONS:MKQUEUE}
+.if ${PORT_OPTIONS:MKQUEUE} || ${PORT_OPTIONS:MFETCH}
@(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf)
.endif
diff --git a/net/openldap24-server/files/patch-ITS8874 b/net/openldap24-server/files/patch-ITS8874
new file mode 100644
index 000000000000..8c816699e2ef
--- /dev/null
+++ b/net/openldap24-server/files/patch-ITS8874
@@ -0,0 +1,20 @@
+--- build/openldap.m4.orig 2021-06-03 18:40:31 UTC
++++ build/openldap.m4
+@@ -904,7 +904,7 @@ dnl ==================================================
+ dnl Look for fetch(3)
+ AC_DEFUN([OL_LIB_FETCH],
+ [ol_LIBS=$LIBS
+-LIBS="-lfetch -lcom_err $LIBS"
++LIBS="-lfetch $LIBS"
+ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_SYS_PARAM_H
+@@ -914,7 +914,7 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ #include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
+ LIBS=$ol_LIBS
+ if test $ol_cv_lib_fetch != no ; then
+- ol_link_fetch="-lfetch -lcom_err"
++ ol_link_fetch="-lfetch"
+ AC_DEFINE(HAVE_FETCH,1,
+ [define if you actually have FreeBSD fetch(3)])
+ fi
diff --git a/net/openldap25-server/Makefile b/net/openldap25-server/Makefile
index 8d368b265ab1..5aae0f0cee2a 100644
--- a/net/openldap25-server/Makefile
+++ b/net/openldap25-server/Makefile
@@ -45,8 +45,8 @@ CONFLICTS_INSTALL= ${PORTNAME}2[0-46-9]-server-* ${PORTNAME}-server-*
GNU_CONFIGURE= yes
-PORTREVISION_CLIENT= 0
-PORTREVISION_SERVER= 0
+PORTREVISION_CLIENT= 1
+PORTREVISION_SERVER= 1
OPENLDAP_SHLIB_MAJOR= 0
OPENLDAP_SHLIB_MINOR= 1.3
OPENLDAP_MAJOR= ${DISTVERSION:R}
@@ -56,6 +56,9 @@ OPTIONS_DEFAULT+= DEBUG
.if defined(CLIENT_ONLY)
OPTIONS_DEFINE+= DOCS FETCH
+
+FETCH_BUILD_DEPENDS= autoconf>0:devel/autoconf
+FETCH_CONFIGURE_WITH= fetch
.else
OPTIONS_GROUP= BKNDS OVLYS
BKNDS_DESC= OpenLDAP backends
@@ -189,7 +192,6 @@ DNSSRV_CONFIGURE_ENABLE= dnssrv=mod
DYNACL_CONFIGURE_ENABLE= dynacl
DYNGROUP_CONFIGURE_ENABLE= dyngroup=mod
DYNLIST_CONFIGURE_ENABLE= dynlist=mod
-FETCH_CONFIGURE_WITH= fetch
HOMEDIR_CONFIGURE_ENABLE= homedir=mod
LLOADD_CONFIGURE_ENABLE= balancer=mod
LLOADD_LIB_DEPENDS= libevent.so:devel/libevent
@@ -381,6 +383,9 @@ post-patch:
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
+pre-configure-FETCH-on:
+ @(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf)
+
.if !defined(CLIENT_ONLY)
test: build
@(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \
diff --git a/net/openldap25-server/files/patch-ITS8874 b/net/openldap25-server/files/patch-ITS8874
new file mode 100644
index 000000000000..280562c90877
--- /dev/null
+++ b/net/openldap25-server/files/patch-ITS8874
@@ -0,0 +1,20 @@
+--- build/openldap.m4.orig 2021-10-11 16:47:09 UTC
++++ build/openldap.m4
+@@ -613,7 +613,7 @@ dnl ==================================================
+ dnl Look for fetch(3)
+ AC_DEFUN([OL_LIB_FETCH],
+ [ol_LIBS=$LIBS
+-LIBS="-lfetch -lcom_err $LIBS"
++LIBS="-lfetch $LIBS"
+ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_SYS_PARAM_H
+@@ -623,7 +623,7 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ #include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
+ LIBS=$ol_LIBS
+ if test $ol_cv_lib_fetch != no ; then
+- ol_link_fetch="-lfetch -lcom_err"
++ ol_link_fetch="-lfetch"
+ AC_DEFINE(HAVE_FETCH,1,
+ [define if you actually have FreeBSD fetch(3)])
+ fi