1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

net/openldap2[45]-server: Fix build on systems WITHOUT_KERBEROS when FETCH is on.

PR:		ports/259345
Reported by:	mi
This commit is contained in:
Xin LI 2021-10-24 00:47:14 -07:00
parent 069de9cc79
commit 7988695148
4 changed files with 52 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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} \

View File

@ -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