From bc5db0565fd46038071d6dba66b7d1136d4a9006 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 11 Nov 2017 16:24:53 +0100 Subject: [PATCH] webencodings: add recipe for version 0.5.1. needed by html5lib. --- .../webencodings/webencodings-0.5.1.recipe | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 dev-python/webencodings/webencodings-0.5.1.recipe diff --git a/dev-python/webencodings/webencodings-0.5.1.recipe b/dev-python/webencodings/webencodings-0.5.1.recipe new file mode 100644 index 000000000..5809cac8c --- /dev/null +++ b/dev-python/webencodings/webencodings-0.5.1.recipe @@ -0,0 +1,65 @@ +SUMMARY="Python implementation of the WHATWG Encoding standard" +DESCRIPTION="In order to be compatible with legacy web content when \ +interpreting something like Content-Type: text/html; charset=latin1, tools \ +need to use a particular set of aliases for encoding labels as well as some \ +overriding rules. For example, US-ASCII and iso-8859-1 on the web are actually \ +aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes precedence over \ +any other encoding declaration. The Encoding standard defines all such details \ +so that implementations do not have to reverse-engineer each other." +HOMEPAGE="https://github.com/gsnedders/python-webencodings" +COPYRIGHT="2012 Simon Sapin" +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="https://github.com/gsnedders/python-webencodings/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="082367f568a7812aa5f6922ffe3d9d027cd83829dc32bcaac4c874eeed618000" +SOURCE_DIR="python-webencodings-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python python3) +PYTHON_VERSIONS=(2.7 3.6) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\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 +}