diff --git a/dev-python/regex/regex-2019.12.20.recipe b/dev-python/regex/regex-2019.12.20.recipe new file mode 100644 index 000000000..a067d13c5 --- /dev/null +++ b/dev-python/regex/regex-2019.12.20.recipe @@ -0,0 +1,64 @@ +SUMMARY="All things regular expression: implemented in python" +DESCRIPTION="This regex implementation is backwards-compatible with the \ +standard ‘re’ module, but offers additional functionality." +HOMEPAGE="https://pypi.org/project/regex/" +COPYRIGHT="2013-2019 Matthew Barnett" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://pypi.org/packages/source/r/regex/regex-$portVersion.tar.gz" +CHECKSUM_SHA256="106e25a841921d8259dcef2a42786caae35bc750fb996f830065b3dfaa67b77e" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + $portName$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " + +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + " + +PYTHON_PACKAGES=(python36 python3) +PYTHON_VERSIONS=(3.6 3.7) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}${secondaryArchSuffix}_$pythonPackage = $portVersion\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku$secondaryArchSuffix\n\ + cmd:python$pythonVersion\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:python$pythonVersion" +done + +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 +}