commit:     f630ded70a887da43e5a79cec2a75313703246e5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  4 01:05:17 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  4 01:05:17 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f630ded7

media-libs/freetype: add 2.14.2

Bug: https://bugs.gentoo.org/970886
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/freetype/Manifest               |   6 +
 media-libs/freetype/freetype-2.14.2.ebuild | 275 +++++++++++++++++++++++++++++
 2 files changed, 281 insertions(+)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 8281b161589e..605ad260db33 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,6 +1,12 @@
 DIST freetype-2.14.1.tar.xz 2664948 BLAKE2B 
1dc62d337a93ca94f93496e60bdf9cbabed5867d66bb2f07669f1b5f81ef16f6cc57c401f51bb62d919680316f73902fafb6a167c45183872faaf984840b5ec7
 SHA512 
28284da99be52e90c7883fd668131cd44227ce68b98a57767fc33b2fe73e4baa5425cba4144bf3094192946d2abec03cec7afefe6300c0cda6787fae91966bad
 DIST freetype-2.14.1.tar.xz.sig 833 BLAKE2B 
9a75da5d2f98d7a72c633c1264ec3bc30a549496033baa2b702f3ab192332d17bf37f554bb2554b399f3a63e4fea203e1f6c200869a882ab45b45c8d3cc3a447
 SHA512 
56dffecdd8388af8b5db893d8b727f8784e0aab79e2b05ee28732026fec4396c5539e6759d70a49aa993caa02335d4889655cfb325262bd1674212fff7e080b5
+DIST freetype-2.14.2.tar.xz 2667092 BLAKE2B 
2fbd3c70efccff3c3ea6ba204699e338627df52a9c043221678a3cb29d43c37fd734e619fc1c0f645636e2d7da65c1b459fe38566782eb876aa4b4c89dbf1ea0
 SHA512 
cf4716510e8edc1344b105359b80ee212d687147ebea1cf410cd8e57eb66380029042f9ad2bf0df184cbb669a63dc36089c0f068fbe1af086038a5bb7fd3ea40
+DIST freetype-2.14.2.tar.xz.sig 833 BLAKE2B 
5da394ea106c26108f72ca4067bd66c4c28783513a06d9a164ab17b851508207cf520f73b5bb4d2e0d1bf7c644064e9b913cdfdced1f4118bd35c08c8d1d93f5
 SHA512 
f4ccc5ecc22eca12f68f870f8134496814a299779a0a359a32a09fae5a0ba789109007a8ad16ad8b352946427bb0fc76e30ae8f70c47675d16c53a19c6baf94f
 DIST freetype-doc-2.14.1.tar.xz 2175972 BLAKE2B 
1065f27c6243c0ff546c091ba4267342304c78615feb700d105136930e3d9cebbae2e784df12a13ca13f9db1b82a079405b665141102f2b96d4c673b76fe45f3
 SHA512 
a2e0901863d59c59ff4d1ded1c2000ddaa5cf21c3ea5fdf74e8bfecee56f8cf954628d0abd7440e9c1a3ebe23801138737e297809f403574304c41231f0fb962
 DIST freetype-doc-2.14.1.tar.xz.sig 833 BLAKE2B 
b3071961f16cda1525dece3d88636be3af329d36151d48443d553492582a05d0fdd8a09f67bda863a40c44b65208f76f7663b1820af5760dfcf902e7a3bff37c
 SHA512 
15ad91d610b19823a1a379f86632a0d42764a49082aaef0eee15fa9e2df70e26b8c48e2f812eadda54ef2b5b3a4f795a979c1534ced7d6b29974335d14daab98
+DIST freetype-doc-2.14.2.tar.xz 2176140 BLAKE2B 
ba7a7f3eccef198b72765d5196cebe5724f0123a781f085dc2244af853ec55038becb79a3d3faa03a5b77dbf618931024f4bcfe25109bc77a72c9c0b19b792aa
 SHA512 
f2794dee78a00f91ea4241722deff64e03e7c42cbd26073ed0d7a6e0ecca14c5f87cb1dbd520ccc94311a6b0f510b4462eee3f8765e8d77841176e78d8c45837
+DIST freetype-doc-2.14.2.tar.xz.sig 833 BLAKE2B 
3edcacd0a59418dcdf499719dc32fcb038f3e4b305f26311eb40d188022e57d16d19a3809b7658fdb223627ec7bfa0b4fa74e8c5603d5906d44ab35b35cb5334
 SHA512 
cc42a1483753313cc5d08ce697a13499906a53ddb94fa3a6e433d273559335a1d0920b1d3425e3fff46458cf1669a666aa9daac67a436136d2e000a095c94ba8
 DIST ft2demos-2.14.1.tar.xz 344228 BLAKE2B 
d91ccdf470a6a14e4d0f6f7a8aa9d22cdaaf88bd44dfc09b65efc90becd87b59c4c9bbc62c63154f207900d0d957bc9dd4674b2228fb9ca0b55b273004ac3f74
 SHA512 
