commit:     68fb39a0c807e8b8e604ee7da9c767c4a1d4f585
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Jul 11 00:23:29 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Jul 11 00:29:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=68fb39a0

media-fonts/3270font: add fontbakery tests

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 media-fonts/3270font/3270font-2.3.0.ebuild                | 15 ++++++++++-----
 .../files/3270font-2.3.0-correctly-pass-options.patch     | 10 ++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/media-fonts/3270font/3270font-2.3.0.ebuild 
b/media-fonts/3270font/3270font-2.3.0.ebuild
index c1ccd1dac..16356a8d7 100644
--- a/media-fonts/3270font/3270font-2.3.0.ebuild
+++ b/media-fonts/3270font/3270font-2.3.0.ebuild
@@ -14,15 +14,17 @@ 
SRC_URI="https://github.com/rbanffy/3270font/archive/v${PV}.tar.gz -> ${P}.tar.g
 LICENSE="BSD CC-BY-SA-3.0 GPL-3 OFL"
 SLOT="0"
 KEYWORDS="~amd64"
-
 IUSE="test"
-RESTRICT="!test? ( test )"
 
+RESTRICT="test"
+PROPERTIES="test_network"
 DOCS=( CHANGELOG.md README.md  )
 HTML_DOCS=( "DESCRIPTION.en_us.html" )
-PATCHES=( "${FILESDIR}/remove-useless-tests.patch" )
+PATCHES=(
+       "${FILESDIR}/remove-useless-tests.patch"
+       "${FILESDIR}/${P}-correctly-pass-options.patch"
+)
 
-RDEPEND=""
 DEPEND="
        ${PYTHON_DEPS}
        media-gfx/fontforge
@@ -31,6 +33,7 @@ DEPEND="
                        dev-python/ipdb[${PYTHON_USEDEP}]
                        dev-python/pillow[${PYTHON_USEDEP}]
                        dev-util/gftools[${PYTHON_SINGLE_USEDEP}]
+                       media-gfx/fontbakery[${PYTHON_USEDEP}]
                ')
        )
 "
@@ -40,7 +43,8 @@ FONT_SUFFIX="otf ttf pfm woff"
 
 python_check_deps() {
        has_version -d "dev-python/ipdb[${PYTHON_USEDEP}]" && \
-       has_version -d "dev-python/pillow[${PYTHON_USEDEP}]"
+       has_version -d "dev-python/pillow[${PYTHON_USEDEP}]" && \
+       has_version -d "dev-util/gftools[${PYTHON_SINGLE_USEDEP}]"
 }
 
 pkg_setup() {
@@ -53,4 +57,5 @@ src_compile() {
 
 src_test() {
        emake test
+       emake fbchecks
 }

diff --git 
a/media-fonts/3270font/files/3270font-2.3.0-correctly-pass-options.patch 
b/media-fonts/3270font/files/3270font-2.3.0-correctly-pass-options.patch
new file mode 100644
index 000000000..7d8dc6224
--- /dev/null
+++ b/media-fonts/3270font/files/3270font-2.3.0-correctly-pass-options.patch
@@ -0,0 +1,10 @@
+--- a/fontbakery_checks.sh
++++ b/fontbakery_checks.sh
+@@ -36,6 +36,6 @@
+ for fontdir in "$OUTPUT_DIR"/*
+ do
+   if [ -d "$fontdir" ]; then
+-    fontbakery check-googlefonts "$OPTIONS" "$fontdir"/*.ttf
++    fontbakery check-googlefonts $OPTIONS "$fontdir"/*.ttf
+   fi
+ done

Reply via email to