SHA256
1
0
forked from pool/latex2html
latex2html/latex2html-dest-dir.diff

29 lines
1.1 KiB
Diff
Raw Normal View History

Index: config/install.pl
===================================================================
--- config/install.pl.orig 2002-11-29 12:49:01.000000000 +0100
+++ config/install.pl 2013-11-25 15:17:23.522211642 +0100
@@ -293,8 +293,10 @@
split(/\s+/,$cfg{'IMAGE_TYPES'}) : qw(gif);
my $iconrx = join('|', @icon_types);
+my $destdir=$ENV{"DESTDIR"};
my $dest1 = "$cfg{'SHLIBDIR'}${dd}icons";
-if((-d $dest1 && !-w _) || (-d $cfg{'SHLIBDIR'} && !-w _)) {
+print STDERR "((( $destdir, $dest1 )))\n";
+if((-d "$destdir$dest1" && !-w _) || (-d "$destdir$cfg{'SHLIBDIR'}" && !-w _)) {
print STDERR "Error: Cannot install icons in '$dest1': No write permission.\n";
$dest1 = '';
}
@@ -372,7 +374,10 @@
if($cfg{TEXPATH}) {
print "\nNote: trying to install LaTeX2HTML style files in TeX directory tree\n ($cfg{TEXPATH})\n";
- unless(mkpath($cfg{TEXPATH})) {
+ my $dest = $cfg{TEXPATH};
+ my $destdir=$ENV{"DESTDIR"};
+ $dest= "$destdir$dest";
+ unless(mkpath($dest)) {
#my $testpath = $cfg{TEXPATH}; # to strip (latex2)html
#$testpath =~ s/[$dd$dd][^$dd$dd]*$//;
#if((-d $cfg{TEXPATH} && !-w _) || (-d $testpath && !-w _)) {