Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-util/ots/, dev-util/ots/files/
Date: Sat, 19 Jun 2021 21:53:12
Message-Id: 1624139584.213e165a02bf8a1054c199b9bc64e4f80b85d33f.Alessandro-Barbieri@gentoo
1 commit: 213e165a02bf8a1054c199b9bc64e4f80b85d33f
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 19 18:23:18 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sat Jun 19 21:53:04 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=213e165a
7
8 dev-util/ots: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-util/ots/Manifest | 1 +
13 dev-util/ots/files/meson-gtest.diff | 21 ++++++++++++++++++
14 dev-util/ots/metadata.xml | 8 +++++++
15 dev-util/ots/ots-8.1.4.ebuild | 43 +++++++++++++++++++++++++++++++++++++
16 4 files changed, 73 insertions(+)
17
18 diff --git a/dev-util/ots/Manifest b/dev-util/ots/Manifest
19 new file mode 100644
20 index 000000000..c7acce9cd
21 --- /dev/null
22 +++ b/dev-util/ots/Manifest
23 @@ -0,0 +1 @@
24 +DIST ots-8.1.4.tar.gz 28931102 BLAKE2B 18503baee9d6f63c4a54ef1f9c4dceb7b780f4940ad75028a0908479d9b9f8e947e00990c145d26c8f7db45ca1d5aa43c25f909e5c7e65ee9cc9a72cd224c484 SHA512 ef89ed28a3c8d1b25b2fb0d26beca72a017e4b37a5b02314c67dd0d6c35856bc2097bce16217546ec348a240ddc992297bcea92da24dbbc0968401051f3cab4e
25
26 diff --git a/dev-util/ots/files/meson-gtest.diff b/dev-util/ots/files/meson-gtest.diff
27 new file mode 100644
28 index 000000000..6bece2245
29 --- /dev/null
30 +++ b/dev-util/ots/files/meson-gtest.diff
31 @@ -0,0 +1,21 @@
32 +--- a/meson.build
33 ++++ b/meson.build
34 +@@ -303,6 +303,7 @@ if cxx.has_header('sys/time.h')
35 + install_man('docs/ots-sanitize.1')
36 +
37 + # https://mesonbuild.com/Dependencies.html#gtest-and-gmock
38 ++if get_option('tests')
39 + gtest = dependency('gtest', main : true, fallback : ['gtest', 'gtest_main_dep'])
40 +
41 + cff_charstring = executable('cff_charstring',
42 +@@ -342,3 +343,4 @@ test('test_fuzzed_fonts',
43 + 'top_builddir=@0@'.format(meson.current_build_dir()),
44 + ]
45 + )
46 ++endif
47 +--- a/meson_options.txt
48 ++++ b/meson_options.txt
49 +@@ -1,2 +1,3 @@
50 ++option('tests', type : 'boolean', value : false, description : 'Enable tests')
51 + option('graphite', type : 'boolean', value : true, description : 'Sanitize Graphite tables')
52 + option('fuzzer_ldflags', type: 'string', description : 'Extra LDFLAGS used during linking of fuzzing binaries')
53
54 diff --git a/dev-util/ots/metadata.xml b/dev-util/ots/metadata.xml
55 new file mode 100644
56 index 000000000..a60848aed
57 --- /dev/null
58 +++ b/dev-util/ots/metadata.xml
59 @@ -0,0 +1,8 @@
60 +<?xml version="1.0" encoding="UTF-8"?>
61 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
62 +<pkgmetadata>
63 + <!-- maintainer-needed -->
64 + <use>
65 + <flag name="sanitize">Sanitize Graphite tables</flag>
66 + </use>
67 +</pkgmetadata>
68
69 diff --git a/dev-util/ots/ots-8.1.4.ebuild b/dev-util/ots/ots-8.1.4.ebuild
70 new file mode 100644
71 index 000000000..a4f0e4477
72 --- /dev/null
73 +++ b/dev-util/ots/ots-8.1.4.ebuild
74 @@ -0,0 +1,43 @@
75 +# Copyright 1999-2021 Gentoo Authors
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=7
79 +
80 +inherit meson
81 +
82 +SRC_URI="https://github.com/khaledhosny/ots/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
83 +KEYWORDS="~amd64 ~x86"
84 +DESCRIPTION="An util for validating and sanitising OpenType files"
85 +HOMEPAGE="https://github.com/khaledhosny/ots"
86 +LICENSE="BSD"
87 +SLOT="0"
88 +IUSE="debug sanitize test"
89 +RESTRICT="!test? ( test )"
90 +
91 +RDEPEND="
92 + media-libs/freetype
93 + media-libs/woff2
94 + sys-libs/zlib
95 +
96 + sanitize? ( app-arch/lz4 )
97 +"
98 +DEPEND="
99 + ${RDEPEND}
100 + test? ( dev-cpp/gtest )
101 +"
102 +
103 +DOCS=(
104 + README.md
105 + docs/{DesignDoc,HowToFix,HowToTest}.md
106 +)
107 +
108 +PATCHES=( "${FILESDIR}/meson-gtest.diff" )
109 +
110 +src_configure() {
111 + local emesonargs=(
112 + $(meson_use debug)
113 + $(meson_use sanitize graphite)
114 + $(meson_use test tests)
115 + )
116 + meson_src_configure
117 +}