summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/bin/powerpc-aix/afm2plbin106990 -> 107038 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/afm2tfmbin117298 -> 117338 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/alephbin598009 -> 598057 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/bboxbin6731 -> 6731 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/bg5convbin2003 -> 2003 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/bibtexbin173265 -> 173313 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/bibtex8bin205665 -> 205713 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/cef5convbin3107 -> 3107 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/cefconvbin3019 -> 3019 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/cefsconvbin3123 -> 3123 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/cfftot1bin530989 -> 530989 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ctanglebin103450 -> 103498 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ctiebin76126 -> 76174 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/ctxtools3
-rwxr-xr-xMaster/bin/powerpc-aix/cweavebin137298 -> 137346 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/detexbin85218 -> 85266 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/devnagbin31828 -> 31996 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/disdvibin10243 -> 10243 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dmpbin110392 -> 110440 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dt2dvbin32867 -> 32867 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dv2dtbin11283 -> 11283 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvi2ttybin20259 -> 20259 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvibookbin38322 -> 38322 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dviconcatbin34022 -> 34022 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvicopybin130926 -> 130974 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvidvibin17215 -> 17215 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dviljbin111578 -> 111626 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvilj2pbin111954 -> 112002 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvilj4bin119894 -> 119942 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvilj4lbin119902 -> 119950 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvipdfmbin488717 -> 488765 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvipdfmxbin947838 -> 947886 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvipngbin1127313 -> 1132557 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dviposbin108506 -> 108554 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvipsbin252774 -> 252862 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dviselectbin36610 -> 36610 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvitodvibin42146 -> 42146 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvitompbin103402 -> 103450 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/dvitypebin104494 -> 104542 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/epsffitbin7074 -> 7074 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/exatools3
-rwxr-xr-xMaster/bin/powerpc-aix/extconvbin2003 -> 2003 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/gftodvibin110198 -> 110246 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/gftopkbin93774 -> 93822 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/gftypebin91014 -> 91062 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/gsftopkbin89940 -> 89988 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/hbf2gfbin97994 -> 98042 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/infobin219492 -> 219492 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/infokeybin24848 -> 24848 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/install-infobin45802 -> 45802 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/kpseaccessbin3307 -> 3299 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/kpsereadlinkbin3131 -> 3123 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/kpsestatbin3803 -> 3803 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/kpsewhichbin81802 -> 81850 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/lacheckbin52391 -> 52391 bytes
l---------Master/bin/powerpc-aix/lualatex1
-rwxr-xr-xMaster/bin/powerpc-aix/luatexbin4898019 -> 4898355 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/luatools3
-rwxr-xr-xMaster/bin/powerpc-aix/magbin19526 -> 19526 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/makeindexbin147822 -> 147870 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/makeinfobin292195 -> 292195 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/makempxbin75298 -> 75346 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/makempy3
l---------Master/bin/powerpc-aix/metafun1
-rwxr-xr-xMaster/bin/powerpc-aix/mfbin366674 -> 366722 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/mf-nowinbin359817 -> 359865 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/mftbin109746 -> 109794 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/mktexlsr65
-rwxr-xr-xMaster/bin/powerpc-aix/mktextfm2
-rwxr-xr-xMaster/bin/powerpc-aix/mmafmbin547444 -> 547444 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/mmpfbbin564562 -> 564562 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/mpostbin461614 -> 461670 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/mpstools3
-rwxr-xr-xMaster/bin/powerpc-aix/mptobin9471 -> 9471 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/mptopdf3
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/mtxtools3
-rwxr-xr-xMaster/bin/powerpc-aix/musixflxbin14046 -> 14046 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/newerbin3991 -> 3991 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/odvicopybin137158 -> 137206 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/odvitypebin105878 -> 105926 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/omegabin609641 -> 609689 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/omfontsbin183694 -> 183742 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/otanglebin57503 -> 57503 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/otfinfobin618650 -> 618650 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/otftotfmbin1076170 -> 1076218 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/otp2ocpbin89046 -> 89094 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/outocpbin69610 -> 69658 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/patgenbin45435 -> 45435 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pdfclosebin7269 -> 7269 bytes
l---------Master/bin/powerpc-aix/pdflualatex1
l---------Master/bin/powerpc-aix/pdfluatex1
-rwxr-xr-xMaster/bin/powerpc-aix/pdfopenbin8141 -> 8141 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pdftexbin1685857 -> 1686561 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/pdftools3
-rwxr-xr-xMaster/bin/powerpc-aix/pdftosrcbin537350 -> 537350 bytes
l---------Master/bin/powerpc-aix/pdftrimwhite1
-rwxr-xr-xMaster/bin/powerpc-aix/pfb2pfabin7183 -> 7183 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pk2bmbin9531 -> 9531 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pktogfbin91346 -> 91394 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pktypebin81926 -> 81974 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pltotfbin64022 -> 64022 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/pooltypebin24175 -> 24175 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ps2pkbin207734 -> 207782 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/psbookbin11807 -> 11807 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/psnupbin19875 -> 19875 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/psresizebin18179 -> 18179 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/psselectbin13255 -> 13255 bytes
l---------Master/bin/powerpc-aix/pst2pdf1
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/pstopdf3
-rwxr-xr-xMaster/bin/powerpc-aix/pstopsbin18719 -> 18719 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/rlxtools3
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/runtools3
-rwxr-xr-xMaster/bin/powerpc-aix/sjisconvbin2027 -> 2027 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/synctexbin130302 -> 146450 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1asciibin27895 -> 27895 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1asmbin34643 -> 34643 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1binarybin27071 -> 27071 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1disasmbin33047 -> 33047 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1dotlessjbin540892 -> 540892 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1lintbin483514 -> 483514 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1macbin37859 -> 37859 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1reencodebin554100 -> 554100 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1testpagebin511336 -> 511336 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t1unmacbin34763 -> 34763 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/t4htbin89778 -> 89826 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/tanglebin113402 -> 113450 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/tcdialogbin158480 -> 158480 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/texbin392145 -> 392193 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/tex2xindybin17227 -> 17227 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/tex4htbin157186 -> 157234 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/texexec3
l---------Master/bin/powerpc-aix/texfind1
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/texfont3
-rwxr-xr-xMaster/bin/powerpc-aix/texindexbin16783 -> 16783 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/texlinks2
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/texmfstart2502
l---------Master/bin/powerpc-aix/texshow1
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/textools3
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/texutil3
-rwxr-xr-xMaster/bin/powerpc-aix/tftoplbin101230 -> 101278 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/tiebin8503 -> 8503 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/tmftools3
-rwxr-xr-xMaster/bin/powerpc-aix/ttf2afmbin97358 -> 97398 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ttf2pkbin286730 -> 286778 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ttf2tfmbin322854 -> 322902 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/ttftotype42bin555807 -> 555807 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/vftovpbin115830 -> 115878 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/vlnabin0 -> 12007 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/vptovfbin79254 -> 79254 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/weavebin134458 -> 134506 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/xdvi19
-rwxr-xr-xMaster/bin/powerpc-aix/xdvi-motifbin0 -> 1029368 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/xdvi-motif.binbin1005357 -> 0 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/xdvipdfmxbin1667449 -> 1675913 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/xetexbin10100927 -> 10113587 bytes
-rw-r--r--Master/bin/powerpc-aix/xindy.membin1060919 -> 1060920 bytes
-rwxr-xr-xMaster/bin/powerpc-aix/xindy.runbin2736888 -> 2736888 bytes
l---------[-rwxr-xr-x]Master/bin/powerpc-aix/xmltools3
-rwxr-xr-xMaster/bin/sparc-solaris/afm2plbin150140 -> 150096 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/afm2tfmbin157432 -> 157388 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/alephbin740568 -> 740524 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/bibtexbin259112 -> 259068 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/bibtex8bin292336 -> 292296 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/cfftot1bin469036 -> 469060 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ctanglebin170668 -> 170624 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ctiebin134020 -> 133976 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/ctxtools3
-rwxr-xr-xMaster/bin/sparc-solaris/cweavebin210728 -> 210684 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/detexbin146088 -> 146048 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/devnagbin33908 -> 34204 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dmpbin149284 -> 149244 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dt2dvbin36016 -> 36016 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvicopybin211232 -> 211188 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dviljbin177860 -> 177816 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvilj2pbin178240 -> 178196 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvilj4bin186452 -> 186408 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvilj4lbin186448 -> 186404 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvipdfmbin594696 -> 594656 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvipdfmxbin1100784 -> 1100728 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvipngbin1300896 -> 1302320 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dviposbin172840 -> 172800 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvipsbin379468 -> 379456 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvitompbin176904 -> 176860 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/dvitypebin186304 -> 186260 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/exatools3
-rwxr-xr-xMaster/bin/sparc-solaris/gftodvibin190716 -> 190672 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/gftopkbin171568 -> 171524 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/gftypebin164580 -> 164536 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/gsftopkbin149568 -> 149524 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/hbf2gfbin160072 -> 160028 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/kpseaccessbin7068 -> 7064 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/kpsereadlinkbin6976 -> 6972 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/kpsestatbin7760 -> 7756 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/kpsewhichbin144560 -> 144516 bytes
l---------Master/bin/sparc-solaris/lualatex1
-rwxr-xr-xMaster/bin/sparc-solaris/luatexbin5168988 -> 5169092 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/luatools3
-rwxr-xr-xMaster/bin/sparc-solaris/makeindexbin220220 -> 220180 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/makempxbin133808 -> 133768 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/makempy3
l---------Master/bin/sparc-solaris/metafun1
-rwxr-xr-xMaster/bin/sparc-solaris/mfbin465080 -> 465036 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/mf-nowinbin459768 -> 459724 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/mftbin184800 -> 184756 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/mktexlsr65
-rwxr-xr-xMaster/bin/sparc-solaris/mktextfm2
-rwxr-xr-xMaster/bin/sparc-solaris/mpostbin565472 -> 565428 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/mpstools3
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/mptopdf3
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/mtxtools3
-rwxr-xr-xMaster/bin/sparc-solaris/odvicopybin218264 -> 218220 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/odvitypebin188140 -> 188096 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/omegabin755008 -> 754964 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/omfontsbin280464 -> 280420 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/otanglebin96044 -> 96040 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/otfinfobin602396 -> 602420 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/otftotfmbin1123984 -> 1123968 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/otp2ocpbin154728 -> 154688 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/outocpbin126464 -> 126424 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/patgenbin81668 -> 81664 bytes
l---------Master/bin/sparc-solaris/pdflualatex1
l---------Master/bin/sparc-solaris/pdfluatex1
-rwxr-xr-xMaster/bin/sparc-solaris/pdftexbin1835476 -> 1836732 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/pdftools3
l---------Master/bin/sparc-solaris/pdftrimwhite1
-rwxr-xr-xMaster/bin/sparc-solaris/pktogfbin165928 -> 165884 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/pktypebin152168 -> 152124 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/pltotfbin111800 -> 111796 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/pooltypebin55696 -> 55692 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ps2pkbin293680 -> 293640 bytes
l---------Master/bin/sparc-solaris/pst2pdf1
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/pstopdf3
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/rlxtools3
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/runtools3
-rwxr-xr-xMaster/bin/sparc-solaris/synctexbin149240 -> 153576 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/t4htbin147836 -> 147796 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/tanglebin190784 -> 190740 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/texbin490484 -> 490440 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/tex4htbin226500 -> 226460 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/texexec3
l---------Master/bin/sparc-solaris/texfind1
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/texfont3
-rwxr-xr-xMaster/bin/sparc-solaris/texlinks2
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/texmfstart2502
l---------Master/bin/sparc-solaris/texshow1
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/textools3
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/texutil3
-rwxr-xr-xMaster/bin/sparc-solaris/tftoplbin176388 -> 176344 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/tiebin14516 -> 14516 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/tmftools3
-rwxr-xr-xMaster/bin/sparc-solaris/ttf2afmbin163956 -> 164028 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ttf2pkbin335612 -> 335568 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ttf2tfmbin352368 -> 352324 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/ttftotype42bin390592 -> 390616 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/vftovpbin197500 -> 197456 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/vlnabin0 -> 16144 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/vptovfbin132840 -> 132836 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/weavebin214124 -> 214080 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/xdvi19
-rwxr-xr-xMaster/bin/sparc-solaris/xdvi-motifbin0 -> 1278140 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/xdvi-motif.binbin1248608 -> 0 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/xdvipdfmxbin1732944 -> 1737204 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/xetexbin9787808 -> 9799664 bytes
-rw-r--r--Master/bin/sparc-solaris/xindy.membin949634 -> 1009109 bytes
-rwxr-xr-xMaster/bin/sparc-solaris/xindy.runbin1756464 -> 1877320 bytes
l---------[-rwxr-xr-x]Master/bin/sparc-solaris/xmltools3
266 files changed, 174 insertions, 5124 deletions
diff --git a/Master/bin/powerpc-aix/afm2pl b/Master/bin/powerpc-aix/afm2pl
index 609d83491e6..46793c75595 100755
--- a/Master/bin/powerpc-aix/afm2pl
+++ b/Master/bin/powerpc-aix/afm2pl
Binary files differ
diff --git a/Master/bin/powerpc-aix/afm2tfm b/Master/bin/powerpc-aix/afm2tfm
index a09983fd8ec..80793ffbc2e 100755
--- a/Master/bin/powerpc-aix/afm2tfm
+++ b/Master/bin/powerpc-aix/afm2tfm
Binary files differ
diff --git a/Master/bin/powerpc-aix/aleph b/Master/bin/powerpc-aix/aleph
index 892ec746d5e..ebfebe80e47 100755
--- a/Master/bin/powerpc-aix/aleph
+++ b/Master/bin/powerpc-aix/aleph
Binary files differ
diff --git a/Master/bin/powerpc-aix/bbox b/Master/bin/powerpc-aix/bbox
index 2af5b497ef6..7657bec8459 100755
--- a/Master/bin/powerpc-aix/bbox
+++ b/Master/bin/powerpc-aix/bbox
Binary files differ
diff --git a/Master/bin/powerpc-aix/bg5conv b/Master/bin/powerpc-aix/bg5conv
index 320c20495a9..373ec7e9d45 100755
--- a/Master/bin/powerpc-aix/bg5conv
+++ b/Master/bin/powerpc-aix/bg5conv
Binary files differ
diff --git a/Master/bin/powerpc-aix/bibtex b/Master/bin/powerpc-aix/bibtex
index e2b52b5dcfc..8bff8e25229 100755
--- a/Master/bin/powerpc-aix/bibtex
+++ b/Master/bin/powerpc-aix/bibtex
Binary files differ
diff --git a/Master/bin/powerpc-aix/bibtex8 b/Master/bin/powerpc-aix/bibtex8
index 9180619590a..a9aad0b31d2 100755
--- a/Master/bin/powerpc-aix/bibtex8
+++ b/Master/bin/powerpc-aix/bibtex8
Binary files differ
diff --git a/Master/bin/powerpc-aix/cef5conv b/Master/bin/powerpc-aix/cef5conv
index 1ddf1f90459..a8f47d16968 100755
--- a/Master/bin/powerpc-aix/cef5conv
+++ b/Master/bin/powerpc-aix/cef5conv
Binary files differ
diff --git a/Master/bin/powerpc-aix/cefconv b/Master/bin/powerpc-aix/cefconv
index a1650d8ddbb..1677566aa85 100755
--- a/Master/bin/powerpc-aix/cefconv
+++ b/Master/bin/powerpc-aix/cefconv
Binary files differ
diff --git a/Master/bin/powerpc-aix/cefsconv b/Master/bin/powerpc-aix/cefsconv
index 320949c33fe..7cc2921fa3d 100755
--- a/Master/bin/powerpc-aix/cefsconv
+++ b/Master/bin/powerpc-aix/cefsconv
Binary files differ
diff --git a/Master/bin/powerpc-aix/cfftot1 b/Master/bin/powerpc-aix/cfftot1
index c469b109bfc..08cf44cb4c4 100755
--- a/Master/bin/powerpc-aix/cfftot1
+++ b/Master/bin/powerpc-aix/cfftot1
Binary files differ
diff --git a/Master/bin/powerpc-aix/ctangle b/Master/bin/powerpc-aix/ctangle
index f60a23c550f..c00f1617188 100755
--- a/Master/bin/powerpc-aix/ctangle
+++ b/Master/bin/powerpc-aix/ctangle
Binary files differ
diff --git a/Master/bin/powerpc-aix/ctie b/Master/bin/powerpc-aix/ctie
index 486b28702b2..afafa7fc19f 100755
--- a/Master/bin/powerpc-aix/ctie
+++ b/Master/bin/powerpc-aix/ctie
Binary files differ
diff --git a/Master/bin/powerpc-aix/ctxtools b/Master/bin/powerpc-aix/ctxtools
index 84e47bbee3c..66237b28340 100755..120000
--- a/Master/bin/powerpc-aix/ctxtools
+++ b/Master/bin/powerpc-aix/ctxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart ctxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/cweave b/Master/bin/powerpc-aix/cweave
index b93bde5c451..c6a42cc5874 100755
--- a/Master/bin/powerpc-aix/cweave
+++ b/Master/bin/powerpc-aix/cweave
Binary files differ
diff --git a/Master/bin/powerpc-aix/detex b/Master/bin/powerpc-aix/detex
index d7013c882a5..e32b8d3f6e2 100755
--- a/Master/bin/powerpc-aix/detex
+++ b/Master/bin/powerpc-aix/detex
Binary files differ
diff --git a/Master/bin/powerpc-aix/devnag b/Master/bin/powerpc-aix/devnag
index b601a791829..4a66324587f 100755
--- a/Master/bin/powerpc-aix/devnag
+++ b/Master/bin/powerpc-aix/devnag
Binary files differ
diff --git a/Master/bin/powerpc-aix/disdvi b/Master/bin/powerpc-aix/disdvi
index 79edbf6dc24..e40e467e288 100755
--- a/Master/bin/powerpc-aix/disdvi
+++ b/Master/bin/powerpc-aix/disdvi
Binary files differ
diff --git a/Master/bin/powerpc-aix/dmp b/Master/bin/powerpc-aix/dmp
index a602f23eb71..3b2c82d2231 100755
--- a/Master/bin/powerpc-aix/dmp
+++ b/Master/bin/powerpc-aix/dmp
Binary files differ
diff --git a/Master/bin/powerpc-aix/dt2dv b/Master/bin/powerpc-aix/dt2dv
index dbb56ff046b..06208f2687c 100755
--- a/Master/bin/powerpc-aix/dt2dv
+++ b/Master/bin/powerpc-aix/dt2dv
Binary files differ
diff --git a/Master/bin/powerpc-aix/dv2dt b/Master/bin/powerpc-aix/dv2dt
index 43a369cd127..356d71b99ed 100755
--- a/Master/bin/powerpc-aix/dv2dt
+++ b/Master/bin/powerpc-aix/dv2dt
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvi2tty b/Master/bin/powerpc-aix/dvi2tty
index 894ccac277d..572c976c2cd 100755
--- a/Master/bin/powerpc-aix/dvi2tty
+++ b/Master/bin/powerpc-aix/dvi2tty
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvibook b/Master/bin/powerpc-aix/dvibook
index 0bf9af397ed..38b9fb1b28d 100755
--- a/Master/bin/powerpc-aix/dvibook
+++ b/Master/bin/powerpc-aix/dvibook
Binary files differ
diff --git a/Master/bin/powerpc-aix/dviconcat b/Master/bin/powerpc-aix/dviconcat
index 11442e2644e..b99f72b4cac 100755
--- a/Master/bin/powerpc-aix/dviconcat
+++ b/Master/bin/powerpc-aix/dviconcat
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvicopy b/Master/bin/powerpc-aix/dvicopy
index 0c4960b0ce7..0fc93bf1dbf 100755
--- a/Master/bin/powerpc-aix/dvicopy
+++ b/Master/bin/powerpc-aix/dvicopy
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvidvi b/Master/bin/powerpc-aix/dvidvi
index 835de6b7a22..ad415dee81d 100755
--- a/Master/bin/powerpc-aix/dvidvi
+++ b/Master/bin/powerpc-aix/dvidvi
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvilj b/Master/bin/powerpc-aix/dvilj
index b59e17f9c0b..0bfc4140858 100755
--- a/Master/bin/powerpc-aix/dvilj
+++ b/Master/bin/powerpc-aix/dvilj
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvilj2p b/Master/bin/powerpc-aix/dvilj2p
index e0fcbd09cd7..343da304403 100755
--- a/Master/bin/powerpc-aix/dvilj2p
+++ b/Master/bin/powerpc-aix/dvilj2p
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvilj4 b/Master/bin/powerpc-aix/dvilj4
index 21826cdffc2..703d2ea6a1b 100755
--- a/Master/bin/powerpc-aix/dvilj4
+++ b/Master/bin/powerpc-aix/dvilj4
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvilj4l b/Master/bin/powerpc-aix/dvilj4l
index 699561c732b..a4c5585127a 100755
--- a/Master/bin/powerpc-aix/dvilj4l
+++ b/Master/bin/powerpc-aix/dvilj4l
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvipdfm b/Master/bin/powerpc-aix/dvipdfm
index c21e4026628..72257a61802 100755
--- a/Master/bin/powerpc-aix/dvipdfm
+++ b/Master/bin/powerpc-aix/dvipdfm
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvipdfmx b/Master/bin/powerpc-aix/dvipdfmx
index 0efaa29e0be..77ffb44612f 100755
--- a/Master/bin/powerpc-aix/dvipdfmx
+++ b/Master/bin/powerpc-aix/dvipdfmx
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvipng b/Master/bin/powerpc-aix/dvipng
index 430136af0c7..ea4094b8738 100755
--- a/Master/bin/powerpc-aix/dvipng
+++ b/Master/bin/powerpc-aix/dvipng
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvipos b/Master/bin/powerpc-aix/dvipos
index b033dd9dd26..8c364665894 100755
--- a/Master/bin/powerpc-aix/dvipos
+++ b/Master/bin/powerpc-aix/dvipos
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvips b/Master/bin/powerpc-aix/dvips
index e7cff6cb16a..a594e9b6769 100755
--- a/Master/bin/powerpc-aix/dvips
+++ b/Master/bin/powerpc-aix/dvips
Binary files differ
diff --git a/Master/bin/powerpc-aix/dviselect b/Master/bin/powerpc-aix/dviselect
index bbf080f39a7..9fe205dfd3e 100755
--- a/Master/bin/powerpc-aix/dviselect
+++ b/Master/bin/powerpc-aix/dviselect
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvitodvi b/Master/bin/powerpc-aix/dvitodvi
index db5ee6de8b9..d525f2fe10e 100755
--- a/Master/bin/powerpc-aix/dvitodvi
+++ b/Master/bin/powerpc-aix/dvitodvi
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvitomp b/Master/bin/powerpc-aix/dvitomp
index a1024c1a86f..672790c64af 100755
--- a/Master/bin/powerpc-aix/dvitomp
+++ b/Master/bin/powerpc-aix/dvitomp
Binary files differ
diff --git a/Master/bin/powerpc-aix/dvitype b/Master/bin/powerpc-aix/dvitype
index 3a8f3edf802..a75ded2c758 100755
--- a/Master/bin/powerpc-aix/dvitype
+++ b/Master/bin/powerpc-aix/dvitype
Binary files differ
diff --git a/Master/bin/powerpc-aix/epsffit b/Master/bin/powerpc-aix/epsffit
index a24a024e978..63173d5a477 100755
--- a/Master/bin/powerpc-aix/epsffit
+++ b/Master/bin/powerpc-aix/epsffit
Binary files differ
diff --git a/Master/bin/powerpc-aix/exatools b/Master/bin/powerpc-aix/exatools
index 50ff0f07e46..304ccdc7e15 100755..120000
--- a/Master/bin/powerpc-aix/exatools
+++ b/Master/bin/powerpc-aix/exatools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart exatools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/exatools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/extconv b/Master/bin/powerpc-aix/extconv
index 4c51646118b..0e23259bd36 100755
--- a/Master/bin/powerpc-aix/extconv
+++ b/Master/bin/powerpc-aix/extconv
Binary files differ
diff --git a/Master/bin/powerpc-aix/gftodvi b/Master/bin/powerpc-aix/gftodvi
index e230083d3eb..06a4eaa7ff0 100755
--- a/Master/bin/powerpc-aix/gftodvi
+++ b/Master/bin/powerpc-aix/gftodvi
Binary files differ
diff --git a/Master/bin/powerpc-aix/gftopk b/Master/bin/powerpc-aix/gftopk
index 0eac8162be7..548a1cd9f8d 100755
--- a/Master/bin/powerpc-aix/gftopk
+++ b/Master/bin/powerpc-aix/gftopk
Binary files differ
diff --git a/Master/bin/powerpc-aix/gftype b/Master/bin/powerpc-aix/gftype
index 3ff843b7e10..c4f54120267 100755
--- a/Master/bin/powerpc-aix/gftype
+++ b/Master/bin/powerpc-aix/gftype
Binary files differ
diff --git a/Master/bin/powerpc-aix/gsftopk b/Master/bin/powerpc-aix/gsftopk
index 55a9bca42d6..8f8994564de 100755
--- a/Master/bin/powerpc-aix/gsftopk
+++ b/Master/bin/powerpc-aix/gsftopk
Binary files differ
diff --git a/Master/bin/powerpc-aix/hbf2gf b/Master/bin/powerpc-aix/hbf2gf
index f15f514eb3a..b24dee795bb 100755
--- a/Master/bin/powerpc-aix/hbf2gf
+++ b/Master/bin/powerpc-aix/hbf2gf
Binary files differ
diff --git a/Master/bin/powerpc-aix/info b/Master/bin/powerpc-aix/info
index 8626f3b8da1..e236f0b4525 100755
--- a/Master/bin/powerpc-aix/info
+++ b/Master/bin/powerpc-aix/info
Binary files differ
diff --git a/Master/bin/powerpc-aix/infokey b/Master/bin/powerpc-aix/infokey
index 0ae6fe556f0..7e98a4f92f5 100755
--- a/Master/bin/powerpc-aix/infokey
+++ b/Master/bin/powerpc-aix/infokey
Binary files differ
diff --git a/Master/bin/powerpc-aix/install-info b/Master/bin/powerpc-aix/install-info
index 7a53928a621..1051957eaec 100755
--- a/Master/bin/powerpc-aix/install-info
+++ b/Master/bin/powerpc-aix/install-info
Binary files differ
diff --git a/Master/bin/powerpc-aix/kpseaccess b/Master/bin/powerpc-aix/kpseaccess
index 5191addfd1d..ef6763aacd3 100755
--- a/Master/bin/powerpc-aix/kpseaccess
+++ b/Master/bin/powerpc-aix/kpseaccess
Binary files differ
diff --git a/Master/bin/powerpc-aix/kpsereadlink b/Master/bin/powerpc-aix/kpsereadlink
index 15deb10f4a2..0accdc63112 100755
--- a/Master/bin/powerpc-aix/kpsereadlink
+++ b/Master/bin/powerpc-aix/kpsereadlink
Binary files differ
diff --git a/Master/bin/powerpc-aix/kpsestat b/Master/bin/powerpc-aix/kpsestat
index 17c6ea42c76..64e81830503 100755
--- a/Master/bin/powerpc-aix/kpsestat
+++ b/Master/bin/powerpc-aix/kpsestat
Binary files differ
diff --git a/Master/bin/powerpc-aix/kpsewhich b/Master/bin/powerpc-aix/kpsewhich
index 24b85d1a00e..5f5092f9c62 100755
--- a/Master/bin/powerpc-aix/kpsewhich
+++ b/Master/bin/powerpc-aix/kpsewhich
Binary files differ
diff --git a/Master/bin/powerpc-aix/lacheck b/Master/bin/powerpc-aix/lacheck
index 33e60dbde8c..37c68cec10b 100755
--- a/Master/bin/powerpc-aix/lacheck
+++ b/Master/bin/powerpc-aix/lacheck
Binary files differ
diff --git a/Master/bin/powerpc-aix/lualatex b/Master/bin/powerpc-aix/lualatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/powerpc-aix/lualatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/luatex b/Master/bin/powerpc-aix/luatex
index 1b99b22814c..81dc4277790 100755
--- a/Master/bin/powerpc-aix/luatex
+++ b/Master/bin/powerpc-aix/luatex
Binary files differ
diff --git a/Master/bin/powerpc-aix/luatools b/Master/bin/powerpc-aix/luatools
index cb3ec1add4a..8fd68d0935a 100755..120000
--- a/Master/bin/powerpc-aix/luatools
+++ b/Master/bin/powerpc-aix/luatools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart luatools.lua "$@"
+../../texmf-dist/scripts/context/stubs/unix/luatools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/mag b/Master/bin/powerpc-aix/mag
index feb24be02d2..878d266f3a0 100755
--- a/Master/bin/powerpc-aix/mag
+++ b/Master/bin/powerpc-aix/mag
Binary files differ
diff --git a/Master/bin/powerpc-aix/makeindex b/Master/bin/powerpc-aix/makeindex
index ec173752097..f273e3cfdbf 100755
--- a/Master/bin/powerpc-aix/makeindex
+++ b/Master/bin/powerpc-aix/makeindex
Binary files differ
diff --git a/Master/bin/powerpc-aix/makeinfo b/Master/bin/powerpc-aix/makeinfo
index ebdf33dd002..f78723e6fc0 100755
--- a/Master/bin/powerpc-aix/makeinfo
+++ b/Master/bin/powerpc-aix/makeinfo
Binary files differ
diff --git a/Master/bin/powerpc-aix/makempx b/Master/bin/powerpc-aix/makempx
index 61ca2aa6a3d..e2f8537e21d 100755
--- a/Master/bin/powerpc-aix/makempx
+++ b/Master/bin/powerpc-aix/makempx
Binary files differ
diff --git a/Master/bin/powerpc-aix/makempy b/Master/bin/powerpc-aix/makempy
index 4bf7a1af230..a3df543b304 100755..120000
--- a/Master/bin/powerpc-aix/makempy
+++ b/Master/bin/powerpc-aix/makempy
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart makempy.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/makempy \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/metafun b/Master/bin/powerpc-aix/metafun
new file mode 120000
index 00000000000..96672bbb523
--- /dev/null
+++ b/Master/bin/powerpc-aix/metafun
@@ -0,0 +1 @@
+mpost \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/mf b/Master/bin/powerpc-aix/mf
index 6563f9042b4..374c7e07c9e 100755
--- a/Master/bin/powerpc-aix/mf
+++ b/Master/bin/powerpc-aix/mf
Binary files differ
diff --git a/Master/bin/powerpc-aix/mf-nowin b/Master/bin/powerpc-aix/mf-nowin
index d6e8f54f663..9a40b8cd187 100755
--- a/Master/bin/powerpc-aix/mf-nowin
+++ b/Master/bin/powerpc-aix/mf-nowin
Binary files differ
diff --git a/Master/bin/powerpc-aix/mft b/Master/bin/powerpc-aix/mft
index 5a305d41663..47b3c3f8837 100755
--- a/Master/bin/powerpc-aix/mft
+++ b/Master/bin/powerpc-aix/mft
Binary files differ
diff --git a/Master/bin/powerpc-aix/mktexlsr b/Master/bin/powerpc-aix/mktexlsr
index bd9b56b1906..2c4ac96f3dd 100755
--- a/Master/bin/powerpc-aix/mktexlsr
+++ b/Master/bin/powerpc-aix/mktexlsr
@@ -5,26 +5,32 @@
# installation won't write this script over yours.)
#
# Suitable for calling from cron, as in:
-# 0 * * * * cd /your/texmf/root && /usr/local/bin/mktexlsr
-# unless the scripts live in a different directory than the 'kpseaccess',
-# 'kpsestat', 'kpsereadlink', and 'kpsewhich' binaries.
+# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr
#
# Originally written as `texhash' by Thomas Esser
# <te@dbs.uni-hannover.de>, Okt., 1994.
# Public domain.
-version='$Id: mktexlsr 8399 2008-05-28 22:19:34Z karl $'
+version='$Id: mktexlsr 9164 2008-07-02 17:42:11Z karl $'
progname=`echo $0 | sed 's%.*/%%'`
usage="Usage: $progname [DIR]...
-The only options are --help, --version, --verbose, --quiet, and --silent.
+Rebuild ls-R filename databases. If one or more arguments DIRS are
+given, these are used as the directories in which to build ls-R. Else
+all directories in the search path for ls-R files (\$TEXMFDBS) are used.
+
+Options:
+ --dry-run do not actually update anything
+ --help display this help and exit
+ --quiet cancel --verbose
+ --silent same as --quiet
+ --verbose explain what is being done
+ --version output version information and exit
+
If standard input is a terminal, --verbose is on by default.
---quiet and --silent are synonyms, and cancel --verbose.
-Rebuild all necessary ls-R filename databases completely. If one or
-more arguments DIRS are given, these are used as texmf directories to
-build ls-R for. Else all directories in the search path for ls-R files
-(\$TEXMFDBS) are used."
+Report bugs to tex-k@tug.org.
+"
# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate
# directories in path lists whereas Unix uses `:'. Make an exception for
@@ -53,6 +59,8 @@ case $dirname in
esac
if tty -s; then verbose=true; else verbose=false; fi
+dry_run=false
+trees=
# A copy of some stuff from mktex.opt, so we can run in the presence of
# terminally damaged ls-R files.
@@ -66,9 +74,19 @@ while test $# -gt 0; do
exit 0
elif test "x$1" = x--verbose || test "x$1" = x-verbose; then
verbose=true
+ elif test "x$1" = x--dry-run || test "x$1" = x-n; then
+ dry_run=true
elif test "x$1" = x--quiet || test "x$1" = x--silent \
|| test "x$1" = x-quiet || test "x$1" = x-silent ; then
verbose=false
+ elif test "x$1" = x--; then
+ :
+ elif echo "x$1" | grep '^x-' >/dev/null; then
+ echo "$progname: unknown option $1, try --help if you need it." >&2
+ exit 1
+ else
+ test -d "$1" || echo "$progname: $1 not a directory." >&2
+ trees="$trees $1" # don't want to update system dirs
fi
shift
done
@@ -79,16 +97,21 @@ ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.'
# The old string, which should continue to work.
old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.'
-trap 'cd / ; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15
+trap 'cd /; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15
# Get list of directories from $TEXMFDBS; eliminate duplicates.
-test $# = 0 && {
- OIFS=$IFS
- IFS='
+{
+ if test -n "$trees"; then
+ set x $trees
+ else
+ OIFS=$IFS # want just a newline
+ IFS='
'
- set x `kpsewhich --show-path=ls-R | tr : '
-' | sort | uniq`; shift
- IFS=$OIFS
+ set x `kpsewhich --show-path=ls-R | tr : '
+' | sort | uniq`
+ IFS=$OIFS
+ fi
+ shift
}
for TEXMFLS_R in "$@"; do
@@ -98,8 +121,8 @@ for TEXMFLS_R in "$@"; do
/* | [A-z]:/*) ;;
*) TEXMFLS_R="`pwd`/$TEXMFLS_R"
esac
- # Allow for ls-R and ls-r to exist. But create ls-R if we're working
- # from scratch.
+ # Allow for either ls-R and ls-r to exist. But create ls-R if we're
+ # working from scratch.
if test -f "$TEXMFLS_R/ls-R"; then
db_file="$TEXMFLS_R/ls-R"
elif test -f "$TEXMFLS_R/ls-r"; then
@@ -117,6 +140,8 @@ for TEXMFLS_R in "$@"; do
esac
db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname
+ # want to be silent if the directory doesn't exist, since the ls-R
+ # path ordinarily contains many nonexistent directories.
test -d "$db_dir" || continue
test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
@@ -141,6 +166,8 @@ for TEXMFLS_R in "$@"; do
rm -f "$db_file_tmp"
$verbose && echo "$progname: Updating $db_file... " >&2
+ $dry_run && continue
+
echo "$ls_R_magic" >"$db_file_tmp"
# The main task. We put ./: in the output, so top-level files can be
diff --git a/Master/bin/powerpc-aix/mktextfm b/Master/bin/powerpc-aix/mktextfm
index a423d0309b0..8884351d7a1 100755
--- a/Master/bin/powerpc-aix/mktextfm
+++ b/Master/bin/powerpc-aix/mktextfm
@@ -48,7 +48,7 @@ esac
(
NAME=`basename "$1" .tfm`
-MAG=1
+MAG=0
#DEST="$2"
DPI=$BDPI
diff --git a/Master/bin/powerpc-aix/mmafm b/Master/bin/powerpc-aix/mmafm
index 4b1f9227a19..9bea77f7d13 100755
--- a/Master/bin/powerpc-aix/mmafm
+++ b/Master/bin/powerpc-aix/mmafm
Binary files differ
diff --git a/Master/bin/powerpc-aix/mmpfb b/Master/bin/powerpc-aix/mmpfb
index 2b298ce062c..360ce084852 100755
--- a/Master/bin/powerpc-aix/mmpfb
+++ b/Master/bin/powerpc-aix/mmpfb
Binary files differ
diff --git a/Master/bin/powerpc-aix/mpost b/Master/bin/powerpc-aix/mpost
index f7fcb31cbab..71ab87204a8 100755
--- a/Master/bin/powerpc-aix/mpost
+++ b/Master/bin/powerpc-aix/mpost
Binary files differ
diff --git a/Master/bin/powerpc-aix/mpstools b/Master/bin/powerpc-aix/mpstools
index b4c8f634548..caf4ae949f7 100755..120000
--- a/Master/bin/powerpc-aix/mpstools
+++ b/Master/bin/powerpc-aix/mpstools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mpstools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/mpstools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/mpto b/Master/bin/powerpc-aix/mpto
index d06f7ab7a3c..aa3dd0f541f 100755
--- a/Master/bin/powerpc-aix/mpto
+++ b/Master/bin/powerpc-aix/mpto
Binary files differ
diff --git a/Master/bin/powerpc-aix/mptopdf b/Master/bin/powerpc-aix/mptopdf
index 980a3123d1a..83172e791cd 100755..120000
--- a/Master/bin/powerpc-aix/mptopdf
+++ b/Master/bin/powerpc-aix/mptopdf
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mptopdf.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/mptopdf \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/mtxtools b/Master/bin/powerpc-aix/mtxtools
index 2922e0b4674..d99a8081bb9 100755..120000
--- a/Master/bin/powerpc-aix/mtxtools
+++ b/Master/bin/powerpc-aix/mtxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mtxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/mtxtools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/musixflx b/Master/bin/powerpc-aix/musixflx
index 49dbcf0be42..83c542c85d6 100755
--- a/Master/bin/powerpc-aix/musixflx
+++ b/Master/bin/powerpc-aix/musixflx
Binary files differ
diff --git a/Master/bin/powerpc-aix/newer b/Master/bin/powerpc-aix/newer
index 84e27495bb1..077eb8b8a98 100755
--- a/Master/bin/powerpc-aix/newer
+++ b/Master/bin/powerpc-aix/newer
Binary files differ
diff --git a/Master/bin/powerpc-aix/odvicopy b/Master/bin/powerpc-aix/odvicopy
index 598ce56f477..39feb798aa8 100755
--- a/Master/bin/powerpc-aix/odvicopy
+++ b/Master/bin/powerpc-aix/odvicopy
Binary files differ
diff --git a/Master/bin/powerpc-aix/odvitype b/Master/bin/powerpc-aix/odvitype
index 63bcb081746..429fc99262c 100755
--- a/Master/bin/powerpc-aix/odvitype
+++ b/Master/bin/powerpc-aix/odvitype
Binary files differ
diff --git a/Master/bin/powerpc-aix/omega b/Master/bin/powerpc-aix/omega
index afe2617cf93..25cd43ec22e 100755
--- a/Master/bin/powerpc-aix/omega
+++ b/Master/bin/powerpc-aix/omega
Binary files differ
diff --git a/Master/bin/powerpc-aix/omfonts b/Master/bin/powerpc-aix/omfonts
index e7159a33eaf..3de46a98a07 100755
--- a/Master/bin/powerpc-aix/omfonts
+++ b/Master/bin/powerpc-aix/omfonts
Binary files differ
diff --git a/Master/bin/powerpc-aix/otangle b/Master/bin/powerpc-aix/otangle
index 53803e9ea28..05a8f281264 100755
--- a/Master/bin/powerpc-aix/otangle
+++ b/Master/bin/powerpc-aix/otangle
Binary files differ
diff --git a/Master/bin/powerpc-aix/otfinfo b/Master/bin/powerpc-aix/otfinfo
index 701c83efbc5..14d75ac5a17 100755
--- a/Master/bin/powerpc-aix/otfinfo
+++ b/Master/bin/powerpc-aix/otfinfo
Binary files differ
diff --git a/Master/bin/powerpc-aix/otftotfm b/Master/bin/powerpc-aix/otftotfm
index dbe2f90a238..7de6426e5d5 100755
--- a/Master/bin/powerpc-aix/otftotfm
+++ b/Master/bin/powerpc-aix/otftotfm
Binary files differ
diff --git a/Master/bin/powerpc-aix/otp2ocp b/Master/bin/powerpc-aix/otp2ocp
index 5b31e1cf77a..96fc8b83c32 100755
--- a/Master/bin/powerpc-aix/otp2ocp
+++ b/Master/bin/powerpc-aix/otp2ocp
Binary files differ
diff --git a/Master/bin/powerpc-aix/outocp b/Master/bin/powerpc-aix/outocp
index ac401ba0b89..6397f1afc09 100755
--- a/Master/bin/powerpc-aix/outocp
+++ b/Master/bin/powerpc-aix/outocp
Binary files differ
diff --git a/Master/bin/powerpc-aix/patgen b/Master/bin/powerpc-aix/patgen
index 68b1f9ca7f4..cf24d809a77 100755
--- a/Master/bin/powerpc-aix/patgen
+++ b/Master/bin/powerpc-aix/patgen
Binary files differ
diff --git a/Master/bin/powerpc-aix/pdfclose b/Master/bin/powerpc-aix/pdfclose
index 7551f1ef31d..8d8137fcf62 100755
--- a/Master/bin/powerpc-aix/pdfclose
+++ b/Master/bin/powerpc-aix/pdfclose
Binary files differ
diff --git a/Master/bin/powerpc-aix/pdflualatex b/Master/bin/powerpc-aix/pdflualatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/powerpc-aix/pdflualatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pdfluatex b/Master/bin/powerpc-aix/pdfluatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/powerpc-aix/pdfluatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pdfopen b/Master/bin/powerpc-aix/pdfopen
index 649c036f901..baf0c8dde94 100755
--- a/Master/bin/powerpc-aix/pdfopen
+++ b/Master/bin/powerpc-aix/pdfopen
Binary files differ
diff --git a/Master/bin/powerpc-aix/pdftex b/Master/bin/powerpc-aix/pdftex
index 66200c3c0c4..f828c06bf52 100755
--- a/Master/bin/powerpc-aix/pdftex
+++ b/Master/bin/powerpc-aix/pdftex
Binary files differ
diff --git a/Master/bin/powerpc-aix/pdftools b/Master/bin/powerpc-aix/pdftools
index 92ee803a868..fa012780ccc 100755..120000
--- a/Master/bin/powerpc-aix/pdftools
+++ b/Master/bin/powerpc-aix/pdftools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart pdftools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/pdftools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pdftosrc b/Master/bin/powerpc-aix/pdftosrc
index bc7a2970ca2..3b7f9d737d7 100755
--- a/Master/bin/powerpc-aix/pdftosrc
+++ b/Master/bin/powerpc-aix/pdftosrc
Binary files differ
diff --git a/Master/bin/powerpc-aix/pdftrimwhite b/Master/bin/powerpc-aix/pdftrimwhite
new file mode 120000
index 00000000000..46526e8ffcc
--- /dev/null
+++ b/Master/bin/powerpc-aix/pdftrimwhite
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/pdftrimwhite \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pfb2pfa b/Master/bin/powerpc-aix/pfb2pfa
index d3999809601..a5ac5c60859 100755
--- a/Master/bin/powerpc-aix/pfb2pfa
+++ b/Master/bin/powerpc-aix/pfb2pfa
Binary files differ
diff --git a/Master/bin/powerpc-aix/pk2bm b/Master/bin/powerpc-aix/pk2bm
index 02696b2827d..e19ad0dc7ce 100755
--- a/Master/bin/powerpc-aix/pk2bm
+++ b/Master/bin/powerpc-aix/pk2bm
Binary files differ
diff --git a/Master/bin/powerpc-aix/pktogf b/Master/bin/powerpc-aix/pktogf
index 72e7d7d9663..4cf88b536bc 100755
--- a/Master/bin/powerpc-aix/pktogf
+++ b/Master/bin/powerpc-aix/pktogf
Binary files differ
diff --git a/Master/bin/powerpc-aix/pktype b/Master/bin/powerpc-aix/pktype
index 63f45a9f397..755ae9a3c39 100755
--- a/Master/bin/powerpc-aix/pktype
+++ b/Master/bin/powerpc-aix/pktype
Binary files differ
diff --git a/Master/bin/powerpc-aix/pltotf b/Master/bin/powerpc-aix/pltotf
index 5426db0b02a..f07422b6b50 100755
--- a/Master/bin/powerpc-aix/pltotf
+++ b/Master/bin/powerpc-aix/pltotf
Binary files differ
diff --git a/Master/bin/powerpc-aix/pooltype b/Master/bin/powerpc-aix/pooltype
index bb3dfacfa90..d3071528796 100755
--- a/Master/bin/powerpc-aix/pooltype
+++ b/Master/bin/powerpc-aix/pooltype
Binary files differ
diff --git a/Master/bin/powerpc-aix/ps2pk b/Master/bin/powerpc-aix/ps2pk
index 47185d3046d..6f26d2e4727 100755
--- a/Master/bin/powerpc-aix/ps2pk
+++ b/Master/bin/powerpc-aix/ps2pk
Binary files differ
diff --git a/Master/bin/powerpc-aix/psbook b/Master/bin/powerpc-aix/psbook
index aad1c0db583..c31a3372c24 100755
--- a/Master/bin/powerpc-aix/psbook
+++ b/Master/bin/powerpc-aix/psbook
Binary files differ
diff --git a/Master/bin/powerpc-aix/psnup b/Master/bin/powerpc-aix/psnup
index f3586994d03..39252b22130 100755
--- a/Master/bin/powerpc-aix/psnup
+++ b/Master/bin/powerpc-aix/psnup
Binary files differ
diff --git a/Master/bin/powerpc-aix/psresize b/Master/bin/powerpc-aix/psresize
index 4bd389a559a..d9ee013158a 100755
--- a/Master/bin/powerpc-aix/psresize
+++ b/Master/bin/powerpc-aix/psresize
Binary files differ
diff --git a/Master/bin/powerpc-aix/psselect b/Master/bin/powerpc-aix/psselect
index b94db12c2d4..9e27ce6eb7c 100755
--- a/Master/bin/powerpc-aix/psselect
+++ b/Master/bin/powerpc-aix/psselect
Binary files differ
diff --git a/Master/bin/powerpc-aix/pst2pdf b/Master/bin/powerpc-aix/pst2pdf
new file mode 120000
index 00000000000..60a28335578
--- /dev/null
+++ b/Master/bin/powerpc-aix/pst2pdf
@@ -0,0 +1 @@
+../../texmf-dist/scripts/pst2pdf/pst2pdf.pl \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pstopdf b/Master/bin/powerpc-aix/pstopdf
index 5b38ed426cb..44478ee1dd4 100755..120000
--- a/Master/bin/powerpc-aix/pstopdf
+++ b/Master/bin/powerpc-aix/pstopdf
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart pstopdf.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/pstops b/Master/bin/powerpc-aix/pstops
index a8657c77332..1d10515ad75 100755
--- a/Master/bin/powerpc-aix/pstops
+++ b/Master/bin/powerpc-aix/pstops
Binary files differ
diff --git a/Master/bin/powerpc-aix/rlxtools b/Master/bin/powerpc-aix/rlxtools
index 41cea40fc09..a5078af4f10 100755..120000
--- a/Master/bin/powerpc-aix/rlxtools
+++ b/Master/bin/powerpc-aix/rlxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart rlxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/rlxtools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/runtools b/Master/bin/powerpc-aix/runtools
index ff9a333791b..127f29a36df 100755..120000
--- a/Master/bin/powerpc-aix/runtools
+++ b/Master/bin/powerpc-aix/runtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart runtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/runtools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/sjisconv b/Master/bin/powerpc-aix/sjisconv
index 99c93393793..634063d95bd 100755
--- a/Master/bin/powerpc-aix/sjisconv
+++ b/Master/bin/powerpc-aix/sjisconv
Binary files differ
diff --git a/Master/bin/powerpc-aix/synctex b/Master/bin/powerpc-aix/synctex
index 1905a87b84e..107e69d472e 100755
--- a/Master/bin/powerpc-aix/synctex
+++ b/Master/bin/powerpc-aix/synctex
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1ascii b/Master/bin/powerpc-aix/t1ascii
index c8b5b245b39..6c98330a05a 100755
--- a/Master/bin/powerpc-aix/t1ascii
+++ b/Master/bin/powerpc-aix/t1ascii
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1asm b/Master/bin/powerpc-aix/t1asm
index a4172498581..4c7cd041d2e 100755
--- a/Master/bin/powerpc-aix/t1asm
+++ b/Master/bin/powerpc-aix/t1asm
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1binary b/Master/bin/powerpc-aix/t1binary
index a68abab2fb2..f80de3db32e 100755
--- a/Master/bin/powerpc-aix/t1binary
+++ b/Master/bin/powerpc-aix/t1binary
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1disasm b/Master/bin/powerpc-aix/t1disasm
index 21252c69681..de01ddaaebf 100755
--- a/Master/bin/powerpc-aix/t1disasm
+++ b/Master/bin/powerpc-aix/t1disasm
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1dotlessj b/Master/bin/powerpc-aix/t1dotlessj
index 399183f7c7d..6b0c3aee7b8 100755
--- a/Master/bin/powerpc-aix/t1dotlessj
+++ b/Master/bin/powerpc-aix/t1dotlessj
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1lint b/Master/bin/powerpc-aix/t1lint
index 28c9ab07844..88cee2eacfc 100755
--- a/Master/bin/powerpc-aix/t1lint
+++ b/Master/bin/powerpc-aix/t1lint
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1mac b/Master/bin/powerpc-aix/t1mac
index ba29867d0a7..6a5fcffa0ad 100755
--- a/Master/bin/powerpc-aix/t1mac
+++ b/Master/bin/powerpc-aix/t1mac
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1reencode b/Master/bin/powerpc-aix/t1reencode
index 36b442ca81c..445ddba7445 100755
--- a/Master/bin/powerpc-aix/t1reencode
+++ b/Master/bin/powerpc-aix/t1reencode
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1testpage b/Master/bin/powerpc-aix/t1testpage
index 13af7393d6d..77dadde3a37 100755
--- a/Master/bin/powerpc-aix/t1testpage
+++ b/Master/bin/powerpc-aix/t1testpage
Binary files differ
diff --git a/Master/bin/powerpc-aix/t1unmac b/Master/bin/powerpc-aix/t1unmac
index cc866235070..bd6b76a7ed6 100755
--- a/Master/bin/powerpc-aix/t1unmac
+++ b/Master/bin/powerpc-aix/t1unmac
Binary files differ
diff --git a/Master/bin/powerpc-aix/t4ht b/Master/bin/powerpc-aix/t4ht
index c05d9c1b43b..82d81dd1e24 100755
--- a/Master/bin/powerpc-aix/t4ht
+++ b/Master/bin/powerpc-aix/t4ht
Binary files differ
diff --git a/Master/bin/powerpc-aix/tangle b/Master/bin/powerpc-aix/tangle
index 71ef5cffbe7..8889853fdc4 100755
--- a/Master/bin/powerpc-aix/tangle
+++ b/Master/bin/powerpc-aix/tangle
Binary files differ
diff --git a/Master/bin/powerpc-aix/tcdialog b/Master/bin/powerpc-aix/tcdialog
index 948634a59ff..a842a5f9a4b 100755
--- a/Master/bin/powerpc-aix/tcdialog
+++ b/Master/bin/powerpc-aix/tcdialog
Binary files differ
diff --git a/Master/bin/powerpc-aix/tex b/Master/bin/powerpc-aix/tex
index c2e102e1952..6afd1690945 100755
--- a/Master/bin/powerpc-aix/tex
+++ b/Master/bin/powerpc-aix/tex
Binary files differ
diff --git a/Master/bin/powerpc-aix/tex2xindy b/Master/bin/powerpc-aix/tex2xindy
index 8425f2e14a9..f6fccf853ae 100755
--- a/Master/bin/powerpc-aix/tex2xindy
+++ b/Master/bin/powerpc-aix/tex2xindy
Binary files differ
diff --git a/Master/bin/powerpc-aix/tex4ht b/Master/bin/powerpc-aix/tex4ht
index 647964286a0..04d9c4cc3db 100755
--- a/Master/bin/powerpc-aix/tex4ht
+++ b/Master/bin/powerpc-aix/tex4ht
Binary files differ
diff --git a/Master/bin/powerpc-aix/texexec b/Master/bin/powerpc-aix/texexec
index 2158172906a..36d22caefe7 100755..120000
--- a/Master/bin/powerpc-aix/texexec
+++ b/Master/bin/powerpc-aix/texexec
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texexec.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/texexec \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/texfind b/Master/bin/powerpc-aix/texfind
new file mode 120000
index 00000000000..e450f1060a3
--- /dev/null
+++ b/Master/bin/powerpc-aix/texfind
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/texfind \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/texfont b/Master/bin/powerpc-aix/texfont
index a91f786e3f8..a3756e037ce 100755..120000
--- a/Master/bin/powerpc-aix/texfont
+++ b/Master/bin/powerpc-aix/texfont
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texfont.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/texfont \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/texindex b/Master/bin/powerpc-aix/texindex
index c7db58b7cac..ae70a4851fd 100755
--- a/Master/bin/powerpc-aix/texindex
+++ b/Master/bin/powerpc-aix/texindex
Binary files differ
diff --git a/Master/bin/powerpc-aix/texlinks b/Master/bin/powerpc-aix/texlinks
index 48657905634..d8e51550924 100755
--- a/Master/bin/powerpc-aix/texlinks
+++ b/Master/bin/powerpc-aix/texlinks
@@ -149,7 +149,7 @@ install_link()
esac
case $src in
- */cont-??|*/metafun|*/mptopdf)
+ */cont-??|*/mptopdf)
# context includes wrapper scripts that create/run these.
verbose_echo "skipped ConTeXtish symlink $src -> $dest (special case)"
;;
diff --git a/Master/bin/powerpc-aix/texmfstart b/Master/bin/powerpc-aix/texmfstart
index e43929213f5..db6dee0a29c 100755..120000
--- a/Master/bin/powerpc-aix/texmfstart
+++ b/Master/bin/powerpc-aix/texmfstart
@@ -1,2501 +1 @@
-#!/usr/bin/env ruby
-
-# program : texmfstart
-# copyright : PRAGMA Advanced Document Engineering
-# version : 1.9.0 - 2003/2006
-# author : Hans Hagen
-#
-# project : ConTeXt / eXaMpLe
-# info : j.hagen@xs4all.nl
-# www : www.pragma-pod.com / www.pragma-ade.com
-
-# no special requirements, i.e. no exa modules/classes used
-
-# texmfstart [switches] filename [optional arguments]
-#
-# ruby2exe texmfstart --help -> avoids stub test
-#
-# Of couse I can make this into a nice class, which i'll undoubtely will
-# do when I feel the need. In that case it will be part of a bigger game.
-
-# turning this into a service would be nice, so some day ...
-
-# --locate => provides location
-# --exec => exec instead of system
-# --iftouched=a,b => only if timestamp a<>b
-# --ifchanged=a,b => only if checksum changed
-#
-# file: path: bin:
-
-# texmfstart --exec bin:scite *.tex
-
-# we don't depend on other libs
-
-$: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq!
-
-require "rbconfig"
-require "md5"
-
-# funny, selfmergs was suddenly broken to case problems
-
-# kpse_merge_done: require 'base/kpseremote'
-# kpse_merge_done: require 'base/kpsedirect'
-# kpse_merge_done: require 'base/kpsefast'
-# kpse_merge_done: require 'base/merge'
-
-# kpse_merge_start
-
-# kpse_merge_file: 't:/ruby/base/kpsefast.rb'
-
-# module : base/kpsefast
-# copyright : PRAGMA Advanced Document Engineering
-# version : 2005
-# author : Hans Hagen
-#
-# project : ConTeXt / eXaMpLe
-# concept : Hans Hagen
-# info : j.hagen@xs4all.nl
-
-# todo: multiple cnf files
-#
-
-class String
-
- def split_path
- if self =~ /\;/o || self =~ /^[a-z]\:/io then
- self.split(";")
- else
- self.split(":")
- end
- end
-
-end
-
-class Array
-
- def join_path
- self.join(File::PATH_SEPARATOR)
- end
-
-end
-
-class File
-
- def File.locate_file(path,name)
- begin
- files = Dir.entries(path)
- if files.include?(name) then
- fullname = File.join(path,name)
- return fullname if FileTest.file?(fullname)
- end
- files.each do |p|
- fullname = File.join(path,p)
- if p != '.' and p != '..' and FileTest.directory?(fullname) and result = locate_file(fullname,name) then
- return result
- end
- end
- rescue
- # bad path
- end
- return nil
- end
-
- def File.glob_file(pattern)
- return Dir.glob(pattern).first
- end
-
-end
-
-module KpseUtil
-
- # to be adapted, see loading cnf file
-
- @@texmftrees = ['texmf-local','texmf.local','../..','texmf'] # '../..' is for gwtex
- @@texmfcnf = 'texmf.cnf'
-
- def KpseUtil::identify
- # we mainly need to identify the local tex stuff and wse assume that
- # the texmfcnf variable is set; otherwise we need to expand the
- # TEXMF variable and that takes time since it may involve more
- ownpath = File.expand_path($0)
- if ownpath.gsub!(/texmf.*?$/o, '') then
- ENV['SELFAUTOPARENT'] = ownpath
- else
- ENV['SELFAUTOPARENT'] = '.' # fall back
- # may be too tricky:
- #
- # (ENV['PATH'] ||'').split_path.each do |p|
- # if p.gsub!(/texmf.*?$/o, '') then
- # ENV['SELFAUTOPARENT'] = p
- # break
- # end
- # end
- end
- filenames = Array.new
- if ENV['TEXMFCNF'] && ! ENV['TEXMFCNF'].empty? then
- ENV['TEXMFCNF'].to_s.split_path.each do |path|
- filenames << File.join(path,@@texmfcnf)
- end
- elsif ENV['SELFAUTOPARENT'] == '.' then
- filenames << File.join('.',@@texmfcnf)
- else
- @@texmftrees.each do |tree|
- filenames << File.join(ENV['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
- end
- end
- loop do
- busy = false
- filenames.collect! do |f|
- f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do
- if (! ENV[$1]) || (ENV[$1] == $1) then
- "$#{$1}"
- else
- busy = true
- ENV[$1]
- end
- end
- end
- break unless busy
- end
- filenames.delete_if do |f|
- ! FileTest.file?(f)
- end
- return filenames
- end
-
- def KpseUtil::environment
- Hash.new.merge(ENV)
- end
-
-end
-
-class KpseFast
-
- # formats are an incredible inconsistent mess
-
- @@suffixes = Hash.new
- @@formats = Hash.new
- @@suffixmap = Hash.new
-
- @@texmfcnf = 'texmf.cnf'
-
- @@suffixes['gf'] = ['.<resolution>gf'] # todo
- @@suffixes['pk'] = ['.<resolution>pk'] # todo
- @@suffixes['tfm'] = ['.tfm']
- @@suffixes['afm'] = ['.afm']
- @@suffixes['base'] = ['.base']
- @@suffixes['bib'] = ['.bib']
- @@suffixes['bst'] = ['.bst']
- @@suffixes['cnf'] = ['.cnf']
- @@suffixes['ls-R'] = ['ls-R', 'ls-r']
- @@suffixes['fmt'] = ['.fmt', '.efmt', '.efm', '.ofmt', '.ofm', '.oft', '.eofmt', '.eoft', '.eof', '.pfmt', '.pfm', '.epfmt', '.epf', '.xpfmt', '.xpf', '.afmt', '.afm']
- @@suffixes['map'] = ['.map']
- @@suffixes['mem'] = ['.mem']
- @@suffixes['mf'] = ['.mf']
- @@suffixes['mfpool'] = ['.pool']
- @@suffixes['mft'] = ['.mft']
- @@suffixes['mp'] = ['.mp']
- @@suffixes['mppool'] = ['.pool']
- @@suffixes['ocp'] = ['.ocp']
- @@suffixes['ofm'] = ['.ofm', '.tfm']
- @@suffixes['opl'] = ['.opl']
- @@suffixes['otp'] = ['.otp']
- @@suffixes['ovf'] = ['.ovf']
- @@suffixes['ovp'] = ['.ovp']
- @@suffixes['graphic/figure'] = ['.eps', '.epsi']
- @@suffixes['tex'] = ['.tex']
- @@suffixes['texpool'] = ['.pool']
- @@suffixes['PostScript header'] = ['.pro']
- @@suffixes['type1 fonts'] = ['.pfa', '.pfb']
- @@suffixes['vf'] = ['.vf']
- @@suffixes['ist'] = ['.ist']
- @@suffixes['truetype fonts'] = ['.ttf', '.ttc']
- @@suffixes['web'] = ['.web', '.ch']
- @@suffixes['cweb'] = ['.w', '.web', '.ch']
- @@suffixes['enc files'] = ['.enc']
- @@suffixes['cmap files'] = ['.cmap']
- @@suffixes['subfont definition files'] = ['.sfd']
- @@suffixes['lig files'] = ['.lig']
- @@suffixes['bitmap font'] = []
- @@suffixes['MetaPost support'] = []
- @@suffixes['TeX system documentation'] = []
- @@suffixes['TeX system sources'] = []
- @@suffixes['Troff fonts'] = []
- @@suffixes['dvips config'] = []
- @@suffixes['type42 fonts'] = []
- @@suffixes['web2c files'] = []
- @@suffixes['other text files'] = []
- @@suffixes['other binary files'] = []
- @@suffixes['misc fonts'] = []
- @@suffixes['opentype fonts'] = []
- @@suffixes['pdftex config'] = []
- @@suffixes['texmfscripts'] = []
-
- # replacements
-
- @@suffixes['fmt'] = ['.fmt']
- @@suffixes['type1 fonts'] = ['.pfa', '.pfb', '.pfm']
- @@suffixes['tex'] = ['.tex', '.xml']
- @@suffixes['texmfscripts'] = ['rb','lua','py','pl']
-
- @@suffixes.keys.each do |k| @@suffixes[k].each do |s| @@suffixmap[s] = k end end
-
- # TTF2TFMINPUTS
- # MISCFONTS
- # TEXCONFIG
- # DVIPDFMINPUTS
- # OTFFONTS
-
- @@formats['gf'] = ''
- @@formats['pk'] = ''
- @@formats['tfm'] = 'TFMFONTS'
- @@formats['afm'] = 'AFMFONTS'
- @@formats['base'] = 'MFBASES'
- @@formats['bib'] = ''
- @@formats['bst'] = ''
- @@formats['cnf'] = ''
- @@formats['ls-R'] = ''
- @@formats['fmt'] = 'TEXFORMATS'
- @@formats['map'] = 'TEXFONTMAPS'
- @@formats['mem'] = 'MPMEMS'
- @@formats['mf'] = 'MFINPUTS'
- @@formats['mfpool'] = 'MFPOOL'
- @@formats['mft'] = ''
- @@formats['mp'] = 'MPINPUTS'
- @@formats['mppool'] = 'MPPOOL'
- @@formats['ocp'] = 'OCPINPUTS'
- @@formats['ofm'] = 'OFMFONTS'
- @@formats['opl'] = 'OPLFONTS'
- @@formats['otp'] = 'OTPINPUTS'
- @@formats['ovf'] = 'OVFFONTS'
- @@formats['ovp'] = 'OVPFONTS'
- @@formats['graphic/figure'] = ''
- @@formats['tex'] = 'TEXINPUTS'
- @@formats['texpool'] = 'TEXPOOL'
- @@formats['PostScript header'] = 'TEXPSHEADERS'
- @@formats['type1 fonts'] = 'T1FONTS'
- @@formats['vf'] = 'VFFONTS'
- @@formats['ist'] = ''
- @@formats['truetype fonts'] = 'TTFONTS'
- @@formats['web'] = ''
- @@formats['cweb'] = ''
- @@formats['enc files'] = 'ENCFONTS'
- @@formats['cmap files'] = 'CMAPFONTS'
- @@formats['subfont definition files'] = 'SFDFONTS'
- @@formats['lig files'] = 'LIGFONTS'
- @@formats['bitmap font'] = ''
- @@formats['MetaPost support'] = ''
- @@formats['TeX system documentation'] = ''
- @@formats['TeX system sources'] = ''
- @@formats['Troff fonts'] = ''
- @@formats['dvips config'] = ''
- @@formats['type42 fonts'] = 'T42FONTS'
- @@formats['web2c files'] = 'WEB2C'
- @@formats['other text files'] = ''
- @@formats['other binary files'] = ''
- @@formats['misc fonts'] = ''
- @@formats['opentype fonts'] = 'OPENTYPEFONTS'
- @@formats['pdftex config'] = 'PDFTEXCONFIG'
- @@formats['texmfscripts'] = 'TEXMFSCRIPTS'
-
- attr_accessor :progname, :engine, :format, :rootpath, :treepath,
- :verbose, :remember, :scandisk, :diskcache, :renewcache
-
- @@cacheversion = '1'
-
- def initialize
- @rootpath = ''
- @treepath = ''
- @progname = 'kpsewhich'
- @engine = 'pdftex'
- @variables = Hash.new
- @expansions = Hash.new
- @files = Hash.new
- @found = Hash.new
- @kpsevars = Hash.new
- @lsrfiles = Array.new
- @cnffiles = Array.new
- @verbose = true
- @remember = true
- @scandisk = true
- @diskcache = true
- @renewcache = false
- @isolate = false
-
- @diskcache = false
- @cachepath = nil
- @cachefile = 'tmftools.log'
-
- @environment = ENV
- end
-
- def set(key,value)
- case key
- when 'progname' then @progname = value
- when 'engine' then @engine = value
- when 'format' then @format = value
- end
- end
-
- def push_environment(env)
- @environment = env
- end
-
- # {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
- #
- # $SELFAUTOLOC : /usr/tex/bin/platform
- # $SELFAUTODIR : /usr/tex/bin
- # $SELFAUTOPARENT : /usr/tex
- #
- # since we live in scriptpath we need a slightly different method
-
- def load_cnf(filenames=nil)
- unless filenames then
- ownpath = File.expand_path($0)
- if ownpath.gsub!(/texmf.*?$/o, '') then
- @environment['SELFAUTOPARENT'] = ownpath
- else
- @environment['SELFAUTOPARENT'] = '.'
- end
- unless @treepath.empty? then
- unless @rootpath.empty? then
- @treepath = @treepath.split(',').collect do |p| File.join(@rootpath,p) end.join(',')
- end
- @environment['TEXMF'] = @treepath
- # only the first one
- @environment['TEXMFCNF'] = File.join(@treepath.split(',').first,'texmf/web2c')
- end
- unless @rootpath.empty? then
- @environment['TEXMFCNF'] = File.join(@rootpath,'texmf/web2c')
- @environment['SELFAUTOPARENT'] = @rootpath
- @isolate = true
- end
- filenames = Array.new
- if @environment['TEXMFCNF'] and not @environment['TEXMFCNF'].empty? then
- @environment['TEXMFCNF'].to_s.split_path.each do |path|
- filenames << File.join(path,@@texmfcnf)
- end
- elsif @environment['SELFAUTOPARENT'] == '.' then
- filenames << File.join('.',@@texmfcnf)
- else
- ['texmf-local','texmf'].each do |tree|
- filenames << File.join(@environment['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
- end
- end
- end
- # <root>/texmf/web2c/texmf.cnf
- filenames = _expanded_path_(filenames)
- @rootpath = filenames.first
- 3.times do
- @rootpath = File.dirname(@rootpath)
- end
- filenames.collect! do |f|
- f.gsub("\\", '/')
- end
- filenames.each do |fname|
- if FileTest.file?(fname) and f = File.open(fname) then
- @cnffiles << fname
- while line = f.gets do
- loop do
- # concatenate lines ending with \
- break unless line.sub!(/\\\s*$/o) do
- f.gets || ''
- end
- end
- case line
- when /^[\%\#]/o then
- # comment
- when /^\s*(.*?)\s*\=\s*(.*?)\s*$/o then
- key, value = $1, $2
- unless @variables.key?(key) then
- value.sub!(/\%.*$/,'')
- value.sub!(/\~/, "$HOME")
- @variables[key] = value
- end
- @kpsevars[key] = true
- end
- end
- f.close
- end
- end
- end
-
- def load_lsr
- @lsrfiles = []
- simplified_list(expansion('TEXMF')).each do |p|
- ['ls-R','ls-r'].each do |f|
- filename = File.join(p,f)
- if FileTest.file?(filename) then
- @lsrfiles << [filename,File.size(filename)]
- break
- end
- end
- end
- @files = Hash.new
- if @diskcache then
- ['HOME','TEMP','TMP','TMPDIR'].each do |key|
- if @environment[key] then
- if FileTest.directory?(@environment[key]) then
- @cachepath = @environment[key]
- @cachefile = [@rootpath.gsub(/[^A-Z0-9]/io, '-').gsub(/\-+/,'-'),File.basename(@cachefile)].join('-')
- break
- end
- end
- end
- if @cachepath and not @renewcache and FileTest.file?(File.join(@cachepath,@cachefile)) then
- begin
- if f = File.open(File.join(@cachepath,@cachefile)) then
- cacheversion = Marshal.load(f)
- if cacheversion == @@cacheversion then
- lsrfiles = Marshal.load(f)
- if lsrfiles == @lsrfiles then
- @files = Marshal.load(f)
- end
- end
- f.close
- end
- rescue
- @files = Hash.new
- end
- end
- end
- return if @files.size > 0
- @lsrfiles.each do |filedata|
- filename, filesize = filedata
- filepath = File.dirname(filename)
- begin
- path = '.'
- data = IO.readlines(filename)
- if data[0].chomp =~ /% ls\-R \-\- filename database for kpathsea\; do not change this line\./io then
- data.each do |line|
- case line
- when /^[a-zA-Z0-9]/o then
- line.chomp!
- if @files[line] then
- @files[line] << path
- else
- @files[line] = [path]
- end
- when /^\.\/(.*?)\:$/o then
- path = File.join(filepath,$1)
- end
- end
- end
- rescue
- # sorry
- end
- end
- if @diskcache and @cachepath and f = File.open(File.join(@cachepath,@cachefile),'wb') then
- f << Marshal.dump(@@cacheversion)
- f << Marshal.dump(@lsrfiles)
- f << Marshal.dump(@files)
- f.close
- end
- end
-
- def expand_variables
- @expansions = Hash.new
- if @isolate then
- @variables['TEXMFCNF'] = @environment['TEXMFCNF'].dup
- @variables['SELFAUTOPARENT'] = @environment['SELFAUTOPARENT'].dup
- else
- @environment.keys.each do |e|
- if e =~ /^([a-zA-Z]+)\_(.*)\s*$/o then
- @expansions["#{$1}.#{$2}"] = (@environment[e] ||'').dup
- else
- @expansions[e] = (@environment[e] ||'').dup
- end
- end
- end
- @variables.keys.each do |k|
- @expansions[k] = @variables[k].dup unless @expansions[k]
- end
- loop do
- busy = false
- @expansions.keys.each do |k|
- @expansions[k].gsub!(/\$([a-zA-Z0-9\_\-]*)/o) do
- busy = true
- @expansions[$1] || ''
- end
- @expansions[k].gsub!(/\$\{([a-zA-Z0-9\_\-]*)\}/o) do
- busy = true
- @expansions[$1] || ''
- end
- end
- break unless busy
- end
- @expansions.keys.each do |k|
- @expansions[k] = @expansions[k].gsub("\\", '/')
- end
- end
-
- def variable(name='')
- (name and not name.empty? and @variables[name.sub('$','')]) or ''
- end
-
- def expansion(name='')
- (name and not name.empty? and @expansions[name.sub('$','')]) or ''
- end
-
- def variable?(name='')
- name and not name.empty? and @variables.key?(name.sub('$',''))
- end
-
- def expansion?(name='')
- name and not name.empty? and @expansions.key?(name.sub('$',''))
- end
-
- def simplified_list(str)
- lst = str.gsub(/^\{/o,'').gsub(/\}$/o,'').split(",")
- lst.collect do |l|
- l.sub(/^[\!]*/,'').sub(/[\/\\]*$/o,'')
- end
- end
-
- def original_variable(variable)
- if variable?("#{@progname}.#{variable}") then
- variable("#{@progname}.#{variable}")
- elsif variable?(variable) then
- variable(variable)
- else
- ''
- end
- end
-
- def expanded_variable(variable)
- if expansion?("#{variable}.#{@progname}") then
- expansion("#{variable}.#{@progname}")
- elsif expansion?(variable) then
- expansion(variable)
- else
- ''
- end
- end
-
- def original_path(filename='')
- _expanded_path_(original_variable(var_of_format_or_suffix(filename)).split(";"))
- end
-
- def expanded_path(filename='')
- _expanded_path_(expanded_variable(var_of_format_or_suffix(filename)).split(";"))
- end
-
- def _expanded_path_(pathlist)
- i, n = 0, 0
- pathlist.collect! do |mainpath|
- mainpath.gsub(/([\{\}])/o) do
- if $1 == "{" then
- i += 1 ; n = i if i > n ; "<#{i}>"
- else
- i -= 1 ; "</#{i+1}>"
- end
- end
- end
- n.times do |i|
- loop do
- more = false
- newlist = []
- pathlist.each do |path|
- unless path.sub!(/^(.*?)<(#{n-i})>(.*?)<\/\2>(.*?)$/) do
- pre, mid, post = $1, $3, $4
- mid.gsub!(/\,$/,',.')
- mid.split(',').each do |m|
- more = true
- if m == '.' then
- newlist << "#{pre}#{post}"
- else
- newlist << "#{pre}#{m}#{post}"
- end
- end
- end then
- newlist << path
- end
- end
- if more then
- pathlist = [newlist].flatten # copy -)
- else
- break
- end
- end
- end
- pathlist = pathlist.uniq.collect do |path|
- p = path
- # p.gsub(/^\/+/o) do '' end
- # p.gsub!(/(.)\/\/(.)/o) do "#{$1}/#{$2}" end
- # p.gsub!(/\/\/+$/o) do '//' end
- p.gsub!(/\/\/+/o) do '//' end
- p
- end
- pathlist
- end
-
- # todo: ignore case
-
- def var_of_format(str)
- @@formats[str] || ''
- end
-
- def var_of_suffix(str) # includes .
- if @@suffixmap.key?(str) then @@formats[@@suffixmap[str]] else '' end
- end
-
- def var_of_format_or_suffix(str)
- if @@formats.key?(str) then
- @@formats[str]
- elsif @@suffixmap.key?(File.extname(str)) then # extname includes .
- @@formats[@@suffixmap[File.extname(str)]] # extname includes .
- else
- ''
- end
- end
-
-end
-
-class KpseFast
-
- # test things
-
- def list_variables(kpseonly=true)
- @variables.keys.sort.each do |k|
- if kpseonly then
- puts("#{k} = #{@variables[k]}") if @kpsevars[k]
- else
- puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@variables[k]}")
- end
- end
- end
-
- def list_expansions(kpseonly=true)
- @expansions.keys.sort.each do |k|
- if kpseonly then
- puts("#{k} = #{@expansions[k]}") if @kpsevars[k]
- else
- puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@expansions[k]}")
- end
- end
- end
-
- def list_lsr
- puts("files = #{@files.size}")
- end
-
- def set_test_patterns
- @variables["KPSE_TEST_PATTERN_A"] = "foo/{1,2}/bar//"
- @variables["KPSE_TEST_PATTERN_B"] = "!!x{A,B{1,2}}y"
- @variables["KPSE_TEST_PATTERN_C"] = "x{A,B//{1,2}}y"
- @variables["KPSE_TEST_PATTERN_D"] = "x{A,B//{1,2,}}//y"
- end
-
- def show_test_patterns
- ['A','B','D'].each do |i|
- puts ""
- puts @variables ["KPSE_TEST_PATTERN_#{i}"]
- puts ""
- puts expand_path("KPSE_TEST_PATTERN_#{i}").split_path
- puts ""
- end
- end
-
-end
-
-class KpseFast
-
- # kpse stuff
-
- def expand_braces(str) # output variable and brace expansion of STRING.
- _expanded_path_(original_variable(str).split_path).join_path
- end
-
- def expand_path(str) # output complete path expansion of STRING.
- _expanded_path_(expanded_variable(str).split_path).join_path
- end
-
- def expand_var(str) # output variable expansion of STRING.
- expanded_variable(str)
- end
-
- def show_path(str) # output search path for file type NAME
- expanded_path(str).join_path
- end
-
- def var_value(str) # output the value of variable $STRING.
- original_variable(str)
- end
-
-end
-
-class KpseFast
-
- def _is_cnf_?(filename)
- filename == File.basename((@cnffiles.first rescue @@texmfcnf) || @@texmfcnf)
- end
-
- def find_file(filename)
- if _is_cnf_?(filename) then
- @cnffiles.first rescue ''
- else
- [find_files(filename,true)].flatten.first || ''
- end
- end
-
- def find_files(filename,first=false)
- if _is_cnf_?(filename) then
- result = @cnffiles.dup
- else
- if @remember then
- # stamp = "#{filename}--#{@format}--#{@engine}--#{@progname}"
- stamp = "#{filename}--#{@engine}--#{@progname}"
- return @found[stamp] if @found.key?(stamp)
- end
- pathlist = expanded_path(filename)
- result = []
- filelist = if @files.key?(filename) then @files[filename].uniq else nil end
- done = false
- if pathlist.size == 0 then
- if FileTest.file?(filename) then
- done = true
- result << '.'
- end
- else
- pathlist.each do |path|
- doscan = if path =~ /^\!\!/o then false else true end
- recurse = if path =~ /\/\/$/o then true else false end
- pathname = path.dup
- pathname.gsub!(/^\!+/o, '')
- done = false
- if not done and filelist then
- # checking for exact match
- if filelist.include?(pathname) then
- result << pathname
- done = true
- end
- if not done and recurse then
- # checking for fuzzy //
- pathname.gsub!(/\/+$/o, '/.*')
- # pathname.gsub!(/\/\//o,'/[\/]*/')
- pathname.gsub!(/\/\//o,'/.*?/')
- re = /^#{pathname}/
- filelist.each do |f|
- if re =~ f then
- result << f # duplicates will be filtered later
- done = true
- end
- break if done
- end
- end
- end
- if not done and doscan then
- # checking for path itself
- pname = pathname.sub(/\.\*$/,'')
- if not pname =~ /\*/o and FileTest.file?(File.join(pname,filename)) then
- result << pname
- done = true
- end
- end
- break if done and first
- end
- end
- if not done and @scandisk then
- pathlist.each do |path|
- pathname = path.dup
- unless pathname.gsub!(/^\!+/o, '') then # !! prevents scan
- recurse = pathname.gsub!(/\/+$/o, '')
- complex = pathname.gsub!(/\/\//o,'/*/')
- if recurse then
- if complex then
- if ok = File.glob_file("#{pathname}/**/#{filename}") then
- result << File.dirname(ok)
- done = true
- end
- elsif ok = File.locate_file(pathname,filename) then
- result << File.dirname(ok)
- done = true
- end
- elsif complex then
- if ok = File.glob_file("#{pathname}/#{filename}") then
- result << File.dirname(ok)
- done = true
- end
- elsif FileTest.file?(File.join(pathname,filename)) then
- result << pathname
- done = true
- end
- break if done and first
- end
- end
- end
- result = result.uniq.collect do |pathname|
- File.join(pathname,filename)
- end
- @found[stamp] = result if @remember
- end
- return result # redundant
- end
-
-end
-
-class KpseFast
-
- class FileData
- attr_accessor :tag, :name, :size, :date
- def initialize(tag=0,name=nil,size=nil,date=nil)
- @tag, @name, @size, @date = tag, name, size, date
- end
- def FileData.sizes(a)
- a.collect do |aa|
- aa.size
- end
- end
- def report
- case @tag
- when 1 then "deleted | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
- when 2 then "present | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
- when 3 then "obsolete | #{' '*8} | #{' '*16} | #{@name}"
- end
- end
- end
-
- def analyze_files(filter='',strict=false,sort='',delete=false)
- puts("command line = #{ARGV.join(' ')}")
- puts("number of files = #{@files.size}")
- puts("filter pattern = #{filter}")
- puts("loaded cnf files = #{@cnffiles.join(' ')}")
- puts('')
- if filter.gsub!(/^not:/,'') then
- def the_same(filter,filename)
- not filter or filter.empty? or /#{filter}/ !~ filename
- end
- else
- def the_same(filter,filename)
- not filter or filter.empty? or /#{filter}/ =~ filename
- end
- end
- @files.keys.each do |name|
- if @files[name].size > 1 then
- data = Array.new
- @files[name].each do |path|
- filename = File.join(path,name)
- # if not filter or filter.empty? or /#{filter}/ =~ filename then
- if the_same(filter,filename) then
- if FileTest.file?(filename) then
- if delete then
- data << FileData.new(1,filename,File.size(filename),File.mtime(filename))
- begin
- File.delete(filename) if delete
- rescue
- end
- else
- data << FileData.new(2,filename,File.size(filename),File.mtime(filename))
- end
- else
- # data << FileData.new(3,filename)
- end
- end
- end
- if data.length > 1 then
- if strict then
- # if data.collect do |d| d.size end.uniq! then
- # data.sort! do |a,b| b.size <=> a.size end
- # data.each do |d| puts d.report end
- # puts ''
- # end
- data.sort! do |a,b|
- if a.size and b.size then
- b.size <=> a.size
- else
- 0
- end
- end
- bunch = Array.new
- done = false
- data.each do |d|
- if bunch.size == 0 then
- bunch << d
- elsif bunch[0].size == d.size then
- bunch << d
- else
- if bunch.size > 1 then
- bunch.each do |b|
- puts b.report
- end
- done = true
- end
- bunch = [d]
- end
- end
- puts '' if done
- else
- case sort
- when 'size' then data.sort! do |a,b| a.size <=> b.size end
- when 'revsize' then data.sort! do |a,b| b.size <=> a.size end
- when 'date' then data.sort! do |a,b| a.date <=> b.date end
- when 'revdate' then data.sort! do |a,b| b.date <=> a.date end
- end
- data.each do |d| puts d.report end
- puts ''
- end
- end
- end
- end
- end
-
-end
-
-
- # k = KpseFast.new # (root)
- # k.set_test_patterns
- # k.load_cnf
- # k.expand_variables
- # k.load_lsr
-
- # k.show_test_patterns
-
- # puts k.list_variables
- # puts k.list_expansions
- # k.list_lsr
- # puts k.expansion("$TEXMF")
- # puts k.expanded_path("TEXINPUTS","context")
-
- # k.progname, k.engine, k.format = 'context', 'pdftex', 'tfm'
- # k.scandisk = false # == must_exist
- # k.expand_variables
-
- # 10.times do |i| puts k.find_file('texnansi-lmr10.tfm') end
-
- # puts "expand braces $TEXMF"
- # puts k.expand_braces("$TEXMF")
- # puts "expand path $TEXMF"
- # puts k.expand_path("$TEXMF")
- # puts "expand var $TEXMF"
- # puts k.expand_var("$TEXMF")
- # puts "expand path $TEXMF"
- # puts k.show_path('tfm')
- # puts "expand value $TEXINPUTS"
- # puts k.var_value("$TEXINPUTS")
- # puts "expand value $TEXINPUTS.context"
- # puts k.var_value("$TEXINPUTS.context")
-
- # exit
-
-
-
-# kpse_merge_file: 't:/ruby/base/kpse/trees.rb'
-
-require 'monitor'
-# kpse_merge_done: require 'base/kpsefast'
-
-class KpseTrees < Monitor
-
- def initialize
- @trees = Hash.new
- end
-
- def pattern(filenames)
- filenames.join('|').gsub(/\\+/o,'/').downcase
- end
-
- def choose(filenames,environment)
- current = pattern(filenames)
- load(filenames,environment) unless @trees[current]
- puts "enabling tree #{current}"
- current
- end
-
- def fetch(filenames,environment) # will send whole object !
- current = pattern(filenames)
- load(filenames,environment) unless @trees[current]
- puts "fetching tree #{current}"
- @trees[current]
- end
-
- def load(filenames,environment)
- current = pattern(filenames)
- puts "loading tree #{current}"
- @trees[current] = KpseFast.new
- @trees[current].push_environment(environment)
- @trees[current].load_cnf(filenames)
- @trees[current].expand_variables
- @trees[current].load_lsr
- end
-
- def set(tree,key,value)
- case key
- when 'progname' then @trees[tree].progname = value
- when 'engine' then @trees[tree].engine = value
- when 'format' then @trees[tree].format = value
- end
- end
- def get(tree,key)
- case key
- when 'progname' then @trees[tree].progname
- when 'engine' then @trees[tree].engine
- when 'format' then @trees[tree].format
- end
- end
-
- def load_cnf(tree)
- @trees[tree].load_cnf
- end
- def load_lsr(tree)
- @trees[tree].load_lsr
- end
- def expand_variables(tree)
- @trees[tree].expand_variables
- end
- def expand_braces(tree,str)
- @trees[tree].expand_braces(str)
- end
- def expand_path(tree,str)
- @trees[tree].expand_path(str)
- end
- def expand_var(tree,str)
- @trees[tree].expand_var(str)
- end
- def show_path(tree,str)
- @trees[tree].show_path(str)
- end
- def var_value(tree,str)
- @trees[tree].var_value(str)
- end
- def find_file(tree,filename)
- @trees[tree].find_file(filename)
- end
- def find_files(tree,filename,first)
- @trees[tree].find_files(filename,first)
- end
-
-end
-
-
-# kpse_merge_file: 't:/ruby/base/kpse/drb.rb'
-
-require 'drb'
-# kpse_merge_done: require 'base/kpse/trees'
-
-class KpseServer
-
- attr_accessor :port
-
- def initialize(port=7000)
- @port = port
- end
-
- def start
- puts "starting drb service at port #{@port}"
- DRb.start_service("druby://localhost:#{@port}", KpseTrees.new)
- trap(:INT) do
- DRb.stop_service
- end
- DRb.thread.join
- end
-
- def stop
- # todo
- end
-
-end
-
-class KpseClient
-
- attr_accessor :port
-
- def initialize(port=7000)
- @port = port
- @kpse = nil
- end
-
- def start
- # only needed when callbacks are used / slow, due to Socket::getaddrinfo
- # DRb.start_service
- end
-
- def object
- @kpse = DRbObject.new(nil,"druby://localhost:#{@port}")
- end
-
-end
-
-
-# SERVER_URI="druby://localhost:8787"
-#
-# # Start a local DRbServer to handle callbacks.
-# #
-# # Not necessary for this small example, but will be required
-# # as soon as we pass a non-marshallable object as an argument
-# # to a dRuby call.
-# DRb.start_service
-#
-
-
-# kpse_merge_file: 't:/ruby/base/kpseremote.rb'
-
-# kpse_merge_done: require 'base/kpsefast'
-
-case ENV['KPSEMETHOD']
- when /soap/o then # kpse_merge_done: require 'base/kpse/soap'
- when /drb/o then # kpse_merge_done: require 'base/kpse/drb'
- else # kpse_merge_done: require 'base/kpse/drb'
-end
-
-class KpseRemote
-
- @@port = ENV['KPSEPORT'] || 7000
- @@method = ENV['KPSEMETHOD'] || 'drb'
-
- def KpseRemote::available?
- @@method && @@port
- end
-
- def KpseRemote::start_server(port=nil)
- kpse = KpseServer.new(port || @@port)
- kpse.start
- end
-
- def KpseRemote::start_client(port=nil) # keeps object in server
- kpseclient = KpseClient.new(port || @@port)
- kpseclient.start
- kpse = kpseclient.object
- tree = kpse.choose(KpseUtil::identify, KpseUtil::environment)
- [kpse, tree]
- end
-
- def KpseRemote::fetch(port=nil) # no need for defining methods but slower, send whole object
- kpseclient = KpseClient.new(port || @@port)
- kpseclient.start
- kpseclient.object.fetch(KpseUtil::identify, KpseUtil::environment) rescue nil
- end
-
- def initialize(port=nil)
- if KpseRemote::available? then
- begin
- @kpse, @tree = KpseRemote::start_client(port)
- rescue
- @kpse, @tree = nil, nil
- end
- else
- @kpse, @tree = nil, nil
- end
- end
-
- def progname=(value)
- @kpse.set(@tree,'progname',value)
- end
- def format=(value)
- @kpse.set(@tree,'format',value)
- end
- def engine=(value)
- @kpse.set(@tree,'engine',value)
- end
-
- def progname
- @kpse.get(@tree,'progname')
- end
- def format
- @kpse.get(@tree,'format')
- end
- def engine
- @kpse.get(@tree,'engine')
- end
-
- def load
- @kpse.load(KpseUtil::identify, KpseUtil::environment)
- end
- def okay?
- @kpse && @tree
- end
- def set(key,value)
- @kpse.set(@tree,key,value)
- end
- def load_cnf
- @kpse.load_cnf(@tree)
- end
- def load_lsr
- @kpse.load_lsr(@tree)
- end
- def expand_variables
- @kpse.expand_variables(@tree)
- end
- def expand_braces(str)
- clean_name(@kpse.expand_braces(@tree,str))
- end
- def expand_path(str)
- clean_name(@kpse.expand_path(@tree,str))
- end
- def expand_var(str)
- clean_name(@kpse.expand_var(@tree,str))
- end
- def show_path(str)
- clean_name(@kpse.show_path(@tree,str))
- end
- def var_value(str)
- clean_name(@kpse.var_value(@tree,str))
- end
- def find_file(filename)
- clean_name(@kpse.find_file(@tree,filename))
- end
- def find_files(filename,first=false)
- # dodo: each filename
- @kpse.find_files(@tree,filename,first)
- end
-
- private
-
- def clean_name(str)
- str.gsub(/\\/,'/')
- end
-
-end
-
-
-# kpse_merge_file: 't:/ruby/base/kpsedirect.rb'
-
-class KpseDirect
-
- attr_accessor :progname, :format, :engine
-
- def initialize
- @progname, @format, @engine = '', '', ''
- end
-
- def expand_path(str)
- clean_name(`kpsewhich -expand-path=#{str}`.chomp)
- end
-
- def expand_var(str)
- clean_name(`kpsewhich -expand-var=#{str}`.chomp)
- end
-
- def find_file(str)
- clean_name(`kpsewhich #{_progname_} #{_format_} #{str}`.chomp)
- end
-
- def _progname_
- if @progname.empty? then '' else "-progname=#{@progname}" end
- end
- def _format_
- if @format.empty? then '' else "-format=\"#{@format}\"" end
- end
-
- private
-
- def clean_name(str)
- str.gsub(/\\/,'/')
- end
-
-end
-
-
-# kpse_merge_stop
-
-
-
-$mswindows = Config::CONFIG['host_os'] =~ /mswin/
-$separator = File::PATH_SEPARATOR
-$version = "2.0.3"
-$ownpath = File.dirname($0)
-
-if $mswindows then
- require "win32ole"
- require "Win32API"
-end
-
-# exit if defined?(REQUIRE2LIB)
-
-$stdout.sync = true
-$stderr.sync = true
-
-$applications = Hash.new
-$suffixinputs = Hash.new
-$predefined = Hash.new
-$runners = Hash.new
-
-$suffixinputs['pl'] = 'PERLINPUTS'
-$suffixinputs['rb'] = 'RUBYINPUTS'
-$suffixinputs['py'] = 'PYTHONINPUTS'
-$suffixinputs['lua'] = 'LUAINPUTS'
-$suffixinputs['jar'] = 'JAVAINPUTS'
-$suffixinputs['pdf'] = 'PDFINPUTS'
-
-$predefined['texexec'] = 'texexec.rb'
-$predefined['texutil'] = 'texutil.rb'
-$predefined['texfont'] = 'texfont.pl'
-$predefined['texshow'] = 'texshow.pl'
-
-$predefined['makempy'] = 'makempy.pl'
-$predefined['mptopdf'] = 'mptopdf.pl'
-$predefined['pstopdf'] = 'pstopdf.rb'
-
-$predefined['examplex'] = 'examplex.rb'
-$predefined['concheck'] = 'concheck.rb'
-
-$predefined['runtools'] = 'runtools.rb'
-$predefined['textools'] = 'textools.rb'
-$predefined['tmftools'] = 'tmftools.rb'
-$predefined['ctxtools'] = 'ctxtools.rb'
-$predefined['rlxtools'] = 'rlxtools.rb'
-$predefined['pdftools'] = 'pdftools.rb'
-$predefined['mpstools'] = 'mpstools.rb'
-$predefined['exatools'] = 'exatools.rb'
-$predefined['xmltools'] = 'xmltools.rb'
-# $predefined['luatools'] = 'luatools.lua'
-# $predefined['mtxtools'] = 'mtxtools.rb'
-
-$predefined['newpstopdf'] = 'pstopdf.rb'
-$predefined['newtexexec'] = 'texexec.rb'
-$predefined['pdftrimwhite'] = 'pdftrimwhite.pl'
-
-$makelist = [
- # context
- 'texexec',
- 'texutil',
- 'texfont',
- # mp/ps
- 'pstopdf',
- 'mptopdf',
- 'makempy',
- # misc
- 'ctxtools',
- 'pdftools',
- 'xmltools',
- 'textools',
- 'mpstools',
- 'tmftools',
- 'exatools',
- 'runtools',
- 'rlxtools',
- 'pdftrimwhite',
- 'texfind',
- 'texshow'
- #
- # no 'luatools',
- # no 'mtxtools',
- # no, 'texmfstart'
-]
-
-$scriptlist = 'rb|pl|py|lua|jar'
-$documentlist = 'pdf|ps|eps|htm|html'
-
-$editor = ENV['TEXMFSTART_EDITOR'] || ENV['EDITOR'] || ENV['editor'] || 'scite'
-
-$crossover = true # to other tex tools, else only local
-$kpse = nil
-
-def set_applications(page=1)
-
- $applications['unknown'] = ''
- $applications['ruby'] = $applications['rb'] = 'ruby'
- $applications['lua'] = $applications['lua'] = 'lua'
- $applications['perl'] = $applications['pl'] = 'perl'
- $applications['python'] = $applications['py'] = 'python'
- $applications['java'] = $applications['jar'] = 'java'
-
- if $mswindows then
- $applications['pdf'] = ['',"pdfopen --page #{page} --file",'acroread']
- $applications['html'] = ['','netscape','mozilla','opera','iexplore']
- $applications['ps'] = ['','gview32','gv','gswin32','gs']
- else
- $applications['pdf'] = ["pdfopen --page #{page} --file",'acroread']
- $applications['html'] = ['netscape','mozilla','opera']
- $applications['ps'] = ['gview','gv','gs']
- end
-
- $applications['htm'] = $applications['html']
- $applications['eps'] = $applications['ps']
-
- $runners['lua'] = "texlua"
-
-end
-
-set_applications()
-
-def check_kpse
- if $kpse then
- # already done
- else
- begin
- if KpseRemote::available? then
- $kpse = KpseRemote.new
- if $kpse.okay? then
- puts("kpse : remote") if $verbose
- else
- $kpse = KpseDirect.new
- puts("kpse : direct (forced)") if $verbose
- end
- else
- $kpse = KpseDirect.new
- puts("kpse : direct") if $verbose
- end
- rescue
- puts("kpse : direct (fallback)") if $verbose
- end
- end
-end
-
-if $mswindows then
-
- GetShortPathName = Win32API.new('kernel32', 'GetShortPathName', ['P','P','N'], 'N')
- GetLongPathName = Win32API.new('kernel32', 'GetLongPathName', ['P','P','N'], 'N')
-
- def dowith_pathname (filename,filemethod)
- filename = filename.gsub(/\\/o,'/') # no gsub! because filename can be frozen
- case filename
- when /\;/o then
- # could be a path spec
- return filename
- when /\s+/o then
- # danger lurking
- buffer = ' ' * 260
- length = filemethod.call(filename,buffer,buffer.size)
- if length>0 then
- return buffer.slice(0..length-1)
- else
- # when the path or file does not exist, nothing is returned
- # so we try to handle the path separately from the basename
- basename = File.basename(filename)
- pathname = File.dirname(filename)
- length = filemethod.call(pathname,buffer,260)
- if length>0 then
- return buffer.slice(0..length-1) + '/' + basename
- else
- return filename
- end
- end
- else
- # no danger
- return filename
- end
- end
-
- def longpathname (filename)
- dowith_pathname(filename,GetLongPathName)
- end
-
- def shortpathname (filename)
- dowith_pathname(filename,GetShortPathName)
- end
-
-else
-
- def longpathname (filename)
- filename
- end
-
- def shortpathname (filename)
- filename
- end
-
-end
-
-class File
-
- # def File.needsupdate(oldname,newname)
- # begin
- # if $mswindows then
- # return File.stat(oldname).mtime > File.stat(newname).mtime
- # else
- # return File.stat(oldname).mtime != File.stat(newname).mtime
- # end
- # rescue
- # return true
- # end
- # end
-
- @@update_eps = 1
-
- def File.needsupdate(oldname,newname)
- begin
- oldtime = File.stat(oldname).mtime.to_i
- newtime = File.stat(newname).mtime.to_i
- if newtime >= oldtime then
- return false
- elsif oldtime-newtime < @@update_eps then
- return false
- else
- return true
- end
- rescue
- return true
- end
- end
-
- def File.syncmtimes(oldname,newname)
- return
- begin
- if $mswindows then
- # does not work (yet) / gives future timestamp
- # t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
- # File.utime(0,t,oldname,newname)
- else
- t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
- File.utime(0,t,oldname,newname)
- end
- rescue
- end
- end
-
- def File.timestamp(name)
- begin
- "#{File.stat(name).mtime}"
- rescue
- return 'unknown'
- end
- end
-
-end
-
-# def hashed (arr=[])
- # arg = if arr.class == String then arr.split(' ') else arr.dup end
- # hsh = Hash.new
- # if arg.length > 0
- # hsh['arguments'] = ''
- # done = false
- # arg.each do |s|
- # if done then
- # if s =~ / / then
- # hsh['arguments'] += " \"#{s}\"" # maybe split on =
- # else
- # hsh['arguments'] += " #{s}"
- # end
- # else
- # kvl = s.split('=')
- # if kvl[0].sub!(/^\-+/,'') then
- # hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end
- # else
- # hsh['file'] = s
- # done = true
- # end
- # end
- # end
- # end
- # return hsh
-# end
-
-def hashed (arr=[])
- arg = if arr.class == String then arr.split(' ') else arr.dup end
- hsh = Hash.new
- if arg.length > 0
- hsh['arguments'] = ''
- done = false
- arg.each do |s|
- if done then
- if s =~ /\s/ then
- kvl = s.split('=')
- if kvl[1] and kvl[1] !~ /^[\"\']/ then
- hsh['arguments'] += ' ' + kvl[0] + "=" + '"' + kvl[1] + '"'
- elsif s =~ /\s/ then
- hsh['arguments'] += ' "' + s + '"'
- else
- hsh['arguments'] += ' ' + s
- end
- else
- hsh['arguments'] += ' ' + s
- end
- else
- kvl = s.split('=')
- if kvl[0].sub!(/^\-+/,'') then
- hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end
- else
- hsh['file'] = s
- done = true
- end
- end
- end
- end
- return hsh
-end
-
-
-def launch(filename)
- if $browser && $mswindows then
- filename = filename.gsub(/\.[\/\\]/) do
- Dir.getwd + '/'
- end
- report("launching #{filename}")
- ie = WIN32OLE.new("InternetExplorer.Application")
- ie.visible = true
- ie.navigate(filename)
- return true
- else
- return false
- end
-end
-
-# env|environment
-# rel|relative
-# loc|locate|kpse|path|file
-
-def quoted(str)
- if str =~ /^\"/ then
- return str
- elsif str =~ / / then
- return "\"#{str}\""
- else
- return str
- end
-end
-
-def expanded(arg) # no "other text files", too restricted
- arg.gsub(/(env|environment)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- if resolved = ENV[original] then
- report("environment variable #{original} expands to #{resolved}") unless $report
- quoted(resolved)
- else
- report("environment variable #{original} cannot be resolved") unless $report
- quoted(original)
- end
- end . gsub(/(rel|relative)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- ['.','..','../..'].each do |r|
- if FileTest.file?(File.join(r,original)) then
- resolved = File.join(r,original)
- break
- end
- end
- if resolved.empty? then
- quoted(original)
- else
- quoted(resolved)
- end
- end . gsub(/(kpse|loc|locate|file|path)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- if $program && ! $program.empty? then
- # pstrings = ["-progname=#{$program}"]
- pstrings = [$program]
- else
- # pstrings = ['','-progname=context']
- pstrings = ['','context']
- end
- # auto suffix with texinputs as fall back
- if ENV["_CTX_K_V_#{original}_"] then
- resolved = ENV["_CTX_K_V_#{original}_"]
- report("environment provides #{original} as #{resolved}") unless $report
- quoted(resolved)
- else
- check_kpse
- pstrings.each do |pstr|
- if resolved.empty? then
- # command = "kpsewhich #{pstr} #{original}"
- # report("running #{command}")
- report("locating '#{original}' in program space '#{pstr}'")
- begin
- # resolved = `#{command}`.chomp
- $kpse.progname = pstr
- $kpse.format = ''
- resolved = $kpse.find_file(original).gsub(/\\/,'/')
- rescue
- resolved = ''
- end
- end
- # elsewhere in the tree
- if resolved.empty? then
- # command = "kpsewhich #{pstr} -format=\"other text files\" #{original}"
- # report("running #{command}")
- report("locating '#{original}' in program space '#{pstr}' using format 'other text files'")
- begin
- # resolved = `#{command}`.chomp
- $kpse.progname = pstr
- $kpse.format = 'other text files'
- resolved = $kpse.find_file(original).gsub(/\\/,'/')
- rescue
- resolved = ''
- end
- end
- end
- if resolved.empty? then
- original = File.dirname(original) if method =~ /path/
- report("#{original} is not resolved") unless $report
- ENV["_CTX_K_V_#{original}_"] = original if $crossover
- quoted(original)
- else
- resolved = File.dirname(resolved) if method =~ /path/
- report("#{original} is resolved to #{resolved}") unless $report
- ENV["_CTX_K_V_#{original}_"] = resolved if $crossover
- quoted(resolved)
- end
- end
- end
-end
-
-def changeddir?(path)
- if path.empty? then
- return true
- else
- oldpath = File.expand_path(path)
- begin
- Dir.chdir(path) if not path.empty?
- rescue
- report("unable to change to directory: #{path}")
- else
- report("changed to directory: #{path}")
- end
- newpath = File.expand_path(Dir.getwd)
- return oldpath == newpath
- end
-end
-
-def runcommand(command)
- if $locate then
- command = command.split(' ').collect do |c|
- if c =~ /\//o then
- begin
- cc = File.expand_path(c)
- c = cc if FileTest.file?(cc)
- rescue
- end
- end
- c
- end . join(' ')
- print command # to stdout and no newline
- elsif $execute then
- report("using 'exec' instead of 'system' call: #{command}")
- exec(command) if changeddir?($path)
- else
- report("using 'system' call: #{command}")
- system(command) if changeddir?($path)
- end
-end
-
-def join_command(args)
- args[0] = $runners[args[0]] || args[0]
- [args].join(' ')
-end
-
-def runoneof(application,fullname,browserpermitted)
- if browserpermitted && launch(fullname) then
- return true
- else
- fullname = quoted(fullname) # added because MM ran into problems
- report("starting #{$filename}") unless $report
- output("\n") if $report && $verbose
- applications = $applications[application.downcase]
- if ! applications then
- output("problems with determining application type")
- return true
- elsif applications.class == Array then
- if $report then
- output(join_command([fullname,expanded($arguments)]))
- return true
- else
- applications.each do |a|
- return true if runcommand(join_command([a,fullname,expanded($arguments)]))
- end
- end
- elsif applications.empty? then
- if $report then
- output(join_command([fullname,expanded($arguments)]))
- return true
- else
- return runcommand(join_command([fullname,expanded($arguments)]))
- end
- else
- if $report then
- output(join_command([applications,fullname,expanded($arguments)]))
- return true
- else
- return runcommand(join_command([applications,fullname,expanded($arguments)]))
- end
- end
- return false
- end
-end
-
-def report(str)
- $stdout.puts(str) if $verbose
-end
-
-def output(str)
- $stdout.puts(str)
-end
-
-def usage
- print "version : #{$version} - 2003/2006 - www.pragma-ade.com\n"
- print("\n")
- print("usage : texmfstart [switches] filename [optional arguments]\n")
- print("\n")
- print("switches : --verbose --report --browser --direct --execute --locate --iftouched --ifchanged\n")
- print(" --program --file --page --arguments --batch --edit --report --clear\n")
- print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n")
- print(" --tree --autotree --environment --showenv\n")
- print("\n")
- print("example : texmfstart pstopdf.rb cow.eps\n")
- print(" texmfstart --locate examplex.rb\n")
- print(" texmfstart --execute examplex.rb\n")
- print(" texmfstart --browser examplap.pdf\n")
- print(" texmfstart showcase.pdf\n")
- print(" texmfstart --page=2 --file=showcase.pdf\n")
- print(" texmfstart --program=yourtex yourscript.rb arg-1 arg-2\n")
- print(" texmfstart --direct xsltproc kpse:somefile.xsl somefile.xml\n")
- print(" texmfstart --direct ruby rel:wn-cleanup-1.rb oldfile.xml newfile.xml\n")
- print(" texmfstart bin:xsltproc env:somepreset path:somefile.xsl somefile.xml\n")
- print(" texmfstart --iftouched=normal,lowres downsample.rb normal lowres\n")
- print(" texmfstart --ifchanged=somefile.dat --direct processit somefile.dat\n")
- print(" texmfstart bin:scite kpse:texmf.cnf\n")
- print(" texmfstart --exec bin:scite *.tex\n")
- print(" texmfstart --edit texmf.cnf\n")
- print(" texmfstart --edit kpse:texmf.cnf\n")
- print(" texmfstart --serve\n")
- print("\n")
- print(" texmfstart --stubpath=/usr/local/bin [--make --remove] --verbose all\n")
- print(" texmfstart --stubpath=auto [--make --remove] all\n")
- print("\n")
- check_kpse
-end
-
-# somehow registration does not work out (at least not under windows)
-# the . is also not accepted by unix as seperator
-
-def tag(name)
- if $crossover then "_CTX_K_S_#{name}_" else "TEXMFSTART.#{name}" end
-end
-
-def registered?(filename)
- return ENV[tag(filename)] != nil
-end
-
-def registered(filename)
- return ENV[tag(filename)] || 'unknown'
-end
-
-def register(filename,fullname)
- if fullname && ! fullname.empty? then # && FileTest.file?(fullname)
- ENV[tag(filename)] = fullname
- report("registering '#{filename}' as '#{fullname}'")
- return true
- else
- return false
- end
-end
-
-def find(filename,program)
- begin
- filename = filename.sub(/script:/o, '') # so we have bin: and script: and nothing
- if $predefined.key?(filename) then
- report("expanding '#{filename}' to '#{$predefined[filename]}'")
- filename = $predefined[filename]
- end
- if registered?(filename) then
- report("already located '#{filename}'")
- return registered(filename)
- end
- # create suffix list
- if filename =~ /^(.*)\.(.+)$/ then
- filename = $1
- suffixlist = [$2]
- else
- suffixlist = [$scriptlist.split('|'),$documentlist.split('|')].flatten
- end
- # first we honor a given path
- if filename =~ /[\\\/]/ then
- report("trying to honor '#{filename}'")
- suffixlist.each do |suffix|
- fullname = filename+'.'+suffix
- if FileTest.file?(fullname) && register(filename,fullname)
- return shortpathname(fullname)
- end
- end
- end
- filename.sub!(/^.*[\\\/]/, '')
- # next we look at the current path and the callerpath
- pathlist = [ ]
- progpath = $applications[suffixlist[0]]
- threadok = registered("THREAD") !~ /unknown/
- pathlist << ['.','current']
- pathlist << [$ownpath,'caller'] if $ownpath != '.'
- pathlist << ["#{$ownpath}/../#{progpath}",'caller'] if progpath
- pathlist << [registered("THREAD"),'thread'] if threadok
- pathlist << ["#{registered("THREAD")}/../#{progpath}",'thread'] if progpath && threadok
- pathlist.each do |p|
- if p && ! p.empty? && ! (p[0] == 'unknown') then
- suffixlist.each do |suffix|
- fname = "#{filename}.#{suffix}"
- fullname = File.expand_path(File.join(p[0],fname))
- report("locating '#{fname}' in #{p[1]} path '#{p[0]}'")
- if FileTest.file?(fullname) && register(filename,fullname) then
- report("'#{fname}' located in #{p[1]} path")
- return shortpathname(fullname)
- end
- end
- end
- end
- # now we consult environment settings
- fullname = nil
- check_kpse
- $kpse.progname = program
- suffixlist.each do |suffix|
- begin
- break unless $suffixinputs[suffix]
- environment = ENV[$suffixinputs[suffix]] || ENV[$suffixinputs[suffix]+".#{$program}"]
- if ! environment || environment.empty? then
- begin
- # environment = `kpsewhich -expand-path=\$#{$suffixinputs[suffix]}`.chomp
- environment = $kpse.expand_path("\$#{$suffixinputs[suffix]}")
- rescue
- environment = nil
- else
- if environment && ! environment.empty? then
- report("using kpsewhich variable #{$suffixinputs[suffix]}")
- end
- end
- elsif environment && ! environment.empty? then
- report("using environment variable #{$suffixinputs[suffix]}")
- end
- if environment && ! environment.empty? then
- environment.split($separator).each do |e|
- e.strip!
- e = '.' if e == '\.' # somehow . gets escaped
- e += '/' unless e =~ /[\\\/]$/
- fullname = e + filename + '.' + suffix
- report("testing '#{fullname}'")
- if FileTest.file?(fullname) then
- break
- else
- fullname = nil
- end
- end
- end
- rescue
- report("environment string '#{$suffixinputs[suffix]}' cannot be used to locate '#{filename}'")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- # then we fall back on kpsewhich
- suffixlist.each do |suffix|
- # TDS script scripts location as per 2004
- if suffix =~ /(#{$scriptlist})/ then
- begin
- report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (1)")
- # fullname = `kpsewhich -progname=#{program} -format=texmfscripts #{filename}.#{suffix}`.chomp
- $kpse.format = 'texmfscripts'
- fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
- rescue
- report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (1)")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- # old TDS location: .../texmf/context/...
- begin
- report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (2)")
- # fullname = `kpsewhich -progname=#{program} -format="other text files" #{filename}.#{suffix}`.chomp
- $kpse.format = 'other text files'
- fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
- rescue
- report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (2)")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- # let's take a look at the path
- paths = ENV['PATH'].split($separator)
- suffixlist.each do |s|
- paths.each do |p|
- suffixedname = "#{filename}.#{s}"
- report("checking #{p} for #{filename}")
- if FileTest.file?(File.join(p,suffixedname)) then
- fullname = File.join(p,suffixedname)
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- end
- # bad luck, we need to search the tree ourselves
- if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
- report("aggressively locating '#{filename}' in document trees")
- begin
- # texroot = `kpsewhich -expand-var=$SELFAUTOPARENT`.chomp
- texroot = $kpse.expand_var("$SELFAUTOPARENT")
- rescue
- texroot = ''
- else
- texroot.sub!(/[\\\/][^\\\/]*?$/, '')
- end
- if not texroot.empty? then
- sffxlst = suffixlist.join(',')
- begin
- report("locating '#{filename}' in document tree '#{texroot}/doc*'")
- if (result = Dir.glob("#{texroot}/doc*/**/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
- fullname = result[0]
- end
- rescue
- report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted")
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- end
- report("aggressively locating '#{filename}' in tex trees")
- begin
- # textrees = `kpsewhich -expand-var=$TEXMF`.chomp
- textrees = $kpse.expand_var("$TEXMF")
- rescue
- textrees = ''
- end
- if not textrees.empty? then
- textrees.gsub!(/[\{\}\!]/, '')
- textrees = textrees.split(',')
- if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
- speedup = ['doc**','**']
- else
- speedup = ['**']
- end
- sffxlst = suffixlist.join(',')
- speedup.each do |speed|
- textrees.each do |tt|
- tt.gsub!(/[\\\/]$/, '')
- if FileTest.directory?(tt) then
- begin
- report("locating '#{filename}' in tree '#{tt}/#{speed}/#{filename}.{#{sffxlst}}'")
- if (result = Dir.glob("#{tt}/#{speed}/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
- fullname = result[0]
- break
- end
- rescue
- report("locating '#{filename}' in tree '#{tt}' aborted")
- next
- end
- end
- end
- break if fullname && ! fullname.empty?
- end
- end
- if register(filename,fullname) then
- return shortpathname(fullname)
- else
- return ''
- end
- rescue
- error, trace = $!, $@.join("\n")
- report("fatal error: #{error}\n#{trace}")
- # report("fatal error")
- end
-end
-
-def run(fullname)
- if ! fullname || fullname.empty? then
- output("the file '#{$filename}' is not found")
- elsif FileTest.file?(fullname) then
- begin
- case fullname
- when /\.(#{$scriptlist})$/i then
- return runoneof($1,fullname,false)
- when /\.(#{$documentlist})$/i then
- return runoneof($1,fullname,true)
- else
- return runoneof('unknown',fullname,false)
- end
- rescue
- report("starting '#{$filename}' in program space '#{$program}' fails (#{$!})")
- end
- else
- report("the file '#{$filename}' in program space '#{$program}' is not accessible")
- end
- return false
-end
-
-def direct(fullname)
- begin
- return runcommand([fullname.sub(/^(bin|binary)\:/, ''),expanded($arguments)].join(' '))
- rescue
- return false
- end
-end
-
-def edit(filename)
- begin
- return runcommand([$editor,expanded(filename),expanded($arguments)].join(' '))
- rescue
- return false
- end
-end
-
-def make(filename,windows=false,linux=false,remove=false)
- basename = File.basename(filename).gsub(/\.[^.]+?$/, '')
- if $stubpath == 'auto' then
- basename = File.dirname($0) + '/' + basename
- else
- basename = $stubpath + '/' + basename unless $stubpath.empty?
- end
- if filename == 'texmfstart' then
- program = 'ruby'
- command = 'kpsewhich --format=texmfscripts --progname=context texmfstart.rb'
- filename = `#{command}`.chomp.gsub(/\\/, '/')
- if filename.empty? then
- report("failure: #{command}")
- return
- elsif not remove then
- if windows then
- ['bat','exe'].each do |suffix|
- if FileTest.file?("#{basename}.#{suffix}") then
- report("windows stub '#{basename}.#{suffix}' skipped (already present)")
- return
- end
- end
- elsif linux && FileTest.file?(basename) then
- report("unix stub '#{basename}' skipped (already present)")
- return
- end
- end
- else
- program = nil
- if filename =~ /[\\\/]/ && filename =~ /\.(#{$scriptlist})$/ then
- program = $applications[$1]
- end
- filename = "\"#{filename}\"" if filename =~ /\s/
- program = 'texmfstart' if $indirect || ! program || program.empty?
- end
- begin
- callname = $predefined[filename.sub(/\.*?$/,'')] || filename
- if remove then
- if windows && (File.delete(basename+'.bat') rescue false) then
- report("windows stub '#{basename}.bat' removed (calls #{callname})")
- elsif linux && (File.delete(basename) rescue false) then
- report("unix stub '#{basename}' removed (calls #{callname})")
- end
- else
- if windows && f = open(basename+'.bat','w') then
- f.binmode
- f.write("@echo off\015\012")
- f.write("#{program} #{callname} %*\015\012")
- f.close
- report("windows stub '#{basename}.bat' made (calls #{callname})")
- elsif linux && f = open(basename,'w') then
- f.binmode
- f.write("#!/bin/sh\012")
- f.write("#{program} #{callname} \"$@\"\012")
- f.close
- report("unix stub '#{basename}' made (calls #{callname})")
- end
- end
- rescue
- report("failed to make stub '#{basename}' #{$!}")
- return false
- else
- return true
- end
-end
-
-def process(&block)
- if $iftouched then
- files = $directives['iftouched'].split(',')
- oldname, newname = files[0], files[1]
- if oldname && newname && File.needsupdate(oldname,newname) then
- report("file #{oldname}: #{File.timestamp(oldname)}")
- report("file #{newname}: #{File.timestamp(newname)}")
- report("file is touched, processing started")
- yield
- File.syncmtimes(oldname,newname)
- else
- report("file #{oldname} is untouched")
- end
- elsif $ifchanged then
- filename = $directives['ifchanged']
- checkname = filename + ".md5"
- oldchecksum, newchecksum = "old", "new"
- begin
- newchecksum = MD5.new(IO.read(filename)).hexdigest.upcase
- rescue
- newchecksum = "new"
- else
- begin
- oldchecksum = IO.read(checkname).chomp
- rescue
- oldchecksum = "old"
- end
- end
- if $verbose then
- report("old checksum #{filename}: #{oldchecksum}")
- report("new checksum #{filename}: #{newchecksum}")
- end
- if oldchecksum != newchecksum then
- report("file is changed, processing started")
- begin
- File.open(checkname,'w') do |f|
- f << newchecksum
- end
- rescue
- end
- yield
- else
- report("file #{filename} is unchanged")
- end
- else
- yield
- end
-end
-
-def checkenvironment(tree)
- report('')
- ENV['TMP'] = ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || ENV['HOME']
- case RUBY_PLATFORM
- when /(mswin|bccwin|mingw|cygwin)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-mswin'
- when /(linux)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-linux'
- when /(darwin|rhapsody|nextstep)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-macosx'
- # when /(netbsd|unix)/i then # todo
- else # todo
- end
- ENV['TEXOS'] = "#{ENV['TEXOS'].sub(/^[\\\/]*/, '').sub(/[\\\/]*$/, '')}"
- ENV['TEXPATH'] = tree.sub(/\/+$/,'') # + '/'
- ENV['TEXMFOS'] = "#{ENV['TEXPATH']}/#{ENV['TEXOS']}"
- report('')
- report("preset : TEXPATH => #{ENV['TEXPATH']}")
- report("preset : TEXOS => #{ENV['TEXOS']}")
- report("preset : TEXMFOS => #{ENV['TEXMFOS']}")
- report("preset : TMP => #{ENV['TMP']}")
- report('')
-end
-
-def loadfile(filename)
- begin
- IO.readlines(filename).each do |line|
- case line.chomp
- when /^[\#\%]/ then
- # comment
- when /^(.*?)\s*(\>|\=|\<)\s*(.*)\s*$/ then
- # = assign | > prepend | < append
- key, how, value = $1, $2, $3
- begin
- # $SAFE = 0
- value.gsub!(/\%(.*?)\%/) do
- ENV[$1] || ''
- end
- # value.gsub!(/\;/,$separator) if key =~ /PATH/i then
- case how
- when '=', '<<' then ENV[key] = value
- when '?', '??' then ENV[key] = ENV[key] || value
- when '<', '+=' then ENV[key] = (ENV[key] || '') + $separator + value
- when '>', '=+' then ENV[key] = value + $separator + (ENV[key] ||'')
- end
- rescue
- report("user set failed : #{key} (#{$!})")
- else
- report("user set : #{key} => #{ENV[key]}")
- end
- end
- end
- rescue
- report("error in reading file '#{filename}'")
- end
-end
-
-def loadtree(tree)
- begin
- unless tree.empty? then
- if File.directory?(tree) then
- setuptex = File.join(tree,'setuptex.tmf')
- else
- setuptex = tree.dup
- end
- if FileTest.file?(setuptex) then
- report("tex tree definition: #{setuptex}")
- checkenvironment(File.dirname(setuptex))
- loadfile(setuptex)
- else
- report("no setup file '#{setuptex}'")
- end
- end
- rescue
- # maybe tree is empty or boolean (no arg given)
- end
-end
-
-def loadenvironment(environment)
- begin
- unless environment.empty? then
- filename = if $path.empty? then environment else File.expand_path(File.join($path,environment)) end
- if FileTest.file?(filename) then
- report("environment : #{environment}")
- loadfile(filename)
- else
- report("no environment file '#{environment}'")
- end
- end
- rescue
- report("problem while loading '#{environment}'")
- end
-end
-
-def show_environment
- if $showenv then
- keys = ENV.keys.sort
- size = 0
- keys.each do |k|
- size = k.size if k.size > size
- end
- report('')
- keys.each do |k|
- report("#{k.rjust(size)} => #{ENV[k]}")
- end
- report('')
- end
-end
-
-def execute(arguments) # br global
-
- arguments = arguments.split(/\s+/) if arguments.class == String
- $directives = hashed(arguments)
-
- $help = $directives['help'] || false
- $batch = $directives['batch'] || false
- $filename = $directives['file'] || ''
- $program = $directives['program'] || 'context'
- $direct = $directives['direct'] || false
- $edit = $directives['edit'] || false
- $page = $directives['page'] || 1
- $browser = $directives['browser'] || false
- $report = $directives['report'] || false
- $verbose = $directives['verbose'] || false
- $arguments = $directives['arguments'] || ''
- $execute = $directives['execute'] || $directives['exec'] || false
- $locate = $directives['locate'] || false
-
- $autotree = if $directives['autotree'] then (ENV['TEXMFSTART_TREE'] || ENV['TEXMFSTARTTREE'] || '') else '' end
-
- $path = $directives['path'] || ''
- $tree = $directives['tree'] || $autotree || ''
- $environment = $directives['environment'] || ''
-
- $make = $directives['make'] || false
- $remove = $directives['remove'] || $directives['delete'] || false
- $unix = $directives['unix'] || false
- $windows = $directives['windows'] || $directives['mswin'] || false
- $stubpath = $directives['stubpath'] || ''
- $indirect = $directives['indirect'] || false
-
- $before = $directives['before'] || ''
- $after = $directives['after'] || ''
-
- $iftouched = $directives['iftouched'] || false
- $ifchanged = $directives['ifchanged'] || false
-
- $openoffice = $directives['oo'] || false
-
- $crossover = false if $directives['clear']
-
- $showenv = $directives['showenv'] || false
- $verbose = true if $showenv
-
- $serve = $directives['serve'] || false
-
- $verbose = true if (ENV['_CTX_VERBOSE_'] =~ /(y|yes|t|true|on)/io) && ! $locate && ! $report
-
- set_applications($page)
-
- # private:
-
- $selfmerge = $directives['selfmerge'] || false
- $selfcleanup = $directives['selfclean'] || $directives['selfcleanup'] || false
-
- ENV['_CTX_VERBOSE_'] = 'yes' if $verbose
-
- if $openoffice then
- if ENV['OOPATH'] then
- if FileTest.directory?(ENV['OOPATH']) then
- report("using open office python")
- if $mswindows then
- $applications['python'] = $applications['py'] = "\"#{File.join(ENV['OOPATH'],'program','python.bat')}\""
- else
- $applications['python'] = $applications['py'] = File.join(ENV['OOPATH'],'python')
- end
- report("python path #{$applications['python']}")
- else
- report("environment variable 'OOPATH' does not exist")
- end
- else
- report("environment variable 'OOPATH' is not set")
- end
- end
-
- if $selfmerge then
- output("ruby libraries are cleaned up") if SelfMerge::cleanup
- output("ruby libraries are merged") if SelfMerge::merge
- return true
- elsif $selfcleanup then
- output("ruby libraries are cleaned up") if SelfMerge::cleanup
- return true
- elsif $serve then
- if ENV['KPSEMETHOD'] && ENV['KPSEPORT'] then
- # # kpse_merge_done: require 'base/kpseremote'
- begin
- KpseRemote::start_server
- rescue
- return false
- else
- return true
- end
- else
- usage
- puts("")
- puts("message : set 'KPSEMETHOD' and 'KPSEPORT' variables")
- return false
- end
- elsif $help || ! $filename || $filename.empty? then
- usage
- loadtree($tree)
- loadenvironment($environment)
- show_environment()
- return true
- elsif $batch && $filename && ! $filename.empty? then
- # todo, take commands from file and avoid multiple starts and checks
- return false
- else
- report("texmfstart version #{$version}")
- loadtree($tree)
- loadenvironment($environment)
- show_environment()
- if $make || $remove then
- if $filename == 'all' then
- makelist = $makelist
- else
- makelist = [$filename]
- end
- makelist.each do |filename|
- if $windows then
- make(filename,true,false,$remove)
- elsif $unix then
- make(filename,false,true,$remove)
- else
- make(filename,$mswindows,!$mswindows,$remove)
- end
- end
- return true # guess
- elsif $browser && $filename =~ /^http\:\/\// then
- return launch($filename)
- else
- begin
- process do
- if $direct || $filename =~ /^bin\:/ then
- return direct($filename)
- elsif $edit && ! $editor.empty? then
- return edit($filename)
- else # script: or no prefix
- command = find(shortpathname($filename),$program)
- if command then
- register("THREAD",File.dirname(File.expand_path(command)))
- return run(command)
- else
- report('unable to locate program')
- return false
- end
- end
- end
- rescue
- report('fatal error in starting process')
- return false
- end
- end
- end
-
-end
-
-if execute(ARGV) then
- report("\nexecution was successful") if $verbose
- exit(0)
-else
- report("\nexecution failed") if $verbose
- exit(1)
-end
+../../texmf-dist/scripts/context/ruby/texmfstart.rb \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/texshow b/Master/bin/powerpc-aix/texshow
new file mode 120000
index 00000000000..52a03692b74
--- /dev/null
+++ b/Master/bin/powerpc-aix/texshow
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/texshow \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/textools b/Master/bin/powerpc-aix/textools
index 7445eac371c..d1a20375405 100755..120000
--- a/Master/bin/powerpc-aix/textools
+++ b/Master/bin/powerpc-aix/textools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart textools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/textools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/texutil b/Master/bin/powerpc-aix/texutil
index 607154af059..78f249c7f02 100755..120000
--- a/Master/bin/powerpc-aix/texutil
+++ b/Master/bin/powerpc-aix/texutil
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texutil.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/texutil \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/tftopl b/Master/bin/powerpc-aix/tftopl
index 42668ca915e..5fcd6ed97dc 100755
--- a/Master/bin/powerpc-aix/tftopl
+++ b/Master/bin/powerpc-aix/tftopl
Binary files differ
diff --git a/Master/bin/powerpc-aix/tie b/Master/bin/powerpc-aix/tie
index 8acf1de19ab..b443b5dbcb1 100755
--- a/Master/bin/powerpc-aix/tie
+++ b/Master/bin/powerpc-aix/tie
Binary files differ
diff --git a/Master/bin/powerpc-aix/tmftools b/Master/bin/powerpc-aix/tmftools
index 7531a966390..444a68a40ee 100755..120000
--- a/Master/bin/powerpc-aix/tmftools
+++ b/Master/bin/powerpc-aix/tmftools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart tmftools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/tmftools \ No newline at end of file
diff --git a/Master/bin/powerpc-aix/ttf2afm b/Master/bin/powerpc-aix/ttf2afm
index c2ec86051ca..bd01dc07880 100755
--- a/Master/bin/powerpc-aix/ttf2afm
+++ b/Master/bin/powerpc-aix/ttf2afm
Binary files differ
diff --git a/Master/bin/powerpc-aix/ttf2pk b/Master/bin/powerpc-aix/ttf2pk
index 089f5e911ba..76552b10ace 100755
--- a/Master/bin/powerpc-aix/ttf2pk
+++ b/Master/bin/powerpc-aix/ttf2pk
Binary files differ
diff --git a/Master/bin/powerpc-aix/ttf2tfm b/Master/bin/powerpc-aix/ttf2tfm
index a43f996a878..479c98dd850 100755
--- a/Master/bin/powerpc-aix/ttf2tfm
+++ b/Master/bin/powerpc-aix/ttf2tfm
Binary files differ
diff --git a/Master/bin/powerpc-aix/ttftotype42 b/Master/bin/powerpc-aix/ttftotype42
index ea39afb7b2a..363c74e5287 100755
--- a/Master/bin/powerpc-aix/ttftotype42
+++ b/Master/bin/powerpc-aix/ttftotype42
Binary files differ
diff --git a/Master/bin/powerpc-aix/vftovp b/Master/bin/powerpc-aix/vftovp
index acc3b129291..226f2d4782d 100755
--- a/Master/bin/powerpc-aix/vftovp
+++ b/Master/bin/powerpc-aix/vftovp
Binary files differ
diff --git a/Master/bin/powerpc-aix/vlna b/Master/bin/powerpc-aix/vlna
new file mode 100755
index 00000000000..3474d931afa
--- /dev/null
+++ b/Master/bin/powerpc-aix/vlna
Binary files differ
diff --git a/Master/bin/powerpc-aix/vptovf b/Master/bin/powerpc-aix/vptovf
index 4fee96db5a5..29b7dbdc9c8 100755
--- a/Master/bin/powerpc-aix/vptovf
+++ b/Master/bin/powerpc-aix/vptovf
Binary files differ
diff --git a/Master/bin/powerpc-aix/weave b/Master/bin/powerpc-aix/weave
index d5b8a8ae277..6f972733ed2 100755
--- a/Master/bin/powerpc-aix/weave
+++ b/Master/bin/powerpc-aix/weave
Binary files differ
diff --git a/Master/bin/powerpc-aix/xdvi b/Master/bin/powerpc-aix/xdvi
index 847bf4acd69..04662a62d36 100755
--- a/Master/bin/powerpc-aix/xdvi
+++ b/Master/bin/powerpc-aix/xdvi
@@ -17,15 +17,22 @@ test -f /bin/bsh && test -z "$RUNNING_BSH" \
&& { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
RUNNING_BSH=
-# -help and -version only work if they are the only options. Therefore,
-# we cannot give the "-name xdvi" parameter in that case.
-# SU: Actually, with current xdvik, they should work in any position; but
-# we may keep this for compatibility with older versions and non-k xdvi.
+# -help and -version only used to work if they were the only options,
+# so the "-name xdvi" parameter wasn't used in that case. With current
+# xdvik, it should work in any case, but we keep this logic for compatibility
+# with older xdvik and plain xdvi versions.
+have_basename=`basename foo/bar 2>&1 | grep -i 'not found'`
+if [ "$have_basename"xxx = "xxx" ]; then
+ BASE_NAME=`basename $0`
+else
+ BASE_NAME=`echo $0 | sed 's!.*/!!'`
+fi
+
case "$#:$1" in
1:-help|1:-version)
NAMEOPT=;;
*)
- NAMEOPT='-name xdvi';;
+ NAMEOPT="-name $BASE_NAME";;
esac
xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`
@@ -43,4 +50,4 @@ if test -n "$xdviappfile"; then
XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH
fi
-exec xdvi-motif.bin $NAMEOPT ${1+"$@"}
+exec xdvi-motif $NAMEOPT ${1+"$@"}
diff --git a/Master/bin/powerpc-aix/xdvi-motif b/Master/bin/powerpc-aix/xdvi-motif
new file mode 100755
index 00000000000..37cb17d6e4e
--- /dev/null
+++ b/Master/bin/powerpc-aix/xdvi-motif
Binary files differ
diff --git a/Master/bin/powerpc-aix/xdvi-motif.bin b/Master/bin/powerpc-aix/xdvi-motif.bin
deleted file mode 100755
index 202f401a029..00000000000
--- a/Master/bin/powerpc-aix/xdvi-motif.bin
+++ /dev/null
Binary files differ
diff --git a/Master/bin/powerpc-aix/xdvipdfmx b/Master/bin/powerpc-aix/xdvipdfmx
index a3a7a982296..b571a615543 100755
--- a/Master/bin/powerpc-aix/xdvipdfmx
+++ b/Master/bin/powerpc-aix/xdvipdfmx
Binary files differ
diff --git a/Master/bin/powerpc-aix/xetex b/Master/bin/powerpc-aix/xetex
index fed521414cd..55c0259bc84 100755
--- a/Master/bin/powerpc-aix/xetex
+++ b/Master/bin/powerpc-aix/xetex
Binary files differ
diff --git a/Master/bin/powerpc-aix/xindy.mem b/Master/bin/powerpc-aix/xindy.mem
index 89d5073d44b..1716e0f5bee 100644
--- a/Master/bin/powerpc-aix/xindy.mem
+++ b/Master/bin/powerpc-aix/xindy.mem
Binary files differ
diff --git a/Master/bin/powerpc-aix/xindy.run b/Master/bin/powerpc-aix/xindy.run
index 3aadef59a9d..f772a684e27 100755
--- a/Master/bin/powerpc-aix/xindy.run
+++ b/Master/bin/powerpc-aix/xindy.run
Binary files differ
diff --git a/Master/bin/powerpc-aix/xmltools b/Master/bin/powerpc-aix/xmltools
index 03086d0436b..873458dcc92 100755..120000
--- a/Master/bin/powerpc-aix/xmltools
+++ b/Master/bin/powerpc-aix/xmltools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart xmltools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/xmltools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/afm2pl b/Master/bin/sparc-solaris/afm2pl
index c468267bf9f..56954d3a4ea 100755
--- a/Master/bin/sparc-solaris/afm2pl
+++ b/Master/bin/sparc-solaris/afm2pl
Binary files differ
diff --git a/Master/bin/sparc-solaris/afm2tfm b/Master/bin/sparc-solaris/afm2tfm
index 7525bddf08f..6416bde9a2b 100755
--- a/Master/bin/sparc-solaris/afm2tfm
+++ b/Master/bin/sparc-solaris/afm2tfm
Binary files differ
diff --git a/Master/bin/sparc-solaris/aleph b/Master/bin/sparc-solaris/aleph
index d3eb46be9dc..a4e265b81ca 100755
--- a/Master/bin/sparc-solaris/aleph
+++ b/Master/bin/sparc-solaris/aleph
Binary files differ
diff --git a/Master/bin/sparc-solaris/bibtex b/Master/bin/sparc-solaris/bibtex
index 9ded07a0477..9bed128b3a5 100755
--- a/Master/bin/sparc-solaris/bibtex
+++ b/Master/bin/sparc-solaris/bibtex
Binary files differ
diff --git a/Master/bin/sparc-solaris/bibtex8 b/Master/bin/sparc-solaris/bibtex8
index 7a39c6a86bb..a17ca1aec1e 100755
--- a/Master/bin/sparc-solaris/bibtex8
+++ b/Master/bin/sparc-solaris/bibtex8
Binary files differ
diff --git a/Master/bin/sparc-solaris/cfftot1 b/Master/bin/sparc-solaris/cfftot1
index b46a6208e9d..c6b7a820de7 100755
--- a/Master/bin/sparc-solaris/cfftot1
+++ b/Master/bin/sparc-solaris/cfftot1
Binary files differ
diff --git a/Master/bin/sparc-solaris/ctangle b/Master/bin/sparc-solaris/ctangle
index b2949b8c74d..d6933887c81 100755
--- a/Master/bin/sparc-solaris/ctangle
+++ b/Master/bin/sparc-solaris/ctangle
Binary files differ
diff --git a/Master/bin/sparc-solaris/ctie b/Master/bin/sparc-solaris/ctie
index 4d26b3e1d03..f018f422a6a 100755
--- a/Master/bin/sparc-solaris/ctie
+++ b/Master/bin/sparc-solaris/ctie
Binary files differ
diff --git a/Master/bin/sparc-solaris/ctxtools b/Master/bin/sparc-solaris/ctxtools
index 84e47bbee3c..66237b28340 100755..120000
--- a/Master/bin/sparc-solaris/ctxtools
+++ b/Master/bin/sparc-solaris/ctxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart ctxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/cweave b/Master/bin/sparc-solaris/cweave
index 89a964972b6..e5d97a5c0d3 100755
--- a/Master/bin/sparc-solaris/cweave
+++ b/Master/bin/sparc-solaris/cweave
Binary files differ
diff --git a/Master/bin/sparc-solaris/detex b/Master/bin/sparc-solaris/detex
index 8584e5891ca..509bbeeb7fa 100755
--- a/Master/bin/sparc-solaris/detex
+++ b/Master/bin/sparc-solaris/detex
Binary files differ
diff --git a/Master/bin/sparc-solaris/devnag b/Master/bin/sparc-solaris/devnag
index 05fb7c64d1a..7507bfe5ef8 100755
--- a/Master/bin/sparc-solaris/devnag
+++ b/Master/bin/sparc-solaris/devnag
Binary files differ
diff --git a/Master/bin/sparc-solaris/dmp b/Master/bin/sparc-solaris/dmp
index 4f292422ada..77c4a1ef427 100755
--- a/Master/bin/sparc-solaris/dmp
+++ b/Master/bin/sparc-solaris/dmp
Binary files differ
diff --git a/Master/bin/sparc-solaris/dt2dv b/Master/bin/sparc-solaris/dt2dv
index ea66566b732..5c8668a232c 100755
--- a/Master/bin/sparc-solaris/dt2dv
+++ b/Master/bin/sparc-solaris/dt2dv
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvicopy b/Master/bin/sparc-solaris/dvicopy
index 019fc753566..ffd4c962d8f 100755
--- a/Master/bin/sparc-solaris/dvicopy
+++ b/Master/bin/sparc-solaris/dvicopy
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvilj b/Master/bin/sparc-solaris/dvilj
index 9af8222ec02..2d43ab8d50a 100755
--- a/Master/bin/sparc-solaris/dvilj
+++ b/Master/bin/sparc-solaris/dvilj
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvilj2p b/Master/bin/sparc-solaris/dvilj2p
index db6021b13d0..82b74fa4cce 100755
--- a/Master/bin/sparc-solaris/dvilj2p
+++ b/Master/bin/sparc-solaris/dvilj2p
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvilj4 b/Master/bin/sparc-solaris/dvilj4
index fb83d399bff..b148b0d1c4c 100755
--- a/Master/bin/sparc-solaris/dvilj4
+++ b/Master/bin/sparc-solaris/dvilj4
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvilj4l b/Master/bin/sparc-solaris/dvilj4l
index 125e2f79a8a..edd5b63b34a 100755
--- a/Master/bin/sparc-solaris/dvilj4l
+++ b/Master/bin/sparc-solaris/dvilj4l
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvipdfm b/Master/bin/sparc-solaris/dvipdfm
index 9098b3e370a..b87ad186cde 100755
--- a/Master/bin/sparc-solaris/dvipdfm
+++ b/Master/bin/sparc-solaris/dvipdfm
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvipdfmx b/Master/bin/sparc-solaris/dvipdfmx
index 23b91ced604..99dc1a02831 100755
--- a/Master/bin/sparc-solaris/dvipdfmx
+++ b/Master/bin/sparc-solaris/dvipdfmx
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvipng b/Master/bin/sparc-solaris/dvipng
index a1d898be2d6..00a10cb2123 100755
--- a/Master/bin/sparc-solaris/dvipng
+++ b/Master/bin/sparc-solaris/dvipng
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvipos b/Master/bin/sparc-solaris/dvipos
index ac342aa33bf..fc6a1f1871b 100755
--- a/Master/bin/sparc-solaris/dvipos
+++ b/Master/bin/sparc-solaris/dvipos
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvips b/Master/bin/sparc-solaris/dvips
index d231c8dc47e..006416932f1 100755
--- a/Master/bin/sparc-solaris/dvips
+++ b/Master/bin/sparc-solaris/dvips
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvitomp b/Master/bin/sparc-solaris/dvitomp
index e76330ac294..4b0fc723262 100755
--- a/Master/bin/sparc-solaris/dvitomp
+++ b/Master/bin/sparc-solaris/dvitomp
Binary files differ
diff --git a/Master/bin/sparc-solaris/dvitype b/Master/bin/sparc-solaris/dvitype
index 4db60a70b80..8e04514bab7 100755
--- a/Master/bin/sparc-solaris/dvitype
+++ b/Master/bin/sparc-solaris/dvitype
Binary files differ
diff --git a/Master/bin/sparc-solaris/exatools b/Master/bin/sparc-solaris/exatools
index 50ff0f07e46..304ccdc7e15 100755..120000
--- a/Master/bin/sparc-solaris/exatools
+++ b/Master/bin/sparc-solaris/exatools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart exatools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/exatools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/gftodvi b/Master/bin/sparc-solaris/gftodvi
index bded6c6bc66..5f8ded0f66d 100755
--- a/Master/bin/sparc-solaris/gftodvi
+++ b/Master/bin/sparc-solaris/gftodvi
Binary files differ
diff --git a/Master/bin/sparc-solaris/gftopk b/Master/bin/sparc-solaris/gftopk
index 051c2bf5142..d1c60dbfa1c 100755
--- a/Master/bin/sparc-solaris/gftopk
+++ b/Master/bin/sparc-solaris/gftopk
Binary files differ
diff --git a/Master/bin/sparc-solaris/gftype b/Master/bin/sparc-solaris/gftype
index 33c7ae2bec2..403dee324c1 100755
--- a/Master/bin/sparc-solaris/gftype
+++ b/Master/bin/sparc-solaris/gftype
Binary files differ
diff --git a/Master/bin/sparc-solaris/gsftopk b/Master/bin/sparc-solaris/gsftopk
index c9684812b98..0de1fdd18e8 100755
--- a/Master/bin/sparc-solaris/gsftopk
+++ b/Master/bin/sparc-solaris/gsftopk
Binary files differ
diff --git a/Master/bin/sparc-solaris/hbf2gf b/Master/bin/sparc-solaris/hbf2gf
index 31e9e85c39c..4605cd797f3 100755
--- a/Master/bin/sparc-solaris/hbf2gf
+++ b/Master/bin/sparc-solaris/hbf2gf
Binary files differ
diff --git a/Master/bin/sparc-solaris/kpseaccess b/Master/bin/sparc-solaris/kpseaccess
index 8a5f619d140..f80c7b87d8d 100755
--- a/Master/bin/sparc-solaris/kpseaccess
+++ b/Master/bin/sparc-solaris/kpseaccess
Binary files differ
diff --git a/Master/bin/sparc-solaris/kpsereadlink b/Master/bin/sparc-solaris/kpsereadlink
index 83aae335d62..bef643ee5c6 100755
--- a/Master/bin/sparc-solaris/kpsereadlink
+++ b/Master/bin/sparc-solaris/kpsereadlink
Binary files differ
diff --git a/Master/bin/sparc-solaris/kpsestat b/Master/bin/sparc-solaris/kpsestat
index 245cb2d3429..05f86286670 100755
--- a/Master/bin/sparc-solaris/kpsestat
+++ b/Master/bin/sparc-solaris/kpsestat
Binary files differ
diff --git a/Master/bin/sparc-solaris/kpsewhich b/Master/bin/sparc-solaris/kpsewhich
index 4fda785fae6..de5acae2bf0 100755
--- a/Master/bin/sparc-solaris/kpsewhich
+++ b/Master/bin/sparc-solaris/kpsewhich
Binary files differ
diff --git a/Master/bin/sparc-solaris/lualatex b/Master/bin/sparc-solaris/lualatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/sparc-solaris/lualatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/luatex b/Master/bin/sparc-solaris/luatex
index 4cf1c8ab5d5..a105da447d7 100755
--- a/Master/bin/sparc-solaris/luatex
+++ b/Master/bin/sparc-solaris/luatex
Binary files differ
diff --git a/Master/bin/sparc-solaris/luatools b/Master/bin/sparc-solaris/luatools
index cb3ec1add4a..8fd68d0935a 100755..120000
--- a/Master/bin/sparc-solaris/luatools
+++ b/Master/bin/sparc-solaris/luatools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart luatools.lua "$@"
+../../texmf-dist/scripts/context/stubs/unix/luatools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/makeindex b/Master/bin/sparc-solaris/makeindex
index c16a403dc04..4fc922d29fb 100755
--- a/Master/bin/sparc-solaris/makeindex
+++ b/Master/bin/sparc-solaris/makeindex
Binary files differ
diff --git a/Master/bin/sparc-solaris/makempx b/Master/bin/sparc-solaris/makempx
index 01f41ad9ffa..99dfc28e4b2 100755
--- a/Master/bin/sparc-solaris/makempx
+++ b/Master/bin/sparc-solaris/makempx
Binary files differ
diff --git a/Master/bin/sparc-solaris/makempy b/Master/bin/sparc-solaris/makempy
index 4bf7a1af230..a3df543b304 100755..120000
--- a/Master/bin/sparc-solaris/makempy
+++ b/Master/bin/sparc-solaris/makempy
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart makempy.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/makempy \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/metafun b/Master/bin/sparc-solaris/metafun
new file mode 120000
index 00000000000..96672bbb523
--- /dev/null
+++ b/Master/bin/sparc-solaris/metafun
@@ -0,0 +1 @@
+mpost \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/mf b/Master/bin/sparc-solaris/mf
index 079a7c32be4..fa7e543da31 100755
--- a/Master/bin/sparc-solaris/mf
+++ b/Master/bin/sparc-solaris/mf
Binary files differ
diff --git a/Master/bin/sparc-solaris/mf-nowin b/Master/bin/sparc-solaris/mf-nowin
index 44d13c79d69..61aa4b367be 100755
--- a/Master/bin/sparc-solaris/mf-nowin
+++ b/Master/bin/sparc-solaris/mf-nowin
Binary files differ
diff --git a/Master/bin/sparc-solaris/mft b/Master/bin/sparc-solaris/mft
index d929953d5f5..110e2eb679d 100755
--- a/Master/bin/sparc-solaris/mft
+++ b/Master/bin/sparc-solaris/mft
Binary files differ
diff --git a/Master/bin/sparc-solaris/mktexlsr b/Master/bin/sparc-solaris/mktexlsr
index bd9b56b1906..2c4ac96f3dd 100755
--- a/Master/bin/sparc-solaris/mktexlsr
+++ b/Master/bin/sparc-solaris/mktexlsr
@@ -5,26 +5,32 @@
# installation won't write this script over yours.)
#
# Suitable for calling from cron, as in:
-# 0 * * * * cd /your/texmf/root && /usr/local/bin/mktexlsr
-# unless the scripts live in a different directory than the 'kpseaccess',
-# 'kpsestat', 'kpsereadlink', and 'kpsewhich' binaries.
+# 0 * * * * cd /your/texmf/root && /usr/local/texlive/bin/mktexlsr
#
# Originally written as `texhash' by Thomas Esser
# <te@dbs.uni-hannover.de>, Okt., 1994.
# Public domain.
-version='$Id: mktexlsr 8399 2008-05-28 22:19:34Z karl $'
+version='$Id: mktexlsr 9164 2008-07-02 17:42:11Z karl $'
progname=`echo $0 | sed 's%.*/%%'`
usage="Usage: $progname [DIR]...
-The only options are --help, --version, --verbose, --quiet, and --silent.
+Rebuild ls-R filename databases. If one or more arguments DIRS are
+given, these are used as the directories in which to build ls-R. Else
+all directories in the search path for ls-R files (\$TEXMFDBS) are used.
+
+Options:
+ --dry-run do not actually update anything
+ --help display this help and exit
+ --quiet cancel --verbose
+ --silent same as --quiet
+ --verbose explain what is being done
+ --version output version information and exit
+
If standard input is a terminal, --verbose is on by default.
---quiet and --silent are synonyms, and cancel --verbose.
-Rebuild all necessary ls-R filename databases completely. If one or
-more arguments DIRS are given, these are used as texmf directories to
-build ls-R for. Else all directories in the search path for ls-R files
-(\$TEXMFDBS) are used."
+Report bugs to tex-k@tug.org.
+"
# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate
# directories in path lists whereas Unix uses `:'. Make an exception for
@@ -53,6 +59,8 @@ case $dirname in
esac
if tty -s; then verbose=true; else verbose=false; fi
+dry_run=false
+trees=
# A copy of some stuff from mktex.opt, so we can run in the presence of
# terminally damaged ls-R files.
@@ -66,9 +74,19 @@ while test $# -gt 0; do
exit 0
elif test "x$1" = x--verbose || test "x$1" = x-verbose; then
verbose=true
+ elif test "x$1" = x--dry-run || test "x$1" = x-n; then
+ dry_run=true
elif test "x$1" = x--quiet || test "x$1" = x--silent \
|| test "x$1" = x-quiet || test "x$1" = x-silent ; then
verbose=false
+ elif test "x$1" = x--; then
+ :
+ elif echo "x$1" | grep '^x-' >/dev/null; then
+ echo "$progname: unknown option $1, try --help if you need it." >&2
+ exit 1
+ else
+ test -d "$1" || echo "$progname: $1 not a directory." >&2
+ trees="$trees $1" # don't want to update system dirs
fi
shift
done
@@ -79,16 +97,21 @@ ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.'
# The old string, which should continue to work.
old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.'
-trap 'cd / ; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15
+trap 'cd /; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp"; exit' 0 1 2 3 7 13 15
# Get list of directories from $TEXMFDBS; eliminate duplicates.
-test $# = 0 && {
- OIFS=$IFS
- IFS='
+{
+ if test -n "$trees"; then
+ set x $trees
+ else
+ OIFS=$IFS # want just a newline
+ IFS='
'
- set x `kpsewhich --show-path=ls-R | tr : '
-' | sort | uniq`; shift
- IFS=$OIFS
+ set x `kpsewhich --show-path=ls-R | tr : '
+' | sort | uniq`
+ IFS=$OIFS
+ fi
+ shift
}
for TEXMFLS_R in "$@"; do
@@ -98,8 +121,8 @@ for TEXMFLS_R in "$@"; do
/* | [A-z]:/*) ;;
*) TEXMFLS_R="`pwd`/$TEXMFLS_R"
esac
- # Allow for ls-R and ls-r to exist. But create ls-R if we're working
- # from scratch.
+ # Allow for either ls-R and ls-r to exist. But create ls-R if we're
+ # working from scratch.
if test -f "$TEXMFLS_R/ls-R"; then
db_file="$TEXMFLS_R/ls-R"
elif test -f "$TEXMFLS_R/ls-r"; then
@@ -117,6 +140,8 @@ for TEXMFLS_R in "$@"; do
esac
db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname
+ # want to be silent if the directory doesn't exist, since the ls-R
+ # path ordinarily contains many nonexistent directories.
test -d "$db_dir" || continue
test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; }
@@ -141,6 +166,8 @@ for TEXMFLS_R in "$@"; do
rm -f "$db_file_tmp"
$verbose && echo "$progname: Updating $db_file... " >&2
+ $dry_run && continue
+
echo "$ls_R_magic" >"$db_file_tmp"
# The main task. We put ./: in the output, so top-level files can be
diff --git a/Master/bin/sparc-solaris/mktextfm b/Master/bin/sparc-solaris/mktextfm
index a423d0309b0..8884351d7a1 100755
--- a/Master/bin/sparc-solaris/mktextfm
+++ b/Master/bin/sparc-solaris/mktextfm
@@ -48,7 +48,7 @@ esac
(
NAME=`basename "$1" .tfm`
-MAG=1
+MAG=0
#DEST="$2"
DPI=$BDPI
diff --git a/Master/bin/sparc-solaris/mpost b/Master/bin/sparc-solaris/mpost
index 97df904b0cb..e34d8cc1fc5 100755
--- a/Master/bin/sparc-solaris/mpost
+++ b/Master/bin/sparc-solaris/mpost
Binary files differ
diff --git a/Master/bin/sparc-solaris/mpstools b/Master/bin/sparc-solaris/mpstools
index b4c8f634548..caf4ae949f7 100755..120000
--- a/Master/bin/sparc-solaris/mpstools
+++ b/Master/bin/sparc-solaris/mpstools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mpstools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/mpstools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/mptopdf b/Master/bin/sparc-solaris/mptopdf
index 980a3123d1a..83172e791cd 100755..120000
--- a/Master/bin/sparc-solaris/mptopdf
+++ b/Master/bin/sparc-solaris/mptopdf
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mptopdf.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/mptopdf \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/mtxtools b/Master/bin/sparc-solaris/mtxtools
index 2922e0b4674..d99a8081bb9 100755..120000
--- a/Master/bin/sparc-solaris/mtxtools
+++ b/Master/bin/sparc-solaris/mtxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart mtxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/mtxtools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/odvicopy b/Master/bin/sparc-solaris/odvicopy
index 2adccc52459..173d670e6c2 100755
--- a/Master/bin/sparc-solaris/odvicopy
+++ b/Master/bin/sparc-solaris/odvicopy
Binary files differ
diff --git a/Master/bin/sparc-solaris/odvitype b/Master/bin/sparc-solaris/odvitype
index 43bc92585e1..ecc5a1f5e4f 100755
--- a/Master/bin/sparc-solaris/odvitype
+++ b/Master/bin/sparc-solaris/odvitype
Binary files differ
diff --git a/Master/bin/sparc-solaris/omega b/Master/bin/sparc-solaris/omega
index 3a38a25860e..60525e15215 100755
--- a/Master/bin/sparc-solaris/omega
+++ b/Master/bin/sparc-solaris/omega
Binary files differ
diff --git a/Master/bin/sparc-solaris/omfonts b/Master/bin/sparc-solaris/omfonts
index 395afbdfb96..5dfc53c6d1e 100755
--- a/Master/bin/sparc-solaris/omfonts
+++ b/Master/bin/sparc-solaris/omfonts
Binary files differ
diff --git a/Master/bin/sparc-solaris/otangle b/Master/bin/sparc-solaris/otangle
index 96182c4f752..c9b01f7272f 100755
--- a/Master/bin/sparc-solaris/otangle
+++ b/Master/bin/sparc-solaris/otangle
Binary files differ
diff --git a/Master/bin/sparc-solaris/otfinfo b/Master/bin/sparc-solaris/otfinfo
index ca7f2fd2153..93517b70a1e 100755
--- a/Master/bin/sparc-solaris/otfinfo
+++ b/Master/bin/sparc-solaris/otfinfo
Binary files differ
diff --git a/Master/bin/sparc-solaris/otftotfm b/Master/bin/sparc-solaris/otftotfm
index 6e20717392a..b3a3b6aef2f 100755
--- a/Master/bin/sparc-solaris/otftotfm
+++ b/Master/bin/sparc-solaris/otftotfm
Binary files differ
diff --git a/Master/bin/sparc-solaris/otp2ocp b/Master/bin/sparc-solaris/otp2ocp
index 311b2440af5..7441bcc902a 100755
--- a/Master/bin/sparc-solaris/otp2ocp
+++ b/Master/bin/sparc-solaris/otp2ocp
Binary files differ
diff --git a/Master/bin/sparc-solaris/outocp b/Master/bin/sparc-solaris/outocp
index 9be2db1e9cc..7f62be70428 100755
--- a/Master/bin/sparc-solaris/outocp
+++ b/Master/bin/sparc-solaris/outocp
Binary files differ
diff --git a/Master/bin/sparc-solaris/patgen b/Master/bin/sparc-solaris/patgen
index fe9aac11173..da1a0eca27d 100755
--- a/Master/bin/sparc-solaris/patgen
+++ b/Master/bin/sparc-solaris/patgen
Binary files differ
diff --git a/Master/bin/sparc-solaris/pdflualatex b/Master/bin/sparc-solaris/pdflualatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/sparc-solaris/pdflualatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pdfluatex b/Master/bin/sparc-solaris/pdfluatex
new file mode 120000
index 00000000000..8d727021583
--- /dev/null
+++ b/Master/bin/sparc-solaris/pdfluatex
@@ -0,0 +1 @@
+luatex \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pdftex b/Master/bin/sparc-solaris/pdftex
index c839de0a157..7b4f74cff5c 100755
--- a/Master/bin/sparc-solaris/pdftex
+++ b/Master/bin/sparc-solaris/pdftex
Binary files differ
diff --git a/Master/bin/sparc-solaris/pdftools b/Master/bin/sparc-solaris/pdftools
index 92ee803a868..fa012780ccc 100755..120000
--- a/Master/bin/sparc-solaris/pdftools
+++ b/Master/bin/sparc-solaris/pdftools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart pdftools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/pdftools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pdftrimwhite b/Master/bin/sparc-solaris/pdftrimwhite
new file mode 120000
index 00000000000..46526e8ffcc
--- /dev/null
+++ b/Master/bin/sparc-solaris/pdftrimwhite
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/pdftrimwhite \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pktogf b/Master/bin/sparc-solaris/pktogf
index ba4536d1e95..91dc7eeb6d2 100755
--- a/Master/bin/sparc-solaris/pktogf
+++ b/Master/bin/sparc-solaris/pktogf
Binary files differ
diff --git a/Master/bin/sparc-solaris/pktype b/Master/bin/sparc-solaris/pktype
index 5c77fce0145..68f7229320d 100755
--- a/Master/bin/sparc-solaris/pktype
+++ b/Master/bin/sparc-solaris/pktype
Binary files differ
diff --git a/Master/bin/sparc-solaris/pltotf b/Master/bin/sparc-solaris/pltotf
index f728e78530a..731293244ca 100755
--- a/Master/bin/sparc-solaris/pltotf
+++ b/Master/bin/sparc-solaris/pltotf
Binary files differ
diff --git a/Master/bin/sparc-solaris/pooltype b/Master/bin/sparc-solaris/pooltype
index 44ebe6599ce..d1c56595a65 100755
--- a/Master/bin/sparc-solaris/pooltype
+++ b/Master/bin/sparc-solaris/pooltype
Binary files differ
diff --git a/Master/bin/sparc-solaris/ps2pk b/Master/bin/sparc-solaris/ps2pk
index 640b1b7443e..ddd83357731 100755
--- a/Master/bin/sparc-solaris/ps2pk
+++ b/Master/bin/sparc-solaris/ps2pk
Binary files differ
diff --git a/Master/bin/sparc-solaris/pst2pdf b/Master/bin/sparc-solaris/pst2pdf
new file mode 120000
index 00000000000..60a28335578
--- /dev/null
+++ b/Master/bin/sparc-solaris/pst2pdf
@@ -0,0 +1 @@
+../../texmf-dist/scripts/pst2pdf/pst2pdf.pl \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pstopdf b/Master/bin/sparc-solaris/pstopdf
index 5b38ed426cb..44478ee1dd4 100755..120000
--- a/Master/bin/sparc-solaris/pstopdf
+++ b/Master/bin/sparc-solaris/pstopdf
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart pstopdf.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/rlxtools b/Master/bin/sparc-solaris/rlxtools
index 41cea40fc09..a5078af4f10 100755..120000
--- a/Master/bin/sparc-solaris/rlxtools
+++ b/Master/bin/sparc-solaris/rlxtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart rlxtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/rlxtools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/runtools b/Master/bin/sparc-solaris/runtools
index ff9a333791b..127f29a36df 100755..120000
--- a/Master/bin/sparc-solaris/runtools
+++ b/Master/bin/sparc-solaris/runtools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart runtools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/runtools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/synctex b/Master/bin/sparc-solaris/synctex
index 617d84472f3..bbfd90825b1 100755
--- a/Master/bin/sparc-solaris/synctex
+++ b/Master/bin/sparc-solaris/synctex
Binary files differ
diff --git a/Master/bin/sparc-solaris/t4ht b/Master/bin/sparc-solaris/t4ht
index 0471eced786..c80d6f042d8 100755
--- a/Master/bin/sparc-solaris/t4ht
+++ b/Master/bin/sparc-solaris/t4ht
Binary files differ
diff --git a/Master/bin/sparc-solaris/tangle b/Master/bin/sparc-solaris/tangle
index 290347e3656..0ad29c1b246 100755
--- a/Master/bin/sparc-solaris/tangle
+++ b/Master/bin/sparc-solaris/tangle
Binary files differ
diff --git a/Master/bin/sparc-solaris/tex b/Master/bin/sparc-solaris/tex
index 472b44d013e..0df7bd4dcb8 100755
--- a/Master/bin/sparc-solaris/tex
+++ b/Master/bin/sparc-solaris/tex
Binary files differ
diff --git a/Master/bin/sparc-solaris/tex4ht b/Master/bin/sparc-solaris/tex4ht
index 08b7126964a..0ee4df2ddc5 100755
--- a/Master/bin/sparc-solaris/tex4ht
+++ b/Master/bin/sparc-solaris/tex4ht
Binary files differ
diff --git a/Master/bin/sparc-solaris/texexec b/Master/bin/sparc-solaris/texexec
index 2158172906a..36d22caefe7 100755..120000
--- a/Master/bin/sparc-solaris/texexec
+++ b/Master/bin/sparc-solaris/texexec
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texexec.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/texexec \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/texfind b/Master/bin/sparc-solaris/texfind
new file mode 120000
index 00000000000..e450f1060a3
--- /dev/null
+++ b/Master/bin/sparc-solaris/texfind
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/texfind \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/texfont b/Master/bin/sparc-solaris/texfont
index a91f786e3f8..a3756e037ce 100755..120000
--- a/Master/bin/sparc-solaris/texfont
+++ b/Master/bin/sparc-solaris/texfont
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texfont.pl "$@"
+../../texmf-dist/scripts/context/stubs/unix/texfont \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/texlinks b/Master/bin/sparc-solaris/texlinks
index 48657905634..d8e51550924 100755
--- a/Master/bin/sparc-solaris/texlinks
+++ b/Master/bin/sparc-solaris/texlinks
@@ -149,7 +149,7 @@ install_link()
esac
case $src in
- */cont-??|*/metafun|*/mptopdf)
+ */cont-??|*/mptopdf)
# context includes wrapper scripts that create/run these.
verbose_echo "skipped ConTeXtish symlink $src -> $dest (special case)"
;;
diff --git a/Master/bin/sparc-solaris/texmfstart b/Master/bin/sparc-solaris/texmfstart
index e43929213f5..db6dee0a29c 100755..120000
--- a/Master/bin/sparc-solaris/texmfstart
+++ b/Master/bin/sparc-solaris/texmfstart
@@ -1,2501 +1 @@
-#!/usr/bin/env ruby
-
-# program : texmfstart
-# copyright : PRAGMA Advanced Document Engineering
-# version : 1.9.0 - 2003/2006
-# author : Hans Hagen
-#
-# project : ConTeXt / eXaMpLe
-# info : j.hagen@xs4all.nl
-# www : www.pragma-pod.com / www.pragma-ade.com
-
-# no special requirements, i.e. no exa modules/classes used
-
-# texmfstart [switches] filename [optional arguments]
-#
-# ruby2exe texmfstart --help -> avoids stub test
-#
-# Of couse I can make this into a nice class, which i'll undoubtely will
-# do when I feel the need. In that case it will be part of a bigger game.
-
-# turning this into a service would be nice, so some day ...
-
-# --locate => provides location
-# --exec => exec instead of system
-# --iftouched=a,b => only if timestamp a<>b
-# --ifchanged=a,b => only if checksum changed
-#
-# file: path: bin:
-
-# texmfstart --exec bin:scite *.tex
-
-# we don't depend on other libs
-
-$: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq!
-
-require "rbconfig"
-require "md5"
-
-# funny, selfmergs was suddenly broken to case problems
-
-# kpse_merge_done: require 'base/kpseremote'
-# kpse_merge_done: require 'base/kpsedirect'
-# kpse_merge_done: require 'base/kpsefast'
-# kpse_merge_done: require 'base/merge'
-
-# kpse_merge_start
-
-# kpse_merge_file: 't:/ruby/base/kpsefast.rb'
-
-# module : base/kpsefast
-# copyright : PRAGMA Advanced Document Engineering
-# version : 2005
-# author : Hans Hagen
-#
-# project : ConTeXt / eXaMpLe
-# concept : Hans Hagen
-# info : j.hagen@xs4all.nl
-
-# todo: multiple cnf files
-#
-
-class String
-
- def split_path
- if self =~ /\;/o || self =~ /^[a-z]\:/io then
- self.split(";")
- else
- self.split(":")
- end
- end
-
-end
-
-class Array
-
- def join_path
- self.join(File::PATH_SEPARATOR)
- end
-
-end
-
-class File
-
- def File.locate_file(path,name)
- begin
- files = Dir.entries(path)
- if files.include?(name) then
- fullname = File.join(path,name)
- return fullname if FileTest.file?(fullname)
- end
- files.each do |p|
- fullname = File.join(path,p)
- if p != '.' and p != '..' and FileTest.directory?(fullname) and result = locate_file(fullname,name) then
- return result
- end
- end
- rescue
- # bad path
- end
- return nil
- end
-
- def File.glob_file(pattern)
- return Dir.glob(pattern).first
- end
-
-end
-
-module KpseUtil
-
- # to be adapted, see loading cnf file
-
- @@texmftrees = ['texmf-local','texmf.local','../..','texmf'] # '../..' is for gwtex
- @@texmfcnf = 'texmf.cnf'
-
- def KpseUtil::identify
- # we mainly need to identify the local tex stuff and wse assume that
- # the texmfcnf variable is set; otherwise we need to expand the
- # TEXMF variable and that takes time since it may involve more
- ownpath = File.expand_path($0)
- if ownpath.gsub!(/texmf.*?$/o, '') then
- ENV['SELFAUTOPARENT'] = ownpath
- else
- ENV['SELFAUTOPARENT'] = '.' # fall back
- # may be too tricky:
- #
- # (ENV['PATH'] ||'').split_path.each do |p|
- # if p.gsub!(/texmf.*?$/o, '') then
- # ENV['SELFAUTOPARENT'] = p
- # break
- # end
- # end
- end
- filenames = Array.new
- if ENV['TEXMFCNF'] && ! ENV['TEXMFCNF'].empty? then
- ENV['TEXMFCNF'].to_s.split_path.each do |path|
- filenames << File.join(path,@@texmfcnf)
- end
- elsif ENV['SELFAUTOPARENT'] == '.' then
- filenames << File.join('.',@@texmfcnf)
- else
- @@texmftrees.each do |tree|
- filenames << File.join(ENV['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
- end
- end
- loop do
- busy = false
- filenames.collect! do |f|
- f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do
- if (! ENV[$1]) || (ENV[$1] == $1) then
- "$#{$1}"
- else
- busy = true
- ENV[$1]
- end
- end
- end
- break unless busy
- end
- filenames.delete_if do |f|
- ! FileTest.file?(f)
- end
- return filenames
- end
-
- def KpseUtil::environment
- Hash.new.merge(ENV)
- end
-
-end
-
-class KpseFast
-
- # formats are an incredible inconsistent mess
-
- @@suffixes = Hash.new
- @@formats = Hash.new
- @@suffixmap = Hash.new
-
- @@texmfcnf = 'texmf.cnf'
-
- @@suffixes['gf'] = ['.<resolution>gf'] # todo
- @@suffixes['pk'] = ['.<resolution>pk'] # todo
- @@suffixes['tfm'] = ['.tfm']
- @@suffixes['afm'] = ['.afm']
- @@suffixes['base'] = ['.base']
- @@suffixes['bib'] = ['.bib']
- @@suffixes['bst'] = ['.bst']
- @@suffixes['cnf'] = ['.cnf']
- @@suffixes['ls-R'] = ['ls-R', 'ls-r']
- @@suffixes['fmt'] = ['.fmt', '.efmt', '.efm', '.ofmt', '.ofm', '.oft', '.eofmt', '.eoft', '.eof', '.pfmt', '.pfm', '.epfmt', '.epf', '.xpfmt', '.xpf', '.afmt', '.afm']
- @@suffixes['map'] = ['.map']
- @@suffixes['mem'] = ['.mem']
- @@suffixes['mf'] = ['.mf']
- @@suffixes['mfpool'] = ['.pool']
- @@suffixes['mft'] = ['.mft']
- @@suffixes['mp'] = ['.mp']
- @@suffixes['mppool'] = ['.pool']
- @@suffixes['ocp'] = ['.ocp']
- @@suffixes['ofm'] = ['.ofm', '.tfm']
- @@suffixes['opl'] = ['.opl']
- @@suffixes['otp'] = ['.otp']
- @@suffixes['ovf'] = ['.ovf']
- @@suffixes['ovp'] = ['.ovp']
- @@suffixes['graphic/figure'] = ['.eps', '.epsi']
- @@suffixes['tex'] = ['.tex']
- @@suffixes['texpool'] = ['.pool']
- @@suffixes['PostScript header'] = ['.pro']
- @@suffixes['type1 fonts'] = ['.pfa', '.pfb']
- @@suffixes['vf'] = ['.vf']
- @@suffixes['ist'] = ['.ist']
- @@suffixes['truetype fonts'] = ['.ttf', '.ttc']
- @@suffixes['web'] = ['.web', '.ch']
- @@suffixes['cweb'] = ['.w', '.web', '.ch']
- @@suffixes['enc files'] = ['.enc']
- @@suffixes['cmap files'] = ['.cmap']
- @@suffixes['subfont definition files'] = ['.sfd']
- @@suffixes['lig files'] = ['.lig']
- @@suffixes['bitmap font'] = []
- @@suffixes['MetaPost support'] = []
- @@suffixes['TeX system documentation'] = []
- @@suffixes['TeX system sources'] = []
- @@suffixes['Troff fonts'] = []
- @@suffixes['dvips config'] = []
- @@suffixes['type42 fonts'] = []
- @@suffixes['web2c files'] = []
- @@suffixes['other text files'] = []
- @@suffixes['other binary files'] = []
- @@suffixes['misc fonts'] = []
- @@suffixes['opentype fonts'] = []
- @@suffixes['pdftex config'] = []
- @@suffixes['texmfscripts'] = []
-
- # replacements
-
- @@suffixes['fmt'] = ['.fmt']
- @@suffixes['type1 fonts'] = ['.pfa', '.pfb', '.pfm']
- @@suffixes['tex'] = ['.tex', '.xml']
- @@suffixes['texmfscripts'] = ['rb','lua','py','pl']
-
- @@suffixes.keys.each do |k| @@suffixes[k].each do |s| @@suffixmap[s] = k end end
-
- # TTF2TFMINPUTS
- # MISCFONTS
- # TEXCONFIG
- # DVIPDFMINPUTS
- # OTFFONTS
-
- @@formats['gf'] = ''
- @@formats['pk'] = ''
- @@formats['tfm'] = 'TFMFONTS'
- @@formats['afm'] = 'AFMFONTS'
- @@formats['base'] = 'MFBASES'
- @@formats['bib'] = ''
- @@formats['bst'] = ''
- @@formats['cnf'] = ''
- @@formats['ls-R'] = ''
- @@formats['fmt'] = 'TEXFORMATS'
- @@formats['map'] = 'TEXFONTMAPS'
- @@formats['mem'] = 'MPMEMS'
- @@formats['mf'] = 'MFINPUTS'
- @@formats['mfpool'] = 'MFPOOL'
- @@formats['mft'] = ''
- @@formats['mp'] = 'MPINPUTS'
- @@formats['mppool'] = 'MPPOOL'
- @@formats['ocp'] = 'OCPINPUTS'
- @@formats['ofm'] = 'OFMFONTS'
- @@formats['opl'] = 'OPLFONTS'
- @@formats['otp'] = 'OTPINPUTS'
- @@formats['ovf'] = 'OVFFONTS'
- @@formats['ovp'] = 'OVPFONTS'
- @@formats['graphic/figure'] = ''
- @@formats['tex'] = 'TEXINPUTS'
- @@formats['texpool'] = 'TEXPOOL'
- @@formats['PostScript header'] = 'TEXPSHEADERS'
- @@formats['type1 fonts'] = 'T1FONTS'
- @@formats['vf'] = 'VFFONTS'
- @@formats['ist'] = ''
- @@formats['truetype fonts'] = 'TTFONTS'
- @@formats['web'] = ''
- @@formats['cweb'] = ''
- @@formats['enc files'] = 'ENCFONTS'
- @@formats['cmap files'] = 'CMAPFONTS'
- @@formats['subfont definition files'] = 'SFDFONTS'
- @@formats['lig files'] = 'LIGFONTS'
- @@formats['bitmap font'] = ''
- @@formats['MetaPost support'] = ''
- @@formats['TeX system documentation'] = ''
- @@formats['TeX system sources'] = ''
- @@formats['Troff fonts'] = ''
- @@formats['dvips config'] = ''
- @@formats['type42 fonts'] = 'T42FONTS'
- @@formats['web2c files'] = 'WEB2C'
- @@formats['other text files'] = ''
- @@formats['other binary files'] = ''
- @@formats['misc fonts'] = ''
- @@formats['opentype fonts'] = 'OPENTYPEFONTS'
- @@formats['pdftex config'] = 'PDFTEXCONFIG'
- @@formats['texmfscripts'] = 'TEXMFSCRIPTS'
-
- attr_accessor :progname, :engine, :format, :rootpath, :treepath,
- :verbose, :remember, :scandisk, :diskcache, :renewcache
-
- @@cacheversion = '1'
-
- def initialize
- @rootpath = ''
- @treepath = ''
- @progname = 'kpsewhich'
- @engine = 'pdftex'
- @variables = Hash.new
- @expansions = Hash.new
- @files = Hash.new
- @found = Hash.new
- @kpsevars = Hash.new
- @lsrfiles = Array.new
- @cnffiles = Array.new
- @verbose = true
- @remember = true
- @scandisk = true
- @diskcache = true
- @renewcache = false
- @isolate = false
-
- @diskcache = false
- @cachepath = nil
- @cachefile = 'tmftools.log'
-
- @environment = ENV
- end
-
- def set(key,value)
- case key
- when 'progname' then @progname = value
- when 'engine' then @engine = value
- when 'format' then @format = value
- end
- end
-
- def push_environment(env)
- @environment = env
- end
-
- # {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
- #
- # $SELFAUTOLOC : /usr/tex/bin/platform
- # $SELFAUTODIR : /usr/tex/bin
- # $SELFAUTOPARENT : /usr/tex
- #
- # since we live in scriptpath we need a slightly different method
-
- def load_cnf(filenames=nil)
- unless filenames then
- ownpath = File.expand_path($0)
- if ownpath.gsub!(/texmf.*?$/o, '') then
- @environment['SELFAUTOPARENT'] = ownpath
- else
- @environment['SELFAUTOPARENT'] = '.'
- end
- unless @treepath.empty? then
- unless @rootpath.empty? then
- @treepath = @treepath.split(',').collect do |p| File.join(@rootpath,p) end.join(',')
- end
- @environment['TEXMF'] = @treepath
- # only the first one
- @environment['TEXMFCNF'] = File.join(@treepath.split(',').first,'texmf/web2c')
- end
- unless @rootpath.empty? then
- @environment['TEXMFCNF'] = File.join(@rootpath,'texmf/web2c')
- @environment['SELFAUTOPARENT'] = @rootpath
- @isolate = true
- end
- filenames = Array.new
- if @environment['TEXMFCNF'] and not @environment['TEXMFCNF'].empty? then
- @environment['TEXMFCNF'].to_s.split_path.each do |path|
- filenames << File.join(path,@@texmfcnf)
- end
- elsif @environment['SELFAUTOPARENT'] == '.' then
- filenames << File.join('.',@@texmfcnf)
- else
- ['texmf-local','texmf'].each do |tree|
- filenames << File.join(@environment['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
- end
- end
- end
- # <root>/texmf/web2c/texmf.cnf
- filenames = _expanded_path_(filenames)
- @rootpath = filenames.first
- 3.times do
- @rootpath = File.dirname(@rootpath)
- end
- filenames.collect! do |f|
- f.gsub("\\", '/')
- end
- filenames.each do |fname|
- if FileTest.file?(fname) and f = File.open(fname) then
- @cnffiles << fname
- while line = f.gets do
- loop do
- # concatenate lines ending with \
- break unless line.sub!(/\\\s*$/o) do
- f.gets || ''
- end
- end
- case line
- when /^[\%\#]/o then
- # comment
- when /^\s*(.*?)\s*\=\s*(.*?)\s*$/o then
- key, value = $1, $2
- unless @variables.key?(key) then
- value.sub!(/\%.*$/,'')
- value.sub!(/\~/, "$HOME")
- @variables[key] = value
- end
- @kpsevars[key] = true
- end
- end
- f.close
- end
- end
- end
-
- def load_lsr
- @lsrfiles = []
- simplified_list(expansion('TEXMF')).each do |p|
- ['ls-R','ls-r'].each do |f|
- filename = File.join(p,f)
- if FileTest.file?(filename) then
- @lsrfiles << [filename,File.size(filename)]
- break
- end
- end
- end
- @files = Hash.new
- if @diskcache then
- ['HOME','TEMP','TMP','TMPDIR'].each do |key|
- if @environment[key] then
- if FileTest.directory?(@environment[key]) then
- @cachepath = @environment[key]
- @cachefile = [@rootpath.gsub(/[^A-Z0-9]/io, '-').gsub(/\-+/,'-'),File.basename(@cachefile)].join('-')
- break
- end
- end
- end
- if @cachepath and not @renewcache and FileTest.file?(File.join(@cachepath,@cachefile)) then
- begin
- if f = File.open(File.join(@cachepath,@cachefile)) then
- cacheversion = Marshal.load(f)
- if cacheversion == @@cacheversion then
- lsrfiles = Marshal.load(f)
- if lsrfiles == @lsrfiles then
- @files = Marshal.load(f)
- end
- end
- f.close
- end
- rescue
- @files = Hash.new
- end
- end
- end
- return if @files.size > 0
- @lsrfiles.each do |filedata|
- filename, filesize = filedata
- filepath = File.dirname(filename)
- begin
- path = '.'
- data = IO.readlines(filename)
- if data[0].chomp =~ /% ls\-R \-\- filename database for kpathsea\; do not change this line\./io then
- data.each do |line|
- case line
- when /^[a-zA-Z0-9]/o then
- line.chomp!
- if @files[line] then
- @files[line] << path
- else
- @files[line] = [path]
- end
- when /^\.\/(.*?)\:$/o then
- path = File.join(filepath,$1)
- end
- end
- end
- rescue
- # sorry
- end
- end
- if @diskcache and @cachepath and f = File.open(File.join(@cachepath,@cachefile),'wb') then
- f << Marshal.dump(@@cacheversion)
- f << Marshal.dump(@lsrfiles)
- f << Marshal.dump(@files)
- f.close
- end
- end
-
- def expand_variables
- @expansions = Hash.new
- if @isolate then
- @variables['TEXMFCNF'] = @environment['TEXMFCNF'].dup
- @variables['SELFAUTOPARENT'] = @environment['SELFAUTOPARENT'].dup
- else
- @environment.keys.each do |e|
- if e =~ /^([a-zA-Z]+)\_(.*)\s*$/o then
- @expansions["#{$1}.#{$2}"] = (@environment[e] ||'').dup
- else
- @expansions[e] = (@environment[e] ||'').dup
- end
- end
- end
- @variables.keys.each do |k|
- @expansions[k] = @variables[k].dup unless @expansions[k]
- end
- loop do
- busy = false
- @expansions.keys.each do |k|
- @expansions[k].gsub!(/\$([a-zA-Z0-9\_\-]*)/o) do
- busy = true
- @expansions[$1] || ''
- end
- @expansions[k].gsub!(/\$\{([a-zA-Z0-9\_\-]*)\}/o) do
- busy = true
- @expansions[$1] || ''
- end
- end
- break unless busy
- end
- @expansions.keys.each do |k|
- @expansions[k] = @expansions[k].gsub("\\", '/')
- end
- end
-
- def variable(name='')
- (name and not name.empty? and @variables[name.sub('$','')]) or ''
- end
-
- def expansion(name='')
- (name and not name.empty? and @expansions[name.sub('$','')]) or ''
- end
-
- def variable?(name='')
- name and not name.empty? and @variables.key?(name.sub('$',''))
- end
-
- def expansion?(name='')
- name and not name.empty? and @expansions.key?(name.sub('$',''))
- end
-
- def simplified_list(str)
- lst = str.gsub(/^\{/o,'').gsub(/\}$/o,'').split(",")
- lst.collect do |l|
- l.sub(/^[\!]*/,'').sub(/[\/\\]*$/o,'')
- end
- end
-
- def original_variable(variable)
- if variable?("#{@progname}.#{variable}") then
- variable("#{@progname}.#{variable}")
- elsif variable?(variable) then
- variable(variable)
- else
- ''
- end
- end
-
- def expanded_variable(variable)
- if expansion?("#{variable}.#{@progname}") then
- expansion("#{variable}.#{@progname}")
- elsif expansion?(variable) then
- expansion(variable)
- else
- ''
- end
- end
-
- def original_path(filename='')
- _expanded_path_(original_variable(var_of_format_or_suffix(filename)).split(";"))
- end
-
- def expanded_path(filename='')
- _expanded_path_(expanded_variable(var_of_format_or_suffix(filename)).split(";"))
- end
-
- def _expanded_path_(pathlist)
- i, n = 0, 0
- pathlist.collect! do |mainpath|
- mainpath.gsub(/([\{\}])/o) do
- if $1 == "{" then
- i += 1 ; n = i if i > n ; "<#{i}>"
- else
- i -= 1 ; "</#{i+1}>"
- end
- end
- end
- n.times do |i|
- loop do
- more = false
- newlist = []
- pathlist.each do |path|
- unless path.sub!(/^(.*?)<(#{n-i})>(.*?)<\/\2>(.*?)$/) do
- pre, mid, post = $1, $3, $4
- mid.gsub!(/\,$/,',.')
- mid.split(',').each do |m|
- more = true
- if m == '.' then
- newlist << "#{pre}#{post}"
- else
- newlist << "#{pre}#{m}#{post}"
- end
- end
- end then
- newlist << path
- end
- end
- if more then
- pathlist = [newlist].flatten # copy -)
- else
- break
- end
- end
- end
- pathlist = pathlist.uniq.collect do |path|
- p = path
- # p.gsub(/^\/+/o) do '' end
- # p.gsub!(/(.)\/\/(.)/o) do "#{$1}/#{$2}" end
- # p.gsub!(/\/\/+$/o) do '//' end
- p.gsub!(/\/\/+/o) do '//' end
- p
- end
- pathlist
- end
-
- # todo: ignore case
-
- def var_of_format(str)
- @@formats[str] || ''
- end
-
- def var_of_suffix(str) # includes .
- if @@suffixmap.key?(str) then @@formats[@@suffixmap[str]] else '' end
- end
-
- def var_of_format_or_suffix(str)
- if @@formats.key?(str) then
- @@formats[str]
- elsif @@suffixmap.key?(File.extname(str)) then # extname includes .
- @@formats[@@suffixmap[File.extname(str)]] # extname includes .
- else
- ''
- end
- end
-
-end
-
-class KpseFast
-
- # test things
-
- def list_variables(kpseonly=true)
- @variables.keys.sort.each do |k|
- if kpseonly then
- puts("#{k} = #{@variables[k]}") if @kpsevars[k]
- else
- puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@variables[k]}")
- end
- end
- end
-
- def list_expansions(kpseonly=true)
- @expansions.keys.sort.each do |k|
- if kpseonly then
- puts("#{k} = #{@expansions[k]}") if @kpsevars[k]
- else
- puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@expansions[k]}")
- end
- end
- end
-
- def list_lsr
- puts("files = #{@files.size}")
- end
-
- def set_test_patterns
- @variables["KPSE_TEST_PATTERN_A"] = "foo/{1,2}/bar//"
- @variables["KPSE_TEST_PATTERN_B"] = "!!x{A,B{1,2}}y"
- @variables["KPSE_TEST_PATTERN_C"] = "x{A,B//{1,2}}y"
- @variables["KPSE_TEST_PATTERN_D"] = "x{A,B//{1,2,}}//y"
- end
-
- def show_test_patterns
- ['A','B','D'].each do |i|
- puts ""
- puts @variables ["KPSE_TEST_PATTERN_#{i}"]
- puts ""
- puts expand_path("KPSE_TEST_PATTERN_#{i}").split_path
- puts ""
- end
- end
-
-end
-
-class KpseFast
-
- # kpse stuff
-
- def expand_braces(str) # output variable and brace expansion of STRING.
- _expanded_path_(original_variable(str).split_path).join_path
- end
-
- def expand_path(str) # output complete path expansion of STRING.
- _expanded_path_(expanded_variable(str).split_path).join_path
- end
-
- def expand_var(str) # output variable expansion of STRING.
- expanded_variable(str)
- end
-
- def show_path(str) # output search path for file type NAME
- expanded_path(str).join_path
- end
-
- def var_value(str) # output the value of variable $STRING.
- original_variable(str)
- end
-
-end
-
-class KpseFast
-
- def _is_cnf_?(filename)
- filename == File.basename((@cnffiles.first rescue @@texmfcnf) || @@texmfcnf)
- end
-
- def find_file(filename)
- if _is_cnf_?(filename) then
- @cnffiles.first rescue ''
- else
- [find_files(filename,true)].flatten.first || ''
- end
- end
-
- def find_files(filename,first=false)
- if _is_cnf_?(filename) then
- result = @cnffiles.dup
- else
- if @remember then
- # stamp = "#{filename}--#{@format}--#{@engine}--#{@progname}"
- stamp = "#{filename}--#{@engine}--#{@progname}"
- return @found[stamp] if @found.key?(stamp)
- end
- pathlist = expanded_path(filename)
- result = []
- filelist = if @files.key?(filename) then @files[filename].uniq else nil end
- done = false
- if pathlist.size == 0 then
- if FileTest.file?(filename) then
- done = true
- result << '.'
- end
- else
- pathlist.each do |path|
- doscan = if path =~ /^\!\!/o then false else true end
- recurse = if path =~ /\/\/$/o then true else false end
- pathname = path.dup
- pathname.gsub!(/^\!+/o, '')
- done = false
- if not done and filelist then
- # checking for exact match
- if filelist.include?(pathname) then
- result << pathname
- done = true
- end
- if not done and recurse then
- # checking for fuzzy //
- pathname.gsub!(/\/+$/o, '/.*')
- # pathname.gsub!(/\/\//o,'/[\/]*/')
- pathname.gsub!(/\/\//o,'/.*?/')
- re = /^#{pathname}/
- filelist.each do |f|
- if re =~ f then
- result << f # duplicates will be filtered later
- done = true
- end
- break if done
- end
- end
- end
- if not done and doscan then
- # checking for path itself
- pname = pathname.sub(/\.\*$/,'')
- if not pname =~ /\*/o and FileTest.file?(File.join(pname,filename)) then
- result << pname
- done = true
- end
- end
- break if done and first
- end
- end
- if not done and @scandisk then
- pathlist.each do |path|
- pathname = path.dup
- unless pathname.gsub!(/^\!+/o, '') then # !! prevents scan
- recurse = pathname.gsub!(/\/+$/o, '')
- complex = pathname.gsub!(/\/\//o,'/*/')
- if recurse then
- if complex then
- if ok = File.glob_file("#{pathname}/**/#{filename}") then
- result << File.dirname(ok)
- done = true
- end
- elsif ok = File.locate_file(pathname,filename) then
- result << File.dirname(ok)
- done = true
- end
- elsif complex then
- if ok = File.glob_file("#{pathname}/#{filename}") then
- result << File.dirname(ok)
- done = true
- end
- elsif FileTest.file?(File.join(pathname,filename)) then
- result << pathname
- done = true
- end
- break if done and first
- end
- end
- end
- result = result.uniq.collect do |pathname|
- File.join(pathname,filename)
- end
- @found[stamp] = result if @remember
- end
- return result # redundant
- end
-
-end
-
-class KpseFast
-
- class FileData
- attr_accessor :tag, :name, :size, :date
- def initialize(tag=0,name=nil,size=nil,date=nil)
- @tag, @name, @size, @date = tag, name, size, date
- end
- def FileData.sizes(a)
- a.collect do |aa|
- aa.size
- end
- end
- def report
- case @tag
- when 1 then "deleted | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
- when 2 then "present | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
- when 3 then "obsolete | #{' '*8} | #{' '*16} | #{@name}"
- end
- end
- end
-
- def analyze_files(filter='',strict=false,sort='',delete=false)
- puts("command line = #{ARGV.join(' ')}")
- puts("number of files = #{@files.size}")
- puts("filter pattern = #{filter}")
- puts("loaded cnf files = #{@cnffiles.join(' ')}")
- puts('')
- if filter.gsub!(/^not:/,'') then
- def the_same(filter,filename)
- not filter or filter.empty? or /#{filter}/ !~ filename
- end
- else
- def the_same(filter,filename)
- not filter or filter.empty? or /#{filter}/ =~ filename
- end
- end
- @files.keys.each do |name|
- if @files[name].size > 1 then
- data = Array.new
- @files[name].each do |path|
- filename = File.join(path,name)
- # if not filter or filter.empty? or /#{filter}/ =~ filename then
- if the_same(filter,filename) then
- if FileTest.file?(filename) then
- if delete then
- data << FileData.new(1,filename,File.size(filename),File.mtime(filename))
- begin
- File.delete(filename) if delete
- rescue
- end
- else
- data << FileData.new(2,filename,File.size(filename),File.mtime(filename))
- end
- else
- # data << FileData.new(3,filename)
- end
- end
- end
- if data.length > 1 then
- if strict then
- # if data.collect do |d| d.size end.uniq! then
- # data.sort! do |a,b| b.size <=> a.size end
- # data.each do |d| puts d.report end
- # puts ''
- # end
- data.sort! do |a,b|
- if a.size and b.size then
- b.size <=> a.size
- else
- 0
- end
- end
- bunch = Array.new
- done = false
- data.each do |d|
- if bunch.size == 0 then
- bunch << d
- elsif bunch[0].size == d.size then
- bunch << d
- else
- if bunch.size > 1 then
- bunch.each do |b|
- puts b.report
- end
- done = true
- end
- bunch = [d]
- end
- end
- puts '' if done
- else
- case sort
- when 'size' then data.sort! do |a,b| a.size <=> b.size end
- when 'revsize' then data.sort! do |a,b| b.size <=> a.size end
- when 'date' then data.sort! do |a,b| a.date <=> b.date end
- when 'revdate' then data.sort! do |a,b| b.date <=> a.date end
- end
- data.each do |d| puts d.report end
- puts ''
- end
- end
- end
- end
- end
-
-end
-
-
- # k = KpseFast.new # (root)
- # k.set_test_patterns
- # k.load_cnf
- # k.expand_variables
- # k.load_lsr
-
- # k.show_test_patterns
-
- # puts k.list_variables
- # puts k.list_expansions
- # k.list_lsr
- # puts k.expansion("$TEXMF")
- # puts k.expanded_path("TEXINPUTS","context")
-
- # k.progname, k.engine, k.format = 'context', 'pdftex', 'tfm'
- # k.scandisk = false # == must_exist
- # k.expand_variables
-
- # 10.times do |i| puts k.find_file('texnansi-lmr10.tfm') end
-
- # puts "expand braces $TEXMF"
- # puts k.expand_braces("$TEXMF")
- # puts "expand path $TEXMF"
- # puts k.expand_path("$TEXMF")
- # puts "expand var $TEXMF"
- # puts k.expand_var("$TEXMF")
- # puts "expand path $TEXMF"
- # puts k.show_path('tfm')
- # puts "expand value $TEXINPUTS"
- # puts k.var_value("$TEXINPUTS")
- # puts "expand value $TEXINPUTS.context"
- # puts k.var_value("$TEXINPUTS.context")
-
- # exit
-
-
-
-# kpse_merge_file: 't:/ruby/base/kpse/trees.rb'
-
-require 'monitor'
-# kpse_merge_done: require 'base/kpsefast'
-
-class KpseTrees < Monitor
-
- def initialize
- @trees = Hash.new
- end
-
- def pattern(filenames)
- filenames.join('|').gsub(/\\+/o,'/').downcase
- end
-
- def choose(filenames,environment)
- current = pattern(filenames)
- load(filenames,environment) unless @trees[current]
- puts "enabling tree #{current}"
- current
- end
-
- def fetch(filenames,environment) # will send whole object !
- current = pattern(filenames)
- load(filenames,environment) unless @trees[current]
- puts "fetching tree #{current}"
- @trees[current]
- end
-
- def load(filenames,environment)
- current = pattern(filenames)
- puts "loading tree #{current}"
- @trees[current] = KpseFast.new
- @trees[current].push_environment(environment)
- @trees[current].load_cnf(filenames)
- @trees[current].expand_variables
- @trees[current].load_lsr
- end
-
- def set(tree,key,value)
- case key
- when 'progname' then @trees[tree].progname = value
- when 'engine' then @trees[tree].engine = value
- when 'format' then @trees[tree].format = value
- end
- end
- def get(tree,key)
- case key
- when 'progname' then @trees[tree].progname
- when 'engine' then @trees[tree].engine
- when 'format' then @trees[tree].format
- end
- end
-
- def load_cnf(tree)
- @trees[tree].load_cnf
- end
- def load_lsr(tree)
- @trees[tree].load_lsr
- end
- def expand_variables(tree)
- @trees[tree].expand_variables
- end
- def expand_braces(tree,str)
- @trees[tree].expand_braces(str)
- end
- def expand_path(tree,str)
- @trees[tree].expand_path(str)
- end
- def expand_var(tree,str)
- @trees[tree].expand_var(str)
- end
- def show_path(tree,str)
- @trees[tree].show_path(str)
- end
- def var_value(tree,str)
- @trees[tree].var_value(str)
- end
- def find_file(tree,filename)
- @trees[tree].find_file(filename)
- end
- def find_files(tree,filename,first)
- @trees[tree].find_files(filename,first)
- end
-
-end
-
-
-# kpse_merge_file: 't:/ruby/base/kpse/drb.rb'
-
-require 'drb'
-# kpse_merge_done: require 'base/kpse/trees'
-
-class KpseServer
-
- attr_accessor :port
-
- def initialize(port=7000)
- @port = port
- end
-
- def start
- puts "starting drb service at port #{@port}"
- DRb.start_service("druby://localhost:#{@port}", KpseTrees.new)
- trap(:INT) do
- DRb.stop_service
- end
- DRb.thread.join
- end
-
- def stop
- # todo
- end
-
-end
-
-class KpseClient
-
- attr_accessor :port
-
- def initialize(port=7000)
- @port = port
- @kpse = nil
- end
-
- def start
- # only needed when callbacks are used / slow, due to Socket::getaddrinfo
- # DRb.start_service
- end
-
- def object
- @kpse = DRbObject.new(nil,"druby://localhost:#{@port}")
- end
-
-end
-
-
-# SERVER_URI="druby://localhost:8787"
-#
-# # Start a local DRbServer to handle callbacks.
-# #
-# # Not necessary for this small example, but will be required
-# # as soon as we pass a non-marshallable object as an argument
-# # to a dRuby call.
-# DRb.start_service
-#
-
-
-# kpse_merge_file: 't:/ruby/base/kpseremote.rb'
-
-# kpse_merge_done: require 'base/kpsefast'
-
-case ENV['KPSEMETHOD']
- when /soap/o then # kpse_merge_done: require 'base/kpse/soap'
- when /drb/o then # kpse_merge_done: require 'base/kpse/drb'
- else # kpse_merge_done: require 'base/kpse/drb'
-end
-
-class KpseRemote
-
- @@port = ENV['KPSEPORT'] || 7000
- @@method = ENV['KPSEMETHOD'] || 'drb'
-
- def KpseRemote::available?
- @@method && @@port
- end
-
- def KpseRemote::start_server(port=nil)
- kpse = KpseServer.new(port || @@port)
- kpse.start
- end
-
- def KpseRemote::start_client(port=nil) # keeps object in server
- kpseclient = KpseClient.new(port || @@port)
- kpseclient.start
- kpse = kpseclient.object
- tree = kpse.choose(KpseUtil::identify, KpseUtil::environment)
- [kpse, tree]
- end
-
- def KpseRemote::fetch(port=nil) # no need for defining methods but slower, send whole object
- kpseclient = KpseClient.new(port || @@port)
- kpseclient.start
- kpseclient.object.fetch(KpseUtil::identify, KpseUtil::environment) rescue nil
- end
-
- def initialize(port=nil)
- if KpseRemote::available? then
- begin
- @kpse, @tree = KpseRemote::start_client(port)
- rescue
- @kpse, @tree = nil, nil
- end
- else
- @kpse, @tree = nil, nil
- end
- end
-
- def progname=(value)
- @kpse.set(@tree,'progname',value)
- end
- def format=(value)
- @kpse.set(@tree,'format',value)
- end
- def engine=(value)
- @kpse.set(@tree,'engine',value)
- end
-
- def progname
- @kpse.get(@tree,'progname')
- end
- def format
- @kpse.get(@tree,'format')
- end
- def engine
- @kpse.get(@tree,'engine')
- end
-
- def load
- @kpse.load(KpseUtil::identify, KpseUtil::environment)
- end
- def okay?
- @kpse && @tree
- end
- def set(key,value)
- @kpse.set(@tree,key,value)
- end
- def load_cnf
- @kpse.load_cnf(@tree)
- end
- def load_lsr
- @kpse.load_lsr(@tree)
- end
- def expand_variables
- @kpse.expand_variables(@tree)
- end
- def expand_braces(str)
- clean_name(@kpse.expand_braces(@tree,str))
- end
- def expand_path(str)
- clean_name(@kpse.expand_path(@tree,str))
- end
- def expand_var(str)
- clean_name(@kpse.expand_var(@tree,str))
- end
- def show_path(str)
- clean_name(@kpse.show_path(@tree,str))
- end
- def var_value(str)
- clean_name(@kpse.var_value(@tree,str))
- end
- def find_file(filename)
- clean_name(@kpse.find_file(@tree,filename))
- end
- def find_files(filename,first=false)
- # dodo: each filename
- @kpse.find_files(@tree,filename,first)
- end
-
- private
-
- def clean_name(str)
- str.gsub(/\\/,'/')
- end
-
-end
-
-
-# kpse_merge_file: 't:/ruby/base/kpsedirect.rb'
-
-class KpseDirect
-
- attr_accessor :progname, :format, :engine
-
- def initialize
- @progname, @format, @engine = '', '', ''
- end
-
- def expand_path(str)
- clean_name(`kpsewhich -expand-path=#{str}`.chomp)
- end
-
- def expand_var(str)
- clean_name(`kpsewhich -expand-var=#{str}`.chomp)
- end
-
- def find_file(str)
- clean_name(`kpsewhich #{_progname_} #{_format_} #{str}`.chomp)
- end
-
- def _progname_
- if @progname.empty? then '' else "-progname=#{@progname}" end
- end
- def _format_
- if @format.empty? then '' else "-format=\"#{@format}\"" end
- end
-
- private
-
- def clean_name(str)
- str.gsub(/\\/,'/')
- end
-
-end
-
-
-# kpse_merge_stop
-
-
-
-$mswindows = Config::CONFIG['host_os'] =~ /mswin/
-$separator = File::PATH_SEPARATOR
-$version = "2.0.3"
-$ownpath = File.dirname($0)
-
-if $mswindows then
- require "win32ole"
- require "Win32API"
-end
-
-# exit if defined?(REQUIRE2LIB)
-
-$stdout.sync = true
-$stderr.sync = true
-
-$applications = Hash.new
-$suffixinputs = Hash.new
-$predefined = Hash.new
-$runners = Hash.new
-
-$suffixinputs['pl'] = 'PERLINPUTS'
-$suffixinputs['rb'] = 'RUBYINPUTS'
-$suffixinputs['py'] = 'PYTHONINPUTS'
-$suffixinputs['lua'] = 'LUAINPUTS'
-$suffixinputs['jar'] = 'JAVAINPUTS'
-$suffixinputs['pdf'] = 'PDFINPUTS'
-
-$predefined['texexec'] = 'texexec.rb'
-$predefined['texutil'] = 'texutil.rb'
-$predefined['texfont'] = 'texfont.pl'
-$predefined['texshow'] = 'texshow.pl'
-
-$predefined['makempy'] = 'makempy.pl'
-$predefined['mptopdf'] = 'mptopdf.pl'
-$predefined['pstopdf'] = 'pstopdf.rb'
-
-$predefined['examplex'] = 'examplex.rb'
-$predefined['concheck'] = 'concheck.rb'
-
-$predefined['runtools'] = 'runtools.rb'
-$predefined['textools'] = 'textools.rb'
-$predefined['tmftools'] = 'tmftools.rb'
-$predefined['ctxtools'] = 'ctxtools.rb'
-$predefined['rlxtools'] = 'rlxtools.rb'
-$predefined['pdftools'] = 'pdftools.rb'
-$predefined['mpstools'] = 'mpstools.rb'
-$predefined['exatools'] = 'exatools.rb'
-$predefined['xmltools'] = 'xmltools.rb'
-# $predefined['luatools'] = 'luatools.lua'
-# $predefined['mtxtools'] = 'mtxtools.rb'
-
-$predefined['newpstopdf'] = 'pstopdf.rb'
-$predefined['newtexexec'] = 'texexec.rb'
-$predefined['pdftrimwhite'] = 'pdftrimwhite.pl'
-
-$makelist = [
- # context
- 'texexec',
- 'texutil',
- 'texfont',
- # mp/ps
- 'pstopdf',
- 'mptopdf',
- 'makempy',
- # misc
- 'ctxtools',
- 'pdftools',
- 'xmltools',
- 'textools',
- 'mpstools',
- 'tmftools',
- 'exatools',
- 'runtools',
- 'rlxtools',
- 'pdftrimwhite',
- 'texfind',
- 'texshow'
- #
- # no 'luatools',
- # no 'mtxtools',
- # no, 'texmfstart'
-]
-
-$scriptlist = 'rb|pl|py|lua|jar'
-$documentlist = 'pdf|ps|eps|htm|html'
-
-$editor = ENV['TEXMFSTART_EDITOR'] || ENV['EDITOR'] || ENV['editor'] || 'scite'
-
-$crossover = true # to other tex tools, else only local
-$kpse = nil
-
-def set_applications(page=1)
-
- $applications['unknown'] = ''
- $applications['ruby'] = $applications['rb'] = 'ruby'
- $applications['lua'] = $applications['lua'] = 'lua'
- $applications['perl'] = $applications['pl'] = 'perl'
- $applications['python'] = $applications['py'] = 'python'
- $applications['java'] = $applications['jar'] = 'java'
-
- if $mswindows then
- $applications['pdf'] = ['',"pdfopen --page #{page} --file",'acroread']
- $applications['html'] = ['','netscape','mozilla','opera','iexplore']
- $applications['ps'] = ['','gview32','gv','gswin32','gs']
- else
- $applications['pdf'] = ["pdfopen --page #{page} --file",'acroread']
- $applications['html'] = ['netscape','mozilla','opera']
- $applications['ps'] = ['gview','gv','gs']
- end
-
- $applications['htm'] = $applications['html']
- $applications['eps'] = $applications['ps']
-
- $runners['lua'] = "texlua"
-
-end
-
-set_applications()
-
-def check_kpse
- if $kpse then
- # already done
- else
- begin
- if KpseRemote::available? then
- $kpse = KpseRemote.new
- if $kpse.okay? then
- puts("kpse : remote") if $verbose
- else
- $kpse = KpseDirect.new
- puts("kpse : direct (forced)") if $verbose
- end
- else
- $kpse = KpseDirect.new
- puts("kpse : direct") if $verbose
- end
- rescue
- puts("kpse : direct (fallback)") if $verbose
- end
- end
-end
-
-if $mswindows then
-
- GetShortPathName = Win32API.new('kernel32', 'GetShortPathName', ['P','P','N'], 'N')
- GetLongPathName = Win32API.new('kernel32', 'GetLongPathName', ['P','P','N'], 'N')
-
- def dowith_pathname (filename,filemethod)
- filename = filename.gsub(/\\/o,'/') # no gsub! because filename can be frozen
- case filename
- when /\;/o then
- # could be a path spec
- return filename
- when /\s+/o then
- # danger lurking
- buffer = ' ' * 260
- length = filemethod.call(filename,buffer,buffer.size)
- if length>0 then
- return buffer.slice(0..length-1)
- else
- # when the path or file does not exist, nothing is returned
- # so we try to handle the path separately from the basename
- basename = File.basename(filename)
- pathname = File.dirname(filename)
- length = filemethod.call(pathname,buffer,260)
- if length>0 then
- return buffer.slice(0..length-1) + '/' + basename
- else
- return filename
- end
- end
- else
- # no danger
- return filename
- end
- end
-
- def longpathname (filename)
- dowith_pathname(filename,GetLongPathName)
- end
-
- def shortpathname (filename)
- dowith_pathname(filename,GetShortPathName)
- end
-
-else
-
- def longpathname (filename)
- filename
- end
-
- def shortpathname (filename)
- filename
- end
-
-end
-
-class File
-
- # def File.needsupdate(oldname,newname)
- # begin
- # if $mswindows then
- # return File.stat(oldname).mtime > File.stat(newname).mtime
- # else
- # return File.stat(oldname).mtime != File.stat(newname).mtime
- # end
- # rescue
- # return true
- # end
- # end
-
- @@update_eps = 1
-
- def File.needsupdate(oldname,newname)
- begin
- oldtime = File.stat(oldname).mtime.to_i
- newtime = File.stat(newname).mtime.to_i
- if newtime >= oldtime then
- return false
- elsif oldtime-newtime < @@update_eps then
- return false
- else
- return true
- end
- rescue
- return true
- end
- end
-
- def File.syncmtimes(oldname,newname)
- return
- begin
- if $mswindows then
- # does not work (yet) / gives future timestamp
- # t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
- # File.utime(0,t,oldname,newname)
- else
- t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
- File.utime(0,t,oldname,newname)
- end
- rescue
- end
- end
-
- def File.timestamp(name)
- begin
- "#{File.stat(name).mtime}"
- rescue
- return 'unknown'
- end
- end
-
-end
-
-# def hashed (arr=[])
- # arg = if arr.class == String then arr.split(' ') else arr.dup end
- # hsh = Hash.new
- # if arg.length > 0
- # hsh['arguments'] = ''
- # done = false
- # arg.each do |s|
- # if done then
- # if s =~ / / then
- # hsh['arguments'] += " \"#{s}\"" # maybe split on =
- # else
- # hsh['arguments'] += " #{s}"
- # end
- # else
- # kvl = s.split('=')
- # if kvl[0].sub!(/^\-+/,'') then
- # hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end
- # else
- # hsh['file'] = s
- # done = true
- # end
- # end
- # end
- # end
- # return hsh
-# end
-
-def hashed (arr=[])
- arg = if arr.class == String then arr.split(' ') else arr.dup end
- hsh = Hash.new
- if arg.length > 0
- hsh['arguments'] = ''
- done = false
- arg.each do |s|
- if done then
- if s =~ /\s/ then
- kvl = s.split('=')
- if kvl[1] and kvl[1] !~ /^[\"\']/ then
- hsh['arguments'] += ' ' + kvl[0] + "=" + '"' + kvl[1] + '"'
- elsif s =~ /\s/ then
- hsh['arguments'] += ' "' + s + '"'
- else
- hsh['arguments'] += ' ' + s
- end
- else
- hsh['arguments'] += ' ' + s
- end
- else
- kvl = s.split('=')
- if kvl[0].sub!(/^\-+/,'') then
- hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end
- else
- hsh['file'] = s
- done = true
- end
- end
- end
- end
- return hsh
-end
-
-
-def launch(filename)
- if $browser && $mswindows then
- filename = filename.gsub(/\.[\/\\]/) do
- Dir.getwd + '/'
- end
- report("launching #{filename}")
- ie = WIN32OLE.new("InternetExplorer.Application")
- ie.visible = true
- ie.navigate(filename)
- return true
- else
- return false
- end
-end
-
-# env|environment
-# rel|relative
-# loc|locate|kpse|path|file
-
-def quoted(str)
- if str =~ /^\"/ then
- return str
- elsif str =~ / / then
- return "\"#{str}\""
- else
- return str
- end
-end
-
-def expanded(arg) # no "other text files", too restricted
- arg.gsub(/(env|environment)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- if resolved = ENV[original] then
- report("environment variable #{original} expands to #{resolved}") unless $report
- quoted(resolved)
- else
- report("environment variable #{original} cannot be resolved") unless $report
- quoted(original)
- end
- end . gsub(/(rel|relative)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- ['.','..','../..'].each do |r|
- if FileTest.file?(File.join(r,original)) then
- resolved = File.join(r,original)
- break
- end
- end
- if resolved.empty? then
- quoted(original)
- else
- quoted(resolved)
- end
- end . gsub(/(kpse|loc|locate|file|path)\:([a-zA-Z\-\_\.0-9]+)/o) do
- method, original, resolved = $1, $2, ''
- if $program && ! $program.empty? then
- # pstrings = ["-progname=#{$program}"]
- pstrings = [$program]
- else
- # pstrings = ['','-progname=context']
- pstrings = ['','context']
- end
- # auto suffix with texinputs as fall back
- if ENV["_CTX_K_V_#{original}_"] then
- resolved = ENV["_CTX_K_V_#{original}_"]
- report("environment provides #{original} as #{resolved}") unless $report
- quoted(resolved)
- else
- check_kpse
- pstrings.each do |pstr|
- if resolved.empty? then
- # command = "kpsewhich #{pstr} #{original}"
- # report("running #{command}")
- report("locating '#{original}' in program space '#{pstr}'")
- begin
- # resolved = `#{command}`.chomp
- $kpse.progname = pstr
- $kpse.format = ''
- resolved = $kpse.find_file(original).gsub(/\\/,'/')
- rescue
- resolved = ''
- end
- end
- # elsewhere in the tree
- if resolved.empty? then
- # command = "kpsewhich #{pstr} -format=\"other text files\" #{original}"
- # report("running #{command}")
- report("locating '#{original}' in program space '#{pstr}' using format 'other text files'")
- begin
- # resolved = `#{command}`.chomp
- $kpse.progname = pstr
- $kpse.format = 'other text files'
- resolved = $kpse.find_file(original).gsub(/\\/,'/')
- rescue
- resolved = ''
- end
- end
- end
- if resolved.empty? then
- original = File.dirname(original) if method =~ /path/
- report("#{original} is not resolved") unless $report
- ENV["_CTX_K_V_#{original}_"] = original if $crossover
- quoted(original)
- else
- resolved = File.dirname(resolved) if method =~ /path/
- report("#{original} is resolved to #{resolved}") unless $report
- ENV["_CTX_K_V_#{original}_"] = resolved if $crossover
- quoted(resolved)
- end
- end
- end
-end
-
-def changeddir?(path)
- if path.empty? then
- return true
- else
- oldpath = File.expand_path(path)
- begin
- Dir.chdir(path) if not path.empty?
- rescue
- report("unable to change to directory: #{path}")
- else
- report("changed to directory: #{path}")
- end
- newpath = File.expand_path(Dir.getwd)
- return oldpath == newpath
- end
-end
-
-def runcommand(command)
- if $locate then
- command = command.split(' ').collect do |c|
- if c =~ /\//o then
- begin
- cc = File.expand_path(c)
- c = cc if FileTest.file?(cc)
- rescue
- end
- end
- c
- end . join(' ')
- print command # to stdout and no newline
- elsif $execute then
- report("using 'exec' instead of 'system' call: #{command}")
- exec(command) if changeddir?($path)
- else
- report("using 'system' call: #{command}")
- system(command) if changeddir?($path)
- end
-end
-
-def join_command(args)
- args[0] = $runners[args[0]] || args[0]
- [args].join(' ')
-end
-
-def runoneof(application,fullname,browserpermitted)
- if browserpermitted && launch(fullname) then
- return true
- else
- fullname = quoted(fullname) # added because MM ran into problems
- report("starting #{$filename}") unless $report
- output("\n") if $report && $verbose
- applications = $applications[application.downcase]
- if ! applications then
- output("problems with determining application type")
- return true
- elsif applications.class == Array then
- if $report then
- output(join_command([fullname,expanded($arguments)]))
- return true
- else
- applications.each do |a|
- return true if runcommand(join_command([a,fullname,expanded($arguments)]))
- end
- end
- elsif applications.empty? then
- if $report then
- output(join_command([fullname,expanded($arguments)]))
- return true
- else
- return runcommand(join_command([fullname,expanded($arguments)]))
- end
- else
- if $report then
- output(join_command([applications,fullname,expanded($arguments)]))
- return true
- else
- return runcommand(join_command([applications,fullname,expanded($arguments)]))
- end
- end
- return false
- end
-end
-
-def report(str)
- $stdout.puts(str) if $verbose
-end
-
-def output(str)
- $stdout.puts(str)
-end
-
-def usage
- print "version : #{$version} - 2003/2006 - www.pragma-ade.com\n"
- print("\n")
- print("usage : texmfstart [switches] filename [optional arguments]\n")
- print("\n")
- print("switches : --verbose --report --browser --direct --execute --locate --iftouched --ifchanged\n")
- print(" --program --file --page --arguments --batch --edit --report --clear\n")
- print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n")
- print(" --tree --autotree --environment --showenv\n")
- print("\n")
- print("example : texmfstart pstopdf.rb cow.eps\n")
- print(" texmfstart --locate examplex.rb\n")
- print(" texmfstart --execute examplex.rb\n")
- print(" texmfstart --browser examplap.pdf\n")
- print(" texmfstart showcase.pdf\n")
- print(" texmfstart --page=2 --file=showcase.pdf\n")
- print(" texmfstart --program=yourtex yourscript.rb arg-1 arg-2\n")
- print(" texmfstart --direct xsltproc kpse:somefile.xsl somefile.xml\n")
- print(" texmfstart --direct ruby rel:wn-cleanup-1.rb oldfile.xml newfile.xml\n")
- print(" texmfstart bin:xsltproc env:somepreset path:somefile.xsl somefile.xml\n")
- print(" texmfstart --iftouched=normal,lowres downsample.rb normal lowres\n")
- print(" texmfstart --ifchanged=somefile.dat --direct processit somefile.dat\n")
- print(" texmfstart bin:scite kpse:texmf.cnf\n")
- print(" texmfstart --exec bin:scite *.tex\n")
- print(" texmfstart --edit texmf.cnf\n")
- print(" texmfstart --edit kpse:texmf.cnf\n")
- print(" texmfstart --serve\n")
- print("\n")
- print(" texmfstart --stubpath=/usr/local/bin [--make --remove] --verbose all\n")
- print(" texmfstart --stubpath=auto [--make --remove] all\n")
- print("\n")
- check_kpse
-end
-
-# somehow registration does not work out (at least not under windows)
-# the . is also not accepted by unix as seperator
-
-def tag(name)
- if $crossover then "_CTX_K_S_#{name}_" else "TEXMFSTART.#{name}" end
-end
-
-def registered?(filename)
- return ENV[tag(filename)] != nil
-end
-
-def registered(filename)
- return ENV[tag(filename)] || 'unknown'
-end
-
-def register(filename,fullname)
- if fullname && ! fullname.empty? then # && FileTest.file?(fullname)
- ENV[tag(filename)] = fullname
- report("registering '#{filename}' as '#{fullname}'")
- return true
- else
- return false
- end
-end
-
-def find(filename,program)
- begin
- filename = filename.sub(/script:/o, '') # so we have bin: and script: and nothing
- if $predefined.key?(filename) then
- report("expanding '#{filename}' to '#{$predefined[filename]}'")
- filename = $predefined[filename]
- end
- if registered?(filename) then
- report("already located '#{filename}'")
- return registered(filename)
- end
- # create suffix list
- if filename =~ /^(.*)\.(.+)$/ then
- filename = $1
- suffixlist = [$2]
- else
- suffixlist = [$scriptlist.split('|'),$documentlist.split('|')].flatten
- end
- # first we honor a given path
- if filename =~ /[\\\/]/ then
- report("trying to honor '#{filename}'")
- suffixlist.each do |suffix|
- fullname = filename+'.'+suffix
- if FileTest.file?(fullname) && register(filename,fullname)
- return shortpathname(fullname)
- end
- end
- end
- filename.sub!(/^.*[\\\/]/, '')
- # next we look at the current path and the callerpath
- pathlist = [ ]
- progpath = $applications[suffixlist[0]]
- threadok = registered("THREAD") !~ /unknown/
- pathlist << ['.','current']
- pathlist << [$ownpath,'caller'] if $ownpath != '.'
- pathlist << ["#{$ownpath}/../#{progpath}",'caller'] if progpath
- pathlist << [registered("THREAD"),'thread'] if threadok
- pathlist << ["#{registered("THREAD")}/../#{progpath}",'thread'] if progpath && threadok
- pathlist.each do |p|
- if p && ! p.empty? && ! (p[0] == 'unknown') then
- suffixlist.each do |suffix|
- fname = "#{filename}.#{suffix}"
- fullname = File.expand_path(File.join(p[0],fname))
- report("locating '#{fname}' in #{p[1]} path '#{p[0]}'")
- if FileTest.file?(fullname) && register(filename,fullname) then
- report("'#{fname}' located in #{p[1]} path")
- return shortpathname(fullname)
- end
- end
- end
- end
- # now we consult environment settings
- fullname = nil
- check_kpse
- $kpse.progname = program
- suffixlist.each do |suffix|
- begin
- break unless $suffixinputs[suffix]
- environment = ENV[$suffixinputs[suffix]] || ENV[$suffixinputs[suffix]+".#{$program}"]
- if ! environment || environment.empty? then
- begin
- # environment = `kpsewhich -expand-path=\$#{$suffixinputs[suffix]}`.chomp
- environment = $kpse.expand_path("\$#{$suffixinputs[suffix]}")
- rescue
- environment = nil
- else
- if environment && ! environment.empty? then
- report("using kpsewhich variable #{$suffixinputs[suffix]}")
- end
- end
- elsif environment && ! environment.empty? then
- report("using environment variable #{$suffixinputs[suffix]}")
- end
- if environment && ! environment.empty? then
- environment.split($separator).each do |e|
- e.strip!
- e = '.' if e == '\.' # somehow . gets escaped
- e += '/' unless e =~ /[\\\/]$/
- fullname = e + filename + '.' + suffix
- report("testing '#{fullname}'")
- if FileTest.file?(fullname) then
- break
- else
- fullname = nil
- end
- end
- end
- rescue
- report("environment string '#{$suffixinputs[suffix]}' cannot be used to locate '#{filename}'")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- # then we fall back on kpsewhich
- suffixlist.each do |suffix|
- # TDS script scripts location as per 2004
- if suffix =~ /(#{$scriptlist})/ then
- begin
- report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (1)")
- # fullname = `kpsewhich -progname=#{program} -format=texmfscripts #{filename}.#{suffix}`.chomp
- $kpse.format = 'texmfscripts'
- fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
- rescue
- report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (1)")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- # old TDS location: .../texmf/context/...
- begin
- report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (2)")
- # fullname = `kpsewhich -progname=#{program} -format="other text files" #{filename}.#{suffix}`.chomp
- $kpse.format = 'other text files'
- fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
- rescue
- report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (2)")
- fullname = nil
- else
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- # let's take a look at the path
- paths = ENV['PATH'].split($separator)
- suffixlist.each do |s|
- paths.each do |p|
- suffixedname = "#{filename}.#{s}"
- report("checking #{p} for #{filename}")
- if FileTest.file?(File.join(p,suffixedname)) then
- fullname = File.join(p,suffixedname)
- return shortpathname(fullname) if register(filename,fullname)
- end
- end
- end
- # bad luck, we need to search the tree ourselves
- if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
- report("aggressively locating '#{filename}' in document trees")
- begin
- # texroot = `kpsewhich -expand-var=$SELFAUTOPARENT`.chomp
- texroot = $kpse.expand_var("$SELFAUTOPARENT")
- rescue
- texroot = ''
- else
- texroot.sub!(/[\\\/][^\\\/]*?$/, '')
- end
- if not texroot.empty? then
- sffxlst = suffixlist.join(',')
- begin
- report("locating '#{filename}' in document tree '#{texroot}/doc*'")
- if (result = Dir.glob("#{texroot}/doc*/**/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
- fullname = result[0]
- end
- rescue
- report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted")
- end
- end
- return shortpathname(fullname) if register(filename,fullname)
- end
- report("aggressively locating '#{filename}' in tex trees")
- begin
- # textrees = `kpsewhich -expand-var=$TEXMF`.chomp
- textrees = $kpse.expand_var("$TEXMF")
- rescue
- textrees = ''
- end
- if not textrees.empty? then
- textrees.gsub!(/[\{\}\!]/, '')
- textrees = textrees.split(',')
- if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
- speedup = ['doc**','**']
- else
- speedup = ['**']
- end
- sffxlst = suffixlist.join(',')
- speedup.each do |speed|
- textrees.each do |tt|
- tt.gsub!(/[\\\/]$/, '')
- if FileTest.directory?(tt) then
- begin
- report("locating '#{filename}' in tree '#{tt}/#{speed}/#{filename}.{#{sffxlst}}'")
- if (result = Dir.glob("#{tt}/#{speed}/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
- fullname = result[0]
- break
- end
- rescue
- report("locating '#{filename}' in tree '#{tt}' aborted")
- next
- end
- end
- end
- break if fullname && ! fullname.empty?
- end
- end
- if register(filename,fullname) then
- return shortpathname(fullname)
- else
- return ''
- end
- rescue
- error, trace = $!, $@.join("\n")
- report("fatal error: #{error}\n#{trace}")
- # report("fatal error")
- end
-end
-
-def run(fullname)
- if ! fullname || fullname.empty? then
- output("the file '#{$filename}' is not found")
- elsif FileTest.file?(fullname) then
- begin
- case fullname
- when /\.(#{$scriptlist})$/i then
- return runoneof($1,fullname,false)
- when /\.(#{$documentlist})$/i then
- return runoneof($1,fullname,true)
- else
- return runoneof('unknown',fullname,false)
- end
- rescue
- report("starting '#{$filename}' in program space '#{$program}' fails (#{$!})")
- end
- else
- report("the file '#{$filename}' in program space '#{$program}' is not accessible")
- end
- return false
-end
-
-def direct(fullname)
- begin
- return runcommand([fullname.sub(/^(bin|binary)\:/, ''),expanded($arguments)].join(' '))
- rescue
- return false
- end
-end
-
-def edit(filename)
- begin
- return runcommand([$editor,expanded(filename),expanded($arguments)].join(' '))
- rescue
- return false
- end
-end
-
-def make(filename,windows=false,linux=false,remove=false)
- basename = File.basename(filename).gsub(/\.[^.]+?$/, '')
- if $stubpath == 'auto' then
- basename = File.dirname($0) + '/' + basename
- else
- basename = $stubpath + '/' + basename unless $stubpath.empty?
- end
- if filename == 'texmfstart' then
- program = 'ruby'
- command = 'kpsewhich --format=texmfscripts --progname=context texmfstart.rb'
- filename = `#{command}`.chomp.gsub(/\\/, '/')
- if filename.empty? then
- report("failure: #{command}")
- return
- elsif not remove then
- if windows then
- ['bat','exe'].each do |suffix|
- if FileTest.file?("#{basename}.#{suffix}") then
- report("windows stub '#{basename}.#{suffix}' skipped (already present)")
- return
- end
- end
- elsif linux && FileTest.file?(basename) then
- report("unix stub '#{basename}' skipped (already present)")
- return
- end
- end
- else
- program = nil
- if filename =~ /[\\\/]/ && filename =~ /\.(#{$scriptlist})$/ then
- program = $applications[$1]
- end
- filename = "\"#{filename}\"" if filename =~ /\s/
- program = 'texmfstart' if $indirect || ! program || program.empty?
- end
- begin
- callname = $predefined[filename.sub(/\.*?$/,'')] || filename
- if remove then
- if windows && (File.delete(basename+'.bat') rescue false) then
- report("windows stub '#{basename}.bat' removed (calls #{callname})")
- elsif linux && (File.delete(basename) rescue false) then
- report("unix stub '#{basename}' removed (calls #{callname})")
- end
- else
- if windows && f = open(basename+'.bat','w') then
- f.binmode
- f.write("@echo off\015\012")
- f.write("#{program} #{callname} %*\015\012")
- f.close
- report("windows stub '#{basename}.bat' made (calls #{callname})")
- elsif linux && f = open(basename,'w') then
- f.binmode
- f.write("#!/bin/sh\012")
- f.write("#{program} #{callname} \"$@\"\012")
- f.close
- report("unix stub '#{basename}' made (calls #{callname})")
- end
- end
- rescue
- report("failed to make stub '#{basename}' #{$!}")
- return false
- else
- return true
- end
-end
-
-def process(&block)
- if $iftouched then
- files = $directives['iftouched'].split(',')
- oldname, newname = files[0], files[1]
- if oldname && newname && File.needsupdate(oldname,newname) then
- report("file #{oldname}: #{File.timestamp(oldname)}")
- report("file #{newname}: #{File.timestamp(newname)}")
- report("file is touched, processing started")
- yield
- File.syncmtimes(oldname,newname)
- else
- report("file #{oldname} is untouched")
- end
- elsif $ifchanged then
- filename = $directives['ifchanged']
- checkname = filename + ".md5"
- oldchecksum, newchecksum = "old", "new"
- begin
- newchecksum = MD5.new(IO.read(filename)).hexdigest.upcase
- rescue
- newchecksum = "new"
- else
- begin
- oldchecksum = IO.read(checkname).chomp
- rescue
- oldchecksum = "old"
- end
- end
- if $verbose then
- report("old checksum #{filename}: #{oldchecksum}")
- report("new checksum #{filename}: #{newchecksum}")
- end
- if oldchecksum != newchecksum then
- report("file is changed, processing started")
- begin
- File.open(checkname,'w') do |f|
- f << newchecksum
- end
- rescue
- end
- yield
- else
- report("file #{filename} is unchanged")
- end
- else
- yield
- end
-end
-
-def checkenvironment(tree)
- report('')
- ENV['TMP'] = ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || ENV['HOME']
- case RUBY_PLATFORM
- when /(mswin|bccwin|mingw|cygwin)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-mswin'
- when /(linux)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-linux'
- when /(darwin|rhapsody|nextstep)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-macosx'
- # when /(netbsd|unix)/i then # todo
- else # todo
- end
- ENV['TEXOS'] = "#{ENV['TEXOS'].sub(/^[\\\/]*/, '').sub(/[\\\/]*$/, '')}"
- ENV['TEXPATH'] = tree.sub(/\/+$/,'') # + '/'
- ENV['TEXMFOS'] = "#{ENV['TEXPATH']}/#{ENV['TEXOS']}"
- report('')
- report("preset : TEXPATH => #{ENV['TEXPATH']}")
- report("preset : TEXOS => #{ENV['TEXOS']}")
- report("preset : TEXMFOS => #{ENV['TEXMFOS']}")
- report("preset : TMP => #{ENV['TMP']}")
- report('')
-end
-
-def loadfile(filename)
- begin
- IO.readlines(filename).each do |line|
- case line.chomp
- when /^[\#\%]/ then
- # comment
- when /^(.*?)\s*(\>|\=|\<)\s*(.*)\s*$/ then
- # = assign | > prepend | < append
- key, how, value = $1, $2, $3
- begin
- # $SAFE = 0
- value.gsub!(/\%(.*?)\%/) do
- ENV[$1] || ''
- end
- # value.gsub!(/\;/,$separator) if key =~ /PATH/i then
- case how
- when '=', '<<' then ENV[key] = value
- when '?', '??' then ENV[key] = ENV[key] || value
- when '<', '+=' then ENV[key] = (ENV[key] || '') + $separator + value
- when '>', '=+' then ENV[key] = value + $separator + (ENV[key] ||'')
- end
- rescue
- report("user set failed : #{key} (#{$!})")
- else
- report("user set : #{key} => #{ENV[key]}")
- end
- end
- end
- rescue
- report("error in reading file '#{filename}'")
- end
-end
-
-def loadtree(tree)
- begin
- unless tree.empty? then
- if File.directory?(tree) then
- setuptex = File.join(tree,'setuptex.tmf')
- else
- setuptex = tree.dup
- end
- if FileTest.file?(setuptex) then
- report("tex tree definition: #{setuptex}")
- checkenvironment(File.dirname(setuptex))
- loadfile(setuptex)
- else
- report("no setup file '#{setuptex}'")
- end
- end
- rescue
- # maybe tree is empty or boolean (no arg given)
- end
-end
-
-def loadenvironment(environment)
- begin
- unless environment.empty? then
- filename = if $path.empty? then environment else File.expand_path(File.join($path,environment)) end
- if FileTest.file?(filename) then
- report("environment : #{environment}")
- loadfile(filename)
- else
- report("no environment file '#{environment}'")
- end
- end
- rescue
- report("problem while loading '#{environment}'")
- end
-end
-
-def show_environment
- if $showenv then
- keys = ENV.keys.sort
- size = 0
- keys.each do |k|
- size = k.size if k.size > size
- end
- report('')
- keys.each do |k|
- report("#{k.rjust(size)} => #{ENV[k]}")
- end
- report('')
- end
-end
-
-def execute(arguments) # br global
-
- arguments = arguments.split(/\s+/) if arguments.class == String
- $directives = hashed(arguments)
-
- $help = $directives['help'] || false
- $batch = $directives['batch'] || false
- $filename = $directives['file'] || ''
- $program = $directives['program'] || 'context'
- $direct = $directives['direct'] || false
- $edit = $directives['edit'] || false
- $page = $directives['page'] || 1
- $browser = $directives['browser'] || false
- $report = $directives['report'] || false
- $verbose = $directives['verbose'] || false
- $arguments = $directives['arguments'] || ''
- $execute = $directives['execute'] || $directives['exec'] || false
- $locate = $directives['locate'] || false
-
- $autotree = if $directives['autotree'] then (ENV['TEXMFSTART_TREE'] || ENV['TEXMFSTARTTREE'] || '') else '' end
-
- $path = $directives['path'] || ''
- $tree = $directives['tree'] || $autotree || ''
- $environment = $directives['environment'] || ''
-
- $make = $directives['make'] || false
- $remove = $directives['remove'] || $directives['delete'] || false
- $unix = $directives['unix'] || false
- $windows = $directives['windows'] || $directives['mswin'] || false
- $stubpath = $directives['stubpath'] || ''
- $indirect = $directives['indirect'] || false
-
- $before = $directives['before'] || ''
- $after = $directives['after'] || ''
-
- $iftouched = $directives['iftouched'] || false
- $ifchanged = $directives['ifchanged'] || false
-
- $openoffice = $directives['oo'] || false
-
- $crossover = false if $directives['clear']
-
- $showenv = $directives['showenv'] || false
- $verbose = true if $showenv
-
- $serve = $directives['serve'] || false
-
- $verbose = true if (ENV['_CTX_VERBOSE_'] =~ /(y|yes|t|true|on)/io) && ! $locate && ! $report
-
- set_applications($page)
-
- # private:
-
- $selfmerge = $directives['selfmerge'] || false
- $selfcleanup = $directives['selfclean'] || $directives['selfcleanup'] || false
-
- ENV['_CTX_VERBOSE_'] = 'yes' if $verbose
-
- if $openoffice then
- if ENV['OOPATH'] then
- if FileTest.directory?(ENV['OOPATH']) then
- report("using open office python")
- if $mswindows then
- $applications['python'] = $applications['py'] = "\"#{File.join(ENV['OOPATH'],'program','python.bat')}\""
- else
- $applications['python'] = $applications['py'] = File.join(ENV['OOPATH'],'python')
- end
- report("python path #{$applications['python']}")
- else
- report("environment variable 'OOPATH' does not exist")
- end
- else
- report("environment variable 'OOPATH' is not set")
- end
- end
-
- if $selfmerge then
- output("ruby libraries are cleaned up") if SelfMerge::cleanup
- output("ruby libraries are merged") if SelfMerge::merge
- return true
- elsif $selfcleanup then
- output("ruby libraries are cleaned up") if SelfMerge::cleanup
- return true
- elsif $serve then
- if ENV['KPSEMETHOD'] && ENV['KPSEPORT'] then
- # # kpse_merge_done: require 'base/kpseremote'
- begin
- KpseRemote::start_server
- rescue
- return false
- else
- return true
- end
- else
- usage
- puts("")
- puts("message : set 'KPSEMETHOD' and 'KPSEPORT' variables")
- return false
- end
- elsif $help || ! $filename || $filename.empty? then
- usage
- loadtree($tree)
- loadenvironment($environment)
- show_environment()
- return true
- elsif $batch && $filename && ! $filename.empty? then
- # todo, take commands from file and avoid multiple starts and checks
- return false
- else
- report("texmfstart version #{$version}")
- loadtree($tree)
- loadenvironment($environment)
- show_environment()
- if $make || $remove then
- if $filename == 'all' then
- makelist = $makelist
- else
- makelist = [$filename]
- end
- makelist.each do |filename|
- if $windows then
- make(filename,true,false,$remove)
- elsif $unix then
- make(filename,false,true,$remove)
- else
- make(filename,$mswindows,!$mswindows,$remove)
- end
- end
- return true # guess
- elsif $browser && $filename =~ /^http\:\/\// then
- return launch($filename)
- else
- begin
- process do
- if $direct || $filename =~ /^bin\:/ then
- return direct($filename)
- elsif $edit && ! $editor.empty? then
- return edit($filename)
- else # script: or no prefix
- command = find(shortpathname($filename),$program)
- if command then
- register("THREAD",File.dirname(File.expand_path(command)))
- return run(command)
- else
- report('unable to locate program')
- return false
- end
- end
- end
- rescue
- report('fatal error in starting process')
- return false
- end
- end
- end
-
-end
-
-if execute(ARGV) then
- report("\nexecution was successful") if $verbose
- exit(0)
-else
- report("\nexecution failed") if $verbose
- exit(1)
-end
+../../texmf-dist/scripts/context/ruby/texmfstart.rb \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/texshow b/Master/bin/sparc-solaris/texshow
new file mode 120000
index 00000000000..52a03692b74
--- /dev/null
+++ b/Master/bin/sparc-solaris/texshow
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/texshow \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/textools b/Master/bin/sparc-solaris/textools
index 7445eac371c..d1a20375405 100755..120000
--- a/Master/bin/sparc-solaris/textools
+++ b/Master/bin/sparc-solaris/textools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart textools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/textools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/texutil b/Master/bin/sparc-solaris/texutil
index 607154af059..78f249c7f02 100755..120000
--- a/Master/bin/sparc-solaris/texutil
+++ b/Master/bin/sparc-solaris/texutil
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart texutil.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/texutil \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/tftopl b/Master/bin/sparc-solaris/tftopl
index 790d0b0ce85..1f3f7070057 100755
--- a/Master/bin/sparc-solaris/tftopl
+++ b/Master/bin/sparc-solaris/tftopl
Binary files differ
diff --git a/Master/bin/sparc-solaris/tie b/Master/bin/sparc-solaris/tie
index 035e7c222b1..f48d13221fa 100755
--- a/Master/bin/sparc-solaris/tie
+++ b/Master/bin/sparc-solaris/tie
Binary files differ
diff --git a/Master/bin/sparc-solaris/tmftools b/Master/bin/sparc-solaris/tmftools
index 7531a966390..444a68a40ee 100755..120000
--- a/Master/bin/sparc-solaris/tmftools
+++ b/Master/bin/sparc-solaris/tmftools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart tmftools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/tmftools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/ttf2afm b/Master/bin/sparc-solaris/ttf2afm
index c1bdcc01601..de8bea6a90d 100755
--- a/Master/bin/sparc-solaris/ttf2afm
+++ b/Master/bin/sparc-solaris/ttf2afm
Binary files differ
diff --git a/Master/bin/sparc-solaris/ttf2pk b/Master/bin/sparc-solaris/ttf2pk
index eed8e499252..1af32459466 100755
--- a/Master/bin/sparc-solaris/ttf2pk
+++ b/Master/bin/sparc-solaris/ttf2pk
Binary files differ
diff --git a/Master/bin/sparc-solaris/ttf2tfm b/Master/bin/sparc-solaris/ttf2tfm
index 24bac60222d..49abbfeaa4d 100755
--- a/Master/bin/sparc-solaris/ttf2tfm
+++ b/Master/bin/sparc-solaris/ttf2tfm
Binary files differ
diff --git a/Master/bin/sparc-solaris/ttftotype42 b/Master/bin/sparc-solaris/ttftotype42
index 7cbf496735e..01286a50204 100755
--- a/Master/bin/sparc-solaris/ttftotype42
+++ b/Master/bin/sparc-solaris/ttftotype42
Binary files differ
diff --git a/Master/bin/sparc-solaris/vftovp b/Master/bin/sparc-solaris/vftovp
index 2c0a638bd0c..5ddea981590 100755
--- a/Master/bin/sparc-solaris/vftovp
+++ b/Master/bin/sparc-solaris/vftovp
Binary files differ
diff --git a/Master/bin/sparc-solaris/vlna b/Master/bin/sparc-solaris/vlna
new file mode 100755
index 00000000000..16e4251fe12
--- /dev/null
+++ b/Master/bin/sparc-solaris/vlna
Binary files differ
diff --git a/Master/bin/sparc-solaris/vptovf b/Master/bin/sparc-solaris/vptovf
index 137c476701a..167eca7306d 100755
--- a/Master/bin/sparc-solaris/vptovf
+++ b/Master/bin/sparc-solaris/vptovf
Binary files differ
diff --git a/Master/bin/sparc-solaris/weave b/Master/bin/sparc-solaris/weave
index 19f75c75f86..ffa4b2827b3 100755
--- a/Master/bin/sparc-solaris/weave
+++ b/Master/bin/sparc-solaris/weave
Binary files differ
diff --git a/Master/bin/sparc-solaris/xdvi b/Master/bin/sparc-solaris/xdvi
index 847bf4acd69..04662a62d36 100755
--- a/Master/bin/sparc-solaris/xdvi
+++ b/Master/bin/sparc-solaris/xdvi
@@ -17,15 +17,22 @@ test -f /bin/bsh && test -z "$RUNNING_BSH" \
&& { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
RUNNING_BSH=
-# -help and -version only work if they are the only options. Therefore,
-# we cannot give the "-name xdvi" parameter in that case.
-# SU: Actually, with current xdvik, they should work in any position; but
-# we may keep this for compatibility with older versions and non-k xdvi.
+# -help and -version only used to work if they were the only options,
+# so the "-name xdvi" parameter wasn't used in that case. With current
+# xdvik, it should work in any case, but we keep this logic for compatibility
+# with older xdvik and plain xdvi versions.
+have_basename=`basename foo/bar 2>&1 | grep -i 'not found'`
+if [ "$have_basename"xxx = "xxx" ]; then
+ BASE_NAME=`basename $0`
+else
+ BASE_NAME=`echo $0 | sed 's!.*/!!'`
+fi
+
case "$#:$1" in
1:-help|1:-version)
NAMEOPT=;;
*)
- NAMEOPT='-name xdvi';;
+ NAMEOPT="-name $BASE_NAME";;
esac
xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`
@@ -43,4 +50,4 @@ if test -n "$xdviappfile"; then
XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH
fi
-exec xdvi-motif.bin $NAMEOPT ${1+"$@"}
+exec xdvi-motif $NAMEOPT ${1+"$@"}
diff --git a/Master/bin/sparc-solaris/xdvi-motif b/Master/bin/sparc-solaris/xdvi-motif
new file mode 100755
index 00000000000..23869e79991
--- /dev/null
+++ b/Master/bin/sparc-solaris/xdvi-motif
Binary files differ
diff --git a/Master/bin/sparc-solaris/xdvi-motif.bin b/Master/bin/sparc-solaris/xdvi-motif.bin
deleted file mode 100755
index 71221cb51f7..00000000000
--- a/Master/bin/sparc-solaris/xdvi-motif.bin
+++ /dev/null
Binary files differ
diff --git a/Master/bin/sparc-solaris/xdvipdfmx b/Master/bin/sparc-solaris/xdvipdfmx
index b00d951a2ff..689a2f00d79 100755
--- a/Master/bin/sparc-solaris/xdvipdfmx
+++ b/Master/bin/sparc-solaris/xdvipdfmx
Binary files differ
diff --git a/Master/bin/sparc-solaris/xetex b/Master/bin/sparc-solaris/xetex
index c9ebb7313cb..b197f5f176a 100755
--- a/Master/bin/sparc-solaris/xetex
+++ b/Master/bin/sparc-solaris/xetex
Binary files differ
diff --git a/Master/bin/sparc-solaris/xindy.mem b/Master/bin/sparc-solaris/xindy.mem
index f125da0bd42..edad407384f 100644
--- a/Master/bin/sparc-solaris/xindy.mem
+++ b/Master/bin/sparc-solaris/xindy.mem
Binary files differ
diff --git a/Master/bin/sparc-solaris/xindy.run b/Master/bin/sparc-solaris/xindy.run
index 7db3a322004..3ca7a9893e8 100755
--- a/Master/bin/sparc-solaris/xindy.run
+++ b/Master/bin/sparc-solaris/xindy.run
Binary files differ
diff --git a/Master/bin/sparc-solaris/xmltools b/Master/bin/sparc-solaris/xmltools
index 03086d0436b..873458dcc92 100755..120000
--- a/Master/bin/sparc-solaris/xmltools
+++ b/Master/bin/sparc-solaris/xmltools
@@ -1,2 +1 @@
-#!/bin/sh
-texmfstart xmltools.rb "$@"
+../../texmf-dist/scripts/context/stubs/unix/xmltools \ No newline at end of file