texlive stable port information

Info2: <<
Package: texlive%type_pkg[-nox]
Type: -nox (boolean)
Version: 0.20110705
Revision: 3
GCC: 4.0
Description: Bundle package for TeX Live
Depends: %N-base (= %v-%r), texinfo, debianutils, texi2html
BuildDepends: <<
libkpathsea6 (>= 6.0.1-1), ptexenc1 (>= 1.2.0-1),
t1lib5-nox, libpng15, libncurses5 (>= 5.4-20041023-1006), fink (>= 0.32.2),
libjpeg8, libiconv-dev, zziplib13-dev, teckit-dev, libpaper1-dev,
xz, freetype219 (>= 2.2.1-4),
(%type_raw[-nox] = .) gd2 (>= 2.0.35-2),
(%type_raw[-nox] = .) poppler4,
(%type_raw[-nox] = .) poppler4-xpdf,
(%type_raw[-nox] = .) expat1,
(%type_raw[-nox] = .) fontconfig2-dev,
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) xmkmf (>= 1.0.2-3),
(%type_raw[-nox] = .) openmotif3
<<
BuildConflicts: libicu36-dev, libicu32-dev, ccache-default
Conflicts: <<
system-tetex, tetex, tetex-nox, ptex (<= 3.1.10-1), ptex-nox (<= 3.1.10-1),
texlive, texlive-nox
<<
Replaces: <<
tetex, tetex-nox, ptex (<= 3.1.10-1), ptex-nox (<= 3.1.10-1),
texlive, texlive-nox
<<
Provides: bundle-tetex, bundle-texlive
Recommends: psutils, tex4ht, t1utils, lcdf-typetools, lacheck, ps2eps
Suggests: latex2html, foiltex
Source: mirror:ctan:systems/texlive/Source/texlive-20110705-source.tar.xz
Source-MD5: 968d238949e8a34a1fd74c374ddfe6f1
TarFilesRename: texlive-20110705-source:texlive
Source2: http://tutimura.ath.cx/~nob/tex/ptexlive/ptexlive-20100711.tar.gz
Source2-MD5: 2dbd0ab5290bf6dfb0b2b04a813df89f
Tar2FilesRename: ptexlive-20100711:ptexlive
Source3: http://sourceforge.jp/projects/eptex/wiki/TeX_Live_2011/attach/tl11supp-111101.tar.xz
Source3-MD5: 5faa742af438292971415bc088580353
Source4: http://hnd.jp.asi.finkmirrors.net/pkgdists/xdvik-20090903-texlive2009_2011.patch.gz
Source4-MD5: 2177965a735d9fff0f206b5b8a309258
Source5: http://hnd.jp.asi.finkmirrors.net/pkgdists/pmpost-makeconf-tl11.diff.gz
Source5-Md5: 0c25f072f252a42a9c4774ffe6378b31
NoSourceDirectory: true
UseMaxBuildJobs: true
PatchFile: texlive.patch
PatchFile-MD5: d06b3f633b64223544ebff713b663456
PatchScript: <<
#!/bin/bash -ev
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -d texlive -p1

# Change the directory to be installed
for file in `find texlive -name Makefile.in`; do \
sed -i.bak -e 's|/texmf/|/share/texmf/|' \
-e 's|\(texmfdir = \)${prefix}|\1${datadir}|' \
-e 's|/texmf-dist/|/share/texmf-dist/|' ${file} ; done

sed -i.bak -e 's|\(texconfdir = \)${prefix}|\1${datadir}|' \
-e 's|\(REL=\).. \(TYPE=\)|\1../share \2|' \
texlive/texk/tetex/Makefile.in

# taking back...
sed -i.bak2 's|/share/texmf/xdvi.cfg|/texmf/xdvi.cfg|' \
texlive/texk/xdvik/Makefile.in

# Force configure to believe that Carbon API is unavailable. (from MacPorts)
if [ %m = 'x86_64' ]; then
perl -pi -e 's|(kpse_cv_have_Carbon=)yes|\1no|' texlive/texk/web2c/configure
perl -pi -e 's|(kpse_cv_have_Carbon=)yes|\1no|' texlive/texk/xdv2pdf/configure
fi

