mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
pypeg2: add recipe for version 2.15.2.
This commit is contained in:
64
dev-python/pypeg2/pypeg2-2.15.2.recipe
Normal file
64
dev-python/pypeg2/pypeg2-2.15.2.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
SUMMARY="An intrinsic PEG Parser-Interpreter for Python"
|
||||
DESCRIPTION="Python is a nice scripting language. It even gives you access to \
|
||||
its own parser and compiler. It also gives you access to different other \
|
||||
parsers for special purposes like XML and string templates.
|
||||
|
||||
But sometimes you may want to have your own parser. This is what’s pyPEG for. \
|
||||
And pyPEG supports Unicode."
|
||||
HOMEPAGE="https://pypi.python.org/pypi/pypeg2"
|
||||
COPYRIGHT="2009-2014 Volker Birk"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/p/pyPEG2/pyPEG2-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="2b2d4f80d8e1a9370b2a91f4a25f4abf7f69b85c8da84cd23ec36451958a1f6d"
|
||||
SOURCE_DIR="pyPEG2-$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