mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
No functional change intended. Just aligning the recipe with what has been done on others lately. Dropping the "REPLACES_*" as nothing in-tree was requiring either "fonttools_python3", nor any of the commands it provides, and that replaces seems to have been there for ages already.
100 lines
2.3 KiB
Bash
100 lines
2.3 KiB
Bash
SUMMARY="A library for manipulating fonts"
|
|
DESCRIPTION="FontTools is a library for manipulating fonts, written in Python.\
|
|
It supports TrueType, OpenType, AFM and to an extent Type 1 and some \
|
|
Mac-specific formats."
|
|
HOMEPAGE="https://github.com/behdad/fonttools"
|
|
COPYRIGHT="1999-2004 Just van Rossum, Letterror, The Netherlands."
|
|
LICENSE="FONTTOOLS"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/fonttools/fonttools/archive/$portVersion.tar.gz"
|
|
SOURCE_FILENAME="fonttools-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="f49a6d3cf67c44a2e8da4435f42e736cbc96591c7033f86ab9f778b11b266b17"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python310)
|
|
PYTHON_VERSIONS=(3.10)
|
|
defaultVersion=3.10
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
cmd:fonttools_$pythonVersion = $portVersion
|
|
cmd:pyftmerge_$pythonVersion = $portVersion
|
|
cmd:pyftsubset_$pythonVersion = $portVersion
|
|
cmd:ttx_$pythonVersion = $portVersion
|
|
\""
|
|
|
|
if [ $pythonVersion = $defaultVersion ]; then
|
|
eval "PROVIDES_${pythonPackage}+=\"
|
|
cmd:fonttools = $portVersion
|
|
cmd:pyftmerge = $portVersion
|
|
cmd:pyftsubset = $portVersion
|
|
cmd:ttx = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage+=\"
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
python=python$pythonVersion
|
|
rm -rf build
|
|
|
|
$python -m build -wn
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
# Version suffix all the scripts
|
|
for f in $binDir/*; do
|
|
mv $f $f-$pythonVersion
|
|
done
|
|
|
|
# And provide suffix-less symlinks for the default version
|
|
if [ $pythonVersion = $defaultVersion ]; then
|
|
for f in $binDir/*; do
|
|
ln -sr $f ${f%-$pythonVersion}
|
|
done
|
|
fi
|
|
|
|
mkdir -p $manDir
|
|
mv $prefix/share/man/* $manDir
|
|
rm -rf $prefix/share
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python* \
|
|
$binDir \
|
|
$manDir
|
|
done
|
|
}
|