diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2017-01-30 18:32:27 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2017-01-30 19:55:52 +0100 |
commit | a2d07a6eeba3c0875080e4e5c627e02ec6b07c3b (patch) | |
tree | 625dd0216773e0b5e2bc63fff7802f7e507ea6fd /dev-python/bsddb3/bsddb3-6.2.4.ebuild | |
parent | media-libs/musicbrainz: Drop slot 4 (diff) | |
download | gentoo-a2d07a6eeba3c0875080e4e5c627e02ec6b07c3b.tar.gz gentoo-a2d07a6eeba3c0875080e4e5c627e02ec6b07c3b.tar.bz2 gentoo-a2d07a6eeba3c0875080e4e5c627e02ec6b07c3b.zip |
dev-python/bsddb3: Bump to version 6.2.4
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-python/bsddb3/bsddb3-6.2.4.ebuild')
-rw-r--r-- | dev-python/bsddb3/bsddb3-6.2.4.ebuild | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/bsddb3/bsddb3-6.2.4.ebuild b/dev-python/bsddb3/bsddb3-6.2.4.ebuild new file mode 100644 index 000000000000..ec32d0017f6e --- /dev/null +++ b/dev-python/bsddb3/bsddb3-6.2.4.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) +PYTHON_REQ_USE="threads(+)" + +inherit db-use distutils-r1 + +DESCRIPTION="Python bindings for Berkeley DB" +HOMEPAGE="http://www.jcea.es/programacion/pybsddb.htm https://pypi.python.org/pypi/bsddb3" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~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} + dev-python/setuptools[${PYTHON_USEDEP}]" + +DISTUTILS_IN_SOURCE_BUILD=1 + +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 +} + +src_configure() { + # 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_compile() { + if ! python_is_python3; then + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + fi + distutils-r1_python_compile +} + +python_test() { + if python_is_python3; then + PYTHONPATH=Lib3 "${PYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}" + else + PYTHONPATH=Lib "${PYTHON}" test.py -v || die "Testing failed with ${EPYTHON}" + fi +} |