mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 17:50:06 +02:00
webencodings: add recipe for version 0.5.1.
needed by html5lib.
This commit is contained in:
65
dev-python/webencodings/webencodings-0.5.1.recipe
Normal file
65
dev-python/webencodings/webencodings-0.5.1.recipe
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user