[arch-commits] Commit in ttf-monoid/repos (3 files)

George Rawlinson grawlinson at archlinux.org
Thu Jun 17 17:30:44 UTC 2021


    Date: Thursday, June 17, 2021 @ 17:30:43
  Author: grawlinson
Revision: 964673

archrelease: copy trunk to community-any

Added:
  ttf-monoid/repos/community-any/
  ttf-monoid/repos/community-any/PKGBUILD
    (from rev 964672, ttf-monoid/trunk/PKGBUILD)
  ttf-monoid/repos/community-any/fontbuilder-python3.patch
    (from rev 964672, ttf-monoid/trunk/fontbuilder-python3.patch)

---------------------------+
 PKGBUILD                  |   61 ++++++++++++++++++++++++++++++++++++++++++++
 fontbuilder-python3.patch |   16 +++++++++++
 2 files changed, 77 insertions(+)

Copied: ttf-monoid/repos/community-any/PKGBUILD (from rev 964672, ttf-monoid/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-06-17 17:30:43 UTC (rev 964673)
@@ -0,0 +1,61 @@
+# Maintainer: George Rawlinson <george at rawlinson.net.nz>
+# Contributor: Severen Redwood <severen at shrike.me>
+
+pkgname='ttf-monoid'
+pkgver=0.61
+pkgrel=7
+pkgdesc='A customisable coding font'
+arch=('any')
+license=('MIT' 'custom:OFL')
+makedepends=('fontforge' 'python')
+url='https://larsenwork.com/monoid/'
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/larsenwork/monoid/archive/${pkgver}.tar.gz"
+        "fontbuilder-python3.patch")
+sha512sums=('2acae11b3d0a86ac1d0588de986fbcf13a83bdcb857b0eb1deaeae55615fdccbfd8f19b5618ee61abd1261c3f203cadcaa7b37f44f535a3fe462240602ab51dc'
+            '7f06b8827ed12b3070512ae58424b92a05635eefe0dee0d6314f1b92230f431e2fde5a2d70adbff324bbcb4ce70b135ccda2a6dfaaeb7b6e4219a447034f00c0')
+
+prepare () {
+  cd "monoid-${pkgver}"
+
+  # extract LICENSE from README
+  sed -n '/Monoid is dual licensed/,/OTHER DEALINGS IN THE FONT SOFTWARE./p' \
+    'Readme.md' > \
+    'LICENSE'
+
+  # patch fontbuilder script
+  cd "Scripts"
+  patch -sp1 < "${srcdir}/fontbuilder-python3.patch"
+}
+
+build () {
+  cd "monoid-${pkgver}"
+
+  # ensure python can find fontbuilder module
+  export PYTHONPATH="$(pwd)/Scripts"
+
+  # list of fonts to build
+  # note: Monoid-Diacritic variants are buggy, so they are skipped
+  local FONT_FILES=(
+    "Source/Monoid.sfdir"
+    "Source/Monoid-Bold.sfdir"
+    "Source/Monoid-Italic.sfdir"
+    "Source/Monoid-Retina.sfdir"
+    "Monoisome/Monoisome.sfdir"
+  )
+
+  # build fonts
+  for FONT_FILE in "${FONT_FILES[@]}"; do
+    python3 -c "import fontbuilder; fontbuilder.build('_build', '"${FONT_FILE}"');"
+  done
+}
+
+package () {
+  cd "monoid-${pkgver}"
+
+  # fonts
+  install -vDm644 _build/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
+
+  # license
+  install -Dm644 LICENSE \
+  "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Copied: ttf-monoid/repos/community-any/fontbuilder-python3.patch (from rev 964672, ttf-monoid/trunk/fontbuilder-python3.patch)
===================================================================
--- community-any/fontbuilder-python3.patch	                        (rev 0)
+++ community-any/fontbuilder-python3.patch	2021-06-17 17:30:43 UTC (rev 964673)
@@ -0,0 +1,16 @@
+diff --git a/fontbuilder.py b/fontbuilder.py
+index c8d8ea5..5442246 100755
+--- a/fontbuilder.py
++++ b/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)
+ 



More information about the arch-commits mailing list