1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/community/py3-fonttools/APKBUILD
2025-04-11 05:30:56 +00:00

61 lines
1.6 KiB
Text

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-fonttools
_pkgname=fonttools
pkgver=4.57.0
pkgrel=0
pkgdesc="Converts OpenType and TrueType fonts to and from XML"
url="https://github.com/fonttools/fonttools"
arch="all"
license="MIT AND OFL-1.1"
makedepends="
cython
py3-gpep517
py3-installer
py3-setuptools
py3-wheel
python3-dev
"
checkdepends="py3-fs py3-pytest py3-pytest-xdist py3-brotli"
subpackages="$pkgname-doc $pkgname-pyc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/fonttools/fonttools/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-fonttools" # Backwards compatibility
provides="py-fonttools=$pkgver-r$pkgrel" # Backwards compatibility
prepare() {
default_prepare
# remove interpreter line
sed -i '1d' Lib/fontTools/mtiLib/__init__.py
}
build() {
CFLAGS="$CFLAGS -O2 -flto=auto" \
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
PATH="$PATH:$PWD" \
.testenv/bin/python3 -m pytest -n auto
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/fonttools-$pkgver-*.whl
}
doc() {
replaces="py-$_pkgname-doc" # Backwards compatibility
provides="py-$_pkgname-doc=$pkgver-r$pkgrel" # Backwards compatibility
default_doc
}
sha512sums="
7e3ef7149b8e6af5953a827e0a078390e67b919ba9752a03672d876f6de3d0d395b2e061c0f87e5d9298c13c74a1f0162d99151c364dfab487eec2ab9adced75 fonttools-4.57.0.tar.gz
"