diff options
author | stas <stas@FreeBSD.org> | 2009-02-20 03:38:02 +0800 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2009-02-20 03:38:02 +0800 |
commit | d31ee47b68ec133574fa2f6e0facc0c16016d811 (patch) | |
tree | 46f1d951d2cdcea223a85f7ebfcd312149cc60ef /net | |
parent | 46a09fc739bc4c0ab6464812d8b8c5efc3fb6e4f (diff) | |
download | freebsd-ports-gnome-d31ee47b68ec133574fa2f6e0facc0c16016d811.tar.gz freebsd-ports-gnome-d31ee47b68ec133574fa2f6e0facc0c16016d811.tar.zst freebsd-ports-gnome-d31ee47b68ec133574fa2f6e0facc0c16016d811.zip |
- Fix with openldap 2.4.6.
Diffstat (limited to 'net')
-rw-r--r-- | net/ruby-ldap/Makefile | 21 | ||||
-rw-r--r-- | net/ruby-ldap/files/extra::patch-conn.c | 48 | ||||
-rw-r--r-- | net/ruby-ldap/files/extra::patch-ldap.c | 25 |
3 files changed, 93 insertions, 1 deletions
diff --git a/net/ruby-ldap/Makefile b/net/ruby-ldap/Makefile index e07e2ccba5a3..9e2972f5dc7c 100644 --- a/net/ruby-ldap/Makefile +++ b/net/ruby-ldap/Makefile @@ -34,6 +34,25 @@ IGNORE= you should set WITH_LDAP variable to openldap1, openldap2 or ldapsdk USE_RUBY= yes USE_RUBY_EXTCONF= yes +.include <bsd.port.pre.mk> + +.if ${WITH_LDAP} == openldap2 +. if exists(${LOCALBASE}/bin/ldapwhoami) +_OPENLDAP_VER!= ${LOCALBASE}/bin/ldapwhoami -VV 2>&1 | ${GREP} ldapwhoami | ${SED} -E 's/.*OpenLDAP: ldapwhoami (2)\.(3|4).*/\1\2/' +. endif + +. if defined(_OPENLDAP_VER) +LDAPVER= ${_OPENLDAP_VER} +. elif defined(DEFAULT_OPENLDAP_VER) +LDAPVER= ${DEFAULT_OPENLDAP_VER} +. else +LDAPVER= 24 +. endif +. if ${LDAPVER} == 24 +EXTRA_PATCHES= ${FILESDIR}/extra::patch-ldap.c ${FILESDIR}/extra::patch-conn.c +. endif +.endif + # Configure options: # --with-ldap specify the ldap directory # --with-ldap-incdir specify the directory which contains ldap.h and lber.h @@ -70,4 +89,4 @@ post-install: ${INSTALL_DATA} ${DOCS_EN:S,^,${WRKSRC}/,} ${RUBY_MODDOCDIR}/ .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net/ruby-ldap/files/extra::patch-conn.c b/net/ruby-ldap/files/extra::patch-conn.c new file mode 100644 index 000000000000..dfd19436d93a --- /dev/null +++ b/net/ruby-ldap/files/extra::patch-conn.c @@ -0,0 +1,48 @@ +--- conn.c.orig 2009-02-19 21:50:36.000000000 +0300 ++++ conn.c 2009-02-19 21:52:45.000000000 +0300 +@@ -497,8 +497,20 @@ + #ifdef LDAP_OPT_X_TLS_KEYFILE + case LDAP_OPT_X_TLS_KEYFILE: + #endif +-#ifdef LDAP_OPT_X_TLS_PROTOCOL +- case LDAP_OPT_X_TLS_PROTOCOL: ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL2 ++ case LDAP_OPT_X_TLS_PROTOCOL_SSL2: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_SSL3: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_0: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_1: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_2: + #endif + #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE + case LDAP_OPT_X_TLS_CIPHER_SUITE: +@@ -627,8 +639,20 @@ + #ifdef LDAP_OPT_X_TLS_KEYFILE + case LDAP_OPT_X_TLS_KEYFILE: + #endif +-#ifdef LDAP_OPT_X_TLS_PROTOCOL +- case LDAP_OPT_X_TLS_PROTOCOL: ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL2 ++ case LDAP_OPT_X_TLS_PROTOCOL_SSL2: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_SSL3: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_0: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_1: ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ case LDAP_OPT_X_TLS_PROTOCOL_TLS1_2: + #endif + #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE + case LDAP_OPT_X_TLS_CIPHER_SUITE: diff --git a/net/ruby-ldap/files/extra::patch-ldap.c b/net/ruby-ldap/files/extra::patch-ldap.c new file mode 100644 index 000000000000..1eaefd2c6783 --- /dev/null +++ b/net/ruby-ldap/files/extra::patch-ldap.c @@ -0,0 +1,25 @@ +--- ldap.c.orig 2009-02-19 21:53:02.000000000 +0300 ++++ ldap.c 2009-02-19 21:53:58.000000000 +0300 +@@ -420,8 +420,20 @@ + #ifdef LDAP_OPT_X_TLS + rb_ldap_define_opt (LDAP_OPT_X_TLS); + #endif +-#ifdef LDAP_OPT_X_TLS_PROTOCOL +- rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL); ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL2 ++ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_SSL2); ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_SSL3 ++ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_SSL3); ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_TLS1_0 ++ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_TLS1_0); ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_TLS1_1 ++ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_TLS1_1); ++#endif ++#ifdef LDAP_OPT_X_TLS_PROTOCOL_TLS1_2 ++ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_TLS1_2); + #endif + #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE + rb_ldap_define_opt (LDAP_OPT_X_TLS_CIPHER_SUITE); |