1SUMMARY="Measures number of Terminal column cells of wide-character codes"
2DESCRIPTION="This API is mainly for Terminal Emulator implementors, or those writing programs \
3that expect to interpreted by a terminal emulator and wish to determine the printable width of a \
4string on a Terminal."
5HOMEPAGE="https://github.com/jquast/wcwidth/"
6COPYRIGHT="2007 Markus Kuhn
7	2014 Jeff Quast"
8LICENSE="MIT"
9REVISION="2"
10SOURCE_URI="https://github.com/jquast/wcwidth/archive/refs/tags/$portVersion.tar.gz"
11CHECKSUM_SHA256="ebcd44c0ba3049d9b813cd8ad1bc7d151674b322a82f99ff09f0e604de1ecf09"
12SOURCE_FILENAME="wcwidth-$portVersion.tar.gz"
13
14ARCHITECTURES="any"
15
16PROVIDES="
17	$portName = $portVersion
18	"
19REQUIRES="
20	haiku
21	"
22
23BUILD_REQUIRES="
24	haiku_devel
25	"
26
27PYTHON_PACKAGES=(python39 python310)
28PYTHON_VERSIONS=(3.9 3.10)
29for i in "${!PYTHON_PACKAGES[@]}"; do
30pythonPackage=${PYTHON_PACKAGES[i]}
31pythonVersion=${PYTHON_VERSIONS[$i]}
32eval "PROVIDES_${pythonPackage}=\"\
33	${portName}_$pythonPackage = $portVersion\
34	\"; \
35REQUIRES_$pythonPackage=\"\
36	haiku\n\
37	cmd:python$pythonVersion\
38	\""
39BUILD_REQUIRES="$BUILD_REQUIRES
40	setuptools_$pythonPackage"
41BUILD_PREREQUIRES="$BUILD_PREREQUIRES
42	cmd:python$pythonVersion"
43done
44
45INSTALL()
46{
47	for i in "${!PYTHON_PACKAGES[@]}"; do
48		pythonPackage=${PYTHON_PACKAGES[i]}
49		pythonVersion=${PYTHON_VERSIONS[$i]}
50
51		python=python$pythonVersion
52		installLocation=$prefix/lib/$python/vendor-packages/
53		export PYTHONPATH=$installLocation:$PYTHONPATH
54		mkdir -p $installLocation
55		rm -rf build
56		$python setup.py build install \
57			--root=/ --prefix=$prefix
58
59		packageEntries  $pythonPackage \
60			$prefix/lib/python*
61	done
62}
63