# Allow to build with poppler 0.10 (configure requires poppler 0.12)
if [ "%type_raw[-nox]" == "." ]; then
sed -i.bak 's|\(poppler --atleast-version=0\).12|\1.10|' \
texlive/configure texlive/texk/web2c/configure
else
sed -i.bak 's|^//\(#define\)|\1|' \
texlive/texk/web2c/luatexdir/image/pdftoepdf.cc
fi

# Install pxdvik
sed -i.bak -e 's|tex4htk|pxdvik|g' texlive/configure
sed -i.bak -e 's|tex4htk|pxdvik|g' texlive/texk/configure

xz -dc ptexlive/archive/xdvik-20090903-texlive2009.diff.xz \
> xdvik-20090903-texlive2009.diff
gzip -dc xdvik-20090903-texlive2009_2011.patch.gz | patch -p0
xz -c xdvik-20090903-texlive2009.diff \
> ptexlive/archive/xdvik-20090903-texlive2009.diff.xz

echo "TEXLIVE_VERSION=2009" >> ptexlive.cfg
echo "TEXMF=./texmf" >> ptexlive.cfg
echo "SRC=`pwd`/texlive" >> ptexlive.cfg
head -n 290 ptexlive/common.sh > common.sh
cp common.sh ptexlive/
echo '#!/bin/bash' >> ptex-app.sh
echo '. ./common.sh' >> ptex-app.sh
sed -n '118,178p' ptexlive/2extract-src.sh | \
sed -e 's|2.3.9|2.4.4|g' >> ptex-app.sh
chmod +x ptex-app.sh
mv ptex-app.sh ptexlive/ptex-app.sh
pushd ptexlive && ./ptex-app.sh
popd

# use Hiragino for pxdvi
perl -pi -e "s/(Ryumin-Light\t\t)ipam.ttf/\1HiraMinPro-W3.otf/" \
texlive/texk/pxdvik/texmf/pxdvi.cfg
perl -pi -e "s/(GothicBBB-Medium\t)ipag.ttf/\1HiraKakuPro-W3.otf/" \
texlive/texk/pxdvik/texmf/pxdvi.cfg

# add kanji cmaps
mkdir -p texmf/web2c
cp %p/share/texmf-dist/web2c/updmap.cfg texmf/web2c
echo '#!/bin/bash' >> ptex-cmap.sh
echo '. ./common.sh' >> ptex-cmap.sh
echo 'MAP=$TEXMF/fonts/map/dvipdfm/ptexlive' >> ptex-cmap.sh
sed -n '53,115p' ptexlive/4extract-texmf.sh >> ptex-cmap.sh
chmod +x ptex-cmap.sh
./ptex-cmap.sh

##### Apply patches taken from upstream svn

sed -i.bak -e "s|\(TLSRCDIR=\)/opt/home-supp/tl11|\1`pwd`/tl11|" \
-e "s|\(TMPDIR=\)/tmp|\1`pwd`|" \
-e 's|texlive-$TLV-source|texlive|' tl11/common.sh

sed -n -e "1,4p" -e "8,18p" \
-e "34,38p" -e "45,61p" \
tl11/scripts/unpack.sh > tl11/unpack.sh

sed -i.bak 's|^# \(zpatch\)|\1|' tl11/unpack.sh
chmod +x tl11/unpack.sh
pushd tl11 && FLG_PMPOST=TRUE ./unpack.sh
popd

gzcat pmpost-makeconf-tl11.diff.gz | patch -p1 -d texlive
perl -pi.bak -e 's|(#include )|#include \n\1|' \
texlive/texk/web2c/pmplibdir/jmp.ch
perl -pi.bak1 -e 's|const char\*s|string s|' \
texlive/texk/web2c/pmplibdir/jmppsw.ch
perl -pi.bak -e 's|const char \*s|string s|' \
texlive/texk/web2c/pmplibdir/jmppsw.ch
perl -pi.bak -e 's|(char kanjioption)|#include \n\1|' \
texlive/texk/web2c/pmplibdir/pmpost.ch
mv texlive/texk/web2c/pmplibdir/psvgout.ch{,.bak}
echo '@x' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '#include ' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '@y' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '#include ' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '#include ' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '@z' >> texlive/texk/web2c/pmplibdir/psvgout.ch
echo '' >> texlive/texk/web2c/pmplibdir/psvgout.ch
cat texlive/texk/web2c/pmplibdir/psvgout.ch.bak \
>> texlive/texk/web2c/pmplibdir/psvgout.ch
#####

