-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
- Loading branch information
1 parent
9aa2b76
commit 337eb5a
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST fcft-3.1.2.tar.gz 741659 BLAKE2B d4c3b9ef444771f255b7b19e9645d53558caed2022a59759418fe0b9961f74833da2b760c0c961ce5fbbf91f3e0291dd87590fe00ab300ee194a497accba392e SHA512 b3874819ef90a4f1d1975cae72b925c928bc9758629e63b2083dab807166133bc68308ba4f9481c34c9e0b5262a1d2558e47cccf6ce9d34516583e48d03a5bf9 | ||
DIST fcft-3.1.3.tar.gz 741726 BLAKE2B 00792d3bb3848e271b28be7d9afe81e917f547558663b7cc3ce08a3b36cc2d56f3e69b1e06bf16cf73f1a08c8b20696906d6eaa07b59e113846820dd57e22419 SHA512 7275f4807b72b5125242dfba9499647d6c1e80ac9a7df8adde4e8ad082744472d3efa6b8c608c07a2107a7df3005ccad69d574cfb06f35991ccf676df6f1b407 | ||
DIST fcft-3.1.4.tar.gz 741783 BLAKE2B a2f5ecca5d7a6549c92897fca138f40021a5fc6bae46713a86c1d98080a52c6d1e13276b24a198ec88724e5ca9e4225cf79759fe57d80df965195530d89ba207 SHA512 1a61a089a401c7155ad4f454f271b134bbcb37873d744851d63823183912958894a4431157b7978c19bf8c33acfd619ba96ca29f2f9a20f47a19b7fb60e6b933 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Copyright 2020-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{8..11} ) | ||
inherit meson python-any-r1 | ||
|
||
DESCRIPTION="Simple library for font loading and glyph rasterization" | ||
HOMEPAGE="https://codeberg.org/dnkl/fcft" | ||
SRC_URI="https://codeberg.org/dnkl/fcft/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
S="${WORKDIR}/${PN}" | ||
|
||
# MIT for fcft | ||
# ZLIB for nanosvg | ||
LICENSE="MIT ZLIB" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm64" | ||
IUSE="examples +harfbuzz +libutf8proc test" | ||
REQUIRED_USE=" | ||
libutf8proc? ( harfbuzz ) | ||
examples? ( libutf8proc ) | ||
" | ||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND=" | ||
media-libs/fontconfig | ||
media-libs/freetype | ||
x11-libs/pixman | ||
examples? ( | ||
dev-libs/libutf8proc:= | ||
dev-libs/wayland | ||
) | ||
harfbuzz? ( | ||
media-libs/harfbuzz:=[truetype] | ||
) | ||
libutf8proc? ( | ||
dev-libs/libutf8proc:= | ||
) | ||
" | ||
DEPEND=" | ||
${RDEPEND} | ||
app-i18n/unicode-data | ||
dev-libs/tllist | ||
examples? ( | ||
dev-libs/wayland-protocols | ||
) | ||
test? ( | ||
dev-libs/check | ||
harfbuzz? ( media-fonts/noto-emoji ) | ||
) | ||
" | ||
BDEPEND=" | ||
${PYTHON_DEPS} | ||
app-text/scdoc | ||
virtual/pkgconfig | ||
examples? ( | ||
dev-util/wayland-scanner | ||
) | ||
" | ||
|
||
src_prepare() { | ||
default | ||
|
||
rm -r unicode || die "Failed removing vendored unicode-data" | ||
|
||
sed -i "s;unicode/UnicodeData.txt;${EPREFIX}/usr/share/unicode-data/UnicodeData.txt;" \ | ||
meson.build || die "Failed changing UnicodeData.txt to system's copy" | ||
sed -i "s;unicode/emoji-data.txt;${EPREFIX}/usr/share/unicode-data/emoji/emoji-data.txt;" \ | ||
meson.build || die "Failed changing emoji-data.txt to system's copy" | ||
} | ||
|
||
src_configure() { | ||
local emesonargs=( | ||
$(meson_feature harfbuzz grapheme-shaping) | ||
$(meson_feature libutf8proc run-shaping) | ||
$(meson_use examples) | ||
$(use test && meson_use harfbuzz test-text-shaping) | ||
# bundled, tiny, I believe this means we should always include it | ||
-Dsvg-backend=nanosvg | ||
-Ddocs=enabled | ||
) | ||
|
||
meson_src_configure | ||
} | ||
|
||
src_install() { | ||
local DOCS=( CHANGELOG.md README.md ) | ||
meson_src_install | ||
|
||
rm -r "${ED}"/usr/share/doc/${PN} || die | ||
|
||
use examples && newbin "${BUILD_DIR}/example/example" fcft-example | ||
} |