From 3fc0cf36f7782e086003cdc5b27f75b72646b5d5 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 15 Mar 2021 19:00:40 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/xorg-x11-fonts.git#ff20ebf08a03721f860c724c5d5df5003e01c842 --- xorg-x11-fonts.spec | 78 ++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/xorg-x11-fonts.spec b/xorg-x11-fonts.spec index 05abdbc..ba8493b 100644 --- a/xorg-x11-fonts.spec +++ b/xorg-x11-fonts.spec @@ -1,11 +1,38 @@ %global _catalogue /etc/X11/fontpath.d # NOTE: Fonts strictly intended for X core fonts, should be installed into _x11fontdir. %global _x11fontdir %{_datadir}/X11/fonts +%global _x11fontencodingsdir %{_x11fontdir}/encodings + +# A macro to de-duplicate a set of calls used in multiple fonts. +# Usage: font_update_dirs [-f] [-t] +# -f ... run fontscale +# -t ... run ttmkfdir +# -u ... uninstall mode, only perform actions if the target directory exists +# +%global font_update_dirs(ftu) ( \ +if [ -z "%*" ]; then \ + echo "Missing directory argument"; \ + exit 1; \ +fi \ +fontdir="%{_x11fontdir}/%%1" \ +if [ -z "%%{-u}" -o -d $fontdir ]; then \ + if [ ! -z "%%{-f}" ]; then \ + mkfontscale "$fontdir"; \ + fi \ + if [ ! -z "%%{-t}" ]; then \ + ttmkfdir -d "$fontdir" -o "$fontdir/fonts.scale"; \ + fi \ + mkfontdir "$fontdir"; \ + fc-cache "$fontdir"; \ + mkdir -p "%{_x11fontencodingsdir}/large"; \ + mkfontscale -n -e "%{_x11fontencodingsdir}" -e "%{_x11fontencodingsdir}/large" "%{_x11fontencodingsdir}"; \ +fi \ +) Summary: X.Org X11 fonts Name: xorg-x11-fonts Version: 7.5 -Release: 28%{?dist} +Release: 30%{?dist} License: MIT and Lucida and Public Domain URL: https://www.x.org @@ -56,7 +83,7 @@ Source31: https://www.x.org/pub/individual/font/font-xfree86-type1-1.0.4.tar.b # http://www.x.org/pub/individual/font/font-misc-meltho-1.0.0.tar.bz2 BuildRequires: make -BuildRequires: bdftopcf +BuildRequires: bdftopcf mkfontscale BuildRequires: font-util >= 1.1.0 BuildRequires: pkgconfig(xorg-macros) >= 1.3 BuildRequires: ucs2any @@ -243,7 +270,7 @@ Contains a set of Cyrillic fonts. %configure --with-fontrootdir=%{_x11fontdir} ;; esac - make %{?_smp_mflags} + %make_build popd done } @@ -292,52 +319,43 @@ done done } - -# xorg-x11-fonts-update-dirs is provided by xorg-x11-font-utils to deduplicate -# stuff run in %%post - %post misc { # Only run fc-cache in the Type1 dir, gzipped pcf's take forever - xorg-x11-fonts-update-dirs --skip-fontscale %{_x11fontdir}/misc || : + %font_update_dirs misc || : } %postun misc { # Rebuild fonts.dir when uninstalling package. (exclude the local, CID dirs) - if [ "$1" = "0" -a -d %{_x11fontdir}/misc ]; then - xorg-x11-fonts-update-dirs --skip-fontscale %{_x11fontdir}/misc || : + if [ "$1" = "0" ]; then + %font_update_dirs -u misc || : fi } %post Type1 { - xorg-x11-fonts-update-dirs %{_x11fontdir}/Type1 || : -} + %font_update_dirs -f Type1 || : +} %postun Type1 { - FONTDIR=%{_x11fontdir}/Type1 - if [ "$1" = "0" -a -d $FONTDIR ]; then - xorg-x11-fonts-update-dirs $FONTDIR || : + if [ "$1" = "0" ]; then + %font_update_dirs -u -f Type1 || : fi } %post ethiopic { - xorg-x11-fonts-update-dirs --skip-fontscale --need-ttmkfdir %{_x11fontdir}/TTF || : - xorg-x11-fonts-update-dirs %{_x11fontdir}/OTF || : + %font_update_dirs -t TTF || : + %font_update_dirs -f OTF || : } %postun ethiopic { - FONTDIR=%{_x11fontdir}/TTF - if [ "$1" = "0" -a -d $FONTDIR ]; then - xorg-x11-fonts-update-dirs --skip-fontscale --need-ttmkfdir $FONTDIR || : - fi - FONTDIR=%{_x11fontdir}/OTF - if [ "$1" = "0" -a -d $FONTDIR ]; then - xorg-x11-fonts-update-dirs $FONTDIR || : + if [ "$1" = "0" ]; then + %font_update_dirs -u -t TTF || : + %font_update_dirs -u -f OTF || : fi } @@ -931,6 +949,16 @@ mkfontdir %{_x11fontdir}/cyrillic || : %ghost %verify(not md5 size mtime) %{_x11fontdir}/cyrillic/fonts.cache-* %changelog +* Fri Mar 12 2021 Peter Hutterer 7.5-30 +- Replace the external xorg-x11-fonts-update-dirs script with an rpm macro + doing the same thing, removing our runtime reliance on + xorg-x11-font-utils (#1938074) + +* Fri Mar 12 2021 Peter Hutterer 7.5-29 +- BuildRequire mkfontscale now that it's separated out from + xorg-x11-font-utils (#1938069) +- Use the make_build rpm macro + * Mon Feb 22 2021 Adam Williamson - 7.5-28 - Make scriptlets non-failable (#1926533) @@ -1059,7 +1087,7 @@ mkfontdir %{_x11fontdir}/cyrillic || : * Tue Jun 08 2010 Peter Hutterer 7.2-11 - Require xorg-x11-font-utils >= 7.2-11 for font-utils 1.1.0 - Fix bashism in spec file (&>) -- Remove perl hack for DEFAULT_FONTS_DIR, fixed upstream +- Remove perl hack for DEFAULT_FONTS_DIR, fixed upstream - Remove perl and autoconf requirement. - Create %%ghost files {misc|705dpi|...}/fonts.scale. - Drop fontdir alias patches