1SUMMARY="A fast implementation of the Cassowary constraint solver" 2DESCRIPTION="Kiwi is an efficient C++ implementation of the Cassowary \ 3constraint solving algorithm. Kiwi is an implementation of the algorithm \ 4based on the seminal Cassowary paper. It is not a refactoring of the original \ 5C++ solver. Kiwi has been designed from the ground up to be lightweight and \ 6fast. Kiwi ranges from 10x to 500x faster than the original Cassowary solver \ 7with typical use cases gaining a 40x improvement. Memory savings are consistently > 5x." 8HOMEPAGE="https://github.com/nucleic/kiwi" 9COPYRIGHT="2018-2020, Nucleic team" 10LICENSE="BSD (3-clause)" 11REVISION="4" 12SOURCE_URI="https://github.com/nucleic/kiwi/archive/refs/tags/$portVersion.tar.gz" 13CHECKSUM_SHA256="91d56ec628be2513a02c3721d4d8173416daf37c49423fe7a41a0e30c1101269" 14SOURCE_DIR="kiwi-$portVersion" 15 16ARCHITECTURES="all !x86_gcc2" 17SECONDARY_ARCHITECTURES="x86" 18 19PROVIDES=" 20 $portName = $portVersion 21 " 22REQUIRES=" 23 haiku$secondaryArchSuffix 24 " 25 26BUILD_REQUIRES=" 27 haiku${secondaryArchSuffix}_devel 28 " 29BUILD_PREREQUIRES=" 30 cmd:gcc$secondaryArchSuffix 31 cmd:pkg_config$secondaryArchSuffix 32 " 33 34PYTHON_PACKAGES=(python39 python310) 35PYTHON_VERSIONS=(3.9 3.10) 36for i in "${!PYTHON_PACKAGES[@]}"; do 37pythonPackage=${PYTHON_PACKAGES[i]} 38pythonVersion=${PYTHON_VERSIONS[$i]} 39eval "PROVIDES_${pythonPackage}=\"\ 40 ${portName}_$pythonPackage = $portVersion\n\ 41 \"; \ 42REQUIRES_$pythonPackage=\"\ 43 haiku$secondaryArchSuffix\n\ 44 cmd:python$pythonVersion\ 45 \"" 46if [ "$targetArchitecture" = "x86_gcc2" ]; then 47 eval "PROVIDES_${pythonPackage}+=\"\n\ 48 kiwisolver_$pythonPackage = $portVersion\ 49 \"" 50fi 51 52BUILD_REQUIRES="$BUILD_REQUIRES 53 cppy_$pythonPackage 54 setuptools_$pythonPackage 55 " 56BUILD_PREREQUIRES="$BUILD_PREREQUIRES 57 cmd:python$pythonVersion 58 " 59done 60 61 62INSTALL() 63{ 64 for i in "${!PYTHON_PACKAGES[@]}"; do 65 pythonPackage=${PYTHON_PACKAGES[i]} 66 pythonVersion=${PYTHON_VERSIONS[$i]} 67 68 python=python$pythonVersion 69 installLocation=$prefix/lib/$python/vendor-packages/ 70 export PYTHONPATH=$installLocation:$PYTHONPATH 71 mkdir -p $installLocation 72 rm -rf build 73 $python setup.py build install \ 74 --root=/ --prefix=$prefix 75 76 packageEntries $pythonPackage \ 77 $prefix/lib/python* 78 done 79} 80