Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: haikuports/haikuports
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cd6670606069
Choose a base ref
...
head repository: haikuports/haikuports
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a7f9e8bed229
Choose a head ref
  • 1 commit
  • 1 file changed
  • 2 contributors

Commits on Aug 25, 2021

  1. kiwisolver: new recipe (#6153)

    Co-authored-by: Aleksei Gerasimov <aleksei.gerasimov@vutbr.cz>
    iam-git and Aleksei Gerasimov authored Aug 25, 2021
    Copy the full SHA
    a7f9e8b View commit details
Showing with 72 additions and 0 deletions.
  1. +72 −0 dev-python/kiwisolver/kiwisolver-1.3.1.recipe
72 changes: 72 additions & 0 deletions dev-python/kiwisolver/kiwisolver-1.3.1.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
SUMMARY="A fast implementation of the Cassowary constraint solver"
DESCRIPTION="Kiwi is an efficient C++ implementation of the Cassowary \
constraint solving algorithm. Kiwi is an implementation of the algorithm \
based on the seminal Cassowary paper. It is not a refactoring of the original \
C++ solver. Kiwi has been designed from the ground up to be lightweight and \
fast. Kiwi ranges from 10x to 500x faster than the original Cassowary solver \
with typical use cases gaining a 40x improvement. Memory savings are consistently > 5x."
HOMEPAGE="https://github.com/nucleic/kiwi"
COPYRIGHT="2018-2020, Nucleic team"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/nucleic/kiwi/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="91d56ec628be2513a02c3721d4d8173416daf37c49423fe7a41a0e30c1101269"
SOURCE_DIR="kiwi-$portVersion"

ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="?x86"

PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"

PYTHON_PACKAGES=(python3 python38 python39)
PYTHON_VERSIONS=(3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku$secondaryArchSuffix\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
}