From: imiyazaki Date: Thu, 23 Mar 2006 04:19:03 +0000 (+0000) Subject: do not depend on Chise_utils.pm anymore. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=14dccea47754937f475b33c9437704a40d72ca2c;p=chise%2Fomega.git do not depend on Chise_utils.pm anymore. --- diff --git a/makefonts.pl b/makefonts.pl index 5b909ef..aee5410 100755 --- a/makefonts.pl +++ b/makefonts.pl @@ -6,7 +6,6 @@ use strict; use utf8; use IO::Socket::INET; use BerkeleyDB; -use Chise_utils '$omegadb_path'; require 5.008001; #my $kageaddr="home.fonts.jp:5100"; # Specify port number! @@ -22,21 +21,41 @@ my $t1asm = "/usr/bin/env t1asm"; # point to 't1asm' executable. my $pfaedit="/usr/bin/env fontforge"; # point to 'fontforge' executable. #die "Cannot execute $pfaedit. Abort.\n" unless -x $pfaedit; +my $omegadb_path=""; # Check the path of omegadb, if needed. +my $cleanup_script=""; # Check the path of pfaedit script, if needed. + +unless($omegadb_path){ + if(-w '/usr/local/share/chise/omega'){ + $omegadb_path='/usr/local/share/chise/omega'; + }elsif(-w '/usr/share/chise/omega'){ + $omegadb_path='/usr/share/chise/omega'; + }elsif(-w '/sw/share/chise/omega'){ + $omegadb_path='/sw/share/chise/omega'; + }elsif(-w '/usr/local/lib/chise/omega'){ + $omegadb_path='/usr/local/lib/chise/omega'; + }else{ + $omegadb_path="."; + } +} $omegadb_path=~s!/$!!; -my $cleanup_script=""; # Check the path of pfaedit script, if needed. +my $makefonts_dir; +($makefonts_dir=$0)=~s!^(.*)/.*$!$1!; unless($cleanup_script){ - if(-e "/usr/local/share/texmf/omega/ocp/chise_rqd/chise/svg2t1.pfe"){ + if(-e "$makefonts_dir/svg2t1.pfe"){ + $cleanup_script="$makefonts_dir/svg2t1.pfe"; + }elsif(-e "/usr/local/share/texmf/omega/ocp/chise_rqd/chise/svg2t1.pfe"){ $cleanup_script="/usr/local/share/texmf/omega/ocp/chise_rqd/chise/svg2t1.pfe"; }elsif(-e "/usr/local/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){ $cleanup_script="/usr/local/share/texmf/omega/ocp/local/chise/svg2t1.pfe"; - }elsif(-e "/usr/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){ + }elsif(-e "/usr/share/texmf/omega/ocp/chise_rqd/chise/svg2t1.pfe"){ $cleanup_script="/usr/share/texmf/omega/ocp/local/chise/svg2t1.pfe"; }elsif(-e "/sw/share/texmf/omega/ocp/local/chise/svg2t1.pfe"){ $cleanup_script="/sw/share/texmf/omega/ocp/local/chise/svg2t1.pfe"; } } + unless($cleanup_script and -e $cleanup_script){ print STDERR "svg2t1.pfe not found!\n", "please check \$cleanup_script in $0.\n";