echo "f kanjix.map" >> texlive/texk/dvipdfmx/dvipdfmx-20*/data/dvipdfmx.cfg

# adjust for Mac, and sync with pxdvik
sed -i.bak -e 's|firefox|open|' \
-e 's|kinput2|uim|' texlive/texk/pxdvik/texmf/XDvi
cp texlive/texk/pxdvik/texmf/XDvi texlive/texk/xdvik/texmf/XDvi

# wrapper for jbibtex
echo '#!/bin/sh' >> jbibtex
echo 'pbibtex "$@"' >> jbibtex

# wrapper for jmpost
echo '#!/bin/sh' >> jmpost
echo 'pmpost "$@"' >> jmpost
<<
SetCPPFLAGS:-I%p/lib/freetype219/include/freetype2 -I%p/lib/freetype219/include -I%p/lib/fontconfig2/include
SetLDFLAGS: -L%p/lib/freetype219/lib -L%p/lib/fontconfig2/lib
ConfigureParams: <<
--with-banner-add="/Fink" \
--disable-native-texlive-build --disable-omfonts \
--disable-texi2html --disable-texinfo --enable-shared \
--datadir='${prefix}/share' --infodir='${prefix}/share/info' \
--mandir='${prefix}/share/man' --disable-multiplatform --with-system-ncurses \
--with-system-libpng --with-system-t1lib \
--with-system-kpathsea --with-kpathsea-includes=%p/include \
--with-kpathsea-libdir=%p/lib --with-system-ptexenc \
--with-system-zziplib --with-system-teckit \
--with-system-zlib \
--disable-psutils --disable-dialog --disable-tex4htk --disable-t1utils \
--disable-xindy --disable-lcdf-typetools --disable-lacheck --disable-ps2eps \
--with-system-freetype2 --with-freetype2-libdir=%p/lib/freetype219/lib \
--with-freetype2-include=%p/lib/freetype219/include \
(%type_raw[-nox] = .) --with-system-gd
(%type_raw[-nox] = .) --with-system-xpdf
(%type_raw[-nox] = .) --with-system-poppler
(%type_raw[-nox] = .) --x-includes=/usr/X11R6/include
(%type_raw[-nox] = .) --x-libraries=/usr/X11R6/lib
(%type_raw[-nox] = .) --with-xdvi-x-toolkit=motif --with-motif-libdir=%p/lib
(%type_raw[-nox] = .) --with-motif-include=%p/include
(%type_raw[-nox] = .) --with-x
(%type_raw[-nox] = -nox) --without-x
(%type_raw[-nox] = -nox) --disable-xdvik
(%type_raw[-nox] = -nox) --disable-pxdvik
(%type_raw[-nox] = -nox) --disable-pdfopen
<<
InfoTest: TestScript: cd texlive/Work; make -k check || exit 1
CompileScript: <<
#!/bin/bash -ev
export PATH=%p/lib/xmkmf/bin:%p/lib/freetype219/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
mkdir texlive/Work
pushd texlive/Work && ../configure %c && make
popd
# make kpathsea
pushd texlive/texk/kpathsea && ./configure %c && make
<<
InstallScript: <<
#!/bin/bash -ev
export PATH=%p/lib/xmkmf/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
pushd texlive/Work && make install-strip DESTDIR=%d run_texlinks=/usr/bin/true
popd

# install kpathsea
pushd texlive/texk/kpathsea && make install-strip DESTDIR=%d
popd
echo "Removing files that belong to the libkpathsea6 package..."

rm -R %i/include
rm -R %i/lib

# install jbibtex and jmpost
install -m 755 jbibtex %i/bin
install -m 755 jmpost %i/bin

