net-nds/openldap: added sha2 contrib support pre bug 621670 and pr \#4973

Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Matthew Thode
2017-06-23 11:33:38 -05:00
parent f4794aec25
commit eaa4df2ad0
2 changed files with 30 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<maintainer type="project">
<email>ldap-bugs@gentoo.org</email>
</maintainer>
<use>
<use>
<flag name="experimental">Enable experimental backend options</flag>
<flag name="kinit">Enable support for kerberos init</flag>
<flag name="odbc">Enable ODBC and SQL backend options</flag>
@@ -13,6 +13,7 @@
lanman passwords</flag>
<flag name="minimal">Build libraries &amp; userspace tools only. Does not install any server code.</flag>
<flag name="pbkdf2">Enable support for pbkdf2 passwords</flag>
<flag name="sha2">Enable support for pw-sha2 password hashes.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:openldap:openldap</remote-id>

View File

@@ -24,7 +24,7 @@ IUSE_DAEMON="crypt samba slp tcpd experimental minimal"
IUSE_BACKEND="+berkdb"
IUSE_OVERLAY="overlays perl"
IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs"
IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2"
IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2 sha2"
IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
@@ -618,6 +618,33 @@ multilib_src_compile() {
pbkdf2.lo || die "linking pw-pbkdf2 failed"
fi
if use sha2 ; then
cd "${S}/contrib/slapd-modules/passwd/sha2" || die
einfo "Compiling contrib-module: pw-sha2"
"${lt}" --mode=compile --tag=CC \
"${CC}" \
-I"${BUILD_DIR}"/include \
-I../../../../include \
${CFLAGS} \
-o sha2.lo \
-c sha2.c || die "compiling pw-sha2 failed"
"${lt}" --mode=compile --tag=CC \
"${CC}" \
-I"${BUILD_DIR}"/include \
-I../../../../include \
${CFLAGS} \
-o slapd-sha2.lo \
-c slapd-sha2.c || die "compiling pw-sha2 failed"
einfo "Linking contrib-module: pw-sha2"
"${lt}" --mode=link --tag=CC \
"${CC}" -module \
${CFLAGS} \
${LDFLAGS} \
-rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
-o pw-sha2.la \
sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed"
fi
# We could build pw-radius if GNURadius would install radlib.h
cd "${S}/contrib/slapd-modules/passwd" || die
einfo "Compiling contrib-module: pw-netscape"