commit 9eeface9bdc87db42d0dc0aa04ebf1f2d9377d04 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:20:24 2019 -0400 Package init diff --git a/bdftopcf-1.1.tar.bz2 b/bdftopcf-1.1.tar.bz2 new file mode 100644 index 0000000..3b6bd3b Binary files /dev/null and b/bdftopcf-1.1.tar.bz2 differ diff --git a/font-util-1.3.1.tar.bz2 b/font-util-1.3.1.tar.bz2 new file mode 100644 index 0000000..f8d893a Binary files /dev/null and b/font-util-1.3.1.tar.bz2 differ diff --git a/fonttosfnt-1.0.5.tar.bz2 b/fonttosfnt-1.0.5.tar.bz2 new file mode 100644 index 0000000..1878183 Binary files /dev/null and b/fonttosfnt-1.0.5.tar.bz2 differ diff --git a/mkfontdir-1.0.7.tar.bz2 b/mkfontdir-1.0.7.tar.bz2 new file mode 100644 index 0000000..bd4f237 Binary files /dev/null and b/mkfontdir-1.0.7.tar.bz2 differ diff --git a/mkfontscale-1.1.3.tar.bz2 b/mkfontscale-1.1.3.tar.bz2 new file mode 100644 index 0000000..86e5dc6 Binary files /dev/null and b/mkfontscale-1.1.3.tar.bz2 differ diff --git a/mkfontscale-examine-all-encodings.patch b/mkfontscale-examine-all-encodings.patch new file mode 100644 index 0000000..1913915 --- /dev/null +++ b/mkfontscale-examine-all-encodings.patch @@ -0,0 +1,13 @@ +diff --git a/mkfontscale.c b/mkfontscale.c +index a67f283..96e19a3 100644 +--- a/mkfontscale.c ++++ b/mkfontscale.c +@@ -317,7 +317,7 @@ getName(FT_Face face, int nid) + int i; + + if(getNameHelper(face, nid, +- TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, &name) || ++ TT_PLATFORM_MICROSOFT, -1, &name) || + getNameHelper(face, nid, + TT_PLATFORM_APPLE_UNICODE, -1, &name)) { + string = malloc(name.string_len / 2 + 1); diff --git a/xorg-x11-font-utils.spec b/xorg-x11-font-utils.spec new file mode 100644 index 0000000..739f0dd --- /dev/null +++ b/xorg-x11-font-utils.spec @@ -0,0 +1,102 @@ +%global _x11fontdir %{_datadir}/X11/fonts + +Summary: X.Org X11 font utilities +Name: xorg-x11-font-utils +Epoch: 1 +Version: 7.5 +Release: 41 +License: MIT +URL: http://www.x.org + +Source0: http://www.x.org/pub/individual/app/bdftopcf-1.1.tar.bz2 +Source1: http://www.x.org/pub/individual/app/fonttosfnt-1.0.5.tar.bz2 +Source2: http://www.x.org/pub/individual/app/mkfontdir-1.0.7.tar.bz2 +Source3: http://www.x.org/pub/individual/app/mkfontscale-1.1.3.tar.bz2 +Source4: http://www.x.org/pub/individual/font/font-util-1.3.1.tar.bz2 +Source5: xorg-x11-fonts-update-dirs +Source6: xorg-x11-fonts-update-dirs.1 + +Patch0: mkfontscale-examine-all-encodings.patch + +BuildRequires: libtool pkgconfig(fontenc) pkgconfig(freetype2) pkgconfig(x11) pkgconfig(xorg-macros) >= 1.8 zlib-devel + +Provides: bdftopcf = 1.1 +Provides: fonttosfnt = 1.0.5 +Provides: mkfontdir = 1.0.7 +Provides: mkfontscale = 1.1.3 +Provides: font-util = 1.3.1 +Provides: font-utils = %{epoch}:%{version}-%{release} +Provides: ucs2any = 1.3.1 + +%description +X.Org X11 font utilities required for font installation, conversion, and generation. + +%prep +%setup -q -c xorg-x11-font-utils-%{version} -a1 -a2 -a3 -a4 +pushd mkfontscale-* +%patch0 -p1 -b .all-encodings +popd + +%build +{ +for app in * ; do + pushd $app + autoreconf -vif + case $app in + font-util-*) + %configure --with-fontrootdir=%{_x11fontdir} + ;; + *) + %configure + ;; + esac + %{make_build} + popd +done +} + +%install +{ + for app in * ; do + pushd $app + %make_install + popd + done + for i in */README ; do + [ -s $i ] && cp $i README-$(echo $i | sed 's/-[0-9].*//') + done + for i in */COPYING ; do + grep -q stub $i || cp $i COPYING-$(echo $i | sed 's/-[0-9].*//') + done +} + +install -m 744 %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/xorg-x11-fonts-update-dirs +sed -i "s:@DATADIR@:%{_datadir}:" $RPM_BUILD_ROOT%{_bindir}/xorg-x11-fonts-update-dirs + +install -m 744 -p -D %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1/xorg-x11-fonts-update-dirs.1 + +find $RPM_BUILD_ROOT -name bdftruncate\* -print0 | xargs -0 rm -f + +%files +%doc README-* COPYING-bdftopcf COPYING-[c-z]* +%{_bindir}/bdftopcf +%{_bindir}/fonttosfnt +%{_bindir}/mkfontdir +%{_bindir}/mkfontscale +%{_bindir}/ucs2any +%{_bindir}/xorg-x11-fonts-update-dirs +%{_datadir}/aclocal/fontutil.m4 +%{_libdir}/pkgconfig/fontutil.pc +%{_mandir}/man1/bdftopcf.1* +%{_mandir}/man1/fonttosfnt.1* +%{_mandir}/man1/mkfontdir.1* +%{_mandir}/man1/mkfontscale.1* +%{_mandir}/man1/ucs2any.1* +%{_mandir}/man1/xorg-x11-fonts-update-dirs.1* +%dir %{_x11fontdir} +%dir %{_x11fontdir}/util +%{_x11fontdir}/util/map-* + +%changelog +* Thu Sep 12 2019 openEuler Buildteam - 7.5-41 +- Package init diff --git a/xorg-x11-fonts-update-dirs b/xorg-x11-fonts-update-dirs new file mode 100755 index 0000000..6d5fb2e --- /dev/null +++ b/xorg-x11-fonts-update-dirs @@ -0,0 +1,61 @@ +#!/bin/sh +# This script is used by the xorg-x11-fonts package in the %post stage for +# some fonts to generate the right encodings. + +fontdir="" +encodingsdir="@DATADIR@/X11/fonts/encodings" + +# some fonts need to skip mkfontscale, set to "yes" to skip +skip_fontscale="" +# some fonts need to run ttmkfdir, set to "yes" to run +need_ttmkfdir="" + +if [ $# -lt 1 ]; then + echo "Need at least one parameter for font dir." + exit 1 +fi + +while [ $# != 0 ]; do + case $1 in + --skip-fontscale) + skip_fontscale="yes" + ;; + --need-ttmkfdir) + need_ttmkfdir="yes" + ;; + --encodingsdir) + shift + encodingsdir="$1" + ;; + *) + fontdir="$1" + + if [ $# != 1 ]; then + echo "Too many parameters." + exit 1 + fi + ;; + esac + shift +done + +if [ "$skip_fontscale" != "yes" ]; then + mkfontscale $fontdir +fi +if [ "$need_ttmkfdir" = "yes" ]; then + ttmkfdir -d $fontdir -o "$fontdir/fonts.scale" +fi + +mkfontdir $fontdir +fc-cache $fontdir + +if ! [ -z "$encodingsdir" ]; then + [ -d "$encodingsdir" ] || mkdir -p "$encodingsdir" + [ -d "$encodingsdir/large" ] || mkdir -p "$encodingsdir/large" + oldpwd=$(pwd) + cd "$encodingsdir" + mkfontscale -n -e "$encodingsdir" -e "$encodingsdir/large" + cd ${oldpwd} +fi + + diff --git a/xorg-x11-fonts-update-dirs.1 b/xorg-x11-fonts-update-dirs.1 new file mode 100644 index 0000000..847f824 --- /dev/null +++ b/xorg-x11-fonts-update-dirs.1 @@ -0,0 +1,23 @@ +.TH XORG-X11-FONTS-UPDATE-DIRS 1 "25 July 2014" +.SH NAME +xorg-x11-fonts-update-dirs \- update X11 font directories +.SH SYNOPSIS +.B xorg-x11-fonts-update-dirs [--skip-fontscale] [--need-ttmkfdir] path +.SH DESCRIPTION +.PP +The +.B xorg-x11-fonts-* +rpm packages call +.I xorg-x11-fonts-update-dirs +during %post and %postun to update the X11 font indices. +This script may change in incompatible ways without notice and +you should not run this script manually or rely on it otherwise. +To manually update the font indices invoke +.B mkfontscale +and +.B ttmkfdir +directly as required. +.PP +.SH "SEE ALSO" +mkfontscale(1) +ttmkfdir(1)