# install tlpkg dir
install -m 755 -d %i/share/tlpkg/TeXLive
install -m 644 texlive/utils/biber/TeXLive/*.pm %i/share/tlpkg/TeXLive

%i/bin/mktexlsr %i/share/texmf

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 files that are supplied in the texlive-texmf package ..."
mv -f %i/share/texmf-dist texmf-dist.conflict

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
fi

echo "Make font dirs and make links for apple's fonts ..."
install -m 755 -d %i/share/texmf/fonts/{opentype,truetype}
if [ "%type_raw[-nox]" == "." ]; then
ln -s %p/lib/X11/fonts/appleotf %i/share/texmf/fonts/opentype
ln -s %p/lib/X11/fonts/applettf %i/share/texmf/fonts/truetype
fi

echo "Install kanji cmaps ..."
mv texmf/web2c/updmap.cfg %i/share/texmf/web2c
mv texmf/fonts/map/dvipdfm/ptexlive %i/share/texmf/fonts/map/dvipdfm
<<
DocFiles: texlive/README
SplitOff: <<
Package: %N-base
Description: Base programs for a TeX Live installation
Depends: <<
t1lib5-nox-shlibs, libpng15-shlibs,
libncurses5-shlibs (>= 5.4-20041023-1006), ncurses (>= 5.4-20041023-1006),
fink (>= 0.12.0-1), texlive-texmf,
libkpathsea6-shlibs (>= 6.0.1-1), ptexenc1-shlibs (>= 1.2.0-1),
zziplib13-shlibs, teckit-shlibs, nkf, libpaper1-shlibs,
freetype219-shlibs (>= 2.2.1-4),
system-perl (>= 5.8.8-1) | perl588,
(%type_raw[-nox] = .) applesystemfonts,
(%type_raw[-nox] = .) appleotffonts,
(%type_raw[-nox] = -nox) ghostscript-nox,
(%type_raw[-nox] = .) ghostscript,
(%type_raw[-nox] = .) gd2-shlibs (>= 2.0.35-2),
(%type_raw[-nox] = .) poppler4-shlibs,
(%type_raw[-nox] = .) x11,
(%type_raw[-nox] = .) x11-shlibs,
(%type_raw[-nox] = .) openmotif3-shlibs,
(%type_raw[-nox] = .) freetype219-shlibs
<<
Conflicts: <<
texlive-base (>= 0), texlive-nox-base,
tetex-base (>= 0), tetex-nox-base
<<
Replaces: <<
texlive-base (>= 0), texlive-nox-base,
tetex-base (>= 0), tetex-nox-base,
ptex-base (<= 3.1.11-1), ptex-nox-base (<= 3.1.11-1), ptex-texmf (<= 2.5-1),
context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex (<= 2.0-3),
(%type_raw[-nox] = .) xdvi (<= 22.70-1),
libkpathsea4, detex, xetex, dvipdfmx, pdfjam, jadetex, latexdiff, eptex
<<
Provides: context, dvipdfm, epstopdf, pdftex, tetex-macosx, tetex-base, tetex3-base, texlive-base, detex, xetex, ptex3-base, dvipdfmx, pdfjam, jadetex, eptex
Files: bin etc share/info share/man share/texmf share/texmf-local share/tlpkg var
InfoDocs: web2c.info dvips.info dvipng.info kpathsea.info
DocFiles: texlive/README
ConfFiles: %p/share/texmf/web2c/texmf.cnf
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
rm -Rf %p/var/lib/texmf

if [ -f %p/etc/texmf-config/web2c/fmtutil.cnf ]; then
time_date="`date +%%Y%%m%%d%%H%%M`"
mv -f %p/etc/texmf-config/web2c/fmtutil.cnf{,.finksave.${time_date}}
fi
if [ -f %p/etc/texmf-config/web2c/updmap.cfg ]; then
if [ ! "`grep updmap-hdr.cfg %p/etc/texmf-config/web2c/updmap.cfg`" ]; then
# This updmap.cfg is not from texlive-texmf! Delete it!
time_date="`date +%%Y%%m%%d%%H%%M`"
mv -f %p/etc/texmf-config/web2c/updmap.cfg{,.finksave.${time_date}}
fi
fi
<<
PostInstScript: <<
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
fi
mktexlsr %p/share/texmf{,-dist} %p/etc/texmf-config %p/etc/texmf.local

# update from texlive-texmf-0.20080822-1.
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-t1.map
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-t2a.map
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-t2b.map
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-t2c.map
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-ts1.map
updmap-sys --nomkmap --nohash --enable MixedMap cm-super-x2.map
if [ -f %p/etc/texmf-config/web2c/updmap.cfg ]; then
if [ ! "`grep 'kanjiEmbed ' %p/etc/texmf-config/web2c/updmap.cfg`" ]; then
updmap-sys --nomkmap --nohash --setoption kanjiEmbed noEmbed
fi
fi
updmap-sys --nomkmap --nohash --enable KanjiMap ptex-@kanjiEmbed@.map
updmap-sys --nomkmap --nohash --enable KanjiMap morisawa.map
updmap-sys --nomkmap --nohash --syncwithtrees

PATH=%p/bin:${PATH} texconfig-sys init

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
fi
fi
<<
<<
License: Restrictive/Distributable
Maintainer: Todai Fink Team
Homepage: http://www.tug.org/texlive/
<<

texlive stable port .patch

diff -Naur texlive-20080816-source.orig/libs/lua51/lcoco.c texlive-20080816-source/libs/lua51/lcoco.c
--- texlive-20080816-source.orig/texk/web2c/luatexdir/lua51/lcoco.c 2008-03-25 00:47:15.000000000 +0900
+++ texlive-20080816-source/texk/web2c/luatexdir/lua51/lcoco.c 2009-10-11 04:14:04.000000000 +0900
@@ -331,7 +331,7 @@
/* Else fallback to ucontext. Slower, because it saves/restores signals. */
#else /* !defined(COCO_MAKECTX) */

