[XeTeX] Patches for XeTeX installation scripts (XeTeX on FreeBSD + more)

Nikola Lecic nlecic at EUnet.yu
Mon Jul 9 05:13:35 CEST 2007


On Sun, 8 Jul 2007 21:10:38 +0100
Jonathan Kew <jonathan_kew at sil.org> wrote:

> Hi Nikola,
> 
> Many thanks for this; it looks like a good step forward in general,  
> and I hope we can include these improvements.

Ok, fine :)
 
> One issue I notice is the use of realpath(1) in the scripts. This is  
> a problem, as it is not universally available; it's not present on  
> Mac OS X, for example. Are there any good alternative approaches?

I'm not aware of a real one-command equivalent, outside of Mac of
course... (realpath(1) is just a ~25 lines implementation of
realpath(3), which is itself present on Mac OS X, right?). Anyway,
'cd -P' should work, i.e. something like

  #!/bin/sh
  real_path()
  {
          current_path=`pwd` && relative_path=$1
  
          cd -P ${relative_path}   # resolving symlinks and './..'s
  
          real_path=`pwd` && cd ${current_path}
          echo ${real_path}
  }

should return the absolute path.

However, this paths-related addition is there for the following reason.
For example, on my installation /usr/local/texlive is a symlink to
texlive-dev (with couple of other possible alternatives), so that

  nikola at nyx% which tex
  /usr/local/texlive/2007/bin/i386-freebsd/tex
  nikola at nyx% kpsewhich hyphen.tex
  /usr/local/texlive-dev/2007/texmf/tex/generic/hyphen/hyphen.tex

I'd like the installation process to honour symlinks since I wouldn't
like hardcoding of the path I temporarily use (passed to 'configure' by
kpsewhich).

Actually, what would you do in this (imaginable) situation? Here are
some questions I included in the diff, could you please clarify these
things:

(1) Does XeTeX hardcode TeX system elements paths provided/determined
    during installation process? I'd say that it doesn't do so because
    it works normally if I change the object of texlive symlink -- but
    it's better to ask.

(2) Does texhash's behaviour differ depending on whether the path it
    uses respects symlinks?

(3) Most importantly, can kpsewhich honour symlinks?

If XeTeX doesn't hardcode TeX paths and relies on kpsewhich everywhere,
then maybe this whole thing is not needed.

Nikola Lečić


More information about the XeTeX mailing list