about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2013-10-14 10:36:39 +0400
committerMichael Raskin <7c6f434c@mail.ru>2013-10-14 10:58:54 +0400
commit776adb5704262ecc884fc2d003988ffb23f4df0a (patch)
treecb161dec170faf0311ee0e02e02423fff332ad1c /pkgs/tools/typesetting
parent4dee7de246e6037d494d798efd2a383d9fccc8cc (diff)
downloadnixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar.gz
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar.bz2
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar.lz
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar.xz
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.tar.zst
nixlib-776adb5704262ecc884fc2d003988ffb23f4df0a.zip
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.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tex/texlive/aggregate.nix17
-rw-r--r--pkgs/tools/typesetting/tex/texlive/cm-super.nix20
-rw-r--r--pkgs/tools/typesetting/tex/texlive/context.nix4
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix52
-rw-r--r--pkgs/tools/typesetting/tex/texlive/extra.nix6
-rw-r--r--pkgs/tools/typesetting/tex/texlive/moderncv.nix6
-rw-r--r--pkgs/tools/typesetting/tex/texlive/moderntimeline.nix6
-rw-r--r--pkgs/tools/typesetting/tex/texlive/pgf.nix4
-rw-r--r--pkgs/tools/typesetting/tex/texlive/xcolor.nix12
9 files changed, 74 insertions, 53 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/aggregate.nix b/pkgs/tools/typesetting/tex/texlive/aggregate.nix
index 84fa1cfab75a..2d1de93fed87 100644
--- a/pkgs/tools/typesetting/tex/texlive/aggregate.nix
+++ b/pkgs/tools/typesetting/tex/texlive/aggregate.nix
@@ -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
 
diff --git a/pkgs/tools/typesetting/tex/texlive/cm-super.nix b/pkgs/tools/typesetting/tex/texlive/cm-super.nix
index e23b39368507..4d161c3e0536 100644
--- a/pkgs/tools/typesetting/tex/texlive/cm-super.nix
+++ b/pkgs/tools/typesetting/tex/texlive/cm-super.nix
@@ -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"];
diff --git a/pkgs/tools/typesetting/tex/texlive/context.nix b/pkgs/tools/typesetting/tex/texlive/context.nix
index a7161cea4c1b..c0c702cd4189 100644
--- a/pkgs/tools/typesetting/tex/texlive/context.nix
+++ b/pkgs/tools/typesetting/tex/texlive/context.nix
@@ -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"];
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index f119dbd1e4a1..57f7424dc2da 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -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
-
-    sed -e 's/.*pyhyph.*/=&/' -i $out/texmf-config/tex/generic/config/language.dat
+  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"/
 
-    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";
diff --git a/pkgs/tools/typesetting/tex/texlive/extra.nix b/pkgs/tools/typesetting/tex/texlive/extra.nix
index 180019bb205f..6613578e2c67 100644
--- a/pkgs/tools/typesetting/tex/texlive/extra.nix
+++ b/pkgs/tools/typesetting/tex/texlive/extra.nix
@@ -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];
diff --git a/pkgs/tools/typesetting/tex/texlive/moderncv.nix b/pkgs/tools/typesetting/tex/texlive/moderncv.nix
index 28329cff9167..0ce1afbb41b3 100644
--- a/pkgs/tools/typesetting/tex/texlive/moderncv.nix
+++ b/pkgs/tools/typesetting/tex/texlive/moderncv.nix
@@ -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"];
 
diff --git a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix b/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
index d129cc62020e..4cb93794edfe 100644
--- a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
+++ b/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
@@ -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"];
 
diff --git a/pkgs/tools/typesetting/tex/texlive/pgf.nix b/pkgs/tools/typesetting/tex/texlive/pgf.nix
index 1f7abc126c3a..b46229e98285 100644
--- a/pkgs/tools/typesetting/tex/texlive/pgf.nix
+++ b/pkgs/tools/typesetting/tex/texlive/pgf.nix
@@ -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"];
 
diff --git a/pkgs/tools/typesetting/tex/texlive/xcolor.nix b/pkgs/tools/typesetting/tex/texlive/xcolor.nix
index e59a58ce9b26..892734afe461 100644
--- a/pkgs/tools/typesetting/tex/texlive/xcolor.nix
+++ b/pkgs/tools/typesetting/tex/texlive/xcolor.nix
@@ -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"];