python-fonttools: Different versions for python 2 & 3
python2-fontools: Update to 3.44.0 python3-fonttools: Update to 4.0.3
This commit is contained in:
56
mingw-w64-python3-fonttools/PKGBUILD
Normal file
56
mingw-w64-python3-fonttools/PKGBUILD
Normal file
@@ -0,0 +1,56 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
_realname=fonttools
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=4.0.2
|
||||
pkgrel=1
|
||||
pkgdesc="Converts OpenType and TrueType fonts to and from XML (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://github.com/fonttools/fonttools'
|
||||
license=('MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-numpy")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-brotli: WOFF 1.0 and WOFF 2.0 webfonts"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pyfilesystem2: for fontTools.ufoLib: to read/write UFO fonts"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pyzopfli: WOFF 1.0 and WOFF 2.0 webfonts"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-sympy: for fontTools.misc.symfont, module for symbolic font statistics analysis")
|
||||
install=${_realname}3-${CARCH}.install
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-matplotlib"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner")
|
||||
options=('staticlibs' 'strip' '!debug')
|
||||
source=("https://github.com/fonttools/fonttools/releases/download/${pkgver}/fonttools-${pkgver}.zip")
|
||||
sha256sums=('bb9bf6b5b4ded33e0d9f823e5ae2e1fa643af4d614915660abe3853a9a6931cd')
|
||||
|
||||
build() {
|
||||
msg "Python 3 build for ${CARCH}"
|
||||
rm -rf python3-build-${CARCH}
|
||||
cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
||||
}
|
||||
|
||||
#Enable tests when the dependencies are solved
|
||||
check() {
|
||||
msg "Python 3 test for ${CARCH}"
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python3 setup.py pytest || warning "Tests failed"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python3-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do
|
||||
sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_ff}
|
||||
done
|
||||
|
||||
install -D -m755 LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/python3-${_realname}/LICENSE
|
||||
chmod oga+r "${pkgdir}${MINGW_PREFIX}"/share/man/man1/ttx.1
|
||||
}
|
||||
26
mingw-w64-python3-fonttools/fonttools3-i686.install
Normal file
26
mingw-w64-python3-fonttools/fonttools3-i686.install
Normal file
@@ -0,0 +1,26 @@
|
||||
post_install() {
|
||||
cd mingw32
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
for _it in fonttools; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in pyftmerge; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in pyftsubset; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in ttx; do
|
||||
sed -e "s|/mingw32|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
26
mingw-w64-python3-fonttools/fonttools3-x86_64.install
Normal file
26
mingw-w64-python3-fonttools/fonttools3-x86_64.install
Normal file
@@ -0,0 +1,26 @@
|
||||
post_install() {
|
||||
cd mingw64
|
||||
local _prefix=$(pwd -W)
|
||||
cd -
|
||||
local _it
|
||||
for _it in fonttools; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in pyftmerge; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in pyftsubset; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
for _it in ttx; do
|
||||
sed -e "s|/mingw64|${_prefix}|g" \
|
||||
-i ${_prefix}/bin/${_it}-script.py
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
Reference in New Issue
Block a user