Updating TeXLive to 2013 using updated Debian snapshots.

Kept the old hacks where they don't break the build in case they things
they fix are still relevant.

I checked that the upgrade doesn't break:
1) Asymptote and EProver builds.
2) My XeLaTeX demo from configurations/ repository.
3) Some of my own files.

The upgrade fixes problems with simultaneous use of 3D and LaTeX labels
in Asymptote.

Please provide a test that worked previously and is broken now if you
need to revert this update or its parts.
This commit is contained in:
Michael Raskin 2013-10-14 10:36:39 +04:00
parent 4dee7de246
commit 776adb5704
15 changed files with 120 additions and 63 deletions

View File

@ -565,13 +565,15 @@ let inherit (builtins) head tail trace; in
# Interpreters that are already in the store are left untouched.
echo "patching script interpreter paths"
local f
for f in $(find "${dir}" -type f -perm +0100); do
for f in $(find "${dir}" -xtype f -perm +0100); do
local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f")
if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then
local newPath=$(type -P $(basename $oldPath) || true)
if test -n "$newPath" -a "$newPath" != "$oldPath"; then
echo "$f: interpreter changed from $oldPath to $newPath"
sed -i "1 s,$oldPath,$newPath," "$f"
else
echo "$f: not changing interpreter from $oldPath"
fi
fi
done

View File

