the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: tetex%type_pkg[-nox]
Type: -nox (boolean)
Version: 3.0
Revision: 1006
GCC: 4.0
Distribution: 10.5, 10.6
Description: Complete distribution of TeX typesetting
Depends: %N-base (= %v-%r), texinfo, debianutils, texi2html
BuildDepends: <<
libkpathsea4 (>= 3.5.6-1), t1lib5-nox, libpng3 (>= 1:1.2.8-1), libwww, libncurses5 (>= 5.4-20041023-1006), fink (>= 0.24.12),
libjpeg, libiconv-dev,
(%type_raw[-nox] = .) t1lib5-x11,
(%type_raw[-nox] = .) gd2 (>= 2.0.35-2),
(%type_raw[-nox] = .) expat1,
(%type_raw[-nox] = .) fontconfig2-dev,
(%type_raw[-nox] = .) freetype219,
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) openmotif3
<<
Conflicts: <<
system-tetex, tetex, tetex-nox, ptex, ptex-nox,
(%type_raw[-nox] = -nox) tetex-base (<= 2.0.2-24),
(%type_raw[-nox] = -nox) ptex-base (<= 3.1.3-7)
<<
Replaces: <<
tetex, tetex-nox, ptex, ptex-nox,
(%type_raw[-nox] = -nox) tetex-base (<= 2.0.2-24),
(%type_raw[-nox] = -nox) ptex-base (<= 3.1.3-7)
<<
Provides: bundle-tetex
Recommends: detex, ifmslide, latex2html, pdfscreen, pdfslide, ppower4, tex4ht, texpower
Suggests: foiltex
Source: ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/%v/distrib/tetex-src-%v.tar.gz
Source-MD5: 944a4641e79e61043fdaf8f38ecbb4b3
Source2: http://hnd.jp.asi.finkmirrors.net/pkgdists/kpathsea-3.5.6-tetex-%v.patch.gz
Source2-MD5: 8c855399616a49e26e411e6ed5db5092
Source3: http://hnd.jp.asi.finkmirrors.net/pkgdists/tetex-%v-security-200709.tar.bz2
Source3-MD5: 461b069855d8c2852c647ebe44f7e1af
Tar3FilesRename: tetex-3.0-security-200709:tetex-3.0-security
PatchFile: tetex.patch
PatchFile-MD5: b5bc9d386f66b9542970d63adcf8270d
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | sed 's|@PACKAGE@|%n-%v-%r|g' | patch -p1
perl -pi -e "s|hardcode_direct=yes|hardcode_direct=no|" texk/configure texk/kpathsea/configure utils/texinfo/configure
perl -pi -e 's,-flat_namespace -undefined suppress,-twolevel_namespace -undefined error,g' texk/configure texk/kpathsea/configure utils/texinfo/configure
perl -pi -e 's,\*\.obj\),*.obj | *.dSYM),' texk/configure texk/kpathsea/configure utils/texinfo/configure
gzip -dc ../kpathsea-3.5.6-tetex-3.0.patch.gz | patch -p1
# Fix dvipdfm buffer overflow (imported from tetex-3.0-20.FC5)
patch -p1 < ../tetex-3.0-security/tetex-3.0-dvipdfm.patch
# Don't use tmpnam() in dvipdfm. (impoted from tetex-3.0-4.FC4)
patch -p1 < ../tetex-3.0-security/tetex-2.0.2-dvipdfm-security.patch
# Fix xpdf overflows CVE-2005-3193 (impoted from tetex-3.0-20.fc5)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2005-3193.patch
# Fix xpdf integer overflow CVE-2007-3387 (imported from tetex-3.0-40.1.fc7)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2007-3387.patch
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0104
patch -d libs -p1 < ../tetex-3.0-security/post-3.5.5-kdegraphics-CVE-2007-0104.diff
# Don't use PID for temporary file names in scripts. (impoted from FC4)
patch -p1 < ../tetex-3.0-security/tetex-3.0-badscript.patch
# Fix overflows in makeindex CVE-2007-0650 (impoted from tetex-3.0-34.fc6)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2007-0650.patch
<<
NoSetMAKEFLAGS: true
SetMAKEFLAGS: -j1
ConfigureParams: <<
--without-texi2html --without-texinfo --enable-shared \
--datadir='${prefix}/share' --infodir='${prefix}/share/info' \
--mandir='${prefix}/share/man' --disable-multiplatform --with-system-ncurses \
--with-system-pnglib --with-system-t1lib --with-system-wwwlib \
--with-system-zlib \
(%type_raw[-nox] = .) --with-system-gd
(%type_raw[-nox] = .) --x-includes=/usr/X11R6/include
(%type_raw[-nox] = .) --x-libraries=/usr/X11R6/lib
(%type_raw[-nox] = -nox) --without-x
<<
InstallScript: <<
#!/bin/bash -ev
make install prefix=%i texmf=%i/share/texmf
echo "Removing files that belong to the libkpathsea4 package..."
rm -R %i/include
rm -R %i/lib
rm %i/share/info/kpathsea.info
echo "Setting up symlinks ..."
export DYLD_LIBRARY_PATH="%b/texk/kpathsea/SHARED" PATH=%i/bin:$PATH TEXMFMAIN=%p/share/texmf-dist ; texlinks --cnffile %i/share/texmf/web2c/fmtutil.cnf --verbose %i/bin
echo "Creating a local texmf tree, and symlinking it into place ..."
mkdir -p %i/etc/texmf.local
%i/bin/mktexlsr %i/etc/texmf.local
mkdir -p %i/share
ln -s %p/etc/texmf.local %i/share/texmf-local
echo "Creating a VARTEXMF tree, including a fonts directory ..."
mkdir -p %i/var/lib/texmf/fonts
%i/bin/mktexlsr %i/var/lib/texmf
echo "Creating a TEXMFCONFIG tree ..."
mkdir -p %i/etc/texmf-config
%i/bin/mktexlsr %i/etc/texmf-config
echo "Removing the ls-R file, which is supplied in the tetex-texmf package ..."
rm -f %i/share/texmf-dist/ls-R
echo "Removing readlink, which is supplied in the debianutils package ..."
rm -f %i/bin/readlink
rm -f %i/share/man/man1/readlink.1
if [ "%type_raw[-nox]" == "." ]; then
echo "Preparing xdvi for the alternatives system ..."
mv %i/bin/xdvi %i/bin/xdvik
mv %i/share/man/man1/xdvi.1 %i/share/man/man1/xdvik.1
mv %i/bin/xdvizilla %i/bin/xdvizillak
mv %i/share/man/man1/xdvizilla.1 %i/share/man/man1/xdvizillak.1
fi
<<
DocFiles: LICENSE.src README README.fink
SplitOff: <<
Package: %N-base
Description: Base programs for a teTeX installation
Depends: <<
t1lib5-nox-shlibs, libpng3-shlibs (>= 1:1.2.8-1),
libwww-bin, libncurses5-shlibs (>= 5.4-20041023-1006), ncurses (>= 5.4-20041023-1006),
fink (>= 0.12.0-1), libkpathsea4-shlibs (>= 3.5.6-1), tetex-texmf (>= 3.0-1),
(%type_raw[-nox] = .) t1lib5-x11-shlibs,
(%type_raw[-nox] = -nox) ghostscript-nox,
(%type_raw[-nox] = .) ghostscript,
(%type_raw[-nox] = .) gd2-shlibs (>= 2.0.35-2),
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) x11-shlibs,
(%type_raw[-nox] = .) openmotif3-shlibs
<<
Conflicts: tetex-nox (<= 2.0.2-24), tetex-base (>= 0), tetex-nox-base, ptex-base, ptex-nox-base
Replaces: <<
tetex-base (>= 0), tetex-nox-base, ptex-base, ptex-nox-base,
context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex (<= 2.0-3),
(%type_raw[-nox] = .) xdvi (<= 22.70-1),
<<
Provides: context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex-base, tetex3-base
Files: bin etc share/info share/man share/texmf share/texmf-local var
InfoDocs: web2c.info dvips.info latex.info
DocFiles: ANNOUNCE-3.0 CREDITS INSTALL INSTALL.generic LICENSE.src NEWS PROBLEMS QuickInstall README README.fink teTeX-vs-TeXLive
PreInstScript: <<
echo "Removing any leftover files from obsolete teTeX installations ..."
rm -f %p/etc/texmf.local/web2c/*
rm -f %p/etc/ls-R/texmf.macosx
rm -Rf %p/share/texmf.macosx
rm -Rf %p/etc/texmf-var
<<
PostInstScript: <<
if [ ! -e %p/share/texmf-dist/tex/context ] ; then
echo " "
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ UPGRADE PROBLEM: We apologize for the inconvenience, but please reinstall +"
echo "+ tetex-texmf and then update or install tetex or tetex-base again. +"
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " "
exit 1
fi
if [ -e %p/bin/xdvik ] ; then
update-alternatives --install %p/bin/xdvi xdvi %p/bin/xdvik 30 --slave %p/share/man/man1/xdvi.1 xdvi.1 %p/share/man/man1/xdvik.1
update-alternatives --install %p/bin/xdvizilla xdvizilla %p/bin/xdvizillak 30 --slave %p/share/man/man1/xdvizilla.1 xdvizilla.1 %p/share/man/man1/xdvizillak.1
fi
mktexlsr %p/share/texmf
texconfig-sys init
mktexlsr %p/etc/texmf-config %p/var/lib/texmf
echo "Adjusting permissions ..."
chmod -R a+rX %p/etc/texmf.local
chmod -R a+rwX %p/var/lib/texmf
chmod -R a+rwX %p/etc/texmf-config
if [ -f ~/Library/texmf/ls-R ]; then chmod a+rw ~/Library/texmf/ls-R; fi
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
if [ -e %p/bin/xdvik ]; then
update-alternatives --remove xdvi %p/bin/xdvik
update-alternatives --remove xdvizilla %p/bin/xdvizillak
fi
fi
<<
<<
License: OSI-Approved
DescDetail: <<
TeX takes a text file and a set of formatting commands as input and
creates a typesetter independent .dvi (DeVice Independent) file as output.
TeTeX includes higher level formatting packages such as LaTeX, since
TeX by itself is not very user-friendly.
<<
DescPort: <<
The Makefile is patched to prevent the mktexlsr, fmtutil, updmap, and texlinks
utilities from running during the install phase (although texlinks is run
after "make install"). The mktexlsr, fmtutil, and updmap utilities are run in
the PostInstall script (the latter two called by texconfig-sys).
User files are stored in $HOME/Library/texmf (not $HOME/texmf) for
backwards-compatibility with earlier Fink teTeX installations.
We also set up a VARTEXMF directory for storing format and font files,
and a TEXMFCONFIG directory for storing configuration files. These latter
can be modified by running "sudo texconfig-sys".
We use update-alternatives for xdvi to allow users to install a different
version if they choose.
We patch libkpathsea's configure script to prevent it linking against an
old copy of the library as it builds.
<<
DescPackaging: <<
Other TeX related packages should use %p/etc/texmf.local/ as their texmf
tree for storing files, rather than %p/share/texmf/. In this way, the
original texmf tree will be preserved. Any such package should list
tetex-base as a dependency, and take care to run
mktexlsr %p/etc/texmf.local
in both PostInstScript and PostRmScript.
There is a variant tetex-nox package with X11 disabled.
texinfo and texi2html are separate packages.
readlink and its manpage are removed since they conflict with debianutils,
an essential Fink package.
Many thanks to the original teTeX maintainer Jeff Whitaker.
<<
Maintainer: Dave Morrison
Homepage: http://www.tug.org/teTeX
<<
diff -ruN tetex-src-3.0/Makefile.in tetex-src-3.0-patched/Makefile.in
--- tetex-src-3.0/Makefile.in Sat Jan 29 18:12:25 2005
+++ tetex-src-3.0-patched/Makefile.in Sun Feb 6 19:47:12 2005
@@ -63,25 +63,6 @@
test -f texk/web2c/omegafonts/omfonts && \
cd texk/web2c/omegafonts; $(MAKE) install-links
$(srcdir)/selfautofix "$(bindir)" "$(texmf)/web2c"
- - if test -f $(scriptdir)/mktexlsr; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/mktexlsr; \
- else :; fi
- - if test -f $(scriptdir)/fmtutil-sys; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/fmtutil-sys --all; \
- else :; fi
- - if test -f $(scriptdir)/texlinks; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/texlinks; \
- else :; fi
- - if test -f $(scriptdir)/updmap-sys \
- && TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/kpsewhich --format='web2c files' updmap.cfg >/dev/null; \
- then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/updmap-sys; \
- else :; fi
install-exec:
for dir in $(INSTDIRS); do \
diff -ruN tetex-src-3.0/README.fink tetex-src-3.0-patched/README.fink
--- tetex-src-3.0/README.fink Wed Dec 31 19:00:00 1969
+++ tetex-src-3.0-patched/README.fink Sun Feb 6 20:02:55 2005
@@ -0,0 +1,82 @@
+ README for Fink package: tetex-3.0-1
+
+The Fink package for teTeX 3.0 follows Thomas Esser's distribution quite
+closely. This file provides some advice for users, and documents the
+differences between the Fink package and the upstream version.
+
+MISSING ITEMS
+
+The following things are removed from the teTeX package because they are
+supplied elsewhere in the Fink system: texinfo (supplied in Fink's texinfo
+package), texi2html (supplied in Fink's texi2html package), and readlink
+(supplied in Fink's debianutils package).
+
+TETEX PACKAGES IN FINK
+
+As of teTeX 3.0, a Fink user will find the following teTeX packages
+available to be installed on the system:
+ tetex-texmf, tetex-base, tetex-nox, tetex-nox-base, tetex.
+
+The "tetex" package replaces the (by now ancient) "bundle-tetex" package,
+and installs everything that is needed. The "tetex-nox" package is an
+alternative to this which does not depend on the X11 libraries. (Note
+that in a change from teTeX 2.x, Users of this package no longer need to
+separately install the "texinfo" and "debianutils" packages.)
+
+The "tetex-texmf", "tetex-base", and "tetex-nox-base" packages are various
+components of the teTeX system, and will be installed when needed.
+
+The shared library used by teTeX now resides in a package called
+"libkpathsea4-shlibs", with the corresponding development files residing in
+"libkpathsea4-dev".
+
+CONFIGURING TETEX
+
+Users can adjust the configuration of their copy of teTeX by running
+"sudo texconfig-sys" (for system-wide configuration) or "texconfig" (for
+individual configuration). The configuration files are stored in the
+directories @PREFIX@/etc/texmf-config and @PREFIX@/var/lib/texmf .
+
+INSTALLING MORE TEX STYLE FILES, ETC.
+
+Users can install any private TeX style files, or TeX macro packages which
+they haven't installed via Fink or don't wish to share with other users of
+their computer, in the directory
+ ~/Library/texmf
+(i.e., a folder named texmf within the Library folder in the user's Home).
+Each user would need to create the corresponding directory if they wished
+to put things into it.
+
+If the user's ~/Library/texmf directory contains many files, it can be
+indexed with "mktexlsr ~/Library/texmf", which will speed up searching.
+Once this has been done, it must be done again any time something new is
+added to the directory (or else the file ~/Library/texmf/ls-R can be
+removed instead, to turn off the indexing of this directory).
+
+USING THE "ORIGINAL" XDVI
+
+Although teTeX comes with a version of xdvi installed (often called xdvik),
+some users may prefer to use the "original" xdvi program maintained by Paul
+Vojta. This can be accomplished by installing Fink's xdvi package along
+side of tetex-base. When this has been done, Vojta's package is invoked by
+the command "xdvi", whereas the teTeX-supplied package is invoked by the
+command "xdvik".
+
+TECHNICAL NOTE: SHARED LIBRARIES
+
+Fink's tetex packages continue to be built using shared libraries. This
+is now a standard feature of teTeX on Mac OS X, and no longer requires
+a Fink-specific patch.
+
+TECHNICAL NOTE: PATCHES
+
+The Makefile is patched so as to prevent execution of the final configuration
+step (which in the Fink system is handled in a PostInstall script), and
+texmf.in is patched to implement the choices of directories and provide
+support for Paul Vojta's xdvi. Finally, this README.fink file is supplied
+via a patch.
+
+
+ Dave Morrison
+
+ 8 February 2005
diff -ruN tetex-src-3.0/texk/kpathsea/texmf.in-teTeX tetex-src-3.0-patched/texk/kpathsea/texmf.in-teTeX
--- tetex-src-3.0/texk/kpathsea/texmf.in-teTeX Sat Feb 5 19:04:35 2005
+++ tetex-src-3.0-patched/texk/kpathsea/texmf.in-teTeX Sun Feb 6 19:56:26 2005
@@ -72,7 +72,7 @@
% TEXMFSYSVAR = $TEXMFMAIN
% For using a separate tree:
% TEXMFSYSVAR = @texmf@-var
-TEXMFSYSVAR = @texmf@-var
+TEXMFSYSVAR = @PREFIX@/var/lib/texmf
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.
% With teTeX-3.0 or later, this must be set.
@@ -80,11 +80,11 @@
% TEXMFSYSCONFIG = $TEXMFMAIN
% For using a separate tree:
% TEXMFSYSCONFIG = @texmf@-config
-TEXMFSYSCONFIG = @texmf@-config
+TEXMFSYSCONFIG = @PREFIX@/etc/texmf-config
% User texmf trees can be catered for like this...
% This used to be HOMETEXMF.
-TEXMFHOME = $HOME/texmf
+TEXMFHOME = $HOME/Library/texmf
% TEXMFVAR, where texconfig stores variable runtime data.
% With teTeX-3.0 or later, this must be set.
@@ -102,7 +102,7 @@
% TEXMFCONFIG = $HOME/.texmf-config
% For using a separate tree:
% TEXMFCONFIG = @texmf@-config
-TEXMFCONFIG = $HOME/.texmf-config
+TEXMFCONFIG = $HOME/.texmf-config
% Now, list all the texmf trees. If you have multiple trees you can
% use shell brace notation, like this:
@@ -119,14 +119,14 @@
% Where generated fonts may be written. This tree is used when the sources
% were found in a system tree and either that tree wasn't writable, or the
% varfonts feature was enabled in MT_FEATURES in mktex.cnf.
-VARTEXFONTS = @vartexfonts@
+VARTEXFONTS = $TEXMFSYSVAR/fonts
% Where to look for ls-R files. There need not be an ls-R in the
% directories in this path, but if there is one, Kpathsea will use it.
%
% Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below
% one of the TEXMF directories (avoids overlapping ls-R files).
-TEXMFDBS = $TEXMF;$VARTEXFONTS
+TEXMFDBS = $TEXMF
% It may be convenient to define TEXMF like this:
% TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN,$HOME}
@@ -147,6 +147,11 @@
% VARTEXFONTS = $TEXMFVAR/fonts
% and do not mention it in TEXMFDBS (but _do_ mention TEXMFVAR).
+% Additional lines for use by xdvi:
+PKFONTS.XDvi = .:$TEXMF/%s:$VARTEXFONTS/pk/{%m,modeless}//
+VFFONTS.XDvi = .:$TEXMF/%s
+PSHEADERS.XDvi = .:$TEXMF/%q{dvips,fonts/type1}//
+TEXPICTS.XDvi = .:$TEXMF/%q{dvips,tex}//
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usually you will not need to edit any of the other variables in part 1. %
Info2: <<
Package: tetex%type_pkg[-nox]
Type: -nox (boolean)
Version: 3.0
Revision: 1006
Distribution: 10.5, 10.6
GCC: 4.0
Description: Complete distribution of TeX typesetting
Depends: %N-base (= %v-%r), texinfo, debianutils, texi2html
BuildDepends: <<
libkpathsea4 (>= 3.5.6-1), t1lib5-nox, libpng3 (>= 1:1.2.8-1), libwww, libncurses5 (>= 5.4-20041023-1006), fink (>= 0.24.12),
libjpeg, libiconv-dev,
(%type_raw[-nox] = .) t1lib5-x11,
(%type_raw[-nox] = .) gd2 (>= 2.0.35-2),
(%type_raw[-nox] = .) expat1,
(%type_raw[-nox] = .) fontconfig2-dev,
(%type_raw[-nox] = .) freetype219,
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) openmotif3
<<
Conflicts: <<
system-tetex, tetex, tetex-nox, ptex, ptex-nox,
(%type_raw[-nox] = -nox) tetex-base (<= 2.0.2-24),
(%type_raw[-nox] = -nox) ptex-base (<= 3.1.3-7)
<<
Replaces: <<
tetex, tetex-nox, ptex, ptex-nox,
(%type_raw[-nox] = -nox) tetex-base (<= 2.0.2-24),
(%type_raw[-nox] = -nox) ptex-base (<= 3.1.3-7)
<<
Provides: bundle-tetex
Recommends: detex, ifmslide, latex2html, pdfscreen, pdfslide, ppower4, tex4ht, texpower
Suggests: foiltex
Source: ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/%v/distrib/tetex-src-%v.tar.gz
Source-MD5: 944a4641e79e61043fdaf8f38ecbb4b3
Source2: http://hnd.jp.asi.finkmirrors.net/pkgdists/kpathsea-3.5.6-tetex-%v.patch.gz
Source2-MD5: 8c855399616a49e26e411e6ed5db5092
Source3: http://hnd.jp.asi.finkmirrors.net/pkgdists/tetex-%v-security-200709.tar.bz2
Source3-MD5: 461b069855d8c2852c647ebe44f7e1af
Tar3FilesRename: tetex-3.0-security-200709:tetex-3.0-security
PatchFile: tetex.patch
PatchFile-MD5: b5bc9d386f66b9542970d63adcf8270d
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | sed 's|@PACKAGE@|%n-%v-%r|g' | patch -p1
perl -pi -e "s|hardcode_direct=yes|hardcode_direct=no|" texk/configure texk/kpathsea/configure utils/texinfo/configure
perl -pi -e 's,-flat_namespace -undefined suppress,-twolevel_namespace -undefined error,g' texk/configure texk/kpathsea/configure utils/texinfo/configure
perl -pi -e 's,\*\.obj\),*.obj | *.dSYM),' texk/configure texk/kpathsea/configure utils/texinfo/configure
gzip -dc ../kpathsea-3.5.6-tetex-3.0.patch.gz | patch -p1
# Fix dvipdfm buffer overflow (imported from tetex-3.0-20.FC5)
patch -p1 < ../tetex-3.0-security/tetex-3.0-dvipdfm.patch
# Don't use tmpnam() in dvipdfm. (impoted from tetex-3.0-4.FC4)
patch -p1 < ../tetex-3.0-security/tetex-2.0.2-dvipdfm-security.patch
# Fix xpdf overflows CVE-2005-3193 (impoted from tetex-3.0-20.fc5)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2005-3193.patch
# Fix xpdf integer overflow CVE-2007-3387 (imported from tetex-3.0-40.1.fc7)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2007-3387.patch
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0104
patch -d libs -p1 < ../tetex-3.0-security/post-3.5.5-kdegraphics-CVE-2007-0104.diff
# Don't use PID for temporary file names in scripts. (impoted from FC4)
patch -p1 < ../tetex-3.0-security/tetex-3.0-badscript.patch
# Fix overflows in makeindex CVE-2007-0650 (impoted from tetex-3.0-34.fc6)
patch -p1 < ../tetex-3.0-security/tetex-3.0-CVE-2007-0650.patch
<<
NoSetMAKEFLAGS: true
SetMAKEFLAGS: -j1
ConfigureParams: <<
--without-texi2html --without-texinfo --enable-shared \
--datadir='${prefix}/share' --infodir='${prefix}/share/info' \
--mandir='${prefix}/share/man' --disable-multiplatform --with-system-ncurses \
--with-system-pnglib --with-system-t1lib --with-system-wwwlib \
--with-system-zlib \
(%type_raw[-nox] = .) --with-system-gd
(%type_raw[-nox] = .) --x-includes=/usr/X11R6/include
(%type_raw[-nox] = .) --x-libraries=/usr/X11R6/lib
(%type_raw[-nox] = -nox) --without-x
<<
InstallScript: <<
#!/bin/bash -ev
make install prefix=%i texmf=%i/share/texmf
echo "Removing files that belong to the libkpathsea4 package..."
rm -R %i/include
rm -R %i/lib
rm %i/share/info/kpathsea.info
echo "Setting up symlinks ..."
export DYLD_LIBRARY_PATH="%b/texk/kpathsea/SHARED" PATH=%i/bin:$PATH TEXMFMAIN=%p/share/texmf-dist ; texlinks --cnffile %i/share/texmf/web2c/fmtutil.cnf --verbose %i/bin
echo "Creating a local texmf tree, and symlinking it into place ..."
mkdir -p %i/etc/texmf.local
%i/bin/mktexlsr %i/etc/texmf.local
mkdir -p %i/share
ln -s %p/etc/texmf.local %i/share/texmf-local
echo "Creating a VARTEXMF tree, including a fonts directory ..."
mkdir -p %i/var/lib/texmf/fonts
%i/bin/mktexlsr %i/var/lib/texmf
echo "Creating a TEXMFCONFIG tree ..."
mkdir -p %i/etc/texmf-config
%i/bin/mktexlsr %i/etc/texmf-config
echo "Removing the ls-R file, which is supplied in the tetex-texmf package ..."
rm -f %i/share/texmf-dist/ls-R
echo "Removing readlink, which is supplied in the debianutils package ..."
rm -f %i/bin/readlink
rm -f %i/share/man/man1/readlink.1
if [ "%type_raw[-nox]" == "." ]; then
echo "Preparing xdvi for the alternatives system ..."
mv %i/bin/xdvi %i/bin/xdvik
mv %i/share/man/man1/xdvi.1 %i/share/man/man1/xdvik.1
mv %i/bin/xdvizilla %i/bin/xdvizillak
mv %i/share/man/man1/xdvizilla.1 %i/share/man/man1/xdvizillak.1
fi
<<
DocFiles: LICENSE.src README README.fink
SplitOff: <<
Package: %N-base
Description: Base programs for a teTeX installation
Depends: <<
t1lib5-nox-shlibs, libpng3-shlibs (>= 1:1.2.8-1),
libwww-bin, libncurses5-shlibs (>= 5.4-20041023-1006), ncurses (>= 5.4-20041023-1006),
fink (>= 0.12.0-1), libkpathsea4-shlibs (>= 3.5.6-1), tetex-texmf (>= 3.0-1),
(%type_raw[-nox] = .) t1lib5-x11-shlibs,
(%type_raw[-nox] = -nox) ghostscript-nox,
(%type_raw[-nox] = .) ghostscript,
(%type_raw[-nox] = .) gd2-shlibs (>= 2.0.35-2),
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) x11-shlibs,
(%type_raw[-nox] = .) openmotif3-shlibs
<<
Conflicts: tetex-nox (<= 2.0.2-24), tetex-base (>= 0), tetex-nox-base, ptex-base, ptex-nox-base
Replaces: <<
tetex-base (>= 0), tetex-nox-base, ptex-base, ptex-nox-base,
context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex (<= 2.0-3),
(%type_raw[-nox] = .) xdvi (<= 22.70-1),
<<
Provides: context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex-base, tetex3-base
Files: bin etc share/info share/man share/texmf share/texmf-local var
InfoDocs: web2c.info dvips.info latex.info
DocFiles: ANNOUNCE-3.0 CREDITS INSTALL INSTALL.generic LICENSE.src NEWS PROBLEMS QuickInstall README README.fink teTeX-vs-TeXLive
PreInstScript: <<
echo "Removing any leftover files from obsolete teTeX installations ..."
rm -f %p/etc/texmf.local/web2c/*
rm -f %p/etc/ls-R/texmf.macosx
rm -Rf %p/share/texmf.macosx
rm -Rf %p/etc/texmf-var
<<
PostInstScript: <<
if [ ! -e %p/share/texmf-dist/tex/context ] ; then
echo " "
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ UPGRADE PROBLEM: We apologize for the inconvenience, but please reinstall +"
echo "+ tetex-texmf and then update or install tetex or tetex-base again. +"
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " "
exit 1
fi
if [ -e %p/bin/xdvik ] ; then
update-alternatives --install %p/bin/xdvi xdvi %p/bin/xdvik 30 --slave %p/share/man/man1/xdvi.1 xdvi.1 %p/share/man/man1/xdvik.1
update-alternatives --install %p/bin/xdvizilla xdvizilla %p/bin/xdvizillak 30 --slave %p/share/man/man1/xdvizilla.1 xdvizilla.1 %p/share/man/man1/xdvizillak.1
fi
mktexlsr %p/share/texmf
texconfig-sys init
mktexlsr %p/etc/texmf-config %p/var/lib/texmf
echo "Adjusting permissions ..."
chmod -R a+rX %p/etc/texmf.local
chmod -R a+rwX %p/var/lib/texmf
chmod -R a+rwX %p/etc/texmf-config
if [ -f ~/Library/texmf/ls-R ]; then chmod a+rw ~/Library/texmf/ls-R; fi
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
if [ -e %p/bin/xdvik ]; then
update-alternatives --remove xdvi %p/bin/xdvik
update-alternatives --remove xdvizilla %p/bin/xdvizillak
fi
fi
<<
<<
License: OSI-Approved
DescDetail: <<
TeX takes a text file and a set of formatting commands as input and
creates a typesetter independent .dvi (DeVice Independent) file as output.
TeTeX includes higher level formatting packages such as LaTeX, since
TeX by itself is not very user-friendly.
<<
DescPort: <<
The Makefile is patched to prevent the mktexlsr, fmtutil, updmap, and texlinks
utilities from running during the install phase (although texlinks is run
after "make install"). The mktexlsr, fmtutil, and updmap utilities are run in
the PostInstall script (the latter two called by texconfig-sys).
User files are stored in $HOME/Library/texmf (not $HOME/texmf) for
backwards-compatibility with earlier Fink teTeX installations.
We also set up a VARTEXMF directory for storing format and font files,
and a TEXMFCONFIG directory for storing configuration files. These latter
can be modified by running "sudo texconfig-sys".
We use update-alternatives for xdvi to allow users to install a different
version if they choose.
We patch libkpathsea's configure script to prevent it linking against an
old copy of the library as it builds.
<<
DescPackaging: <<
Other TeX related packages should use %p/etc/texmf.local/ as their texmf
tree for storing files, rather than %p/share/texmf/. In this way, the
original texmf tree will be preserved. Any such package should list
tetex-base as a dependency, and take care to run
mktexlsr %p/etc/texmf.local
in both PostInstScript and PostRmScript.
There is a variant tetex-nox package with X11 disabled.
texinfo and texi2html are separate packages.
readlink and its manpage are removed since they conflict with debianutils,
an essential Fink package.
Many thanks to the original teTeX maintainer Jeff Whitaker.
<<
Maintainer: Dave Morrison
Homepage: http://www.tug.org/teTeX
<<
diff -ruN tetex-src-3.0/Makefile.in tetex-src-3.0-patched/Makefile.in
--- tetex-src-3.0/Makefile.in Sat Jan 29 18:12:25 2005
+++ tetex-src-3.0-patched/Makefile.in Sun Feb 6 19:47:12 2005
@@ -63,25 +63,6 @@
test -f texk/web2c/omegafonts/omfonts && \
cd texk/web2c/omegafonts; $(MAKE) install-links
$(srcdir)/selfautofix "$(bindir)" "$(texmf)/web2c"
- - if test -f $(scriptdir)/mktexlsr; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/mktexlsr; \
- else :; fi
- - if test -f $(scriptdir)/fmtutil-sys; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/fmtutil-sys --all; \
- else :; fi
- - if test -f $(scriptdir)/texlinks; then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/texlinks; \
- else :; fi
- - if test -f $(scriptdir)/updmap-sys \
- && TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/kpsewhich --format='web2c files' updmap.cfg >/dev/null; \
- then \
- TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
- $(scriptdir)/updmap-sys; \
- else :; fi
install-exec:
for dir in $(INSTDIRS); do \
diff -ruN tetex-src-3.0/README.fink tetex-src-3.0-patched/README.fink
--- tetex-src-3.0/README.fink Wed Dec 31 19:00:00 1969
+++ tetex-src-3.0-patched/README.fink Sun Feb 6 20:02:55 2005
@@ -0,0 +1,82 @@
+ README for Fink package: tetex-3.0-1
+
+The Fink package for teTeX 3.0 follows Thomas Esser's distribution quite
+closely. This file provides some advice for users, and documents the
+differences between the Fink package and the upstream version.
+
+MISSING ITEMS
+
+The following things are removed from the teTeX package because they are
+supplied elsewhere in the Fink system: texinfo (supplied in Fink's texinfo
+package), texi2html (supplied in Fink's texi2html package), and readlink
+(supplied in Fink's debianutils package).
+
+TETEX PACKAGES IN FINK
+
+As of teTeX 3.0, a Fink user will find the following teTeX packages
+available to be installed on the system:
+ tetex-texmf, tetex-base, tetex-nox, tetex-nox-base, tetex.
+
+The "tetex" package replaces the (by now ancient) "bundle-tetex" package,
+and installs everything that is needed. The "tetex-nox" package is an
+alternative to this which does not depend on the X11 libraries. (Note
+that in a change from teTeX 2.x, Users of this package no longer need to
+separately install the "texinfo" and "debianutils" packages.)
+
+The "tetex-texmf", "tetex-base", and "tetex-nox-base" packages are various
+components of the teTeX system, and will be installed when needed.
+
+The shared library used by teTeX now resides in a package called
+"libkpathsea4-shlibs", with the corresponding development files residing in
+"libkpathsea4-dev".
+
+CONFIGURING TETEX
+
+Users can adjust the configuration of their copy of teTeX by running
+"sudo texconfig-sys" (for system-wide configuration) or "texconfig" (for
+individual configuration). The configuration files are stored in the
+directories @PREFIX@/etc/texmf-config and @PREFIX@/var/lib/texmf .
+
+INSTALLING MORE TEX STYLE FILES, ETC.
+
+Users can install any private TeX style files, or TeX macro packages which
+they haven't installed via Fink or don't wish to share with other users of
+their computer, in the directory
+ ~/Library/texmf
+(i.e., a folder named texmf within the Library folder in the user's Home).
+Each user would need to create the corresponding directory if they wished
+to put things into it.
+
+If the user's ~/Library/texmf directory contains many files, it can be
+indexed with "mktexlsr ~/Library/texmf", which will speed up searching.
+Once this has been done, it must be done again any time something new is
+added to the directory (or else the file ~/Library/texmf/ls-R can be
+removed instead, to turn off the indexing of this directory).
+
+USING THE "ORIGINAL" XDVI
+
+Although teTeX comes with a version of xdvi installed (often called xdvik),
+some users may prefer to use the "original" xdvi program maintained by Paul
+Vojta. This can be accomplished by installing Fink's xdvi package along
+side of tetex-base. When this has been done, Vojta's package is invoked by
+the command "xdvi", whereas the teTeX-supplied package is invoked by the
+command "xdvik".
+
+TECHNICAL NOTE: SHARED LIBRARIES
+
+Fink's tetex packages continue to be built using shared libraries. This
+is now a standard feature of teTeX on Mac OS X, and no longer requires
+a Fink-specific patch.
+
+TECHNICAL NOTE: PATCHES
+
+The Makefile is patched so as to prevent execution of the final configuration
+step (which in the Fink system is handled in a PostInstall script), and
+texmf.in is patched to implement the choices of directories and provide
+support for Paul Vojta's xdvi. Finally, this README.fink file is supplied
+via a patch.
+
+
+ Dave Morrison
+
+ 8 February 2005
diff -ruN tetex-src-3.0/texk/kpathsea/texmf.in-teTeX tetex-src-3.0-patched/texk/kpathsea/texmf.in-teTeX
--- tetex-src-3.0/texk/kpathsea/texmf.in-teTeX Sat Feb 5 19:04:35 2005
+++ tetex-src-3.0-patched/texk/kpathsea/texmf.in-teTeX Sun Feb 6 19:56:26 2005
@@ -72,7 +72,7 @@
% TEXMFSYSVAR = $TEXMFMAIN
% For using a separate tree:
% TEXMFSYSVAR = @texmf@-var
-TEXMFSYSVAR = @texmf@-var
+TEXMFSYSVAR = @PREFIX@/var/lib/texmf
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.
% With teTeX-3.0 or later, this must be set.
@@ -80,11 +80,11 @@
% TEXMFSYSCONFIG = $TEXMFMAIN
% For using a separate tree:
% TEXMFSYSCONFIG = @texmf@-config
-TEXMFSYSCONFIG = @texmf@-config
+TEXMFSYSCONFIG = @PREFIX@/etc/texmf-config
% User texmf trees can be catered for like this...
% This used to be HOMETEXMF.
-TEXMFHOME = $HOME/texmf
+TEXMFHOME = $HOME/Library/texmf
% TEXMFVAR, where texconfig stores variable runtime data.
% With teTeX-3.0 or later, this must be set.
@@ -102,7 +102,7 @@
% TEXMFCONFIG = $HOME/.texmf-config
% For using a separate tree:
% TEXMFCONFIG = @texmf@-config
-TEXMFCONFIG = $HOME/.texmf-config
+TEXMFCONFIG = $HOME/.texmf-config
% Now, list all the texmf trees. If you have multiple trees you can
% use shell brace notation, like this:
@@ -119,14 +119,14 @@
% Where generated fonts may be written. This tree is used when the sources
% were found in a system tree and either that tree wasn't writable, or the
% varfonts feature was enabled in MT_FEATURES in mktex.cnf.
-VARTEXFONTS = @vartexfonts@
+VARTEXFONTS = $TEXMFSYSVAR/fonts
% Where to look for ls-R files. There need not be an ls-R in the
% directories in this path, but if there is one, Kpathsea will use it.
%
% Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below
% one of the TEXMF directories (avoids overlapping ls-R files).
-TEXMFDBS = $TEXMF;$VARTEXFONTS
+TEXMFDBS = $TEXMF
% It may be convenient to define TEXMF like this:
% TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN,$HOME}
@@ -147,6 +147,11 @@
% VARTEXFONTS = $TEXMFVAR/fonts
% and do not mention it in TEXMFDBS (but _do_ mention TEXMFVAR).
+% Additional lines for use by xdvi:
+PKFONTS.XDvi = .:$TEXMF/%s:$VARTEXFONTS/pk/{%m,modeless}//
+VFFONTS.XDvi = .:$TEXMF/%s
+PSHEADERS.XDvi = .:$TEXMF/%q{dvips,fonts/type1}//
+TEXPICTS.XDvi = .:$TEXMF/%q{dvips,tex}//
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usually you will not need to edit any of the other variables in part 1. %