rpm/rpm-5.4.9-font-provides.patch
2012-05-18 05:02:54 +04:00

60 lines
2.3 KiB
Diff

--- rpm-5.4.9/macros/macros.rpmbuild.in.font~ 2012-05-15 02:55:46.222011889 +0200
+++ rpm-5.4.9/macros/macros.rpmbuild.in 2012-05-15 02:55:46.347012566 +0200
@@ -682,5 +682,8 @@ done \
%requires_eq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
+%__font_provides %{_rpmhome}/fontconfig.prov
+#%__font_requires %{_rpmhome}/fontconfig.req
+
# \endverbatim
#*/
--- rpm-5.4.9/scripts/fontconfig.prov.font~ 2012-05-15 02:55:46.347012566 +0200
+++ rpm-5.4.9/scripts/fontconfig.prov 2012-05-15 02:55:46.347012566 +0200
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Script to install in:
+# /usr/lib/rpm/redhat/find-provides.d
+#
+# Transform font files into RPM provides
+# Requires fontconfig >= 2.6.90
+#
+# Author: Behdad Esfahbod <behdad@redhat.com>
+# Based on other provides scripts from RPM
+#
+
+fcquery=/usr/bin/fc-query
+
+if [ ! -x $fcquery ]; then
+ cat > /dev/null
+ exit 0
+fi
+
+# filter out anything outside main fontconfig path
+grep /usr/share/fonts/ |
+while read fn; do
+ $fcquery --format '%{=pkgkit}' "${fn}" 2> /dev/null
+done
--- rpm-5.4.9/scripts/Makefile.am.font~ 2012-05-15 02:55:46.304012334 +0200
+++ rpm-5.4.9/scripts/Makefile.am 2012-05-15 02:55:46.347012566 +0200
@@ -19,7 +19,7 @@ EXTRA_DIST = api-sanity-autotest.pl api-
cpanflute cpanflute2 Specfile.pm \
find-provides.perl find-requires.perl \
find-provides.php find-requires.php \
- freshen.sh gendiff getpo.sh haskelldeps.sh http.req \
+ freshen.sh fontconfig.prov gendiff getpo.sh haskelldeps.sh http.req \
check-java-closure.sh java.prov.sh java.req.sh \
gstreamer.sh javadeps.sh libtooldeps.sh mgo \
mono-find-provides mono-find-requires \
@@ -55,8 +55,8 @@ pkgdata_SCRIPTS = \
brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
check-files cross-build dbconvert.sh executabledeps.sh \
find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
- find-provides.perl \
- find-requires.perl gem_helper.rb getpo.sh haskelldeps.sh http.req \
+ find-provides.perl find-requires.perl \
+ fontconfig.prov gem_helper.rb getpo.sh haskelldeps.sh http.req \
kmod-deps.sh gstreamer.sh javadeps.sh libtooldeps.sh \
mono-find-provides mono-find-requires \
check-multiarch-files mkmultiarch \