// Look for TeX support and print the software version info
if ( $wgUseTeX ) {
$binPath = '/usr/bin/';
+ $binPathLocal = '/usr/local/bin/';
$swMathName = Array(
'ocaml' => 'OCaml',
'gs' => 'Ghostscript',
'imagemagick' => '-version',
);
foreach ( $swMathExec as $swMath => $swMathCmd ) {
- if ( file_exists( $binPath . $swMathCmd ) ) {
- $swMathInfo = self::execOutput( $binPath . $swMathCmd . ' ' . $swMathParam[$swMath] );
- $swMathLine = explode("\n",$swMathInfo ,2);
+ if ( file_exists( $binPath . $swMathCmd ) || file_exists( $binPathLocal . $swMathCmd ) ) {
+ $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] );
+ $swMathLine = explode( "\n", $swMathInfo, 2);
$swMathVerInfo = $swMathLine[0];
if ( !strcmp( $swMath, 'gs' ) )
$swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo );
list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail );
}
$swMathVer[$swMath] = $swMathVerInfo;
- $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath];
+ $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = trim ( $swMathVer[$swMath] );
}
}
}