Bug 185151 - net/php5-ldap fails to build when LOCALBASE is not /usr/local
Summary: net/php5-ldap fails to build when LOCALBASE is not /usr/local
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-24 07:00 UTC by Erick Turnquist
Modified: 2013-12-27 10:30 UTC (History)
0 users

See Also:


Attachments
file.diff (296 bytes, patch)
2013-12-24 07:00 UTC, Erick Turnquist
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erick Turnquist 2013-12-24 07:00:00 UTC
This was a difficult issue to track down.

I use a non-default LOCALBASE/PREFIX setting (/usr/pkg instead of /usr/local). net/php5-ldap has been failing to build. It turns out that the --with-ldap-sasl configure option can also accept a path and it doesn't respect the --with-ldap path. We can see how this has been working for those users who leave LOCALBASE/PREFIX alone by noticing the default value of SEARCH_DIRS in this snippet from the extension's config.m4:

----

AC_DEFUN([PHP_LDAP_SASL_CHECKS], [
  if test "$1" = "yes"; then
    SEARCH_DIRS="/usr/local /usr"
  else
    SEARCH_DIRS=$1
  fi

  for i in $SEARCH_DIRS; do
    if test -f $i/include/sasl/sasl.h; then
      LDAP_SASL_DIR=$i
      AC_DEFINE(HAVE_LDAP_SASL_SASL_H,1,[ ])
      break
    elif test -f $i/include/sasl.h; then
      LDAP_SASL_DIR=$i
      AC_DEFINE(HAVE_LDAP_SASL_H,1,[ ])
      break
    fi
  done
  
  if test "$LDAP_SASL_DIR"; then
    LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include
    LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$PHP_LIBDIR
  else
    AC_MSG_ERROR([sasl.h not found!])
  fi

----

A trivial patch is attached to fix this.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-24 07:00:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-27 10:24:50 UTC
Author: ale
Date: Fri Dec 27 10:24:43 2013
New Revision: 337692
URL: http://svnweb.freebsd.org/changeset/ports/337692

Log:
  Fix build of ldap module when sasl is enabled and LOCALBASE is not /usr/local.
  
  PR:		ports/185151
  Submitted by:	Erick Turnquist <jhujhiti@adjectivism.org>

Modified:
  head/lang/php5/Makefile.ext
  head/lang/php55/Makefile.ext

Modified: head/lang/php5/Makefile.ext
==============================================================================
--- head/lang/php5/Makefile.ext	Fri Dec 27 10:24:34 2013	(r337691)
+++ head/lang/php5/Makefile.ext	Fri Dec 27 10:24:43 2013	(r337692)
@@ -160,7 +160,7 @@ CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
 USE_OPENLDAP=	yes
 
 . ifdef(WANT_OPENLDAP_SASL)
-CONFIGURE_ARGS+=--with-ldap-sasl
+CONFIGURE_ARGS+=--with-ldap-sasl=${LOCALBASE}
 . endif
 .endif
 

Modified: head/lang/php55/Makefile.ext
==============================================================================
--- head/lang/php55/Makefile.ext	Fri Dec 27 10:24:34 2013	(r337691)
+++ head/lang/php55/Makefile.ext	Fri Dec 27 10:24:43 2013	(r337692)
@@ -160,7 +160,7 @@ CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
 USE_OPENLDAP=	yes
 
 . ifdef(WANT_OPENLDAP_SASL)
-CONFIGURE_ARGS+=--with-ldap-sasl
+CONFIGURE_ARGS+=--with-ldap-sasl=${LOCALBASE}
 . endif
 .endif
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2013-12-27 10:26:40 UTC
State Changed
From-To: open->closed

Committed, thanks!