diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-02-06 23:03:12 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-02-06 23:03:12 +0000 |
commit | 215a07c1a9d6d208c1ba0037eccaaba7de9d6b68 (patch) | |
tree | f31e835b16c30957eb4ae3710cbfa922e8a64fbd /pkgs/tools/typesetting/tex/tetex | |
parent | b31c67e24d56c90a6732d3a310ff13684b73e200 (diff) | |
parent | 4e3dcd925499547314567107366cae26a99c4ef7 (diff) | |
download | nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar.gz nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar.bz2 nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar.lz nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar.xz nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.tar.zst nixlib-215a07c1a9d6d208c1ba0037eccaaba7de9d6b68.zip |
svn merge ^/nixpkgs/trunk
Merge conflicts: * unzip (almost trivial) * dvswitch (trivial) * gmp (copied result of `git merge`) The last item introduced gmp-5.0.3, thus full rebuild. +ensureDir->mkdir -p in TeX packages was catched by git but not svn. svn path=/nixpkgs/branches/stdenv-updates/; revision=32091
Diffstat (limited to 'pkgs/tools/typesetting/tex/tetex')
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/default.nix | 44 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/environment.patch | 35 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/getline.patch | 96 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/tetex/setup-hook.sh | 7 |
4 files changed, 182 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/tetex/default.nix b/pkgs/tools/typesetting/tex/tetex/default.nix new file mode 100644 index 000000000000..bb1e3f8b4b03 --- /dev/null +++ b/pkgs/tools/typesetting/tex/tetex/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, flex, bison, zlib, libpng, ncurses, ed }: + +stdenv.mkDerivation { + name = "tetex-3.0"; + + src = fetchurl { + url = ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/tetex-src-3.0.tar.gz; + md5 = "944a4641e79e61043fdaf8f38ecbb4b3"; + }; + + texmf = fetchurl { + url = ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/tetex-texmf-3.0.tar.gz; + md5 = "11aa15c8d3e28ee7815e0d5fcdf43fd4"; + }; + + buildInputs = [ flex bison zlib libpng ncurses ed ]; + + patches = [ ./environment.patch ./getline.patch ]; + + setupHook = ./setup-hook.sh; + + configureFlags = + [ "--disable-multiplatform" + "--without-x11" + "--without-xdvik" + "--without-oxdvik" + "--without-texinfo" + "--without-texi2html" + "--with-system-zlib" + "--with-system-pnglib" + "--with-system-ncurses" + ]; + + postUnpack = + '' + mkdir -p $out/share/texmf + mkdir -p $out/share/texmf-dist + gunzip < $texmf | (cd $out/share/texmf-dist && tar xvf -) + ''; + + meta = { + description = "A full-featured (La)TeX distribution"; + }; +} diff --git a/pkgs/tools/typesetting/tex/tetex/environment.patch b/pkgs/tools/typesetting/tex/tetex/environment.patch new file mode 100644 index 000000000000..6e652849b773 --- /dev/null +++ b/pkgs/tools/typesetting/tex/tetex/environment.patch @@ -0,0 +1,35 @@ +diff -rc --exclude=texmf.in tetex-src-3.0.orig/texk/kpathsea/texmf.in-teTeX tetex-src-3.0/texk/kpathsea/texmf.in-teTeX +*** tetex-src-3.0.orig/texk/kpathsea/texmf.in-teTeX 2006-01-27 17:33:11.000000000 +0100 +--- tetex-src-3.0/texk/kpathsea/texmf.in-teTeX 2006-01-27 17:38:35.000000000 +0100 +*************** +*** 104,109 **** +--- 104,115 ---- + % TEXMFCONFIG = @texmf@-config + TEXMFCONFIG = $HOME/.texmf-config + ++ % TEXMFNIX is supposed to be unset. It's used by the Nix ++ % system to add trees during the build of nix-expressions. ++ ++ % TEXMFNIXHOME, for packages in the user environment. ++ TEXMFNIXHOME = $HOME/.nix-profile/share/texmf-nix ++ + % Now, list all the texmf trees. If you have multiple trees you can + % use shell brace notation, like this: + % TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN} +*************** +*** 111,117 **** + % + % For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named + % explicitly and before all other trees. +! TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} + + % The system trees. These are the trees that are shared by all the users. + SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST +--- 117,123 ---- + % + % For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named + % explicitly and before all other trees. +! TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFNIX,$TEXMFHOME,$TEXMFNIXHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} + + % The system trees. These are the trees that are shared by all the users. + SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST diff --git a/pkgs/tools/typesetting/tex/tetex/getline.patch b/pkgs/tools/typesetting/tex/tetex/getline.patch new file mode 100644 index 000000000000..c82c1b3ac360 --- /dev/null +++ b/pkgs/tools/typesetting/tex/tetex/getline.patch @@ -0,0 +1,96 @@ +Glibc 2.10 has a `getline' symbol that clashes with teTeX's. +Taken from http://lists.ibiblio.org/pipermail/sm-commit/2009-July/024831.html + +diff -rc -x '*~' tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c tetex-src-3.0/texk/dvipsk/afm2tfm.c +*** tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c 2005-01-30 14:17:09.000000000 +0100 +--- tetex-src-3.0/texk/dvipsk/afm2tfm.c 2010-02-03 13:50:21.000000000 +0100 +*************** +*** 257,263 **** + } + + int +! getline P1H(void) { + register char *p ; + register int c ; + +--- 257,263 ---- + } + + int +! tetex_getline P1H(void) { + register char *p ; + register int c ; + +*************** +*** 606,612 **** + ai = newchar() ; + ai->adobenum = -1 ; + ai->adobename = "||" ; /* boundary character name */ +! while (getline()) { + switch(interest(paramstring())) { + case FontName: + fontname = paramnewstring() ; +--- 606,612 ---- + ai = newchar() ; + ai->adobenum = -1 ; + ai->adobename = "||" ; /* boundary character name */ +! while (tetex_getline()) { + switch(interest(paramstring())) { + case FontName: + fontname = paramnewstring() ; +*************** +*** 1882,1888 **** + + while (1) { + while (param == 0 || *param == 0) { +! if (getline() == 0) + error("! premature end in encoding file") ; + for (p=buffer; *p; p++) + if (*p == '%') { +--- 1882,1888 ---- + + while (1) { + while (param == 0 || *param == 0) { +! if (tetex_getline() == 0) + error("! premature end in encoding file") ; + for (p=buffer; *p; p++) + if (*p == '%') { +*************** +*** 1973,1979 **** + p = gettoken() ; + if (strcmp(p, "]")) + error("! token 258 in encoding must be make-array (])") ; +! while (getline()) { + for (p=buffer; *p; p++) + if (*p == '%') { + if (ignoreligkern == 0) +--- 1973,1979 ---- + p = gettoken() ; + if (strcmp(p, "]")) + error("! token 258 in encoding must be make-array (])") ; +! while (tetex_getline()) { + for (p=buffer; *p; p++) + if (*p == '%') { + if (ignoreligkern == 0) +diff -rc -x '*~' tetex-src-3.0-orig/texk/web2c/cpascal.h tetex-src-3.0/texk/web2c/cpascal.h +*** tetex-src-3.0-orig/texk/web2c/cpascal.h 2004-08-28 22:49:59.000000000 +0200 +--- tetex-src-3.0/texk/web2c/cpascal.h 2010-02-03 13:51:04.000000000 +0100 +*************** +*** 240,245 **** +--- 240,255 ---- + #undef getname + #define getname vms_getname + #endif ++ ++ /* Apparently POSIX 2008 has getline and glibc 2.9.90 exports it. ++ * tangle, weave, et al. use that symbol; try to define it away so ++ * something that a standard won't usurp. ++ * From http://tutimura.ath.cx/ptetex/?%C6%B0%BA%EE%CA%F3%B9%F0%2F134 */ ++ #ifdef getline ++ #undef getline ++ #endif ++ #define getline web2c_getline ++ + + /* Declarations for the routines we provide ourselves in lib/. */ + diff --git a/pkgs/tools/typesetting/tex/tetex/setup-hook.sh b/pkgs/tools/typesetting/tex/tetex/setup-hook.sh new file mode 100644 index 000000000000..d79c4fae4196 --- /dev/null +++ b/pkgs/tools/typesetting/tex/tetex/setup-hook.sh @@ -0,0 +1,7 @@ +addTeXMFPath () { + if test -d "$1/share/texmf-nix"; then + export TEXINPUTS="${TEXINPUTS}${TEXINPUTS:+:}$1/share/texmf-nix//:" + fi +} + +envHooks=(${envHooks[@]} addTeXMFPath) |