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);