dev-util/ots: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-06-19 20:23:18 +02:00
parent 32c3ee199c
commit 213e165a02
4 changed files with 73 additions and 0 deletions

1
dev-util/ots/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST ots-8.1.4.tar.gz 28931102 BLAKE2B 18503baee9d6f63c4a54ef1f9c4dceb7b780f4940ad75028a0908479d9b9f8e947e00990c145d26c8f7db45ca1d5aa43c25f909e5c7e65ee9cc9a72cd224c484 SHA512 ef89ed28a3c8d1b25b2fb0d26beca72a017e4b37a5b02314c67dd0d6c35856bc2097bce16217546ec348a240ddc992297bcea92da24dbbc0968401051f3cab4e

View File

@@ -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')

View File

@@ -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>

View File

@@ -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
}