diff options
author | Sam James <sam@gentoo.org> | 2021-01-17 15:58:40 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-01-17 16:16:01 +0000 |
commit | 24d91b11bc9132fa9b08c7260d76a87c755e6ae0 (patch) | |
tree | f582e637bca6e4827af9bb7daf234d4751cebb10 /dev-python/bsddb3/bsddb3-6.2.9.ebuild | |
parent | dev-python/blurb: mark ALLARCHES (diff) | |
download | gentoo-24d91b11bc9132fa9b08c7260d76a87c755e6ae0.tar.gz gentoo-24d91b11bc9132fa9b08c7260d76a87c755e6ae0.tar.bz2 gentoo-24d91b11bc9132fa9b08c7260d76a87c755e6ae0.zip |
dev-python/bsddb3: bump to 6.2.9
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/bsddb3/bsddb3-6.2.9.ebuild')
-rw-r--r-- | dev-python/bsddb3/bsddb3-6.2.9.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/bsddb3/bsddb3-6.2.9.ebuild b/dev-python/bsddb3/bsddb3-6.2.9.ebuild new file mode 100644 index 000000000000..3851c82e6067 --- /dev/null +++ b/dev-python/bsddb3/bsddb3-6.2.9.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) +PYTHON_REQ_USE="threads(+)" +DISTUTILS_USE_SETUPTOOLS=no +DISTUTILS_IN_SOURCE_BUILD=1 +inherit db-use distutils-r1 + +DESCRIPTION="Python bindings for Berkeley DB" +HOMEPAGE="https://www.jcea.es/programacion/pybsddb.htm https://pypi.org/project/bsddb3/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + <sys-libs/db-6.3:= + || ( + sys-libs/db:6.2 + sys-libs/db:6.1 + sys-libs/db:5.3 + sys-libs/db:5.1 + sys-libs/db:4.8 + sys-libs/db:4.7 + )" +DEPEND="${RDEPEND}" + +python_prepare_all() { + # This list should be kept in sync with setup.py. + if [[ -z ${DB_VER} ]]; then + for DB_VER in 6.2 6.1 5.3 5.1 4.8 4.7; do + has_version "sys-libs/db:${DB_VER}" && break + done + fi + + # Force version. + sed -e "s/db_ver = None/db_ver = (${DB_VER%.*}, ${DB_VER#*.})/" \ + -e "s/dblib = 'db'/dblib = '$(db_libname ${DB_VER})'/" \ + -i setup2.py setup3.py || die + + # Adjust test.py to look in build/lib. + sed -e "s/'lib.%s' % PLAT_SPEC/'lib'/" \ + -i test2.py test3.py || die + + distutils-r1_python_prepare_all +} + +python_configure_all() { + # These are needed for both build and install. + export BERKELEYDB_DIR="${EPREFIX}/usr" + export BERKELEYDB_INCDIR="$(db_includedir ${DB_VER})" + export BERKELEYDB_LIBDIR="${EPREFIX}/usr/$(get_libdir)" + export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=1 +} + +python_test() { + PYTHONPATH=Lib3 "${EPYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}" +} |