Skip to content

Instantly share code, notes, and snippets.

@joshdmiller joshdmiller/PKGBUILD
Created Jul 21, 2015

Embed
What would you like to do?
ttf-monoid-git
diff --git a/Scripts/fontbuilder.py b/Scripts/fontbuilder.py
index c8d8ea5..5442246 100755
--- a/Scripts/fontbuilder.py
+++ b/Scripts/fontbuilder.py
@@ -58,9 +58,9 @@ def permutations():
bitmap_max = 1 << count
# Iterate over all possible permutations
- for i in xrange(bitmap_max):
+ for i in range(bitmap_max):
# Map the iteration's permutations using a bitmap
- bitmap = [i >> n & 1 for n in xrange(count)]
+ bitmap = [i >> n & 1 for n in range(count)]
for opts in _expand_options(bitmap):
yield(int(float(i)/bitmap_max*100), opts)
# Maintainer: Adrián Pérez de Castro <aperez@igalia.com>
pkgname='ttf-monoid-git'
pkgdesc='Open Source coding font'
pkgver=r292.164cfa9
pkgrel=1
arch=('any')
license=('custom:MIT')
url='http://andreaslarsen.github.io/monoid/'
source=("${pkgname}::git://github.com/andreaslarsen/monoid.git"
'fontbuilder-python3.patch')
install="${pkgname}.install"
depends=('xorg-font-utils' 'fontconfig')
makedepends=('git' 'fontforge' 'python')
conflicts=('ttf-mono16' 'ttf-mono16-git')
provides=( "${conflicts[@]}" )
sha512sums=('SKIP'
'52b08b45d91f2ac1de1e5c4dedde073f152652f2adb28dc58613f1f81b5b8448bf660808799a7fbf7b432166e4a06d7d91eba18532469f81d9554ef2ff65b5ea')
pkgver () {
cd "${pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare () {
cd "${pkgname}"
patch -p1 < "${srcdir}/fontbuilder-python3.patch"
}
build () {
cd "${pkgname}/Scripts"
python3 -c 'import fontbuilder; fontbuilder.build("../_release", "../Source/Monoid.sfdir");'
}
package () {
cd "${pkgname}"
install -Dm644 _release/Monoid-Regular.ttf \
"${pkgdir}/usr/share/fonts/TTF/Monoid-Regular.ttf"
install -Dm644 Source/Readme+License.html \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.