From d5ad8abe300c2da4bad79faf952673246bd00c47 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 13 Mar 2011 20:20:09 +0000 Subject: add fontconfig.prov provides script --- Makefile.am | 3 ++- NEWS | 3 +++ configure.ac | 2 +- find-provides.in | 6 ++++++ fontconfig.prov | 22 ++++++++++++++++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 fontconfig.prov diff --git a/Makefile.am b/Makefile.am index d253892..1673421 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,7 +49,8 @@ pkg_scripts = \ php.req \ pkgconfigdeps.sh \ pythoneggs.py \ - rubygems.rb + rubygems.rb \ + fontconfig.prov pkg_gscripts = \ find-provides \ diff --git a/NEWS b/NEWS index 6d3ead4..47cd021 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Version 1.123 - 13 March 2011, by Nicolas Vigier +- add fontconfig.prov provides script + Version 1.122 - 4 March 2011, by Nicolas Vigier - kmod.prov: exit 0 when there is no error - check if pkgconfig version is defined, or exit with an error diff --git a/configure.ac b/configure.ac index 7ea0207..e5aeaa9 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # $Id: configure.ac 271266 2010-11-04 10:43:28Z fwang $ AC_PREREQ(2.59) -AC_INIT(rpm-mageia-setup, 1.122, boklm@mars-attacks.org) +AC_INIT(rpm-mageia-setup, 1.123, boklm@mars-attacks.org) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.9 -Wno-portability) AC_CONFIG_SRCDIR diff --git a/find-provides.in b/find-provides.in index bed7c13..3fdf3cf 100755 --- a/find-provides.in +++ b/find-provides.in @@ -80,6 +80,12 @@ done | sort -u echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/pkgconfigdeps.sh -P | sort -u \ && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/pkgconfigdeps.sh failed' >&2 && exit 1 +# +# --- fonts +[ -x @RPMVENDORDIR@/fontconfig.prov ] && + echo "$filelist" | tr '[:blank:]' \\n | @RPMVENDORDIR@/fontconfig.prov --provides | sort -u \ + && test ${PIPESTATUS[2]} -ne 0 && echo 'error: @RPMVENDORDIR@/fontconfig.prov failed' >&2 && exit 1 + if [ -n "$LIBTOOLDEP" ]; then # # --- libtooldep deps diff --git a/fontconfig.prov b/fontconfig.prov new file mode 100755 index 0000000..73f345c --- /dev/null +++ b/fontconfig.prov @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Script to install in: +# /usr/lib/rpm/mageia/find-provides.d +# +# Transform font files into RPM provides +# Requires fontconfig >= 2.6.90 +# +# Author: Behdad Esfahbod +# Based on other provides scripts from RPM +# + +fcquery=/usr/bin/fc-query + +[ -x $fcquery ] || exit 0 + +# filter out anything outside main fontconfig path +grep /usr/share/fonts/ | +while read fn; do + $fcquery --format '%{=pkgkit}' "${fn}" 2> /dev/null +done +exit 0 -- cgit v1.2.1