mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 21:30:08 +02:00
On-tree recipes that depend on cffi: - argon2_cffi_bindings - bcrypt - pycares - pynacl So we're doing the same on those too in one go. Also: - moved all recipes to use build/installer instead of setup.py. - fixed calling of tests on cffi.
77 lines
1.7 KiB
Bash
77 lines
1.7 KiB
Bash
SUMMARY="Modern password hashing"
|
|
DESCRIPTION="Bcrypt provides good password hashing for your software and your \
|
|
servers."
|
|
HOMEPAGE="https://pypi.python.org/pypi/bcrypt"
|
|
COPYRIGHT="2013 Donald Stufft"
|
|
LICENSE="Apache v2"
|
|
REVISION="7"
|
|
SOURCE_URI="https://pypi.io/packages/source/b/bcrypt/bcrypt-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
gcc$secondaryArchSuffix
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
eval "PROVIDES_${pythonPackage}+=\"
|
|
bcrypt_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cffi_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
cffi_$pythonPackage
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
export CFLAGS="-D_BSD_SOURCE"
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer --p $prefix dist/*-$portVersion-cp${pythonVersion//.}-*.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|