The dev-tex/latex2html ebuild modifies {{BIN,SHLIB,LIB}DIR,TEXPATH} to get everything installed in the sandbox properly. # mktexlsr is run later to avoid a sandbox violation sed \ -e "/BINDIR\|LIBDIR\|SHLIBDIR\|TEXPATH/s#q'/#q'"${D}"#" \ -e "/MKTEXLSR/s:q'.*':q'':" \ cfgcache.pm.bak > cfgcache.pm This messes things up though, and has to be cleaned up later: # clean the perl scripts up to remove references to the sandbox einfo "fixing sandbox references" einfo ${T} dosed "s:${T}:/tmp:g" /usr/lib/latex2html/pstoimg.pl dosed "s:${S}::g" /usr/lib/latex2html/latex2html.pl dosed "s:${T}:/tmp:g" /usr/lib/latex2html/cfgcache.pm dosed "s:${T}:/tmp:g" /usr/lib/latex2html/l2hconf.pm Instead, the install script should be patched to fix the actual problem. I wrote this patch, which needs to be applied after econf and before make install. make install will need to be changed to emake install. econf should also be run with --without-mktexlsr, instead of hacking it out of the build script. All of the lines I pated above can be removed. --- latex2html-2002-2-1/config/install.pl.bak 2005-09-22 15:23:23.000000000 -0400 +++ latex2html-2002-2-1/config/install.pl 2005-09-22 15:23:52.000000000 -0400 @@ -293,13 +293,14 @@ 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 _)) { +if((-d $destdir.$dest1 && !-w _) || (-d $destdir.$cfg{'SHLIBDIR'} && !-w _)) { print STDERR "Error: Cannot install icons in '$dest1': No write permission.\n"; $dest1 = ''; } my $dest2 = $cfg{'ICONSTORAGE'} || ''; -if(-d $dest2 && !-w $dest2) { +if(-d $destdir.$dest2 && !-w _) { print STDERR "Error: Cannot install icons in '$dest2': No write permission.\n"; $dest2 = ''; } @@ -371,8 +372,8 @@ #----------------------------------------------------------------------------- if($cfg{TEXPATH}) { - print "\nNote: trying to install LaTeX2HTML style files in TeX directory tree\n ($cfg{TEXPATH})\n"; - unless(mkpath($cfg{TEXPATH})) { + print "\nNote: trying to install LaTeX2HTML style files in TeX directory tree\n ($destdir$cfg{TEXPATH})\n"; + unless(mkpath($destdir.$cfg{TEXPATH})) { #my $testpath = $cfg{TEXPATH}; # to strip (latex2)html #$testpath =~ s/[$dd$dd][^$dd$dd]*$//; #if((-d $cfg{TEXPATH} && !-w _) || (-d $testpath && !-w _)) { Reproducible: Always Steps to Reproduce:
cp cfgcache.pm cfgcache.pm.bak This line would be removed too, of course, as it wouldn't modify cfgcache.pm.bak any more. :)
please attach patches, do not inline
Created attachment 69039 [details, diff] patch to fix install paths.
I'm no perl expert (or anything near), but as far as I can see, your patch (or at least the patch you supplied) does not do anything about the installation paths. It does a lot of checking and stuff, but no installation paths in install.pl are altered. I like the idea of a patch against install.pl much more than the current mess of an ebuild. But to change that we need a working patch. Btw. if you are going to paste diff output into a patch file, then please do it properly (not breaking any lines).
No reply for a week. Feel free to reopen this bug if you can supply a working patch.