mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
bcrypt: new recipe.
This commit is contained in:
82
dev-python/bcrypt/bcrypt-3.1.7.recipe
Normal file
82
dev-python/bcrypt/bcrypt-3.1.7.recipe
Normal file
@@ -0,0 +1,82 @@
|
||||
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="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/b/bcrypt/bcrypt-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
gcc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=()
|
||||
PYTHON_VERSIONS=()
|
||||
PYTHON_LIBSUFFIXES=()
|
||||
# We don't have python2 for secondaryArch
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
PYTHON_PACKAGES+=(python)
|
||||
PYTHON_VERSIONS+=(2.7)
|
||||
fi
|
||||
# gcc2 does not support the flags passed by python3
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
PYTHON_PACKAGES+=(python3)
|
||||
PYTHON_VERSIONS+=(3.7)
|
||||
fi
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cffi_$pythonPackage\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
cffi_$pythonPackage
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then
|
||||
PROVIDES_python3+="
|
||||
bcrypt_python3 = $portVersion
|
||||
"
|
||||
fi
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
export CFLAGS="-D_BSD_SOURCE"
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user