NLS nuisances.
Only set these to C if already set. These must not be set unconditionally
because not all systems understand e.g. LANG=C (notably SCO).
- Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+ Fixing LC_MESSAGES prevents Solaris sh from translating var values in set!
Non-C LC_CTYPE values break the ctype check.
'''
os.environ['LANG'] = os.getenv('LANG', 'C')
path, PPLATEX = checkProg('a DVI postprocessing program', ['pplatex $$i'])
#-----------------------------------------------------------------
path, PLATEX = checkProg('pLaTeX, the Japanese LaTeX', ['platex $$i'])
- # check if PLATEX is pLaTeX2e
- writeToFile('chklatex.ltx', '''
+ if PLATEX != '':
+ # check if PLATEX is pLaTeX2e
+ writeToFile('chklatex.ltx', '''
\\nonstopmode
\\@@end
''')
- # run platex on chklatex.ltx and check result
- if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:
- # We have the Japanese pLaTeX2e
- addToRC(r'\converter platex dvi "%s" "latex"' % PLATEX)
- LATEX = PLATEX
- else:
- PLATEX = ''
- removeFiles(['chklatex.ltx', 'chklatex.log'])
+ # run platex on chklatex.ltx and check result
+ if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:
+ # We have the Japanese pLaTeX2e
+ addToRC(r'\converter platex dvi "%s" "latex"' % PLATEX)
+ LATEX = PLATEX
+ else:
+ PLATEX = ''
+ removeFiles(['chklatex.ltx', 'chklatex.log'])
#-----------------------------------------------------------------
# use LATEX to convert from latex to dvi if PPLATEX is not available
if PPLATEX == '':
#
checkProg('a TGIF -> EPS/PPM converter', ['tgif'],
rc_entry = [
- r'''\converter tgif eps "tgif -stdout -print -color -eps $$i > $$o" ""
-\converter tgif ppm "tgif -stdout -print -color -ppm $$i > $$o" ""
-\converter tgif png "tgif -stdout -print -color -png $$i > $$o" ""
-\converter tgif pdf "tgif -stdout -print -color -pdf $$i > $$o" ""''',
+ r'''\converter tgif eps "tgif -print -color -eps -stdout $$i > $$o" ""
+\converter tgif png "tgif -print -color -png -o $$d $$i" ""
+\converter tgif pdf "tgif -print -color -pdf -stdout $$i > $$o" ""''',
''])
#
checkProg('a WMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o $$o $$i'],
def checkDocBook():
''' Check docbook '''
- path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook) or db2x scripts', ['sgmltools', 'db2dvi'],
+ path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook), db2x scripts or xsltproc', ['sgmltools', 'db2dvi', 'xsltproc'],
rc_entry = [
r'''\converter docbook dvi "sgmltools -b dvi $$i" ""
\converter docbook html "sgmltools -b html $$i" ""''',
r'''\converter docbook dvi "db2dvi $$i" ""
\converter docbook html "db2html $$i" ""''',
r'''\converter docbook dvi "" ""
+\converter docbook html "" ""''',
+ r'''\converter docbook dvi "" ""
\converter docbook html "" ""'''])
#
if DOCBOOK != '':
def checkOtherEntries():
''' entries other than Format and Converter '''
- checkProg('a *roff formatter', ['groff', 'nroff'],
- rc_entry = [
- r'\plaintext_roff_command "groff -t -Tlatin1 $$FName"',
- r'\plaintext_roff_command "tbl $$FName | nroff"',
- r'\plaintext_roff_command ""' ])
checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'],
rc_entry = [ r'\chktex_command "%%"' ])
checkProg('BibTeX', ['jbibtex', 'bibtex'],
if not os.path.isfile( 'chkconfig.ltx' ):
shutil.copyfile( os.path.join(srcdir, 'chkconfig.ltx'), 'chkconfig.ltx' )
rmcopy = True
- writeToFile('wrap_chkconfig.ltx', '%s\n%s\n\\input{chkconfig.ltx}\n',
- docbook_cmd)
+ writeToFile('wrap_chkconfig.ltx', '%s\n\\input{chkconfig.ltx}\n' % docbook_cmd)
# Construct the list of classes to test for.
# build the list of available layout files and convert it to commands
# for chkconfig.ltx