a6240e888807c6171f8ee5d14578f83902cb495e6e911e5fd7c17628025310a60b0dfe5cd6c6e8803d3460eacd534d7f21c6c598081934d609575e182a312877
 DIST ft2demos-2.14.1.tar.xz.sig 833 BLAKE2B 
4bf9a85ea16ddd9c619d2537abc8b38dd0939422c3f66c932695ce739c0bf158ba6851dd708c4986ee3fda42ad05a73c033c0158c577f59eebdb091fd36279c7
 SHA512 
86ba1530f510fcf9c088f598d5c038b537844dfa5faa5a8b69ece497b1ced61bd56af566b2563f63c74af56229db9e1357b924697b8a6cf77a5f88e5f98912f4
+DIST ft2demos-2.14.2.tar.xz 347364 BLAKE2B 
e0c26e9298f91873344c3d96d1e304cfdfe8edab71c320f9b549b32b0d90395362845079a97186dad0e818259f93102c5c0a69ae78a014b9f1804f14f579cf1a
 SHA512 
efef4187b3d9cc747daad26cef6700051388435480c60e96e371eb04be3baae1e09ac932183c3a72b7bb4db1889d2bda89a70bfb058193c73bc5a602e53a3553
+DIST ft2demos-2.14.2.tar.xz.sig 833 BLAKE2B 
2e3e0fa9f8a8aec14da625dcc53a2909db30387a16f99e13224a6ceb683732742433be2a70d7837ffeee5b1c1ada38813a2a2fceef8c9c4254695f61bbecfd5c
 SHA512 
d0162db5915321536c8de69a92b6b69ee6611a7ee5c34bce94cf62773159c2ccd97bc79acb2df7a79fd01986d1827e9f2a06986abbd68d04bd62662063f58ae4

