mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 15:45:15 -04:00
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Ryan Fox <flewkey@2a03.party>
83 lines
1.8 KiB
Bash
83 lines
1.8 KiB
Bash
# Copyright 2020-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit meson
|
|
|
|
if [[ ${PV} != *9999* ]]; then
|
|
SRC_URI="https://codeberg.org/dnkl/fcft/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
KEYWORDS="~amd64"
|
|
S="${WORKDIR}/${PN}"
|
|
else
|
|
inherit git-r3
|
|
EGIT_REPO_URI="https://codeberg.org/dnkl/fcft.git"
|
|
fi
|
|
|
|
DESCRIPTION="A simple library for font loading and glyph rasterization"
|
|
HOMEPAGE="https://codeberg.org/dnkl/fcft"
|
|
LICENSE="MIT"
|
|
SLOT="0/3"
|
|
IUSE="examples +text-shaping test"
|
|
RESTRICT="!test? ( test )"
|
|
|
|
RDEPEND="
|
|
dev-libs/tllist
|
|
media-libs/fontconfig
|
|
media-libs/freetype
|
|
x11-libs/pixman
|
|
text-shaping? (
|
|
dev-libs/libutf8proc:=
|
|
media-libs/harfbuzz
|
|
)
|
|
examples? (
|
|
dev-libs/libutf8proc:=
|
|
dev-libs/wayland
|
|
)
|
|
"
|
|
DEPEND="
|
|
${RDEPEND}
|
|
test? (
|
|
text-shaping? ( media-fonts/noto-emoji )
|
|
)
|
|
"
|
|
BDEPEND="
|
|
app-text/scdoc
|
|
app-i18n/unicode-data
|
|
examples? (
|
|
dev-libs/wayland-protocols
|
|
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 text-shaping run-shaping)
|
|
$(meson_use examples)
|
|
"-Dwerror=false"
|
|
)
|
|
|
|
use test && emesonargs+=(
|
|
$(meson_use text-shaping test-text-shaping)
|
|
)
|
|
|
|
meson_src_configure
|
|
}
|
|
|
|
src_install() {
|
|
meson_src_install
|
|
use examples && newbin "${BUILD_DIR}/example/example" fcft-example
|
|
mv "${D}/usr/share/doc/${PN}" "${D}/usr/share/doc/${PF}" || die "Failed to install docs"
|
|
}
|