commit: 213e165a02bf8a1054c199b9bc64e4f80b85d33f
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat Jun 19 18:23:18 2021 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat Jun 19 21:53:04 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=213e165a
dev-util/ots: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
dev-util/ots/Manifest | 1 +
dev-util/ots/files/meson-gtest.diff | 21 ++++++++++++++++++
dev-util/ots/metadata.xml | 8 +++++++
dev-util/ots/ots-8.1.4.ebuild | 43 +++++++++++++++++++++++++++++++++++++
4 files changed, 73 insertions(+)
diff --git a/dev-util/ots/Manifest b/dev-util/ots/Manifest
new file mode 100644
index 000000000..c7acce9cd
--- /dev/null
+++ b/dev-util/ots/Manifest
@@ -0,0 +1 @@
+DIST ots-8.1.4.tar.gz 28931102 BLAKE2B
18503baee9d6f63c4a54ef1f9c4dceb7b780f4940ad75028a0908479d9b9f8e947e00990c145d26c8f7db45ca1d5aa43c25f909e5c7e65ee9cc9a72cd224c484
SHA512
ef89ed28a3c8d1b25b2fb0d26beca72a017e4b37a5b02314c67dd0d6c35856bc2097bce16217546ec348a240ddc992297bcea92da24dbbc0968401051f3cab4e
diff --git a/dev-util/ots/files/meson-gtest.diff
b/dev-util/ots/files/meson-gtest.diff
new file mode 100644
index 000000000..6bece2245
--- /dev/null
+++ b/dev-util/ots/files/meson-gtest.diff
@@ -0,0 +1,21 @@
+--- a/meson.build
++++ b/meson.build
+@@ -303,6 +303,7 @@ if cxx.has_header('sys/time.h')
+ install_man('docs/ots-sanitize.1')
+
+ # https://mesonbuild.com/Dependencies.html#gtest-and-gmock
++if get_option('tests')
+ gtest = dependency('gtest', main : true, fallback : ['gtest',
'gtest_main_dep'])
+
+ cff_charstring = executable('cff_charstring',
+@@ -342,3 +343,4 @@ test('test_fuzzed_fonts',
+ 'top_builddir=@0@'.format(meson.current_build_dir()),
+ ]
+ )
++endif
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,2 +1,3 @@
++option('tests', type : 'boolean', value : false, description : 'Enable tests')
+ option('graphite', type : 'boolean', value : true, description : 'Sanitize
Graphite tables')
+ option('fuzzer_ldflags', type: 'string', description : 'Extra LDFLAGS used
during linking of fuzzing binaries')
diff --git a/dev-util/ots/metadata.xml b/dev-util/ots/metadata.xml
new file mode 100644
index 000000000..a60848aed
--- /dev/null
+++ b/dev-util/ots/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="sanitize">Sanitize Graphite tables</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-util/ots/ots-8.1.4.ebuild b/dev-util/ots/ots-8.1.4.ebuild
new file mode 100644
index 000000000..a4f0e4477
--- /dev/null
+++ b/dev-util/ots/ots-8.1.4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson
+
+SRC_URI="https://github.com/khaledhosny/ots/archive/refs/tags/v${PV}.tar.gz ->
${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+DESCRIPTION="An util for validating and sanitising OpenType files"
+HOMEPAGE="https://github.com/khaledhosny/ots"
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug sanitize test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/freetype
+ media-libs/woff2
+ sys-libs/zlib
+
+ sanitize? ( app-arch/lz4 )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+DOCS=(
+ README.md
+ docs/{DesignDoc,HowToFix,HowToTest}.md
+)
+
+PATCHES=( "${FILESDIR}/meson-gtest.diff" )
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use debug)
+ $(meson_use sanitize graphite)
+ $(meson_use test tests)
+ )
+ meson_src_configure
+}