diff options
author | marha <marha@users.sourceforge.net> | 2013-03-06 08:37:36 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-04-11 11:13:32 +0200 |
commit | fb84fb26466262dcab4bd31bdf51c982f14f891a (patch) | |
tree | 8b53ac928f676a2a6f2273c770d65625794c1ab5 /fontconfig/fc-cache | |
parent | d95b2ad7bc95e4ba2f1af9737935878f1ff7d79a (diff) | |
download | vcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.tar.gz vcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.tar.bz2 vcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.zip |
fontconfig libfontenc mesa xserver git update 6 Mar 2013
xserver commit 103b77c59e3638a45179bf6d7908f5c738d2d872
libfontenc commit 624508365ec3279bc74ce523d024533e062629e1
fontconfig commit e96d7760886a3781a46b3271c76af99e15cb0146
mesa commit 88b20d58344ed336b146799c0bf1149a932dc2d7
Diffstat (limited to 'fontconfig/fc-cache')
-rw-r--r-- | fontconfig/fc-cache/fc-cache.c | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c index 220609604..aeb0af29b 100644 --- a/fontconfig/fc-cache/fc-cache.c +++ b/fontconfig/fc-cache/fc-cache.c @@ -67,6 +67,7 @@ const struct option longopts[] = { {"force", 0, 0, 'f'}, {"really-force", 0, 0, 'r'}, + {"sysroot", 0, 0, 'y'}, {"system-only", 0, 0, 's'}, {"version", 0, 0, 'V'}, {"verbose", 0, 0, 'v'}, @@ -85,26 +86,28 @@ usage (char *program, int error) { FILE *file = error ? stderr : stdout; #if HAVE_GETOPT_LONG - fprintf (file, "usage: %s [-frsvVh] [--force|--really-force] [--system-only] [--verbose] [--version] [--help] [dirs]\n", + fprintf (file, "usage: %s [-frsvVh] [-y SYSROOT] [--force|--really-force] [--sysroot=SYSROOT] [--system-only] [--verbose] [--version] [--help] [dirs]\n", program); #else - fprintf (file, "usage: %s [-frsvVh] [dirs]\n", + fprintf (file, "usage: %s [-frsvVh] [-y SYSROOT] [dirs]\n", program); #endif fprintf (file, "Build font information caches in [dirs]\n" "(all directories in font configuration by default).\n"); fprintf (file, "\n"); #if HAVE_GETOPT_LONG - fprintf (file, " -f, --force scan directories with apparently valid caches\n"); - fprintf (file, " -r, --really-force erase all existing caches, then rescan\n"); - fprintf (file, " -s, --system-only scan system-wide directories only\n"); - fprintf (file, " -v, --verbose display status information while busy\n"); - fprintf (file, " -V, --version display font config version and exit\n"); - fprintf (file, " -h, --help display this help and exit\n"); + fprintf (file, " -f, --force scan directories with apparently valid caches\n"); + fprintf (file, " -r, --really-force erase all existing caches, then rescan\n"); + fprintf (file, " -s, --system-only scan system-wide directories only\n"); + fprintf (file, " -y, --sysroot=SYSROOT prepend SYSROOT to all paths for scanning\n"); + fprintf (file, " -v, --verbose display status information while busy\n"); + fprintf (file, " -V, --version display font config version and exit\n"); + fprintf (file, " -h, --help display this help and exit\n"); #else fprintf (file, " -f (force) scan directories with apparently valid caches\n"); fprintf (file, " -r, (really force) erase all existing caches, then rescan\n"); fprintf (file, " -s (system) scan system-wide directories only\n"); + fprintf (file, " -y SYSROOT (sysroot) prepend SYSROOT to all paths for scanning\n"); fprintf (file, " -v (verbose) display status information while busy\n"); fprintf (file, " -V (version) display font config version and exit\n"); fprintf (file, " -h (help) display this help and exit\n"); @@ -270,6 +273,7 @@ main (int argc, char **argv) FcBool really_force = FcFalse; FcBool systemOnly = FcFalse; FcConfig *config; + FcChar8 *sysroot = NULL; int i; int changed; int ret; @@ -277,9 +281,9 @@ main (int argc, char **argv) int c; #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "frsVvh", longopts, NULL)) != -1) + while ((c = getopt_long (argc, argv, "frsy:Vvh", longopts, NULL)) != -1) #else - while ((c = getopt (argc, argv, "frsVvh")) != -1) + while ((c = getopt (argc, argv, "frsy:Vvh")) != -1) #endif { switch (c) { @@ -292,6 +296,9 @@ main (int argc, char **argv) case 's': systemOnly = FcTrue; break; + case 'y': + sysroot = FcStrCopy ((const FcChar8 *)optarg); + break; case 'V': fprintf (stderr, "fontconfig version %d.%d.%d\n", FC_MAJOR, FC_MINOR, FC_REVISION); @@ -312,7 +319,16 @@ main (int argc, char **argv) if (systemOnly) FcConfigEnableHome (FcFalse); - config = FcInitLoadConfig (); + if (sysroot) + { + FcConfigSetSysRoot (NULL, sysroot); + FcStrFree (sysroot); + config = FcConfigGetCurrent(); + } + else + { + config = FcInitLoadConfig (); + } if (!config) { fprintf (stderr, "%s: Can't init font config library\n", argv[0]); |