[tex-live] asy & texmf v texmf-local

Will Robertson wspr81 at gmail.com
Fri Aug 27 15:56:39 CEST 2010


On 27/08/2010, at 10:56 PM, John Bowman wrote:

> If instead you let configure install asy to /usr/local/bin
> and you put /usr/local/bin in $PATH before /usr/local/texlive/2010/bin,
> then you should also do the same with asymptote.sty, putting
> 
> /usr/local/texlive/2010/../texmf-local/tex/latex
> before
> /usr/local/texlive/2010/texmf/tex/latex
> 
> in $TEXINPUTS. This allows you to select between two different versions of
> asy and its corresponding style file on the same system, as long as you keep
> $PATH and $TEXINPUTS in sync.
> 
> Does this seem reasonable?

Not to the TL team, I think. I'd prefer not to touch texmf.cnf if at all possible.

I have to admit to not telling the whole story here. I'm trying to put together a script to compile Asymptote that takes care of its dependencies on Mac OS X, using the Homebrew packaging system. (http://mxcl.github.com/homebrew/ for those who care to look.)

I'm fine with just adding a caveat to the install script saying "remove the TL version of asymptote.sty before continuing", but any solution I use must be generic.

However, I don't even know if this project will accept this script ("formula" in their parlance) since it requires a TeX distribution to compile the source. So before taking any drastic action I think we should wait and see what they say.

FWIW, the script is attached if you'd like to take a look. I suspect it's only of interest to Mac users.

-- Will



require 'formula'

class Asymptote <Formula
  url 'http://downloads.sourceforge.net/asymptote/asymptote-2.04.src.tgz'
  homepage 'http://asymptote.sourceforge.net/'
  md5 '6adb5d7714b662152b6f6f16c24f5751'

  depends_on 'readline'
  depends_on 'bdw-gc'

  def install
    texbin = `which latex`
    if texbin==''
      ohai 'Asymptote requires a TeX/LaTeX installation; aborting now.'
      ohai 'You can obtain the TeX distribution for Mac OS X from'
      ohai '     http://www.tug.org/mactex/'
      system "false"
    end
    
    system "./configure",
      "--prefix=#{prefix}",
      "--enable-gc=#{HOMEBREW_PREFIX}",
      "--disable-fftw", "--disable-gsl" # follow TeX Live
    
    system "make install"

  end

  def caveats
    caveats = <<-EOS
1) If you are installing Asymptote on top of a TeX Live system (e.g., and most
   commonly, with MacTeX 2009 or 2010), you will need to move or remove the
   standard asymptote.sty package. For example,
   
       rm /usr/local/texlive/2010/texmf-dist/tex/latex/asymptote/asymptote.sty

   If you do not do this, the new version of asymptote.sty installed with this
   new version of Asymptote will not be used in your LaTeX documents. Errors
   will probably result as a consequence of this.

2) Because brew installs asymptote without super-user privileges, the command
   `texhash` to update the TeX filename database has not been run. If this is
   your first time installing asymptote from source, you will (probably) not
   be able to use the `asymptote` package in LaTeX without first running

       sudo texhash

3) If you wish to use xasy, run the following command to install the Python
   Imaging Library (PIL):
   
       easy_install http://effbot.org/downloads/Imaging-1.1.7.tar.gz

    EOS
  end

end





More information about the tex-live mailing list