diff --git a/media-fonts/redhat/Manifest b/media-fonts/redhat/Manifest new file mode 100644 index 0000000000..b31db53a54 --- /dev/null +++ b/media-fonts/redhat/Manifest @@ -0,0 +1 @@ +DIST redhat-5.0.0.tar.gz 5025058 BLAKE2B 772f997a118d3fad1cf62ae5a9f8ca04ea914e0b5963145c86320db7c2a7b2a034162a0a0ec0157d3defb618943f8d514ab9dadc7b283bd31fd45fef86c2618e SHA512 6b34e8ee283ad25f9979af5ace6d97e12e6402357c38c1129c9b1b7a4b67ab26deaa341fbe333764a15d9f6cc5a11874dfa931e6f279cf79cef6f756b326545d diff --git a/media-fonts/redhat/metadata.xml b/media-fonts/redhat/metadata.xml new file mode 100644 index 0000000000..2c0766c708 --- /dev/null +++ b/media-fonts/redhat/metadata.xml @@ -0,0 +1,19 @@ + + + + reedy.sailors.8t@icloud.com + Emi + + + Install the RedHatMono font + Install the RedHatDisplay font + Install the RedHatText font + Install otf font files + Install ttf font files + Install web font files + Install variable font files + + + RedHatOfficial/RedHatFont + + diff --git a/media-fonts/redhat/redhat-5.0.0.ebuild b/media-fonts/redhat/redhat-5.0.0.ebuild new file mode 100644 index 0000000000..667af1c667 --- /dev/null +++ b/media-fonts/redhat/redhat-5.0.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit font + +DESCRIPTION="Red Hat's Open Source Fonts - Red Hat Display and Red Hat Text" +HOMEPAGE="https://redhatofficial.github.io/RedHatFont/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/RedHatOfficial/RedHatFont.git" +else + SRC_URI="https://github.com/RedHatOfficial/RedHatFont/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/RedHatFont-${PV}" +fi + +LICENSE="OFL-1.1" +SLOT="0" + +IUSE="+ttf otf variable webfonts +redhatmono +redhatdisplay +redhattext" +IUSE_FONTS="redhatmono redhatdisplay redhattext" +IUSE_TYPE="ttf otf variable webfonts" +REQUIRED_USE="|| ( ${IUSE_TYPE} ) || ( ${IUSE_FONTS} )" +src_install() { + local font suffix + for font in RedHatMono RedHatDisplay RedHatText; do + use "${font,,}" || continue + for suffix in ${IUSE_TYPE}; do + use "${suffix}" || continue + if [[ ${suffix} == variable ]]; then + FONT_SUFFIX="ttf" + elif [[ ${suffix} == webfonts ]]; then + FONT_SUFFIX="woff2" + else + FONT_SUFFIX="${suffix}" + fi + if [[ ${font} == RedHatMono ]]; then + FONT_S="${S}/fonts/Mono/${font}/${suffix}" + else + FONT_S="${S}/fonts/Proportional/${font}/${suffix}" + fi + font_src_install + done + done + +} diff --git a/media-fonts/redhat/redhat-9999.ebuild b/media-fonts/redhat/redhat-9999.ebuild new file mode 100644 index 0000000000..667af1c667 --- /dev/null +++ b/media-fonts/redhat/redhat-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit font + +DESCRIPTION="Red Hat's Open Source Fonts - Red Hat Display and Red Hat Text" +HOMEPAGE="https://redhatofficial.github.io/RedHatFont/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/RedHatOfficial/RedHatFont.git" +else + SRC_URI="https://github.com/RedHatOfficial/RedHatFont/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/RedHatFont-${PV}" +fi + +LICENSE="OFL-1.1" +SLOT="0" + +IUSE="+ttf otf variable webfonts +redhatmono +redhatdisplay +redhattext" +IUSE_FONTS="redhatmono redhatdisplay redhattext" +IUSE_TYPE="ttf otf variable webfonts" +REQUIRED_USE="|| ( ${IUSE_TYPE} ) || ( ${IUSE_FONTS} )" +src_install() { + local font suffix + for font in RedHatMono RedHatDisplay RedHatText; do + use "${font,,}" || continue + for suffix in ${IUSE_TYPE}; do + use "${suffix}" || continue + if [[ ${suffix} == variable ]]; then + FONT_SUFFIX="ttf" + elif [[ ${suffix} == webfonts ]]; then + FONT_SUFFIX="woff2" + else + FONT_SUFFIX="${suffix}" + fi + if [[ ${font} == RedHatMono ]]; then + FONT_S="${S}/fonts/Mono/${font}/${suffix}" + else + FONT_S="${S}/fonts/Proportional/${font}/${suffix}" + fi + font_src_install + done + done + +}