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

Peter Dyballa Peter_Dyballa at Web.DE
Wed Oct 3 19:45:36 CEST 2007


Am 03.10.2007 um 17:49 schrieb Bruno Voisin:

> Le 3 oct. 07 à 17:28, Peter Dyballa a écrit :
>
>> Am 03.10.2007 um 17:09 schrieb Bruno Voisin:
>>
>>> It seems Fink's TeX has the same problem as MacPorts (formerly  
>>> DarwinPorts)
>>
>> This is *not* true for Fink.
>
> Can you elaborate?


I have to confess: I have created a *local* system-tetex.info file  
in /sw/fink/dists/local/main/finkinfo:


Package: system-tetex
Version: 20061216
Revision: 1
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/teTeX/texmf         %i/share/texmf
  ln -s /usr/local/teTeX/texmf.gwtex   %i/share/texmf.gwtex
  ln -s /usr/local/teTeX/texmf.pkgs    %i/share/texmf.pkgs
  ln -s /usr/local/teTeX/texmf.texlive %i/share/texmf.texlive
  ln -s /usr/local/teTeX/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/powerpc-apple-darwin-current/mktexlsr %i/ 
bin/mktexlsr
  mkdir -p %i/etc/profile.d
  echo "append_path PATH /usr/local/gwTeX/bin/powerpc-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/powerpc-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.macosx before installing system-tetex."
    echo
    exit 1
  fi

  if [ -d %p/share/texmf.macosx ]; then
    echo "Sorry, you must remove the directory %p/share/texmf.macosx  
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
<<


I did not pay much intention, I just made a few changes to make the  
package work. With other changes it also would work with TeX Live –  
although one would need every year a new version or make the year's  
number be the output of `date +%Y` ...


To create own local packages from a Fink one (to get rid of  
dependencies from Tcl/Tk, Ruby, Python, GTK, and a lot more, it's at  
least needed to increment the Revision from <number> to <number>l,  
for local, or whatever, for example the first name's first character,  
or to set the Version date to be that of the day the Fink .info file  
was created; with a new version from Fink the local version will be  
"overridden" and a new adaptation will be needed.)

--
Greetings

   Pete

Eat the rich – the poor are tough and stringy.


------------------------- 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 macostex-archives mailing list