From ea512104b2abb17852f4493329b5866940f5aeb7 Mon Sep 17 00:00:00 2001 From: ubports-on-cedric <56452425+ubports-on-cedric@users.noreply.github.com> Date: Tue, 31 Dec 2019 15:17:15 +0200 Subject: [PATCH] regex: add recipe for version 2019.12.20 (#4485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jérôme Duval --- dev-python/regex/regex-2019.12.20.recipe | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dev-python/regex/regex-2019.12.20.recipe 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 +}