-#include
+#include

#define COCO_CTX ucontext_t

diff -Naur texlive-20080816-source.orig/texk/kpathsea/texmf.cnf texlive-20080816-source/texk/kpathsea/texmf.cnf
--- texlive-20080816-source.orig/texk/kpathsea/texmf.cnf 2008-07-27 06:39:36.000000000 +0900
+++ texlive-20080816-source/texk/kpathsea/texmf.cnf 2009-05-10 21:31:18.000000000 +0900
@@ -49,7 +49,7 @@
% (http://tug.org/tds), or files may not be found.
%
% Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
-TEXMFROOT = $SELFAUTOPARENT
+TEXMFROOT = @PREFIX@/share

% The tree containing runtime files related to the specific
% distribution and version.
@@ -59,25 +59,25 @@
TEXMFDIST = $TEXMFROOT/texmf-dist

% Local additions to the distribution trees.
-TEXMFLOCAL = $TEXMFROOT/../texmf-local
+TEXMFLOCAL = $TEXMFROOT/texmf-local

% TEXMFSYSVAR, where *-sys store cached runtime data.
-TEXMFSYSVAR = $TEXMFROOT/texmf-var
+TEXMFSYSVAR = @PREFIX@/var/lib/texmf

% TEXMFSYSCONFIG, where *-sys store configuration data.
-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
+TEXMFSYSCONFIG = @PREFIX@/etc/texmf-config

% Per-user texmf tree(s) -- organized per the TDS, as usual. To define
% more than one per-user tree, set this to a list of directories in
% braces, as described above. (This used to be HOMETEXMF.) ~ expands
% to %USERPROFILE% on Windows, $HOME otherwise.
-TEXMFHOME = ~/texmf
+TEXMFHOME = ~/Library/texmf

% TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
-TEXMFVAR = ~/.texlive2011/texmf-var
+TEXMFVAR = ~/.texmf-var

% TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
-TEXMFCONFIG = ~/.texlive2011/texmf-config
+TEXMFCONFIG = ~/.texmf-config

% List all the texmf trees.
%
@@ -92,7 +92,7 @@
% versions should take precedence over those -- although it is generally
% a source of confusion to have different versions of a package
% installed, whatever the trees, so try to avoid it.
-TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
+TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN,!!$TEXMFDIST}

% 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.
@@ -100,18 +100,18 @@
% does not create ls-R files in the non-!! elements -- because if an
% ls-R is present, it will be used, and the disk will not be searched.
% This is arguably a bug in kpathsea.
-TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
+TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN,!!$TEXMFDIST}

