aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-06-18 04:08:04 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-06-18 04:16:54 +0200
commit4a82cd9399f4ac19a2d798efc9687f272d1ae124 (patch)
treefaaa28d1bcb07b06b4f53ef2886ef5347a334b65
parentdev-util/psautohint: deselect one more test (diff)
downloadguru-4a82cd93.tar.gz
guru-4a82cd93.tar.bz2
guru-4a82cd93.zip
dev-util/afdko: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r--dev-util/afdko/Manifest1
-rw-r--r--dev-util/afdko/afdko-3.6.2.ebuild66
-rw-r--r--dev-util/afdko/files/afdko-3.6.2-AR-fix.patch22
-rw-r--r--dev-util/afdko/files/afdko-3.6.2-_get_scripts-to-data_files.patch11
-rw-r--r--dev-util/afdko/files/afdko-3.6.2-relax-hard-pinning.patch26
-rw-r--r--dev-util/afdko/files/afdko-nowheel.diff26
-rw-r--r--dev-util/afdko/metadata.xml5
7 files changed, 157 insertions, 0 deletions
diff --git a/dev-util/afdko/Manifest b/dev-util/afdko/Manifest
new file mode 100644
index 000000000..9bb7f468b
--- /dev/null
+++ b/dev-util/afdko/Manifest
@@ -0,0 +1 @@
+DIST afdko-3.6.2.tar.gz 12669802 BLAKE2B 55be8d0e0f9cbca187cff9f33113dab39d15d4a96f02ca1e356e3357204bf50b52ab6575ebb1bbf7f24b1406332be25b9b34300ae383ba0f33b873c2a945fc81 SHA512 6a3ad1a268daa321f2bc68be40674bbd68cb4d9d03622aa5884823ff74d86567739e17b1152ad24af186dbba6e623fe77f448c330a08b61b9b9813e6ff1d04c5
diff --git a/dev-util/afdko/afdko-3.6.2.ebuild b/dev-util/afdko/afdko-3.6.2.ebuild
new file mode 100644
index 000000000..172f16a06
--- /dev/null
+++ b/dev-util/afdko/afdko-3.6.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_8 )
+
+inherit distutils-r1
+
+DESCRIPTION="Adobe Font Development Kit for OpenType"
+HOMEPAGE="https://adobe-type-tools.github.io/afdko"
+SRC_URI="https://github.com/adobe-type-tools/afdko/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+LICENSE="Apache-2.0"
+SLOT="0"
+RESTRICT="test" #too many failed tests
+
+RDEPEND="
+ >=dev-python/booleanOperations-0.9[${PYTHON_USEDEP}]
+ >=dev-python/defcon-0.7.2[${PYTHON_USEDEP}]
+ >=dev-python/fontMath-0.6[${PYTHON_USEDEP}]
+ dev-python/fontPens[${PYTHON_USEDEP}]
+ >=dev-python/fonttools-4.21.1[${PYTHON_USEDEP}]
+ >=dev-util/psautohint-2.3[${PYTHON_USEDEP}]
+ >=dev-python/tqdm-4.58[${PYTHON_USEDEP}]
+ >=dev-python/ufoNormalizer-0.5.3[${PYTHON_USEDEP}]
+ >=dev-python/ufoProcessor-1.9[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]"
+
+DOCS=( {README,NEWS}.md docs )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-nowheel.diff"
+ "${FILESDIR}/${P}-AR-fix.patch"
+ "${FILESDIR}/${P}-relax-hard-pinning.patch"
+ "${FILESDIR}/${P}-_get_scripts-to-data_files.patch"
+)
+
+distutils_enable_tests pytest
+
+pkg_setup() {
+ export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}"
+}
+
+python_prepare_all() {
+ rm docs/*.{yml,plist} || die
+ distutils-r1_python_prepare_all
+}
+
+src_compile() {
+ tc-export CC CPP AR
+ local _d
+ find -path '*/linux/gcc/release/Makefile' | while read _d; do
+ emake -C "${_d%/Makefile}" XFLAGS="${CFLAGS}" || return
+ done
+ distutils-r1_src_compile
+}
+
+python_test() {
+ local -x PYTHONPATH="${S}/python:${PYTHONPATH}"
+ local -x PATH="${BUILD_DIR}/test/scripts:${S}/c/build_all:${PATH}"
+ distutils_install_for_testing
+ epytest -vv || die
+}
diff --git a/dev-util/afdko/files/afdko-3.6.2-AR-fix.patch b/dev-util/afdko/files/afdko-3.6.2-AR-fix.patch
new file mode 100644
index 000000000..a42f9ca96
--- /dev/null
+++ b/dev-util/afdko/files/afdko-3.6.2-AR-fix.patch
@@ -0,0 +1,22 @@
+--- a/c/public/lib/config/linux/gcc/gcc.mak
++++ b/c/public/lib/config/linux/gcc/gcc.mak
+@@ -27,7 +27,7 @@
+
+ $(LIB_TARGET): $(LIB_OBJS)
+ mkdir -p $(LIB_DIR)
+- $(AR) -rvs $@ $?
++ $(AR) rvs $@ $?
+
+ clean:
+ if [ "$(LIB_OBJS)" ]; then \
+--- a/c/public/lib/config/linux/gcc/gcc_tx.mak
++++ b/c/public/lib/config/linux/gcc/gcc_tx.mak
+@@ -30,7 +30,7 @@
+
+ $(LIB_TARGET): $(LIB_OBJS)
+ mkdir -p $(LIB_DIR)
+- $(AR) -rvs $@ $?
++ $(AR) rvs $@ $?
+
+ clean:
+ if [ "$(LIB_OBJS)" ]; then \
diff --git a/dev-util/afdko/files/afdko-3.6.2-_get_scripts-to-data_files.patch b/dev-util/afdko/files/afdko-3.6.2-_get_scripts-to-data_files.patch
new file mode 100644
index 000000000..cff40e488
--- /dev/null
+++ b/dev-util/afdko/files/afdko-3.6.2-_get_scripts-to-data_files.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -234,7 +234,7 @@
+ 'pytest',
+ ],
+ install_requires=_get_requirements(),
+- scripts=_get_scripts(),
++ data_files=[("bin",_get_scripts())],
+ entry_points={
+ 'console_scripts': _get_console_scripts(),
+ },
diff --git a/dev-util/afdko/files/afdko-3.6.2-relax-hard-pinning.patch b/dev-util/afdko/files/afdko-3.6.2-relax-hard-pinning.patch
new file mode 100644
index 000000000..4939f1a40
--- /dev/null
+++ b/dev-util/afdko/files/afdko-3.6.2-relax-hard-pinning.patch
@@ -0,0 +1,26 @@
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,13 +1,13 @@
+ # 'lxml' is not a primary requirement of afdko but it's listed here because
+ # we want to have control over the version and guarantee that the XML output
+ # of our tools is stable
+-# NOTE: hard-pinning (==) here gets relaxed to >= in setup.py
+-lxml==4.6.2
+-booleanOperations==0.9.0
+-defcon[pens,lxml]==0.7.2
+-fontMath==0.6.0
+-fontTools[woff,ufo,lxml,unicode]==4.21.1
+-psautohint==2.3.0
+-tqdm==4.58.0
+-ufonormalizer==0.5.3
+-ufoProcessor==1.9.0
++# NOTE: hard-pinning (>=) here gets relaxed to >= in setup.py
++lxml>=4.6.2
++booleanOperations>=0.9.0
++defcon[pens,lxml]>=0.7.2
++fontMath>=0.6.0
++fontTools[woff,ufo,lxml,unicode]>=4.21.1
++psautohint>=2.3.0
++tqdm>=4.58.0
++ufonormalizer>=0.5.3
++ufoProcessor>=1.9.0
diff --git a/dev-util/afdko/files/afdko-nowheel.diff b/dev-util/afdko/files/afdko-nowheel.diff
new file mode 100644
index 000000000..14baff83c
--- /dev/null
+++ b/dev-util/afdko/files/afdko-nowheel.diff
@@ -0,0 +1,26 @@
+--- a/setup.py
++++ b/setup.py
+@@ -29,7 +29,6 @@ try:
+ except ImportError:
+ print("afdko: setup.py requires that the Python package 'wheel' be "
+ "installed. Try the command 'pip install wheel'.")
+- sys.exit(1)
+
+
+ class InstallPlatlib(setuptools.command.install.install):
+@@ -246,7 +245,6 @@ def main():
+ zip_safe=False,
+ python_requires='>=2.7',
+ setup_requires=[
+- 'wheel',
+ 'setuptools_scm',
+ ],
+ tests_require=[
+@@ -260,7 +258,6 @@ def main():
+ cmdclass={
+ 'build_py': CustomBuild,
+ 'build_scripts': CustomBuildScripts,
+- 'bdist_wheel': CustomBDistWheel,
+ 'install': InstallPlatlib,
+ },
+ )
diff --git a/dev-util/afdko/metadata.xml b/dev-util/afdko/metadata.xml
new file mode 100644
index 000000000..46f4785f7
--- /dev/null
+++ b/dev-util/afdko/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer needed -->
+</pkgmetadata>