summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-11-28 00:28:26 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-11-28 00:28:26 +0000
commitd72b300bd6001f94fa60a7718b8c82a24554c7d6 (patch)
treede7d2697a91ed8c5d2260107c755bf8b689af082 /net-nds/openldap
parent*portage-2.2_rc53 (27 Nov 2009) (diff)
downloadgentoo-2-d72b300bd6001f94fa60a7718b8c82a24554c7d6.tar.gz
gentoo-2-d72b300bd6001f94fa60a7718b8c82a24554c7d6.tar.bz2
gentoo-2-d72b300bd6001f94fa60a7718b8c82a24554c7d6.zip
Fixup the bash4 usage and go into slightly more detail on the berkdb prebuilt check so users do not block themselves out of their database.
(Portage version: 2.2_rc51/cvs/Linux x86_64)
Diffstat (limited to 'net-nds/openldap')
-rw-r--r--net-nds/openldap/ChangeLog7
-rw-r--r--net-nds/openldap/openldap-2.4.19-r1.ebuild50
2 files changed, 40 insertions, 17 deletions
diff --git a/net-nds/openldap/ChangeLog b/net-nds/openldap/ChangeLog
index 7caa5a10ac8b..2b4a4360c03d 100644
--- a/net-nds/openldap/ChangeLog
+++ b/net-nds/openldap/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-nds/openldap
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.359 2009/11/27 23:35:41 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.360 2009/11/28 00:28:26 robbat2 Exp $
+
+ 28 Nov 2009; Robin H. Johnson <robbat2@gentoo.org>
+ openldap-2.4.19-r1.ebuild:
+ Fixup the bash4 usage and go into slightly more detail on the berkdb
+ prebuilt check so users do not block themselves out of their database.
27 Nov 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
openldap-2.4.19-r1.ebuild:
diff --git a/net-nds/openldap/openldap-2.4.19-r1.ebuild b/net-nds/openldap/openldap-2.4.19-r1.ebuild
index 93870eebda07..f0bbde20a06d 100644
--- a/net-nds/openldap/openldap-2.4.19-r1.ebuild
+++ b/net-nds/openldap/openldap-2.4.19-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.4.19-r1.ebuild,v 1.4 2009/11/27 23:35:41 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.4.19-r1.ebuild,v 1.5 2009/11/28 00:28:26 robbat2 Exp $
EAPI="2"
inherit db-use eutils flag-o-matic multilib ssl-cert versionator toolchain-funcs
@@ -118,21 +118,37 @@ openldap_find_versiontags() {
fi
done
- if use berkdb ; then
- # Now we must check for the major version of sys-libs/db linked against.
- SLAPD_PATH=${ROOT}/usr/$(get_libdir)/openldap/slapd
- if [ -f "${SLAPD_PATH}" ]; then
- OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \
- | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')"
- NEWVER="$(db_findver sys-libs/db)"
- if [ "${OLDVER}" != "${NEWVER}" ]; then
- eerror " Your existing version of OpenLDAP was built against"
- eerror " sys-libs/db:${OLDVER}, but the new one will build against"
- eerror " ${NEWVER} and your database would be inaccessible."
- echo
- openldap_upgrade_howto
- fi
+ # Now we must check for the major version of sys-libs/db linked against.
+ SLAPD_PATH=${ROOT}/usr/$(get_libdir)/openldap/slapd
+ if [ -f "${SLAPD_PATH}" ]; then
+ OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \
+ | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')"
+ NEWVER="$(use berkdb && db_findver sys-libs/db)"
+ local fail=0
+ if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
+ :
+ # Nothing wrong here.
+ elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was not built against"
+ eerror " any version of sys-libs/db, but the new one will build"
+ eerror " against ${NEWVER} and your database may be inaccessible."
+ echo
+ fail=1
+ elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will not be"
+ eerror " built against any version and your database may be"
+ eerror " inaccessible."
+ echo
+ fail=1
+ elif [ "${OLDVER}" != "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will build against"
+ eerror " ${NEWVER} and your database would be inaccessible."
+ echo
+ fail=1
fi
+ [ "${fail}" == "1" ] && openldap_upgrade_howto
fi
echo
@@ -228,9 +244,11 @@ build_contrib_module() {
# <dir> <sources> <outputname>
cd "${S}/contrib/slapd-modules/$1"
einfo "Compiling contrib-module: $3"
+ # Make sure it's uppercase
+ local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
"${lt}" --mode=compile --tag=CC \
"${CC}" \
- -DSLAPD_OVER_${1^^}=SLAPD_MOD_DYNAMIC \
+ -D${define_name}=SLAPD_MOD_DYNAMIC \
-I../../../include -I../../../servers/slapd ${CFLAGS} \
-o ${2%.c}.lo -c $2 || die "compiling $3 failed"
einfo "Linking contrib-module: $3"