[OS X TeX] Problem with tetex/gwtex and fink

Peter Dyballa Peter_Dyballa at Web.DE
Wed Oct 3 15:08:52 EDT 2007


Am 03.10.2007 um 20:08 schrieb Holger Schulz:

> it seems I'm lost. Is there a chance to use a gwTeX with fink? How?

	sudo mkdir -p  /sw/fink/dists/local/main/finkinfo
	sudo pico /sw/fink/dists/local/main/finkinfo/system-tetex-info

Then insert the following contents into the file opened in pico (you  
can use another text editor, and only a plain text editor):

############  Begin Here Below  ############
Package: system-tetex
Version: 20071003
Revision: 2
Depends: base-files (>= 1.8.0-1)
Provides: tetex-texmf, tetex-base, pdftex, hyperref, tetex-macosx,  
oberdiek, context, jadetex
Conflicts: tetex-texmf, tetex-base, pdftex, hyperref, tetex-macosx,  
oberdiek, context, dvipdfm (<= 0.13.2c-3)
Type: nosource
Maintainer:  Dave Morrison <drm at finkproject.org>
Description: Placeholder package for manually installed teTeX, gwTeX,  
or TeX Live
DescDetail: <<
  Install this package if you have installed teTeX or TeX Live  
separately
  from Fink, for example, by using Gerben Wierda's distribution (see
  http://www.rna.nl/tex.html) or the MacTeX install package, which is
  based on it (see http://www.tug.org/~koch/).  The package checks to  
see
  if you have a valid installation of a system TeX in /usr/local/gwTeX.

  This package insists on a complete installation of TeX: in order to  
ensure
  that from Wierda's distribution, you may need to use the expert  
mode in
  i-Installer and install "TeX Programs (developer extras)" in  
addition to
  the standard install.

  Because of the complicated interaction between Wierda's  
distribution and
  fink, if you need to update this package or to switch between  
system-tetex
  and the fink teTeX packages tetex-texmf and tetex-base, you must  
first remove
  all packages which depend on tetex-base, such as latex2html. You
  can reinstall them after the update.
<<
DescPackaging: <<
  We put /usr/local/gwTeX/bin/... at the end of the user's path to  
ensure that
  fink's install-info is used rather than the install-info found in  
teTeX.
  Starting in rev. 9, we also add /usr/local/teTeX/man to the MANPATH  
(which
  is set in init.(c)sh prior to loading the system-tetex profile  
script).
<<
CompileScript: <<
  echo "This public domain package creates links from a teTeX  
installation in" > README
  echo "/usr/local/gwTeX to appropriate locations in the fink tree."  
 >> README
<<
InstallScript: <<
  mkdir -p %i/share
  mkdir -p %i/etc
  ln -s /usr/local/gwTeX/texmf         %i/share/texmf
  ln -s /usr/local/gwTeX/texmf.gwtex   %i/share/texmf.gwtex
  ln -s /usr/local/gwTeX/texmf.pkgs    %i/share/texmf.pkgs
  ln -s /usr/local/gwTeX/texmf.texlive %i/share/texmf.texlive
  ln -s /usr/local/gwTeX/texmf.local   %i/etc/texmf.local
  ln -s %p/etc/texmf.local             %i/share/texmf.local
  mkdir -p %i/bin
  mkdir -p %i/lib
  mkdir -p %i/include
  ln -s /usr/local/gwTeX/texmf.cnf	  %i
  ln -s /usr/local/gwTeX/include/kpathsea  %i/include/kpathsea
  ln -s /usr/local/gwTeX/lib/libkpathsea.a %i/lib/libkpathsea.a
  ln -s /usr/local/gwTeX/bin/`uname -p`-apple-darwin-current/mktexlsr  
%i/bin/mktexlsr
  mkdir -p %i/etc/profile.d
  echo "append_path PATH /usr/local/gwTeX/bin/`uname -p`-apple-darwin- 
current " > %i/etc/profile.d/%n.csh
  echo "append_path MANPATH /usr/local/gwTeX/man" >> %i/etc/profile.d/ 
%n.csh
  echo "append_path PATH /usr/local/gwTeX/bin/`uname -p`-apple-darwin- 
current" > %i/etc/profile.d/%n.sh
  echo "export PATH" >> %i/etc/profile.d/%n.sh
  echo "append_path MANPATH /usr/local/gwTeX/man" >> %i/etc/profile.d/ 
%n.sh
  echo "export MANPATH" >> %i/etc/profile.d/%n.sh
  chmod 755 %i/etc/profile.d/%n.*
<<
DocFiles: README
License: Public Domain
PreInstScript: <<

  echo

# check for system TeX installation.
  if [ -d /usr/local/gwTeX ]; then
    echo "It looks like you may have gwTeX installed .. will check  
for some files .."
    echo
  fi

# check for some needed files
  missing=
  mcount=0
  for file in lib/libkpathsea.a include/kpathsea/tex-file.h \
       texmf/web2c/texmf.cnf; do
    if [ ! -f "/usr/local/gwTeX/$file" ]; then
      missing="$missing /usr/local/gwTeX/$file"
      mcount=$(($mcount+1))
    fi
  done
  if [ $mcount -ge 1 ]; then
    echo
    echo " *** ERROR *** "
    echo
    echo "You don't a valid gwTeX installation; you are missing the  
file(s)"
    echo "$missing"
    echo
    echo "If you are using Gerben Wierda's distribution, you might be  
able"
    echo "to solve this problem by using the expert mode in i- 
Installer,"
    echo "and installing 'TeX Programs (developer extras)'."
    echo
    echo "Otherwise, install the tetex-texmf and tetex-base packages"
    echo "instead, or install gwTeX manually from"
    echo "http://www.uoregon.edu/~koch/texshop/texshop.html"
    echo "and then retry installing the system-tetex package."
    echo
    exit 1
  fi

  echo "Valid gwTeX installation detected."
  echo

  if [ $1 != "upgrade" ]; then

# check for conflicting files/directories on the system
  if [ -d %p/share/texmf ]; then
    echo "Sorry, you must remove the directory %p/share/texmf before  
installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the files %p/lib/libkpathsea.a, % 
p/bin/mktexlsr,"
    echo " %p/texmf.cnf and the directories %p/include/kpathsea, %p/ 
etc/texmf.local,"
    echo " and %p/share/texmf.gwtex before installing system-tetex."
    echo
    exit 1
  fi

  if [ -d %p/share/texmf.gwtex ]; then
    echo "Sorry, you must remove the directory %p/share/texmf.gwtex  
before installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the files %p/lib/libkpathsea.a, % 
p/bin/mktexlsr,"
    echo " %p/texmf.cnf and the directories %p/include/kpathsea and % 
p/etc/texmf.local"
    echo " before installing system-tetex."
    echo
    exit 1
  fi

  if [ -d %p/etc/texmf.local ]; then
    echo "Sorry, you must remove the directory %p/etc/texmf.local  
before installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the files %p/lib/libkpathsea.a, % 
p/bin/mktexlsr,"
    echo " %p/texmf.cnf and the directory %p/include/kpathsea before  
installing system-tetex."
    echo
    exit 1
  fi

  if [ -d %p/include/kpathsea ]; then
    echo "Sorry, you must remove the directory %p/include/kpathsea  
before installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the files %p/lib/libkpathsea.a, % 
p/texmf.cnf, and"
    echo " %p/bin/mktexlsr before installing system-tetex."
    echo
    exit 1
  fi

  if [ -f %p/bin/mktexlsr ]; then
    echo "Sorry, you must remove the file %p/bin/mktexlsr before  
installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the files %p/texmf.cnf and %p/bin/ 
mktexlsr before"
    echo " installing system-tetex."
    echo
    exit 1
  fi

  if [ -f %p/lib/libkpathsea.a ]; then
    echo "Sorry, you must remove the file %p/lib/libkpathsea.a before  
installing"
    echo "system-tetex."
    echo
    echo "Make sure you also remove the file %p/texmf.cnf before  
installing system-tetex."
    echo
    exit 1
  fi

  if [ -f %p/texmf.cnf ]; then
    echo "Sorry, you must remove the file %p/texmf.cnf before  
installing system-tetex."
    echo
    exit 1
  fi

  fi

echo "WARNING: If you are upgrading system-tetex, you may need to  
remove other"
echo "TeX-related packages.  After the upgrade, you can reinstall  
those packages."
echo "Affected packages include: foiltex, ifmslide, latex2html,  
lilypond,"
echo "lyx, pdfscreen, pdfslide, ppower4, tex4ht, texpower."
echo

<<
PostInstScript: <<
  if [ -f /usr/bin/ranlib ]; then
  /usr/bin/ranlib /usr/local/gwTeX/lib/libkpathsea.a
  exit 0
  fi

echo
echo "WARNING: /usr/bin/ranlib was not found.  If you are only  
planning to use"
echo "Fink's binary distribution, this is not a problem; otherwise, you"
echo "should obtain and install the Mac OS X Developer Tools and then  
re-install"
echo "system-tetex."
echo
<<
############  End Here Above  ############

Don't include the ### lines! Save and quit pico (or whatever plain  
text editor you were using).

	sudo fink install system-tetex

I just did the last, after cleaning a bit my file system, and the  
system-tetex package was created successfully. The file is an  
improved version: it does not use "powerpc" but `uname -p`, so it is  
hardware independent.


Since I do not use that nonsense of /usr/texbin etc. I can't create a  
system-tetex.info for a package that switches from gwTeX to TeX Live  
2007 whenever the user switches the TeX distribution.

--
Mit friedvollen Grüßen

   Pete

      _o    o         o   o
    _<<     \\_/\_,   \\_ \\_/\_,
   (*)/(*) (*)   (*) (*) `-    (*)



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list