mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
cffi, bump version (#6782)
This commit is contained in:
@@ -1,141 +0,0 @@
|
||||
SUMMARY="Foreign Function Interface for Python calling C code"
|
||||
DESCRIPTION="CFFI is a Python module which allows to call C code."
|
||||
HOMEPAGE="https://cffi.readthedocs.io/
|
||||
https://pypi.org/project/cffi/"
|
||||
COPYRIGHT="2012-2018 Armin Rigo, Maciej Fijalkowski"
|
||||
LICENSE="MIT"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/c/cffi/cffi-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
cffi$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libffi$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:pkg_config$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)
|
||||
PYTHON_LIBSUFFIXES+=("")
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_python
|
||||
pycparser_python
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python2
|
||||
"
|
||||
fi
|
||||
# gcc2 does not support the flags passed by python3
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
PYTHON_PACKAGES+=(python3)
|
||||
PYTHON_VERSIONS+=(3.7)
|
||||
PYTHON_LIBSUFFIXES+=(m)
|
||||
BUILD_REQUIRES+="
|
||||
setuptools_python3
|
||||
pycparser_python3
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python3
|
||||
"
|
||||
fi
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku$secondaryArchSuffix
|
||||
pycparser_$pythonPackage
|
||||
lib:libffi$secondaryArchSuffix
|
||||
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
|
||||
\""
|
||||
|
||||
TEST_REQUIRES+="
|
||||
${portName}_$pythonPackage
|
||||
py_$pythonPackage
|
||||
pycparser_$pythonPackage
|
||||
pytest_$pythonPackage
|
||||
"
|
||||
done
|
||||
if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then
|
||||
PROVIDES_python3+="
|
||||
cffi_python3 = $portVersion
|
||||
"
|
||||
fi
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
rm -rf "$sourceDir"-$pythonPackage
|
||||
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py install \
|
||||
--optimize=1 \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
cd "$sourceDir"
|
||||
install -m 755 -d "$docDir"
|
||||
install -m 644 -t "$docDir" README.md
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
echo import cffi | $python
|
||||
$python setup.py test
|
||||
cd testing
|
||||
$python support.py
|
||||
done
|
||||
}
|
||||
93
dev-python/cffi/cffi-1.15.0.recipe
Normal file
93
dev-python/cffi/cffi-1.15.0.recipe
Normal file
@@ -0,0 +1,93 @@
|
||||
SUMMARY="Foreign Function Interface for Python calling C code"
|
||||
DESCRIPTION="CFFI is a Python module which allows to call C code."
|
||||
HOMEPAGE="https://cffi.readthedocs.io/
|
||||
https://pypi.org/project/cffi/"
|
||||
COPYRIGHT="2012-2021 Armin Rigo, Maciej Fijalkowski"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/c/cffi/cffi-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libffi$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9)
|
||||
PYTHON_LIBSUFFIXES+=(m)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
lib:libffi$secondaryArchSuffix\n\
|
||||
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage
|
||||
pycparser_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
TEST_REQUIRES+="
|
||||
${portName}_$pythonPackage
|
||||
py_$pythonPackage
|
||||
pycparser_$pythonPackage
|
||||
pytest_$pythonPackage
|
||||
"
|
||||
|
||||
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
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
echo import cffi | $python
|
||||
$python setup.py test
|
||||
cd testing
|
||||
$python support.py
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user