% The system trees. These are the trees that are shared by all users.
% If a tree appears in this list, the mktex* scripts will use
% VARTEXFONTS for generated files, if the original tree isn't writable;
% otherwise the current working directory is used.
-SYSTEXMF = $TEXMFSYSVAR;$TEXMFMAIN;$TEXMFLOCAL;$TEXMFDIST
+SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST

% 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 = $TEXMFVAR/fonts
+VARTEXFONTS = $TEXMFSYSVAR/fonts

% On some systems, there will be a system tree which contains all the font
% files that may be created as well as the formats. For example
@@ -215,10 +215,20 @@
% epTeX.
TEXINPUTS.eptex = .;$TEXMF/tex/{ptex,ptexgeneric,plain,generic,}//

+% upTeX.
+TEXINPUTS.uptex = .;$TEXMF/tex/{ptex,ptexgeneric,plain,generic,}//
+TEXINPUTS.uplatex = .;$TEXMF/tex/{platex,ptexgeneric,latex,generic,}//
+TEXINPUTS.euptex = .;$TEXMF/tex/{ptex,ptexgeneric,plain,generic,}//
+TEXINPUTS.euplatex = .;$TEXMF/tex/{platex,ptexgeneric,latex,generic,}//
+
% pBibTeX bibliographies and style files.
BIBINPUTS.pbibtex = .;$TEXMF/{pbibtex,bibtex}/bib//
BSTINPUTS.pbibtex = .;$TEXMF/{pbibtex,bibtex}/bst//

+% upBibTeX bibliographies and style files.
+BIBINPUTS.upbibtex = .;$TEXMF/{pbibtex,bibtex}/bib//
+BSTINPUTS.upbibtex = .;$TEXMF/{pbibtex,bibtex}/bst//
+
% ConTeXt.
TEXINPUTS.context = .;$TEXMF/tex/{context,plain,generic}//

@@ -314,7 +324,7 @@
% OSFONTDIR is to provide a convenient hook for allowing TeX to find
% fonts installed on the system (outside of TeX). An empty default
% value would add "//" to the search paths, so we give it a dummy value.
-OSFONTDIR = /please/set/osfontdir/in/the/environment
+OSFONTDIR = /{System/,}Library/Fonts//

% PostScript Type 1 outline fonts.
T1FONTS = .;$TEXMF/fonts/type1//;$OSFONTDIR//
@@ -359,14 +369,14 @@
PDFTEXCONFIG = .;$TEXMF/pdftex/{$progname,}//

% Used by DMP (ditroff-to-mpx), called by makempx -troff.
-TRFONTS = /usr{/local,}/share/groff/{current/font,site-font}/devps
+TRFONTS = /usr{/local,}/share/groff/{current/font,1.19.2/font,1.18.1/font,site-font}/devps
MPSUPPORT = .;$TEXMF/metapost/support

% For xdvi to find mime.types and .mailcap, if they do not exist in
% ~. These are single directories, not paths.
% (But the default mime.types, at least, may well suffice.)
-MIMELIBDIR = $TEXMFROOT/etc
-MAILCAPLIBDIR = $TEXMFROOT/etc
+MIMELIBDIR = @PREFIX@/etc
+MAILCAPLIBDIR = @PREFIX@/etc

% Default settings for fontconfig library, used by Windows versions of
% xetex/xdvipdfmx. On Unixish systems, fontconfig ignores this.
@@ -413,7 +423,7 @@
LUAINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXINPUTS

% Lua needs to look for binary lua libraries distributed with packages.
-CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
+CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//;@PREFIX@/lib/{$progname,$engine,}/lua//

% Architecture independent executables.
TEXMFSCRIPTS = $TEXMF/scripts/{$progname,$engine,}//
@@ -514,7 +524,7 @@
% for the purportedly safe shell_escape_commands above to system
% directories.
TEXMF_RESTRICTED_SCRIPTS = \
- {!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}//
+ {!!$TEXMFLOCAL,!!$TEXMFMAIN,!!$TEXMFDIST}/scripts/{$progname,$engine,}//

