mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 16:20:08 +02:00
All on-tree users (orcus0.18, sphinx, sphinxcontrib_jquery, assimp_docs) already target 3.10 only.
78 lines
2.3 KiB
Bash
78 lines
2.3 KiB
Bash
SUMMARY="Snowball stemming library collection for Python"
|
|
DESCRIPTION="This package provides 29 stemmers for 28 languages generated from Snowball algorithms.
|
|
|
|
Stemming maps different forms of the same word to a common *stem* - for example, the English \
|
|
stemmer maps *connection*, *connections*, *connective*, *connected*, and *connecting* to \
|
|
*connect*. So a searching for *connected* would also find documents which only have the other \
|
|
forms.
|
|
|
|
This stem form is often a word itself, but this is not always the case as this is not a \
|
|
requirement for text search systems, which are the intended field of use. We also aim to conflate \
|
|
words with the same meaning, rather than all words with a common linguistic root (so *awe* and \
|
|
*awful* don't have the same stem), and over-stemming is more problematic than under-stemming so we \
|
|
tend not to stem in cases that are hard to resolve. If you want to always reduce words to a root \
|
|
form and/or get a root form which is itself a word then Snowball's stemming algorithms likely \
|
|
aren't the right answer."
|
|
HOMEPAGE="https://github.com/snowballstem/snowball"
|
|
COPYRIGHT="2001, Dr Martin Porter
|
|
2004,2005, Richard Boulton
|
|
2013, Yoshiki Shibukawa
|
|
2006-2019 Olly Betts"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="https://pypi.python.org/packages/source/s/snowballstemmer/snowballstemmer-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
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
|
|
}
|