@ -9,10 +9,10 @@ stdenv.mkDerivation {
};
installPhase = ''
mkdir -p $out/texmf/
mkdir -p $out/texmf-dist/
mkdir -p $out/share/fonts/
cp -r ./* $out/texmf/
cp -r ./* $out/texmf-dist/
cp -r fonts/{opentype,type1} $out/share/fonts/
ln -s $out/texmf* $out/share/

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
installPhase = ''
export PREFIX="$out/texmf"
export PREFIX="$out/texmf-dist"
mkdir -p "$PREFIX" "$out/share"
make install PREFIX="$PREFIX"

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, pkgconfig, glib, freetype, libintlOrEmpty }:
{ stdenv, fetchurl, pkgconfig, glib, freetype,
icu ? null, graphite2 ? null, libintlOrEmpty }:
stdenv.mkDerivation rec {
name = "harfbuzz-0.9.12";
@ -8,7 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "19cx5y2m20rp7z5j7mwqfb4ph2g8lrri69zim44x362y4w5gfly6";
};
buildInputs = [ pkgconfig glib freetype ] ++ libintlOrEmpty;
buildInputs = [ pkgconfig glib freetype ]
++ libintlOrEmpty;
propagatedBuildInputs = []
++ (stdenv.lib.optionals (icu != null) [icu])
++ (stdenv.lib.optionals (graphite2 != null) [graphite2])
;
meta = {
description = "An OpenType text shaping engine";

View File

@ -0,0 +1,21 @@
{ stdenv, fetchurl, pkgconfig, freetype, libXft, pango, fontconfig, cmake }:
stdenv.mkDerivation rec {
version = "1.2.3";
name = "graphite2-${version}";
src = fetchurl {
url = "mirror://sourceforge/silgraphite/graphite2/${name}.tgz";
sha256 = "1xgwnd81gm6p293x8paxb3yisnvpj5qnv1dzr7bjdi7b7h00ls7g";
};
buildInputs = [pkgconfig freetype libXft pango fontconfig cmake];
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
meta = {
description = "An advanced font engine";
maintainers = [ stdenv.lib.maintainers.raskin ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -3,6 +3,7 @@ rec {
name = "TeXLive-linkdir";
buildInputs = lib.closePropagation paths
++ [perl]
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
phaseNames = [ "doAggregate" ];
@ -11,12 +12,15 @@ rec {
mkdir -p $out/bin
for currentPath in ${lib.concatStringsSep " " buildInputs}; do
echo Symlinking "$currentPath"
find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) -type d | while read; do
REPLY="''${REPLY#$currentPath}"
mkdir -p $out/"$REPLY"
done
find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) ! -type d | while read; do
REPLY="''${REPLY#$currentPath}"
mkdir -p $out/"$(dirname "$REPLY")"
ln -fs $currentPath/"$REPLY" $out/"$REPLY"
echo
done | while read; do head -n 99 >/dev/null; echo -n .; done
done | while read; do head -n 999 >/dev/null; echo -n .; done
for i in "$currentPath/bin/"* :; do
test "$i" != : || continue
@ -31,8 +35,8 @@ rec {
ln -s $out/texmf* $out/share/
rm -r $out/texmf-config
find $out/texmf/ -type d | while read; do
rm -rf $out/texmf-config
find $out/texmf*/ -type d | while read; do
REPLY="''${REPLY#$out/texmf}"
mkdir -p $out/texmf-config/"$REPLY"
done
@ -45,9 +49,10 @@ rec {
chmod a+x $out/bin/$(basename $i)
done
rm $out/texmf*/ls-R
rm -f $out/texmf*/ls-R
for i in web2c texconfig fonts/map; do
cp -Lr $out/texmf/$i/* $out/texmf-config/$i || true
mkdir -p $out/texmf-config/$i
cp -Lr $out/texmf*/$i/* $out/texmf-config/$i || true
done
chmod -R u+w $out/texmf-config

View File

@ -10,16 +10,16 @@ rec {
doCopy = fullDepEntry (''
mkdir -p $out/share/
mkdir -p $out/texmf/fonts/enc
mkdir -p $out/texmf/fonts/map
mkdir -p $out/texmf/fonts/type1/public/cm-super
cp pfb/*.pfb $out/texmf/fonts/type1/public/cm-super
mkdir -p $out/texmf/dvips/cm-super
cp dvips/*.{map,enc} $out/texmf/dvips/cm-super
cp dvips/*.enc $out/texmf/fonts/enc
cp dvips/*.map $out/texmf/fonts/map
mkdir -p $out/texmf/dvipdfm/config
cp dvipdfm/*.map $out/texmf/dvipdfm/config
mkdir -p $out/texmf-dist/fonts/enc
mkdir -p $out/texmf-dist/fonts/map
mkdir -p $out/texmf-dist/fonts/type1/public/cm-super
cp pfb/*.pfb $out/texmf-dist/fonts/type1/public/cm-super
mkdir -p $out/texmf-dist/dvips/cm-super
cp dvips/*.{map,enc} $out/texmf-dist/dvips/cm-super
cp dvips/*.enc $out/texmf-dist/fonts/enc
cp dvips/*.map $out/texmf-dist/fonts/map
mkdir -p $out/texmf-dist/dvipdfm/config
cp dvipdfm/*.map $out/texmf-dist/dvipdfm/config
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];

View File

@ -11,8 +11,8 @@ rec {
doCopy = fullDepEntry (''
mkdir -p $out/share/
mkdir -p $out/texmf
cp -r * $out/texmf
mkdir -p $out/texmf-dist
cp -r * $out/texmf-dist
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];

View File

@ -1,18 +1,18 @@
args : with args;
rec {
src = fetchurl {
url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2012.20120628.orig.tar.xz;
sha256 = "0k94df3lfvghngzdzi2d4fz2z0gs8iglz7h3w2lxvlhiwwpmx601";
url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2013.20130729.30972.orig.tar.xz;
sha256 = "1idgyim6r4bi3id245k616qrdarfh65xv3gi2psarqqmsw504yhd";
};
texmfSrc = fetchurl {
url = mirror://debian/pool/main/t/texlive-base/texlive-base_2012.20120611.orig.tar.xz;
sha256 = "116zm0qdq9rd4vakhd2py9q7lq3ihspc7hy33bh8wy5v1rgiqsm6";
url = mirror://debian/pool/main/t/texlive-base/texlive-base_2013.20130918.orig.tar.xz;
sha256 = "0h7x49zsd2gs8fr28f4h04dv5m8p2mpgqxk2vvl5xlf4wwxxbm2p";
};
langTexmfSrc = fetchurl {
url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2012.20120611.orig.tar.xz;
sha256 = "0zh9svszfkbjx72i7sa9gg0gak93wf05845mxpjv56h8qwk4bffv";
url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2013.20131010.orig.tar.xz;
sha256 = "17wfd2qmyafv74ac3ssy9aga12g09l2q0r1p19fb4vvs0wrkwzbz";
};
setupHook = ./setup-hook.sh;
@ -34,6 +34,8 @@ rec {
sed -e 's@\<env python@${python}/bin/python@' -i $(grep 'env python' -rl . )
sed -e '/ubidi_open/i#include <unicode/urename.h>' -i $(find . -name configure)
sed -e 's/-lttf/-lfreetype/' -i $(find . -name configure)
sed -e s@ncurses/curses.h@curses.h@g -i $(grep ncurses/curses.h -rl . )
sed -e '1i\#include <string.h>\n\#include <stdlib.h>' -i $( find libs/teckit -name '*.cpp' -o -name '*.c' )
@ -44,7 +46,7 @@ rec {
cd Work
'' ) [ "minInit" "doUnpack" "addInputs" "defEnsureDir" ];
doPostInstall = fullDepEntry( ''
promoteLibexec = fullDepEntry (''
mkdir -p $out/libexec/
mv $out/bin $out/libexec/$(uname -m)
mkdir -p $out/bin
@ -61,13 +63,15 @@ rec {
rm "$out/libexec/$(basename "$i")"
fi;
done
'') ["doMakeInstall"];
[ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
ln -s -v "$out/"*texmf* "$out/share/" || true
doPostInstall = fullDepEntry( ''
cp -r "$out/"texmf* "$out/share/" || true
rm -rf "$out"/texmf*
[ -d $out/share/texmf-config ] || ln -s $out/share/texmf-dist $out/share/texmf-config
ln -s "$out"/share/texmf* "$out"/
sed -e 's/.*pyhyph.*/=&/' -i $out/texmf-config/tex/generic/config/language.dat
PATH=$PATH:$out/bin mktexlsr $out/texmf*
PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees
@ -80,25 +84,37 @@ rec {
#
# I find it acceptable, hence the "|| true".
echo "building format files..."
mkdir -p "$out/texmf-var/web2c"
mkdir -p "$out/share/texmf-var/web2c"
ln -sf "$out"/out/share/texmf* "$out"/
PATH="$PATH:$out/bin" fmtutil-sys --all || true
PATH=$PATH:$out/bin mktexlsr $out/texmf*
PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
'' + stdenv.lib.optionalString stdenv.isDarwin ''
for prog in $out/bin/*; do
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler}/lib"
done
'' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" ];
'' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" "promoteLibexec" "patchShebangsInterim"];
patchShebangsInterimBin = doPatchShebangs ''$out/bin/'';
patchShebangsInterimLibexec = doPatchShebangs ''$out/libexec/'';
patchShebangsInterimShareTexmfDist = doPatchShebangs ''$out/share/texmf-dist/scripts/'';
patchShebangsInterimTexmfDist = doPatchShebangs ''$out/texmf-dist/scripts/'';
patchShebangsInterim = fullDepEntry ("") ["patchShebangsInterimBin"
"patchShebangsInterimLibexec" "patchShebangsInterimTexmfDist"
"patchShebangsInterimShareTexmfDist"];
buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11 libICE xproto
freetype t1lib gd libXaw icu ghostscript ed libXt libXpm libXmu libXext
xextproto perl libSM ruby expat curl libjpeg python fontconfig xz pkgconfig
poppler silgraphite lesstif zziplib ]
poppler graphite2 lesstif zziplib harfbuzz texinfo ]
++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper ];
configureFlags = [ "--with-x11" "--enable-ipc" "--with-mktexfmt"
"--enable-shared" "--disable-native-texlive-build" "--with-system-zziplib"
"--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2" ]
"--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2"
"--with-system-freetype=no" "--disable-ttf2pk" "--enable-ttf2pk2"
]
++ ( if stdenv.isDarwin
# ironically, couldn't get xetex compiling on darwin
then [ "--disable-xetex" "--disable-xdv2pdf" "--disable-xdvipdfmx" ]
@ -107,7 +123,7 @@ rec {
phaseNames = [ "addInputs" "doMainBuild" "doMakeInstall" "doPostInstall" ];
name = "texlive-core-2012";
name = "texlive-core-2013";
meta = with stdenv.lib; {
description = "A TeX distribution";

View File

@ -1,9 +1,9 @@
args: with args;
rec {
name = "texlive-extra-2012";
name = "texlive-extra-2013";
src = fetchurl {
url = mirror://debian/pool/main/t/texlive-extra/texlive-extra_2012.20120611.orig.tar.xz;
sha256 = "1wn2gwifb5ww6nb15zdbkk5yz5spynvwqscvrgxzb84p0z3hy8dq";
url = mirror://debian/pool/main/t/texlive-extra/texlive-extra_2013.20131010.orig.tar.xz;
sha256 = "1wciyjwp0swny22amwcnr6vvdwjy423856q7c3l1sd5b31xfbc18";
};
buildInputs = [texLive xz];

View File

@ -10,9 +10,9 @@ rec {
buildInputs = [texLive unzip];
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
mkdir -p $out/texmf/tex/latex/moderncv $out/texmf/doc $out/share
mv *.cls *.sty $out/texmf/tex/latex/moderncv/
mv examples $out/texmf/doc/moderncv
mkdir -p $out/texmf-dist/tex/latex/moderncv $out/texmf-dist/doc $out/share
mv *.cls *.sty $out/texmf-dist/tex/latex/moderncv/
mv examples $out/texmf-dist/doc/moderncv
ln -s $out/texmf* $out/share/
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];

View File

@ -13,9 +13,9 @@ rec {
buildInputs = [texLive unzip];
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
mkdir -p $out/texmf/tex/latex/moderntimeline $out/texmf/doc/moderntimeline $out/share
mv *.dtx *.ins $out/texmf/tex/latex/moderntimeline/
mv *.pdf $out/texmf/doc/moderntimeline/
mkdir -p $out/texmf-dist/tex/latex/moderntimeline $out/texmf-dist/doc/moderntimeline $out/share
mv *.dtx *.ins $out/texmf-dist/tex/latex/moderntimeline/
mv *.pdf $out/texmf-dist/doc/moderntimeline/
ln -s $out/texmf* $out/share/
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];

View File

@ -14,8 +14,8 @@ rec {
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
mkdir -p $out/share/
mkdir -p $out/texmf/tex/generic/pgf
cp -r * $out/texmf/tex/generic/pgf
mkdir -p $out/texmf-dist/tex/generic/pgf
cp -r * $out/texmf-dist/tex/generic/pgf
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];

View File

@ -12,11 +12,11 @@ rec {
export HOME=$PWD
mkdir -p $out/share/
mkdir -p $out/texmf/tex/latex/xcolor
mkdir -p $out/texmf/dvips/xcolor
mkdir -p $out/texmf-dist/tex/latex/xcolor
mkdir -p $out/texmf-dist/dvips/xcolor
latex xcolor.ins
cp *.sty *.def $out/texmf/tex/latex/xcolor
cp *.pro $out/texmf/dvips/xcolor
cp *.sty *.def $out/texmf-dist/tex/latex/xcolor
cp *.pro $out/texmf-dist/dvips/xcolor
#latex xcolor.dtx
#latex xcolor.dtx
@ -25,8 +25,8 @@ rec {
#latex xcolor.dtx
rm *.sty *.pro *.ins *.def *.dtx
mkdir -p $out/texmf/doc/latex-xcolor
cp * $out/texmf/doc/latex-xcolor
mkdir -p $out/texmf-dist/doc/latex-xcolor
cp * $out/texmf-dist/doc/latex-xcolor
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];

View File

@ -4442,7 +4442,10 @@ let
heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { };
harfbuzz = callPackage ../development/libraries/harfbuzz { };
harfbuzz = callPackage ../development/libraries/harfbuzz {
icu = null;
graphite2 = null;
};
hawknl = callPackage ../development/libraries/hawknl { };
@ -5530,6 +5533,7 @@ let
serd = callPackage ../development/libraries/serd {};
silgraphite = callPackage ../development/libraries/silgraphite {};
graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {};
simgear = callPackage ../development/libraries/simgear { };
@ -10028,11 +10032,14 @@ let
texLive = builderDefsPackage (import ../tools/typesetting/tex/texlive) {
inherit builderDefs zlib bzip2 ncurses libpng ed lesstif ruby
gd t1lib freetype icu perl expat curl xz pkgconfig zziplib
libjpeg bison python fontconfig flex poppler silgraphite makeWrapper;
gd t1lib freetype icu perl expat curl xz pkgconfig zziplib texinfo
libjpeg bison python fontconfig flex poppler graphite2 makeWrapper;
inherit (xlibs) libXaw libX11 xproto libXt libXpm
libXmu libXext xextproto libSM libICE;
ghostscript = ghostscriptX;
harfbuzz = harfbuzz.override {
inherit icu graphite2;
};
};
texLiveFull = lib.setName "texlive-full" (texLiveAggregationFun {
@ -10055,7 +10062,7 @@ let
*/
texLiveAggregationFun = params:
builderDefsPackage (import ../tools/typesetting/tex/texlive/aggregate.nix)
({inherit poppler makeWrapper;} // params);
({inherit poppler perl makeWrapper;} // params);
texDisser = callPackage ../tools/typesetting/tex/disser {};