mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 06:10:06 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
72 lines
1.7 KiB
Bash
72 lines
1.7 KiB
Bash
SUMMARY="Python binding to libsodium"
|
|
DESCRIPTION="PyNaCl provides Python binding to the libsodium library."
|
|
HOMEPAGE="https://pypi.python.org/pypi/PyNaCl"
|
|
COPYRIGHT="2013,2018 Donald Stufft and individual contributors"
|
|
LICENSE="Apache v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://pypi.io/packages/source/p/pynacl/PyNaCl-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c"
|
|
SOURCE_DIR="PyNaCl-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
devel:libsodium$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:awk
|
|
cmd:cmp
|
|
cmd:diff
|
|
gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python python3)
|
|
PYTHON_VERSIONS=(2.7 3.7)
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
eval "PROVIDES_${pythonPackage}=\"\
|
|
${portName}_$pythonPackage = $portVersion\
|
|
\"; \
|
|
REQUIRES_$pythonPackage=\"\
|
|
haiku\n\
|
|
six_$pythonPackage\n\
|
|
cmd:python$pythonVersion\
|
|
\""
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
cffi_$pythonPackage
|
|
setuptools_$pythonPackage"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
export SODIUM_INSTALL=system
|
|
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
|
|
mkdir -p $installLocation
|
|
rm -rf build
|
|
$python setup.py build install \
|
|
--root=/ --prefix=$prefix
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|