2019-03-26 15:59:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2018-07-16 20:45:36 +02:00
|
|
|
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
2017-03-02 01:08:35 +00:00
|
|
|
|
|
|
|
|
PKG_NAME="pycryptodome"
|
2020-01-24 06:03:48 +00:00
|
|
|
PKG_VERSION="3.9.4"
|
|
|
|
|
PKG_SHA256="a168e73879619b467072509a223282a02c8047d932a48b74fbd498f27224aa04"
|
2017-03-02 01:08:35 +00:00
|
|
|
PKG_LICENSE="BSD"
|
2018-05-28 02:33:56 +01:00
|
|
|
PKG_SITE="https://pypi.org/project/pycryptodome"
|
2017-05-13 02:56:54 +01:00
|
|
|
PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
|
2019-10-24 22:51:28 +01:00
|
|
|
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
|
2017-03-02 01:08:35 +00:00
|
|
|
PKG_LONGDESC="PyCryptodome is a self-contained Python package of low-level cryptographic primitives."
|
2017-10-27 13:11:34 +02:00
|
|
|
PKG_TOOLCHAIN="manual"
|
2017-03-02 01:08:35 +00:00
|
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
|
cd $PKG_BUILD
|
|
|
|
|
rm -rf .$TARGET_NAME
|
|
|
|
|
|
|
|
|
|
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
|
|
|
|
|
export LDSHARED="$CC -shared"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
make_target() {
|
2019-10-24 22:51:28 +01:00
|
|
|
python3 setup.py build --cross-compile
|
2017-03-02 01:08:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2019-10-24 22:51:28 +01:00
|
|
|
python3 setup.py install --root=$INSTALL --prefix=/usr
|
2017-03-02 01:08:35 +00:00
|
|
|
|
|
|
|
|
# Remove SelfTest bloat
|
|
|
|
|
find $INSTALL -type d -name SelfTest -exec rm -fr "{}" \; 2>/dev/null || true
|
|
|
|
|
find $INSTALL -name SOURCES.txt -exec sed -i "/\/SelfTest\//d;" "{}" \;
|
2017-03-02 14:53:03 +00:00
|
|
|
|
|
|
|
|
# Create Cryptodome as an alternative namespace to Crypto (Kodi addons may use either)
|
2017-10-08 23:50:38 +01:00
|
|
|
ln -sf /usr/lib/$PKG_PYTHON_VERSION/site-packages/Crypto $INSTALL/usr/lib/$PKG_PYTHON_VERSION/site-packages/Cryptodome
|
2017-03-02 01:08:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
post_makeinstall_target() {
|
2019-10-24 22:51:28 +01:00
|
|
|
python_remove_source
|
2017-03-02 01:08:35 +00:00
|
|
|
}
|