Add ebuild that allows not-installing the variable font.

This commit is contained in:
Manuel Friedli 2022-06-10 23:34:57 +02:00
parent 4ec3f7c18b
commit 80bd165635
Signed by: manuel
GPG key ID: 41D08ABA75634DA1
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,4 @@
DIST cantarell-fonts-0.303.1.tar.xz 338316 BLAKE2B 1208f57b70a82d93e2714483d36b2a0027f4e3a04eb494b9e74207d20e074377061d6af9bce4f9f48a56d87ff67fe9def1b24ec33a5f3b7decd883d3ab328505 SHA512 f61c2df6bb04167a9623bac141773211486059a5569106c0ed096d6d1a5d57e599cc5b75b06be954859aef13c649f7617ae067d9936932faec0b2ce896fd31b5
DIST cantarell-static-fonts-0.303.1.tar 522240 BLAKE2B 98a73bbf70e17c332f6b228347a7fb99c48e0081033eed6812041802587cc5e90fd950732d34fb347973ff282f452f1f3afc0b50eeca242d40e02787a942dd22 SHA512 5369e310bd8ba3b544d1e8488d95b7d3600cb8c28757c5a8b31cf3db94b87ecbe01f0b9dca0d4dc7dc95e2f193fcc984e0536fd1a914bb66f1c47aae8e163398
EBUILD cantarell-0.303.1-r1.ebuild 1417 BLAKE2B f7cc06329b24c939ce2095a8f6a2818bc4877928240951f7da30ac4110c32002f5d96107861f047962e48b57ea02ae948aa82263b63b2be330504506c2602481 SHA512 66426ac167eba625c58b1604d7acf17fc63670b9f21fa0ae05f0687be20984230dc37fbb1ed275464f2e854666ac4042df6927d699f122cadd06486dd643a20c
MISC metadata.xml 447 BLAKE2B bd2de9c28aac2dd34be2783cebdd80ac144118af4b25d1cddfcdb578c8d26355b098cb8c6bb5d2eefdd99fcad6145bd839e8d16b39dc7a5edab00de6abb96dec SHA512 15371e91265f3c4ab01df2dad6a428f97f4eadea4cbfc9bd51dad8fb4d599df4d8885109e88f9d59dcdd7c07ba58c38eeff728f35f0cd6de22fc141482c50b34

View file

@ -0,0 +1,54 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
GNOME_ORG_MODULE="${PN}-fonts"
inherit font gnome.org meson
DESCRIPTION="Default fontset for GNOME Shell"
HOMEPAGE="https://wiki.gnome.org/Projects/CantarellFonts"
SRC_URI+=" https://manuel.friedli.info/gentoo-overlay/cantarell-static-fonts-0.303.1.tar"
LICENSE="OFL-1.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="staticfont +variablefont"
REQUIRED_USE="|| ( staticfont variablefont )"
BDEPEND="
>=sys-devel/gettext-0.20
virtual/pkgconfig
"
# This ebuild does not install any binaries
RESTRICT="binchecks strip"
# Font eclass settings
FONT_S="${S}/prebuilt"
FONT_SUFFIX="otf"
src_prepare() {
# Leave prebuilt font installation to font.eclass
sed -e "/subdir('prebuilt')/d" -i meson.build || die
use staticfont && mv "${WORKDIR}"/prebuilt/* "${S}"/prebuilt
use !variablefont && rm "${FONT_S}"/Cantarell-VF.otf
default
}
src_configure() {
local emesonargs=(
-Dfontsdir=${FONTDIR}
-Duseprebuilt=true
-Dbuildappstream=true
$(meson_use staticfont buildstatics)
$(meson_use variablefont buildvf)
)
meson_src_configure
}
src_install() {
font_src_install
local DOCS=( NEWS README.md )
meson_src_install
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>manuel@fritteli.ch</email>
<name>Manuel Friedli</name>
</maintainer>
<use>
<flag name="staticfont">Install the static fonts.</flag>
<flag name="variablefont">Install the variable font (may cause problems with Libreoffice and printing/PDF export).</flag>
</use>
</pkgmetadata>