Bug 46288 - OpenLDAP port update
Summary: OpenLDAP port update
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: Edwin Groothuis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-16 11:10 UTC by Emile Heitor
Modified: 2003-08-28 12:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emile Heitor 2002-12-16 11:10:04 UTC
OpenLDAP 2.x port could be built against unixODBC, as this one handles
multi threading far better than iODBC under FreeBSD , it could be a nice
choice

Fix: Here is a simple hack of OpenLDAP 2 port's Makefile :



-.if defined(WITH_ODBC)
+.if defined(WITH_IODBC)
 LIB_DEPENDS+=  iodbc.3:${PORTSDIR}/databases/libiodbc
+CONFIGURE_ARGS+=--enable-sql
+.endif
+
+.if defined(WITH_UNIXODBC)
+LIB_DEPENDS+=  odbc.1:${PORTSDIR}/databases/unixODBC
 CONFIGURE_ARGS+=--enable-sql
 .endif--lKUnmdRTm64EkaT2PwoJLagqgbhp1ZLtpOdeStQM0YNyvUsS
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       Sun Dec 15 12:22:58 2002
+++ Makefile    Sun Dec 15 12:29:04 2002
@@ -54,8 +54,13 @@
 CPPFLAGS+=     -I${LOCALBASE}/include/sasl1
 .endif
How-To-Repeat: 
N/A
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-07 08:54:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->edwin

Informed maintainer.
Comment 2 Jun Kuriyama freebsd_committer freebsd_triage 2003-08-16 15:25:59 UTC
Hi Oliver,

What do you think about this PR?
Comment 3 Oliver Eikemeier 2003-08-17 17:48:41 UTC
Hi Emile,

This is probably a good idea, especially because OpenLDAP supports both.

I'm happy to incorporate your patch into the OpenLDAP ports, but I want
to leave WITH_ODBC alone to avoid introducing incompatibilites. How about
WITH_ODBC & WITH_ODBC_TYPE? Please tell me what you think of the following
patch:

--- openldap-odbc.patch begins here ---
diff -u net/openldap20-server/Makefile.orig net/openldap20-server/Makefile
--- net/openldap20-server/Makefile.orig	Fri Aug 15 16:46:06 2003
+++ net/openldap20-server/Makefile	Sun Aug 17 18:20:03 2003
@@ -124,8 +124,18 @@
 .endif
 
 .if defined(WITH_ODBC)
+WITH_ODBC_TYPE?=	iODBC
+.endif
+.if defined(WITH_ODBC_TYPE)
+.if ${WITH_ODBC_TYPE:L} == iodbc
 LIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
 CONFIGURE_ARGS+=	--enable-sql
+.elif ${WITH_ODBC_TYPE:L} == unixodbc
+LIB_DEPENDS+=		odbc.1:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=	--enable-sql
+.else
+.error WITH_ODBC_TYPE must be iODBC or unixODBC
+.endif
 .endif
 
 # Include tcp-wrapper support
diff -u net/openldap21-server/Makefile.orig net/openldap21-server/Makefile
--- net/openldap21-server/Makefile.orig	Fri Aug 15 16:46:06 2003
+++ net/openldap21-server/Makefile	Sun Aug 17 18:34:00 2003
@@ -136,8 +136,18 @@
 .endif
 
 .if defined(WITH_ODBC)
+WITH_ODBC_TYPE?=	iODBC
+.endif
+.if defined(WITH_ODBC_TYPE)
+.if ${WITH_ODBC_TYPE:L} == iodbc
 LIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
 CONFIGURE_ARGS+=	--enable-sql
+.elif ${WITH_ODBC_TYPE:L} == unixodbc
+LIB_DEPENDS+=		odbc.1:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=	--enable-sql
+.else
+.error WITH_ODBC_TYPE must be iODBC or unixODBC
+.endif
 .endif
 
 # Include tcp-wrapper support
diff -u net/openldap22-server/Makefile.orig net/openldap22-server/Makefile
--- net/openldap22-server/Makefile.orig	Thu Aug 14 05:55:20 2003
+++ net/openldap22-server/Makefile	Sun Aug 17 18:34:23 2003
@@ -137,8 +137,18 @@
 .endif
 
 .if defined(WITH_ODBC)
+WITH_ODBC_TYPE?=	iODBC
+.endif
+.if defined(WITH_ODBC_TYPE)
+.if ${WITH_ODBC_TYPE:L} == iodbc
 LIB_DEPENDS+=		iodbc.3:${PORTSDIR}/databases/libiodbc
 CONFIGURE_ARGS+=	--enable-sql
+.elif ${WITH_ODBC_TYPE:L} == unixodbc
+LIB_DEPENDS+=		odbc.1:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=	--enable-sql
+.else
+.error WITH_ODBC_TYPE must be iODBC or unixODBC
+.endif
 .endif
 
 .if defined(WITH_SLAPI)
--- openldap-odbc.patch ends here ---

The patch assumes that libiodbc and unixodbc are not both installed, which
would not work anyway because the headers collide.

Thanks for your efforts
    Oliver
Comment 4 Oliver Eikemeier 2003-08-28 11:23:00 UTC
included with modifications in PR 56077, thanks!
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2003-08-28 12:53:35 UTC
State Changed
From-To: open->closed

Implemented in a later PR, thank you!