diff options
author | Caleb Maclennan | 2020-03-26 01:09:12 +0300 |
---|---|---|
committer | Caleb Maclennan | 2020-03-26 01:09:52 +0300 |
commit | 85a30768787e3d37b998ffc2abd9bf97e7c202fc (patch) | |
tree | 1714520f0746d4a350db3f65a5594fbf1e09e216 | |
parent | dc468058e25f8b9544782c4a81cf558286ac1ba7 (diff) | |
download | aur-85a30768787e3d37b998ffc2abd9bf97e7c202fc.tar.gz |
Fix versioning and copy Python3 patch from stable package
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | python3.patch | 47 |
4 files changed, 72 insertions, 15 deletions
@@ -1,17 +1,21 @@ pkgbase = ufo2otf-git pkgdesc = Take UFO font sources and generate OTF’s and webfonts - pkgver = r9.9025ba2 - pkgrel = 2 + pkgver = 0.2.2 + pkgrel = 1 url = https://github.com/fonts/ufo2otf arch = any - license = BSD 3-Clause + license = BSD makedepends = git makedepends = python-setuptools - depends = python2 + depends = python depends = fontforge + depends = afdko provides = ufo2otf - source = git+https://github.com/fonts/ufo2otf + conflicts = ufo2otf + source = git+https://github.com/fonts/ufo2otf.git + source = python3.patch sha256sums = SKIP + sha256sums = 152396362fb91765a7a34958d24ca521a804df3ade5f0cce27135dfb1c712d62 pkgname = ufo2otf-git diff --git a/.gitignore b/.gitignore index 0ca50ff4dd97..b5879dba0e14 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ !./.SRCINFO !./.gitignore !./PKGBUILD +!./python3.patch @@ -2,27 +2,32 @@ # Contributor: Ankit R Gadiya <git@argp.in> pkgname=ufo2otf-git -pkgver=r9.9025ba2 -pkgrel=2 -pkgdesc="Take UFO font sources and generate OTF’s and webfonts" +pkgver=0.2.2 +pkgrel=1 +pkgdesc='Take UFO font sources and generate OTF’s and webfonts' arch=('any') url="https://github.com/fonts/${pkgname%-git}" provides=("${pkgname%-git}") -depends=('python2' - 'fontforge') +conflicts=("${provides[@]}") +depends=('python' + 'fontforge' + 'afdko') makedepends=('git' 'python-setuptools') -license=('BSD 3-Clause') -source=("git+https://github.com/fonts/${pkgname%-git}") -sha256sums=('SKIP') +license=('BSD') +source=("git+$url.git" + 'python3.patch') +sha256sums=('SKIP' + '152396362fb91765a7a34958d24ca521a804df3ade5f0cce27135dfb1c712d62') pkgver() { cd "${pkgname%-git}" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + git tag | grep -Fq 'v0.2.2' || git tag v0.2.2 9025ba292c2a17e7dc8010c4fed79ab1a036403a + git describe --tags --abbrev=7 --match="v*" HEAD | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } package() { cd "${pkgname%-git}" - python2 setup.py -q install --root="$pkgdir" --optimize=1 + python setup.py -q install --root="$pkgdir" --optimize=1 install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname"/LICENSE } diff --git a/python3.patch b/python3.patch new file mode 100644 index 000000000000..81cf0126b361 --- /dev/null +++ b/python3.patch @@ -0,0 +1,47 @@ +diff --git a/bin/ufo2otf b/bin/ufo2otf +index fdfa2e6..bfbd9ca 100644 +--- a/bin/ufo2otf ++++ b/bin/ufo2otf +@@ -25,7 +25,7 @@ from ufo2otf import FontError + + def diagnostics(): + e = FontError() +- print e ++ print(e) + + def console(): + from sys import exit +diff --git a/ufo2otf/__init__.py b/ufo2otf/__init__.py +index 65f245e..7ade949 100644 +--- a/ufo2otf/__init__.py ++++ b/ufo2otf/__init__.py +@@ -1,3 +1,3 @@ + import argparse +-from compilers import Compiler +-from diagnostics import diagnostics, FontError ++from .compilers import Compiler ++from .diagnostics import diagnostics, FontError +diff --git a/ufo2otf/compilers.py b/ufo2otf/compilers.py +index 2014bfd..f012639 100644 +--- a/ufo2otf/compilers.py ++++ b/ufo2otf/compilers.py +@@ -4,7 +4,7 @@ + from os import mkdir + from os.path import splitext, dirname, sep, join, exists, basename + from subprocess import Popen +-from diagnostics import diagnostics, known_compilers, FontError ++from .diagnostics import diagnostics, known_compilers, FontError + import codecs + import re + +diff --git a/ufo2otf/diagnostics.py b/ufo2otf/diagnostics.py +index 2271af2..eff7316 100644 +--- a/ufo2otf/diagnostics.py ++++ b/ufo2otf/diagnostics.py +@@ -158,5 +158,5 @@ class FontError(Exception): + if __name__ == "__main__": + # This will print diagnostics to stdout + e = FontError() +- print e ++ print(e) + |