diff --git a/media-libs/freetype/freetype-2.14.2.ebuild 
b/media-libs/freetype/freetype-2.14.2.ebuild
new file mode 100644
index 000000000000..74c6907116eb
--- /dev/null
+++ b/media-libs/freetype/freetype-2.14.2.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools libtool multilib-minimal toolchain-funcs
+
+DESCRIPTION="High-quality and portable font engine"
+HOMEPAGE="https://www.freetype.org/";
+
+if [[ ${PV} == 9999 ]] ; then
+       inherit git-r3
+else
+       VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wernerlemberg.asc
+       inherit verify-sig
+       SRC_URI="
+               https://downloads.sourceforge.net/freetype/${P/_/}.tar.xz
+               mirror://nongnu/freetype/${P/_/}.tar.xz
+               utils? (
+                       
https://downloads.sourceforge.net/freetype/ft2demos-${PV}.tar.xz
+                       mirror://nongnu/freetype/ft2demos-${PV}.tar.xz
+                       verify-sig? (
+                               
https://downloads.sourceforge.net/freetype/ft2demos-${PV}.tar.xz.sig
+                               
mirror://nongnu/freetype/ft2demos-${PV}.tar.xz.sig
+                       )
+               )
+               doc? (
+                       
https://downloads.sourceforge.net/freetype/${PN}-doc-${PV}.tar.xz
+                       mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz
+                       verify-sig? (
+                               
https://downloads.sourceforge.net/freetype/${PN}-doc-${PV}.tar.xz.sig
+                               
mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz.sig
+                       )
+               )
+               verify-sig? (
+                       
https://downloads.sourceforge.net/freetype/${P/_/}.tar.xz.sig
+                       mirror://nongnu/freetype/${P/_/}.tar.xz.sig
+               )
+       "
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
+
+       BDEPEND="verify-sig? ( sec-keys/openpgp-keys-wernerlemberg )"
+fi
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug doc fontforge 
harfbuzz +png static-libs svg utils"
+
+RDEPEND="
+       >=virtual/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+       brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
+       bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+       png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
+       utils? (
+               svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] )
+               X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND+="
+       virtual/pkgconfig
+"
+PDEPEND="harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] 
)"
+
+_egit_repo_handler() {
+       if [[ ${PV} == 9999 ]] ; then
+               local phase="${1}"
+               case ${phase} in
+                       fetch|unpack)
+                               :;
+                       ;;
+                       *)
+                               die "Please use this function with either 
\"fetch\" or \"unpack\""
+                       ;;
+               esac
+
+               local EGIT_REPO_URI
+               
EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype.git";
+               git-r3_src_${phase}
+               if use utils ; then
+                       
EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype-demos.git";
+                       local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
+                       git-r3_src_${phase}
+               fi
+       else
+               default
+
+               if use verify-sig; then
+                       verify-sig_verify_detached 
"${DISTDIR}"/${P}.tar.xz{,.sig}
+
+                       use doc && verify-sig_verify_detached 
"${DISTDIR}"/${PN}-doc-${PV}.tar.xz{,.sig}
+                       use utils && verify-sig_verify_detached 
"${DISTDIR}"/ft2demos-${PV}.tar.xz{,.sig}
+               fi
+       fi
+}
+
+pkg_pretend() {
+       if use svg && ! use utils ; then
+               einfo "The \"svg\" USE flag only has effect when the \"utils\" 
USE flag is also enabled."
+       fi
+}
+
+src_unpack() {
+       _egit_repo_handler ${EBUILD_PHASE}
+
+       if [[ ${PV} == 9999 ]] ; then
+               # Need to copy stuff from dlg subproject (bug #758902)
+               local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
+               local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
+               local dlg_dest_dir="${S}/include"
+               mkdir -p "${dlg_dest_dir}/dlg" || die
+               cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
+               cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
+       fi
+}
+
+src_prepare() {
+       if [[ ${PV} == 9999 ]] ; then
+               # Do NOT automagically mess with submodules!
+               sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
+
+               # Inspired by shipped autogen.sh script
+               eval $(sed -n \
+                       -e 's/^#define  *\(FREETYPE_MAJOR\)  
*\([0-9][0-9]*\).*/\1=\2/p' \
+                       -e 's/^#define  *\(FREETYPE_MINOR\)  
*\([0-9][0-9]*\).*/\1=\2/p' \
+                       -e 's/^#define  *\(FREETYPE_PATCH\)  
*\([0-9][0-9]*\).*/\1=\2/p' \
+                       include/freetype/freetype.h || die)
+               FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
+               [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
+
+               pushd builds/unix &>/dev/null || die
+               sed -e "s;@VERSION@;${FREETYPE};" \
+                       < configure.raw > configure.ac || die
+               unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
+               popd &>/dev/null || die
+       fi
+
+       default
+
+       pushd builds/unix &>/dev/null || die
+       # eautoheader produces broken ftconfig.in
+       AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
+       popd &>/dev/null || die
+
+       # This is the same as the 01 patch from infinality
+       sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
+
+       enable_option() {
+               sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+                       include/${PN}/config/ftoption.h \
+                       || die "unable to enable option $1"
+       }
+
+       disable_option() {
+               sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+                       include/${PN}/config/ftoption.h \
+                       || die "unable to disable option $1"
+       }
+
+       if ! use cleartype-hinting ; then
+               disable_option TT_CONFIG_OPTION_SUBPIXEL_HINTING
+       fi
+
+       # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
+       # via environment (new since v2.8)
+       enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+       # See https://freetype.org/patents.html (expired!)
+       enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+       if ! use adobe-cff ; then
+               enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+       fi
+
+       if use debug ; then
+               enable_option FT_DEBUG_LEVEL_TRACE
+               enable_option FT_DEBUG_MEMORY
+       fi
+
+       if use utils ; then
+               cd "${WORKDIR}/ft2demos-${PV}" || die
+               # Disable tests needing X11 when USE="-X". (bug #177597)
+               if ! use X ; then
+                       sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+               fi
+               cd "${S}" || die
+       fi
+
+       # bug #869803
+       rm docs/reference/sitemap.xml.gz || die
+
+       # We need non-/bin/sh to run configure
+       if [[ -n ${CONFIG_SHELL} ]] ; then
+               sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
+                       "${S}"/builds/unix/configure || die
+       fi
+
+       elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+       export GNUMAKE=gmake
+
+       local myeconfargs=(
+               --disable-freetype-config
+               --enable-shared
+               --with-zlib
+               $(use_with brotli)
+               $(use_with bzip2)
+               # As of 2.14.0, FT bundles its own copies of the needed headers 
and dlopen()s
+               # harfbuzz instead, which breaks an insidious circular 
dependency.
+               $(use_with harfbuzz harfbuzz dynamic)
+               $(use_with png)
+               $(use_enable static-libs static)
+               $(usex utils $(use_with svg librsvg) --without-librsvg)
+
+               # Avoid using libpng-config
+               LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+               LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+       )
+
+       case ${CHOST} in
+               mingw*|*-mingw*) ;;
+               # Workaround windows misdetection: bug #654712
+               # Have to do it for both ${CHOST}-windres and windres
+               *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
+       esac
+
+       export CC_BUILD="$(tc-getBUILD_CC)"
+
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+       default
+
+       if multilib_is_native_abi && use utils ; then
+               einfo "Building utils"
+               # Fix for Prefix, bug #339334
+               emake \
+                       X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+                       FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+       fi
+}
+
+multilib_src_install() {
+       default
+
+       if multilib_is_native_abi && use utils ; then
+               einfo "Installing utils"
+               emake DESTDIR="${D}" FT2DEMOS=1 \
+                       TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
+       fi
+}
+
+multilib_src_install_all() {
+       if use fontforge ; then
+               # fontforge can probably cope with fewer of these, but this is 
simpler
+               einfo "Installing internal headers required for fontforge"
+               local header
+               find src/truetype include/freetype/internal -name '*.h' | \
+               while read header ; do
+                       mkdir -p 
"${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+                       cp ${header} 
"${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+               done
+       fi
+
+       dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+       if [[ ${PV} != 9999 ]] && use doc ; then
+               docinto html
+               dodoc -r docs/*
+       fi
+
+       find "${ED}" -type f -name '*.la' -delete || die
+}

Reply via email to