% Allow TeX \openin, \openout, or \input on filenames starting with `.'
% (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
@@ -707,3 +717,6 @@
line_length.gftype = 500
max_rows.gftype = 8191
max_cols.gftype = 8191
+
+% for ptex filter
+PTEX_IN_FILTER = @PREFIX@/bin/nkf -w
diff -Naur texlive-20100720-source.orig/texk/tetex/fmtutil.cnf texlive-20100720-source/texk/tetex/fmtutil.cnf
--- texlive-20100720-source.orig/texk/tetex/fmtutil.cnf 2011-01-15 20:50:23.000000000 +0900
+++ texlive-20100720-source/texk/tetex/fmtutil.cnf 2011-01-16 10:52:00.000000000 +0900
@@ -100,6 +100,10 @@
ptex ptex - ptex.ini
eptex eptex language.def *eptex.ini
platex eptex language.ptx *platex.ini
+#! uptex uptex - uptex.ini
+#! uplatex uptex language.ptx uplatex.ini
+#! euptex euptex - -etex euptex.src
+#! euplatex euptex language.ptx -etex uplatex.ini
#
# from t2:
#! cyramstex pdftex language.dat -translate-file=cp227.tcx *cyramstx.ini
--- texlive.orig/texk/ps2pkm/type1.c 2011-07-17 10:56:13.000000000 -0400
+++ texlive/texk/ps2pkm/type1.c 2011-07-17 10:57:31.000000000 -0400
@@ -127,6 +127,8 @@
#define Error {errflag = TRUE; return;}

#define Error0(errmsg) { CC; IfTrace0(TRUE, errmsg); Error;}
+
+#define Error01(errmsg) { CC; IfTrace0(TRUE, errmsg); errflag = TRUE; return -1.0;}

#define Error1(errmsg,arg) { CC; IfTrace1(TRUE, errmsg, arg); Error;}

@@ -780,7 +782,7 @@
static DOUBLE PSFakePop ()
{
if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]);
- else Error0("PSFakePop : Stack empty\n");
+ else Error01("PSFakePop : Stack empty\n");
/*NOTREACHED*/
}

--- texlive-20110705-source.orig/texk/web2c/luatexdir/image/pdftoepdf.cc 2011-04-14 15:45:02.000000000 +0900
+++ texlive-20110705-source/texk/web2c/luatexdir/image/pdftoepdf.cc 2011-04-12 23:17:47.000000000 +0900
@@ -25,6 +25,7 @@
// define DEBUG

#include "epdf.h"
+//#define HAVE_GETPDFMAJORVERSION 1

// This file is mostly C and not very much C++; it's just used to interface
// the functions of xpdf, which happens to be written in C++.
@@ -533,7 +534,11 @@
Page *page;
int rotate;
PDFRectangle *pagebox;
+#ifdef HAVE_GETPDFMAJORVERSION
int pdf_major_version_found, pdf_minor_version_found;
+#else
+ float pdf_version_found, pdf_version_wanted;
+#endif
float xsize, ysize, xorig, yorig;
assert(idict != NULL);
assert(img_type(idict) == IMG_TYPE_PDF);
@@ -550,6 +555,7 @@
// this works only for PDF 1.x -- but since any versions of PDF newer
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
// then have to changed drastically anyway.
+#ifdef HAVE_GETPDFMAJORVERSION
pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
if ((pdf_major_version_found > 1)
@@ -564,6 +570,19 @@
minor_pdf_version_wanted);
}
}
+#else
+ pdf_version_found = pdf_doc->doc->getPDFVersion();
+ pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
+ if (pdf_version_found > pdf_version_wanted + 0.01) {
+ char msg[] =
+ "PDF inclusion: found PDF version <%.1f>, but at most version <%.1f> allowed";
+ if (pdf_inclusion_errorlevel > 0) {
+ pdftex_fail(msg, pdf_version_found, pdf_version_wanted);
+ } else {
+ pdftex_warn(msg, pdf_version_found, pdf_version_wanted);
+ }
+ }
+#endif
img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages();
if (img_pagename(idict)) {
// get page by name
--- texlive-20110705-source.orig/texk/web2c/luatexdir/lua/lepdflib.cc 2011-04-12 23:17:47.000000000 +0900
+++ texlive-20110705-source/texk/web2c/luatexdir/lua/lepdflib.cc 2012-01-03 09:15:51.000000000 +0900
@@ -89,8 +89,10 @@
new_poppler_userdata(Annots);
new_poppler_userdata(Array);
new_poppler_userdata(Catalog);
-new_poppler_userdata(EmbFile);
new_poppler_userdata(Dict);
+#ifdef EMBFILE_IN_CATALOG_H
+new_poppler_userdata(EmbFile);
+#endif
//new_poppler_userdata(GooString);
new_poppler_userdata(LinkDest);
new_poppler_userdata(Links);
@@ -393,7 +395,11 @@
printf("\n===== Annot GC ===== uin=<%p>\n", uin);
#endif
if (uin->atype == ALLOC_LEPDF)
+#ifdef HAVE_ANNOTDECREFCNT
+ ((Annot *) uin->d)->decRefCnt();
+#else
delete(Annot *) uin->d;
+#endif
return 0;
}

@@ -410,6 +416,8 @@
//**********************************************************************
// AnnotBorderStyle

+#ifdef HAVE_ANNOTBORDERSTYLE
+
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);

m_poppler__tostring(AnnotBorderStyle);
@@ -435,6 +443,8 @@
{NULL, NULL} // sentinel
};

+#endif
+
//**********************************************************************
// Annots

@@ -684,6 +694,8 @@
m_poppler_get_poppler(Catalog, Object, getDests);
m_poppler_get_INT(Catalog, numEmbeddedFiles);

+#ifdef EMBFILE_IN_CATALOG_H
+
static int m_Catalog_embeddedFile(lua_State * L)
{
EmbFile *ef;
@@ -708,6 +720,8 @@
return 1;
}

+#endif
+
m_poppler_get_INT(Catalog, numJS);

static int m_Catalog_getJS(lua_State * L)
@@ -749,7 +763,9 @@
{"findDest", m_Catalog_findDest},
{"getDests", m_Catalog_getDests},
{"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
+#ifdef EMBFILE_IN_CATALOG_H
{"embeddedFile", m_Catalog_embeddedFile},
+#endif
{"numJS", m_Catalog_numJS},
{"getJS", m_Catalog_getJS},
{"getOutline", m_Catalog_getOutline},
@@ -761,6 +777,8 @@
//**********************************************************************
// EmbFile

+#ifdef EMBFILE_IN_CATALOG_H
+
m_poppler_get_GOOSTRING(EmbFile, name);
m_poppler_get_GOOSTRING(EmbFile, description);
m_poppler_get_INT(EmbFile, size);
@@ -801,6 +819,8 @@
{NULL, NULL} // sentinel
};

+#endif
+
//**********************************************************************
// Dict

@@ -2344,8 +2364,10 @@
return 1;
}

+#ifdef HAVE_GETPDFMAJORVERSION
m_PDFDoc_INT(getPDFMajorVersion);
m_PDFDoc_INT(getPDFMinorVersion);
+#endif

static int m_PDFDoc__gc(lua_State * L)
{
@@ -2388,8 +2410,10 @@
{"isLinearized", m_PDFDoc_isLinearized},
{"getDocInfo", m_PDFDoc_getDocInfo},
{"getDocInfoNF", m_PDFDoc_getDocInfoNF},
+#ifdef HAVE_GETPDFMAJORVERSION
{"getPDFMajorVersion", m_PDFDoc_getPDFMajorVersion},
{"getPDFMinorVersion", m_PDFDoc_getPDFMinorVersion},
+#endif
{"__gc", m_PDFDoc__gc}, // finalizer
{NULL, NULL} // sentinel
};
@@ -2683,12 +2707,16 @@
{
register_meta(Annot);
// TODO register_meta(AnnotBorder);
+#ifdef HAVE_ANNOTBORDERSTYLE
register_meta(AnnotBorderStyle);
+#endif
register_meta(Annots);
register_meta(Array);
register_meta(Catalog);
- register_meta(EmbFile);
register_meta(Dict);
+#ifdef EMBFILE_IN_CATALOG_H
+ register_meta(EmbFile);
+#endif
register_meta(GooString);
register_meta(LinkDest);
register_meta(Links);

texlive _unstable_ port .patch