Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2018 07:18:01 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458892 - in head/sysutils/am-utils: . files
Message-ID:  <201801130718.w0D7I1sA096025@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sat Jan 13 07:18:01 2018
New Revision: 458892
URL: https://svnweb.freebsd.org/changeset/ports/458892

Log:
  Fix build with OPENLDAP and gdbm-compatibility.
  
  PR:		204140, 207687
  Submitted by:	Lawrence Chen <beastie@tardisi.com>

Added:
  head/sysutils/am-utils/files/patch-configure.ac   (contents, props changed)
Modified:
  head/sysutils/am-utils/Makefile   (contents, props changed)
  head/sysutils/am-utils/pkg-plist   (contents, props changed)

Modified: head/sysutils/am-utils/Makefile
==============================================================================
--- head/sysutils/am-utils/Makefile	Sat Jan 13 06:40:00 2018	(r458891)
+++ head/sysutils/am-utils/Makefile	Sat Jan 13 07:18:01 2018	(r458892)
@@ -3,7 +3,7 @@
 
 PORTNAME=	am-utils
 PORTVERSION=	6.2
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	sysutils net
 MASTER_SITES=	ftp://ftp.am-utils.org/pub/am-utils/ \
@@ -21,6 +21,7 @@ OPTIONS_DEFAULT=OPENLDAP
 OPENLDAP_DESC=	OpenLDAP support
 
 USES=		bison libtool makeinfo perl5
+USE_AUTOTOOLS=	autoconf
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=yes
 GNU_CONFIGURE=	yes
@@ -36,19 +37,15 @@ INSTALL_TARGET=	install-strip
 INFO=		am-utils
 DOCS=		AUTHORS BUGS FAQ NEWS README.attrcache
 
-.include <bsd.port.options.mk>
+OPENLDAP_USE=			OPENLDAP=yes
+OPENLDAP_CONFIGURE_WITH=	ldap
+OPENLDAP_CONFIGURE_ENV=		LDFLAGS="-L${LOCALBASE}/lib" \
+				CPPFLAGS="-I${LOCALBASE}/include"
+OPENLDAP_VARS=			DOCS+="README.ldap ldap-id.txt ldap.schema"
 
-.if ${PORT_OPTIONS:MOPENLDAP}
-USE_OPENLDAP=	yes
-CONFIGURE_ARGS+=--with-ldap=yes \
-		--enable-ldflags=-L${LOCALBASE}/lib \
-		--enable-cppflags=-I${LOCALBASE}/include
-DOCS+=		README.ldap ldap-id.txt ldap.schema
-PLIST_SUB+=	LDAP_DOC=""
-.else
-PLIST_SUB+=	LDAP_DOC="@comment "
-CONFIGURE_ARGS+=--with-ldap=no
-.endif
+OPTIONS_SUB=	yes
+
+.include <bsd.port.options.mk>
 
 post-patch:
 	@${RM} ${WRKSRC}/doc/am-utils.info*

Added: head/sysutils/am-utils/files/patch-configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/am-utils/files/patch-configure.ac	Sat Jan 13 07:18:01 2018	(r458892)
@@ -0,0 +1,15 @@
+--- configure.ac.orig	2014-10-28 17:12:59 UTC
++++ configure.ac
+@@ -732,7 +732,11 @@ dnl libgdbm for dbm_pagfno, so check for
+ fi
+ dnl check if dbm_open is part of libc
+ if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then
+-  AC_CHECK_LIB(c, dbm_open, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c")
++  AC_CHECK_LIB(c, dbm_open, 
++dnl on FreeBSD dbm_open is in base libc, but if gdbm is installed with COMPAT
++dnl then GNU ndbm.h is present, so check if this is the case first.
++    AC_CHECK_LIB(gdbm_compat, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="gdbm -lgdbm_compat",
++      AC_CHECK_LIB(c, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c")))
+ fi
+ if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then
+   AC_CHECK_LIB(db1, dbm_open, ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1")

Modified: head/sysutils/am-utils/pkg-plist
==============================================================================
--- head/sysutils/am-utils/pkg-plist	Sat Jan 13 06:40:00 2018	(r458891)
+++ head/sysutils/am-utils/pkg-plist	Sat Jan 13 07:18:01 2018	(r458892)
@@ -40,6 +40,6 @@ sbin/wire-test
 %%PORTDOCS%%%%DOCSDIR%%/FAQ
 %%PORTDOCS%%%%DOCSDIR%%/NEWS
 %%PORTDOCS%%%%DOCSDIR%%/README.attrcache
-%%LDAP_DOC%%%%PORTDOCS%%%%DOCSDIR%%/README.ldap
-%%LDAP_DOC%%%%PORTDOCS%%%%DOCSDIR%%/ldap-id.txt
-%%LDAP_DOC%%%%PORTDOCS%%%%DOCSDIR%%/ldap.schema
+%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/README.ldap
+%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/ldap-id.txt
+%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/ldap.schema



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801130718.w0D7I1sA096025>