- Generate encodings.dir files in the encodings dirs with mkfontscale from
the base fonts package post install script, to work around bug (#173875)
This commit is contained in:
parent
1d77c34d19
commit
b66234b2c3
@ -30,7 +30,7 @@
|
|||||||
Summary: X.Org X11 fonts
|
Summary: X.Org X11 fonts
|
||||||
Name: xorg-x11-fonts
|
Name: xorg-x11-fonts
|
||||||
Version: 7.0
|
Version: 7.0
|
||||||
Release: 1
|
Release: 2
|
||||||
License: Various licenses
|
License: Various licenses
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
@ -103,8 +103,8 @@ X.Org X Window System fonts
|
|||||||
%package base
|
%package base
|
||||||
Summary: Base fonts required by the X Window System.
|
Summary: Base fonts required by the X Window System.
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
Requires(post): mkfontdir, fontconfig, chkfontpath
|
Requires(post): mkfontdir, mkfontscale, fontconfig, chkfontpath
|
||||||
Requires(postun): mkfontdir, fontconfig
|
Requires(postun): mkfontdir, mkfontscale, fontconfig, chkfontpath
|
||||||
# Required so upgrades work, since base fonts moved here from main pkg
|
# Required so upgrades work, since base fonts moved here from main pkg
|
||||||
Conflicts: XFree86 <= 4.2.0-3.1
|
Conflicts: XFree86 <= 4.2.0-3.1
|
||||||
# The fonts.* files from truetype and syriac moved from those pkgs to base
|
# The fonts.* files from truetype and syriac moved from those pkgs to base
|
||||||
@ -406,6 +406,14 @@ Contains a set of Cyrillic fonts.
|
|||||||
%build
|
%build
|
||||||
for dir in $(find . -maxdepth 1 -type d -name '[a-z]*-[0-9]*' | sort | sed -e 's#\./##g') ; do
|
for dir in $(find . -maxdepth 1 -type d -name '[a-z]*-[0-9]*' | sort | sed -e 's#\./##g') ; do
|
||||||
pushd $dir
|
pushd $dir
|
||||||
|
case $dir in
|
||||||
|
encodings-*)
|
||||||
|
perl -p -i -e 's#(^DEFAULT(_|_OTF|_TTF)FONTDIR=)\${libdir}/X11/fonts#\1\$(pkg-config --variable=fontdir fontutil)#' configure.ac
|
||||||
|
autoconf
|
||||||
|
%configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
# FIXME: Yes, this perl hack is fairly ugly, but beats the heck out of
|
# FIXME: Yes, this perl hack is fairly ugly, but beats the heck out of
|
||||||
# making a patch that patches 35 or so configure.ac files and maintaining
|
# making a patch that patches 35 or so configure.ac files and maintaining
|
||||||
# it for an indefinite amount of time. Hopefully my solution here will
|
# it for an indefinite amount of time. Hopefully my solution here will
|
||||||
@ -414,17 +422,13 @@ for dir in $(find . -maxdepth 1 -type d -name '[a-z]*-[0-9]*' | sort | sed -e 's
|
|||||||
# is my friend. -- mharris
|
# is my friend. -- mharris
|
||||||
perl -p -i -e 's#(^DEFAULT(_|_OTF|_TTF)FONTDIR=)\${libdir}/X11/fonts#\1\$(pkg-config --variable=fontdir fontutil)#' configure.ac
|
perl -p -i -e 's#(^DEFAULT(_|_OTF|_TTF)FONTDIR=)\${libdir}/X11/fonts#\1\$(pkg-config --variable=fontdir fontutil)#' configure.ac
|
||||||
autoconf
|
autoconf
|
||||||
#3,4,6,10,11,12,13,16
|
|
||||||
%configure \
|
%configure \
|
||||||
--disable-iso8859-3 \
|
--disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-6 \
|
||||||
--disable-iso8859-4 \
|
--disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-12 \
|
||||||
--disable-iso8859-6 \
|
--disable-iso8859-13 --disable-iso8859-16
|
||||||
--disable-iso8859-10 \
|
;;
|
||||||
--disable-iso8859-11 \
|
esac
|
||||||
--disable-iso8859-12 \
|
|
||||||
--disable-iso8859-13 \
|
|
||||||
--disable-iso8859-16
|
|
||||||
# --prefix=$RPM_BUILD_ROOT/usr --libdir=$RPM_BUILD_ROOT%{_x11fontdirprefix} --datadir=$RPM_BUILD_ROOT%{_datadir}
|
|
||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
@ -439,7 +443,6 @@ for dir in $(find . -maxdepth 1 -type d -name '[a-z]*-[0-9]*' | sort | sed -e 's
|
|||||||
# specification of the 'fontdir' variable, instead of it being
|
# specification of the 'fontdir' variable, instead of it being
|
||||||
# relative to libdir.
|
# relative to libdir.
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
# libdir=%{_x11fontdirprefix}
|
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -459,7 +462,6 @@ done
|
|||||||
chmod 0644 $FONTDIR/$subdir/{encodings,fonts}.dir
|
chmod 0644 $FONTDIR/$subdir/{encodings,fonts}.dir
|
||||||
|
|
||||||
# Create bogus fonts.cache-* files
|
# Create bogus fonts.cache-* files
|
||||||
# touch $FONTDIR/$subdir/fonts.cache
|
|
||||||
# Create somewhat future-proofed ghosted fonts.cache-* files so that
|
# Create somewhat future-proofed ghosted fonts.cache-* files so that
|
||||||
# the font packages own these files.
|
# the font packages own these files.
|
||||||
for fcver in $(seq 1 9) ; do
|
for fcver in $(seq 1 9) ; do
|
||||||
@ -471,24 +473,6 @@ done
|
|||||||
|
|
||||||
# Remove unwanted fonts
|
# Remove unwanted fonts
|
||||||
{
|
{
|
||||||
# Remove unwanted 100dpi,75dpi ISO8859-{3,4,10,13} fonts
|
|
||||||
%if 0
|
|
||||||
{
|
|
||||||
for dir in $RPM_BUILD_ROOT%{_x11fontdir}/{100dpi,75dpi} ; do
|
|
||||||
find $dir -iregex ".*-ISO8859-\(3\|4\|10\|13\)\.pcf.*" | xargs rm --
|
|
||||||
done
|
|
||||||
}
|
|
||||||
# font-misc-misc (Remove unwanted ISO8859-{3,4,6,10,11,12,13,16} fonts
|
|
||||||
# NOTE: Although we don't ship ISO8859-{5,7,8} encodings of most fonts in
|
|
||||||
# monolithic X, we do ship misc-fixed in ISO8859-{5,7,8}, so we'll keep
|
|
||||||
# them in modular too.
|
|
||||||
{
|
|
||||||
for dir in $RPM_BUILD_ROOT%{_x11fontdir}/misc ; do
|
|
||||||
find $dir -iregex ".*-ISO8859-\(3\|4\|6\|10\|11\|12\|13\|16\)\.pcf.*" | xargs rm --
|
|
||||||
done
|
|
||||||
}
|
|
||||||
%endif
|
|
||||||
# || : &> /dev/null
|
|
||||||
# font-misc-meltho (syriac fonts)
|
# font-misc-meltho (syriac fonts)
|
||||||
{
|
{
|
||||||
# Remove fonts which contain bad codepoints, as documented in bug #97591
|
# Remove fonts which contain bad codepoints, as documented in bug #97591
|
||||||
@ -511,6 +495,20 @@ done
|
|||||||
|
|
||||||
%post base
|
%post base
|
||||||
{
|
{
|
||||||
|
ENCODINGSDIR=%{_datadir}/X11/fonts/encodings
|
||||||
|
# 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
|
||||||
|
{
|
||||||
|
for each in "${ENCODINGSDIR}" "${ENCODINGSDIR}/large" ; do
|
||||||
|
pushd $each &> /dev/null
|
||||||
|
mkfontscale -n -e "${each}"
|
||||||
|
popd &> /dev/null
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
FONTDIR=%{_x11fontdir}/misc
|
FONTDIR=%{_x11fontdir}/misc
|
||||||
mkfontdir $FONTDIR
|
mkfontdir $FONTDIR
|
||||||
|
|
||||||
@ -541,7 +539,8 @@ done
|
|||||||
# /usr/sbin/chkfontpath -qr %{_x11fontdir}/misc
|
# /usr/sbin/chkfontpath -qr %{_x11fontdir}/misc
|
||||||
|
|
||||||
fc-cache $FONTDIR
|
fc-cache $FONTDIR
|
||||||
} || :
|
}
|
||||||
|
# || :
|
||||||
# &> /dev/null || :
|
# &> /dev/null || :
|
||||||
|
|
||||||
%postun base
|
%postun base
|
||||||
@ -937,10 +936,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
# encodings
|
# encodings
|
||||||
%dir %{_datadir}/X11/fonts/encodings
|
%dir %{_datadir}/X11/fonts/encodings
|
||||||
%dir %{_datadir}/X11/fonts/encodings/large
|
%dir %{_datadir}/X11/fonts/encodings/large
|
||||||
%{_datadir}/X11/fonts/encodings/*.enc*
|
%{_datadir}/X11/fonts/encodings/*.enc.gz
|
||||||
%{_datadir}/X11/fonts/encodings/encodings.dir
|
%ghost %verify(not md5 size mtime) %{_datadir}/X11/fonts/encodings/encodings.dir
|
||||||
%{_datadir}/X11/fonts/encodings/large/*.enc*
|
%{_datadir}/X11/fonts/encodings/large/*.enc.gz
|
||||||
%{_datadir}/X11/fonts/encodings/large/encodings.dir
|
%ghost %verify(not md5 size mtime) %{_datadir}/X11/fonts/encodings/large/encodings.dir
|
||||||
%ghost %verify(not md5 size mtime) %{_x11fontdir}/misc/encodings.dir
|
%ghost %verify(not md5 size mtime) %{_x11fontdir}/misc/encodings.dir
|
||||||
%ghost %verify(not md5 size mtime) %{_x11fontdir}/misc/fonts.dir
|
%ghost %verify(not md5 size mtime) %{_x11fontdir}/misc/fonts.dir
|
||||||
# NOTE: Xorg supplies this fonts.alias, so it is not ghosted
|
# NOTE: Xorg supplies this fonts.alias, so it is not ghosted
|
||||||
@ -1524,6 +1523,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 Feb 24 2006 Mike A. Harris <mharris@redhat.com> 7.0-2
|
||||||
|
- Generate encodings.dir files in the encodings dirs with mkfontscale from the
|
||||||
|
base fonts package post install script, to work around bug (#173875)
|
||||||
|
|
||||||
* Thu Jan 26 2006 Mike A. Harris <mharris@redhat.com> 7.0-1
|
* Thu Jan 26 2006 Mike A. Harris <mharris@redhat.com> 7.0-1
|
||||||
- Bumped artificial package version to 7.0, to indicate that the font tarballs
|
- Bumped artificial package version to 7.0, to indicate that the font tarballs
|
||||||
are all from X11R7.0.
|
are all from X11R7.0.
|
||||||
|
Loading…
Reference in New Issue
Block a user