summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-09-19 19:27:39 -0500
committerroot <root@alpha.trunkmasters.com>2026-09-19 19:27:39 -0500
commit47516b9667518dacb1efd6d257f7b3e6a481ec93 (patch)
tree15968af203a3ff5970f912ab816b33e3a8648196 /eclass
parent1e827c97be50f4e8e4da3697da898689b2bde9d5 (diff)
downloadbaldeagleos-repo-47516b9667518dacb1efd6d257f7b3e6a481ec93.tar.gz
baldeagleos-repo-47516b9667518dacb1efd6d257f7b3e6a481ec93.tar.xz
baldeagleos-repo-47516b9667518dacb1efd6d257f7b3e6a481ec93.zip
Adding metadata
Diffstat (limited to 'eclass')
-rw-r--r--eclass/font-ebdftopcf.eclass5
-rw-r--r--eclass/font.eclass119
-rw-r--r--eclass/llvm.org.eclass3
3 files changed, 104 insertions, 23 deletions
diff --git a/eclass/font-ebdftopcf.eclass b/eclass/font-ebdftopcf.eclass
index afd77e083bee..97db3aa39d74 100644
--- a/eclass/font-ebdftopcf.eclass
+++ b/eclass/font-ebdftopcf.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: font-ebdftopcf.eclass
@@ -11,6 +11,9 @@
# @DESCRIPTION:
# The manpage for this eclass is in media-gfx/ebdftopcf.
# Inherit this eclass after font.eclass
+#
+# In EAPI 9 and newer, this eclass is deprecated in favor of font.eclass's
+# native BDF to OTB conversion via FONT_OPENTYPE_COMPAT=1.
case ${EAPI} in
7) ;;
diff --git a/eclass/font.eclass b/eclass/font.eclass
index f0261ad05dd6..e8d763e1e1c1 100644
--- a/eclass/font.eclass
+++ b/eclass/font.eclass
@@ -4,11 +4,11 @@
# @ECLASS: font.eclass
# @MAINTAINER:
# fonts@gentoo.org
-# @SUPPORTED_EAPIS: 7 8
+# @SUPPORTED_EAPIS: 7 8 9
# @BLURB: Eclass to make font installation uniform
case ${EAPI} in
- 7|8) ;;
+ 7|8|9) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -50,12 +50,27 @@ FONT_CONF=( "" )
# Determines whether detected BDF and PCF font files should be converted
# to an SFNT wrapper, for use with newer Pango.
-if [[ ${CATEGORY}/${PN} != media-fonts/encodings ]]; then
+# @ECLASS_VARIABLE: FONT_DEPEND
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# Contains dependencies on mkfontscale and encodings in *DEPEND format
+# needed for font_xfont_config.
+FONT_DEPEND="
+ >=x11-apps/mkfontscale-1.2.0
+ media-fonts/encodings
+"
+
+# @ECLASS_VARIABLE: FONT_AUTO_DEPEND
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Set to 'no' to disable automatically adding USE=X and FONT_DEPEND to BDEPEND.
+# This allows ebuilds to handle dependencies or X font generation conditionally
+# under their own USE flag or unconditionally.
+: "${FONT_AUTO_DEPEND:=yes}"
+
+if [[ ${CATEGORY}/${PN} != media-fonts/encodings && ${FONT_AUTO_DEPEND} != "no" ]]; then
IUSE="X"
- BDEPEND="X? (
- >=x11-apps/mkfontscale-1.2.0
- media-fonts/encodings
- )"
+ BDEPEND="X? ( ${FONT_DEPEND} )"
fi
if [[ -n ${FONT_OPENTYPE_COMPAT} ]] ; then
@@ -63,6 +78,19 @@ if [[ -n ${FONT_OPENTYPE_COMPAT} ]] ; then
BDEPEND+=" opentype-compat? ( x11-apps/fonttosfnt )"
fi
+# @FUNCTION: font_bdf_to_otb
+# @USAGE: <output.otb> [input1.bdf...]
+# @DESCRIPTION:
+# Converts and merges one or more BDF font files into a single OpenType
+# Bitmap (OTB) font using x11-apps/fonttosfnt. If no input files are
+# specified, uncompressed BDF is read from stdin.
+font_bdf_to_otb() {
+ [[ $# -ge 1 ]] || die "Usage: ${FUNCNAME} <output.otb> [input1.bdf...]"
+ local out=$1
+ shift
+ fonttosfnt -v -o "${out}" ${@:+-- "$@"} || die "Failed to convert BDF ${*:-stdin} to ${out}"
+}
+
# @FUNCTION: font_wrap_opentype_compat
# @DESCRIPTION:
# Converts .bdf and .pcf fonts detected within ${ED} to the OTB wrapper format
@@ -84,22 +112,26 @@ font_wrap_opentype_compat() {
}
# @FUNCTION: font_xfont_config
+# @USAGE: [directory]
# @DESCRIPTION:
# Generate Xorg font files (mkfontscale/mkfontdir).
font_xfont_config() {
local dir_name
- if in_iuse X && use X ; then
- dir_name="${1:-${FONT_PN}}"
- rm -f "${ED}${FONTDIR}/${1//${S}/}"/{fonts.{dir,scale},encodings.dir} \
- || die "failed to prepare ${FONTDIR}/${1//${S}/}"
- einfo "Creating fonts.scale & fonts.dir in ${dir_name##*/}"
- mkfontscale "${ED}${FONTDIR}/${1//${S}/}" || eerror "failed to create fonts.scale"
- mkfontdir \
- -e "${EPREFIX}"/usr/share/fonts/encodings \
- -e "${EPREFIX}"/usr/share/fonts/encodings/large \
- "${ED}${FONTDIR}/${1//${S}/}" || eerror "failed to create fonts.dir"
- [[ -e fonts.alias ]] && doins fonts.alias
+
+ if ! in_iuse X || ! use X ; then
+ return
fi
+
+ dir_name="${1:-${FONT_PN}}"
+ rm -f "${ED}${FONTDIR}/${1//${S}/}"/{fonts.{dir,scale},encodings.dir} \
+ || die "failed to prepare ${FONTDIR}/${1//${S}/}"
+ einfo "Creating fonts.scale & fonts.dir in ${dir_name##*/}"
+ mkfontscale "${ED}${FONTDIR}/${1//${S}/}" || eerror "failed to create fonts.scale"
+ mkfontdir \
+ -e "${EPREFIX}"/usr/share/fonts/encodings \
+ -e "${EPREFIX}"/usr/share/fonts/encodings/large \
+ "${ED}${FONTDIR}/${1//${S}/}" || eerror "failed to create fonts.dir"
+ [[ -e fonts.alias ]] && doins fonts.alias
}
# @FUNCTION: font_fontconfig
@@ -173,15 +205,54 @@ font_pkg_setup() {
fi
}
+# @FUNCTION: font_src_compile
+# @DESCRIPTION:
+# The font src_compile function. Converts BDF fonts to OTB when
+# FONT_OPENTYPE_COMPAT is enabled.
+font_src_compile() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ case ${EAPI} in
+ 7|8) die "${FUNCNAME} is not supported in EAPI ${EAPI}" ;;
+ esac
+
+ if [[ -z ${FONT_OPENTYPE_COMPAT} ]] || ! in_iuse opentype-compat || ! use opentype-compat ; then
+ return
+ fi
+
+ local dirs=()
+ if [[ $(declare -p FONT_S 2>/dev/null) == "declare -a"* ]]; then
+ dirs=( "${FONT_S[@]}" )
+ else
+ dirs=( "${FONT_S:-${S}}" )
+ fi
+ local file out
+ while IFS= read -rd '' file; do
+ out=${file%.gz}
+ out=${out%.*}.otb
+ if [[ ${file} == *.gz ]]; then
+ gzip -cd -- "${file}" | font_bdf_to_otb "${out}"
+ pipestatus || die "Failed to convert ${file} to OTB"
+ else
+ font_bdf_to_otb "${out}" "${file}"
+ fi
+ done < <(find "${dirs[@]}" \( -name '*.bdf' -o -name '*.bdf.gz' \) -type f -print0)
+ [[ " ${FONT_SUFFIX} " != *" otb "* ]] && FONT_SUFFIX+=" otb"
+}
+
# @FUNCTION: font_src_install
# @DESCRIPTION:
# The font src_install function.
font_src_install() {
local dir suffix commondoc
- if [[ -n ${FONT_OPENTYPE_COMPAT} ]] && in_iuse opentype-compat && use opentype-compat ; then
- font_wrap_opentype_compat
- fi
+ case ${EAPI} in
+ 7|8)
+ if [[ -n ${FONT_OPENTYPE_COMPAT} ]] && in_iuse opentype-compat && use opentype-compat ; then
+ font_wrap_opentype_compat
+ fi
+ ;;
+ esac
if [[ $(declare -p FONT_S 2>/dev/null) == "declare -a"* ]]; then
# recreate the directory structure if FONT_S is an array
@@ -239,7 +310,7 @@ _update_fontcache() {
# @DESCRIPTION:
# The font pkg_postinst function.
font_pkg_postinst() {
- if [[ -n ${FONT_CONF[@]} ]]; then
+ if [[ -z ${REPLACING_VERSIONS} && -n ${FONT_CONF[@]} ]]; then
local conffile
elog "The following fontconfig configuration files have been installed:"
elog
@@ -265,3 +336,7 @@ font_pkg_postrm() {
fi
EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
+case ${EAPI} in
+ 7|8) ;;
+ *) EXPORT_FUNCTIONS src_compile ;;
+esac
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 489c394dc30c..a76f460ce521 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
case ${PV} in
+ 24.0.0_pre20260919)
+ EGIT_COMMIT=3dcd66d0110335d7d1a5921fd085914b66ffbd3c
+ ;;
24.0.0_pre20260916)
EGIT_COMMIT=02bd47db9d3c4313fe1b5054ed8a1a081f1b7f78
;;