SUMMARY="A generic syntax highlighter" DESCRIPTION="It is a generic syntax highlighter for general use in all kinds \ of software such as forum systems, wikis or other applications that need to \ prettify source code. Highlights are: * a wide range of common languages and markup formats is supported * special attention is paid to details that increase highlighting quality * support for new languages and formats are added easily; most languages use a \ simple regex-based lexing mechanism * a number of output formats is available, among them HTML, RTF, LaTeX and \ ANSI sequences * it is usable as a command-line tool and as a library * ... and it highlights even Brainf*ck!" HOMEPAGE="https://pygments.org/" COPYRIGHT="2006-2023 by the Pygments team" LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://pypi.org/packages/source/P/Pygments/Pygments-$portVersion.tar.gz" CHECKSUM_SHA256="b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297" SOURCE_DIR="Pygments-$portVersion" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " PYTHON_PACKAGES=(python38 python39 python310) PYTHON_VERSIONS=(3.8 3.9 3.10) commandSuffixes=(3.8 "" 3.10) for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} commandSuffix=${commandSuffixes[$i]} eval "PROVIDES_${pythonPackage}=\"\ ${portName}_$pythonPackage = $portVersion\n\ cmd:pygmentize$commandSuffix = $portVersion\n\ \"; \ 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]} commandSuffix=${commandSuffixes[$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 mkdir -p $manDir/man1 cp doc/pygmentize.1 $manDir/man1 if [ "$pythonVersion" = "$commandSuffix" ]; then for f in $binDir/*; do mv $f ${f}$commandSuffix done fi packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir \ $manDir done }