SHA256
1
0
forked from pool/fonts-config

- updated to 20141207

added --info option (will be required by yast fonts)

OBS-URL: https://build.opensuse.org/package/show/M17N/fonts-config?expand=0&rev=60
This commit is contained in:
Petr Gajdos 2014-12-08 11:50:31 +00:00 committed by Git OBS Bridge
parent 095ffcc0e8
commit 4a19f509ae
3 changed files with 57 additions and 14 deletions

View File

@ -154,6 +154,10 @@ Display version and exit.
Display a short help message and exit. Display a short help message and exit.
=item B<-i>, B<--info>
Lists important involved input and output files to fonts-config script.
=back =back
=head1 DESCRIPTION =head1 DESCRIPTION
@ -316,7 +320,7 @@ use Env;
use strict; use strict;
my $script_start_time = time(); my $script_start_time = time();
my $version = 20140604; my $version = 20141207;
# #
# OPTIONS # OPTIONS
@ -343,6 +347,7 @@ my $OPT_TTCAP = 0;
my $OPT_JAVA = 1; my $OPT_JAVA = 1;
my $OPT_VERSION = 0; my $OPT_VERSION = 0;
my $OPT_HELP = 0; my $OPT_HELP = 0;
my $OPT_INFO = 0;
my $VERBOSITY_QUIET = 0; my $VERBOSITY_QUIET = 0;
my $VERBOSITY_VERBOSE = 1; my $VERBOSITY_VERBOSE = 1;
@ -370,9 +375,22 @@ my %sysconfig_options = (
"GENERATE_JAVA_FONT_SETUP" , "OPT_JAVA", "GENERATE_JAVA_FONT_SETUP" , "OPT_JAVA",
); );
my %in_files = (
"sysconfig file", "/etc/sysconfig/fonts-config",
"rendering config template", "/usr/share/fonts-config/10-rendering-options.conf.template",
"metric compatibility config", "/usr/share/fontconfig/conf.avail/30-metric-aliases.conf",
"metric compatibility bw config", "/usr/share/fonts-config/conf.avail/31-metric-aliases-bw.conf",
"java fontconfig properties template", "/usr/share/fonts-config/fontconfig.SuSE.properties.template",
);
my %out_files = (
"rendering config", "/etc/fonts/conf.d/10-rendering-options.conf",
"local family list", "/etc/fonts/conf.d/58-family-prefer-local.conf",
"metric compatibility symlink", "/etc/fonts/conf.d/30-metric-aliases.conf",
"metric compatibility bw symlink", "/etc/fonts/conf.d/31-metric-aliases-bw.conf",
"java fontconfig properties", "/usr/lib*/jvm/jre/lib/fontconfig.SuSE.properties",
);
get_option_defaults_from_sysconfig($in_files{"sysconfig file"});
get_option_defaults_from_sysconfig("/etc/sysconfig/fonts-config");
# process command line options # process command line options
my %opt; my %opt;
@ -398,6 +416,7 @@ unless (GetOptions(\%opt,
'java!', \$OPT_JAVA, 'java!', \$OPT_JAVA,
'version', \$OPT_VERSION, 'version', \$OPT_VERSION,
'help|h', \$OPT_HELP, 'help|h', \$OPT_HELP,
'info|i', \$OPT_INFO,
)) { )) {
&usage (); &usage ();
exit 1; exit 1;
@ -421,6 +440,24 @@ if ($OPT_HELP) {
exit 0; exit 0;
} }
#
# INFO
#
if ($OPT_INFO) {
# this is read by yast-fonts, so may be that
# change should be reflected in this yast module
print "Input Files\n";
for my $f (keys %in_files) {
print " $f: $in_files{$f}\n"
}
print "Output Files\n";
for my $f (keys %out_files) {
print " $f: $out_files{$f}\n"
}
exit 0;
}
# #
# VERBOSITY # VERBOSITY
# #
@ -442,7 +479,7 @@ elsif ($OPT_VERBOSE) {
no strict "vars"; no strict "vars";
no warnings; no warnings;
if ($VERBOSITY >= $VERBOSITY_DEBUG) { if ($VERBOSITY >= $VERBOSITY_DEBUG) {
print "--- sysconfig options (read from $sysconfig_file):\n"; print "--- sysconfig options (read from $in_files{'sysconfig file'}):\n";
for my $i (keys %sysconfig_options) { for my $i (keys %sysconfig_options) {
if (defined eval ("\$$i")) { if (defined eval ("\$$i")) {
printf "$i=%s\n", eval("\$$i"); printf "$i=%s\n", eval("\$$i");
@ -1037,8 +1074,8 @@ sub create_symbolic_links {
# #
sub rendering_options { sub rendering_options {
my $suse_rendering_file = "/etc/fonts/conf.d/10-rendering-options.conf"; my $suse_rendering_file = $out_files{"rendering config"};
my $suse_rendering_template_file = "/usr/share/fonts-config/10-rendering-options.conf.template"; my $suse_rendering_template_file = $in_files{"rendering config template"};
my $suse_rendering = ""; my $suse_rendering = "";
my $suse_rendering_template = ""; my $suse_rendering_template = "";
@ -1230,11 +1267,11 @@ sub family_preference_list {
} }
sub family_preference_config { sub family_preference_config {
my $suse_pref_file = "/etc/fonts/conf.d/58-family-prefer-local.conf"; my $suse_pref_file = $out_files{"local family list"};
my $metric_file = "/usr/share/fontconfig/conf.avail/30-metric-aliases.conf"; my $metric_file = $in_files{"metric compatibility config"};
my $bw_metric_file = "/usr/share/fonts-config/conf.avail/31-metric-aliases-bw.conf"; my $bw_metric_file = $in_files{"metric compatibility bw config"};
my $metric_symlink = "/etc/fonts/conf.d/30-metric-aliases.conf"; my $metric_symlink = $out_files{"metric compatibility symlink"};
my $bw_metric_symlink = "/etc/fonts/conf.d/31-metric-aliases-bw.conf"; my $bw_metric_symlink = $out_files{"metric compatibility bw symlink"};
my $suse_pref = ""; my $suse_pref = "";
my $edit_options; my $edit_options;
@ -1362,8 +1399,8 @@ sub run_fp_rehash {
# #
sub generate_java_font_setup { sub generate_java_font_setup {
my @fontconfig_SuSE_properties_globs = "/usr/lib*/jvm/jre/lib/fontconfig.SuSE.properties"; my @fontconfig_SuSE_properties_globs = $out_files{"java fontconfig properties"};
my $fontconfig_SuSE_properties_template_file = "/usr/share/fonts-config/fontconfig.SuSE.properties.template"; my $fontconfig_SuSE_properties_template_file = $in_files{"java fontconfig properties template"};
my $fontconfig_SuSE_properties_template = ""; my $fontconfig_SuSE_properties_template = "";
my @sans_japanese_priority = ("MS Gothic", my @sans_japanese_priority = ("MS Gothic",
"HGGothicB", "HGGothicB",

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Dec 7 21:42:17 UTC 2014 - pgajdos@suse.com
- updated to 20141207
added --info option (will be required by yast fonts)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 22 13:19:56 UTC 2014 - pgajdos@suse.com Mon Sep 22 13:19:56 UTC 2014 - pgajdos@suse.com

View File

@ -19,7 +19,7 @@
%define infinality_srcver 1-20130104_1 %define infinality_srcver 1-20130104_1
%define infinality_name fontconfig-infinality %define infinality_name fontconfig-infinality
Name: fonts-config Name: fonts-config
Version: 20140604 Version: 20141207
Release: 0 Release: 0
Summary: Configures Fonts for X Windows and other applications Summary: Configures Fonts for X Windows and other applications
License: GPL-2.0+ and MIT License: GPL-2.0+ and MIT