- Rely on a script provided in xorg-x11-font-utils for mkfontscale and
friends (#634039)
This commit is contained in:
parent
5414c031e7
commit
341c891162
@ -26,7 +26,7 @@
|
|||||||
Summary: X.Org X11 fonts
|
Summary: X.Org X11 fonts
|
||||||
Name: xorg-x11-fonts
|
Name: xorg-x11-fonts
|
||||||
Version: 7.5
|
Version: 7.5
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: MIT and Lucida and Public Domain
|
License: MIT and Lucida and Public Domain
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
@ -76,7 +76,7 @@ Source44: ftp://ftp.x.org/pub/individual/font/font-xfree86-type1-1.0.3.tar.bz2
|
|||||||
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: xorg-x11-util-macros
|
BuildRequires: xorg-x11-util-macros
|
||||||
BuildRequires: xorg-x11-font-utils >= 7.2-11
|
BuildRequires: xorg-x11-font-utils >= 7.5-3
|
||||||
# FIXME: fontconfig is needed only because the upstream Makefiles invoke
|
# FIXME: fontconfig is needed only because the upstream Makefiles invoke
|
||||||
# fc-cache at build time. This is totally useless, because we do not ship
|
# fc-cache at build time. This is totally useless, because we do not ship
|
||||||
# any of the resulting cache files, we generate them at install time from the
|
# any of the resulting cache files, we generate them at install time from the
|
||||||
@ -347,22 +347,6 @@ for f in misc:unscaled:pri=10 75dpi:unscaled:pri=20 100dpi:unscaled:pri=30 Type1
|
|||||||
ln -fs %{_x11fontdir}/${f%%%%:*} $RPM_BUILD_ROOT%{_catalogue}/xorg-x11-fonts-$f
|
ln -fs %{_x11fontdir}/${f%%%%:*} $RPM_BUILD_ROOT%{_catalogue}/xorg-x11-fonts-$f
|
||||||
done
|
done
|
||||||
|
|
||||||
# Generate the encodings.dir files in the encodings directories during
|
|
||||||
# install time to work around bugs in upstream Makefiles. This is more
|
|
||||||
# consistent with how we generate fonts.dir files anyway. Fixes bugs:
|
|
||||||
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=173875
|
|
||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=6028
|
|
||||||
{
|
|
||||||
ENCODINGSDIR=$RPM_BUILD_ROOT%{_datadir}/X11/fonts/encodings
|
|
||||||
[ -d "${ENCODINGSDIR}" ] || mkdir -p "${ENCODINGSDIR}"
|
|
||||||
pushd "${ENCODINGSDIR}"
|
|
||||||
mkfontscale -n -e "${ENCODINGSDIR}" -e "${ENCODINGSDIR}/large"
|
|
||||||
sed -i "s@$RPM_BUILD_ROOT@@" encodings.dir
|
|
||||||
sed -i "s@$RPM_BUILD_ROOT@@" large/encodings.dir
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Create fake %ghost files for file manifests.
|
# Create fake %ghost files for file manifests.
|
||||||
{
|
{
|
||||||
# Make ghost fonts.alias, fonts.dir, encodings.dir files
|
# Make ghost fonts.alias, fonts.dir, encodings.dir files
|
||||||
@ -391,73 +375,52 @@ done
|
|||||||
}
|
}
|
||||||
|
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# FIXME: We should write a script, or couple of scripts for generic font
|
# xorg-x11-fonts-update-dirs is provided by xorg-x11-font-utils to
|
||||||
# installation - with options if necessary, to reduce the amount of code
|
# deduplicate stuff run in %post
|
||||||
# duplication in these font installation scripts, then add the generic
|
|
||||||
# font installation script to xorg-x11-font-utils or whatever.
|
|
||||||
|
|
||||||
%post misc
|
%post misc
|
||||||
{
|
{
|
||||||
FONTDIR=%{_x11fontdir}/misc
|
# Only run fc-cache in the Type1 dir, gzipped pcf's take forever
|
||||||
mkfontdir $FONTDIR
|
xorg-x11-fonts-update-dirs --skip-fontscale %{_x11fontdir}/misc
|
||||||
fc-cache $FONTDIR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%postun misc
|
%postun misc
|
||||||
{
|
{
|
||||||
# Rebuild fonts.dir when uninstalling package. (exclude the local, CID dirs)
|
# Rebuild fonts.dir when uninstalling package. (exclude the local, CID dirs)
|
||||||
if [ "$1" = "0" -a -d %{_x11fontdir}/misc ]; then
|
if [ "$1" = "0" -a -d %{_x11fontdir}/misc ]; then
|
||||||
mkfontdir %{_x11fontdir}/misc
|
xorg-x11-fonts-update-dirs --skip-fontscale %{_x11fontdir}/misc
|
||||||
# Only run fc-cache in the Type1 dir, gzipped pcf's take forever
|
|
||||||
fc-cache %{_x11fontdir}/misc
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
%post Type1
|
%post Type1
|
||||||
{
|
{
|
||||||
FONTDIR=%{_type1_fontdir}/Type1
|
xorg-x11-fonts-update-dirs %{_x11fontdir}/Type1
|
||||||
mkfontscale $FONTDIR
|
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%postun Type1
|
%postun Type1
|
||||||
{
|
{
|
||||||
FONTDIR=%{_type1_fontdir}/Type1
|
FONTDIR=%{_type1_fontdir}/Type1
|
||||||
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
||||||
mkfontscale $FONTDIR
|
xorg-x11-fonts-update-dirs $FONTDIR
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
%if %{with_ethiopic_fonts}
|
%if %{with_ethiopic_fonts}
|
||||||
%post ethiopic
|
%post ethiopic
|
||||||
{
|
{
|
||||||
FONTDIR=%{_ttf_fontdir}/TTF
|
xorg-x11-fonts-update-dirs --skip_fontscale --need_ttmkfdir %{_ttf_fontdir}/TTF
|
||||||
ttmkfdir -d $FONTDIR -o $FONTDIR/fonts.scale
|
xorg-x11-fonts-update-dirs %{_ttf_fontdir}/OTF
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
|
|
||||||
FONTDIR=%{_otf_fontdir}/OTF
|
|
||||||
mkfontscale $FONTDIR
|
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%postun ethiopic
|
%postun ethiopic
|
||||||
{
|
{
|
||||||
FONTDIR=%{_ttf_fontdir}/TTF
|
FONTDIR=%{_ttf_fontdir}/TTF
|
||||||
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
||||||
ttmkfdir -d $FONTDIR -o $FONTDIR/fonts.scale
|
xorg-x11-fonts-update-dirs --skip_fontscale --need_ttmkfdir $FONTDIR
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
fi
|
fi
|
||||||
FONTDIR=%{_otf_fontdir}/OTF
|
FONTDIR=%{_otf_fontdir}/OTF
|
||||||
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
if [ "$1" = "0" -a -d $FONTDIR ]; then
|
||||||
mkfontscale $FONTDIR
|
xorg-x11-fonts-update-dirs $FONTDIR
|
||||||
mkfontdir $FONTDIR
|
|
||||||
fc-cache $FONTDIR
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
@ -1091,6 +1054,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%ghost %verify(not md5 size mtime) %{_x11fontdir}/cyrillic/fonts.cache-*
|
%ghost %verify(not md5 size mtime) %{_x11fontdir}/cyrillic/fonts.cache-*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 7.5-3
|
||||||
|
- Rely on a script provided in xorg-x11-font-utils for mkfontscale and
|
||||||
|
friends (#634039)
|
||||||
|
|
||||||
* Fri Nov 12 2010 Peter Hutterer <peter.hutterer@redhat.com> 7.5-2
|
* Fri Nov 12 2010 Peter Hutterer <peter.hutterer@redhat.com> 7.5-2
|
||||||
- This time with tarballs
|
- This time with tarballs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user