Use 'rsvg-convert' binary rather than 'rsvg' everywhere
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 5 Feb 2015 18:14:34 +0000 (19:14 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 5 Feb 2015 18:17:32 +0000 (18:17 +0000)
Update $wgSVGConverters['rsvg'] to something closer to WMF production
configuration (there is a more complicated setup involving two
variants of rsvg for some reason).

Documentation is scarce, but 'rsvg-convert' appears to be the "modern"
way to call rsvg, with 'rsvg' being deprecated or not recommended.

Bug: T76476
Change-Id: I5ed877f3a5a1f1e97ae881c1d03fc977276182b6

RELEASE-NOTES-1.25
includes/DefaultSettings.php
includes/resourceloader/ResourceLoaderImage.php
tests/phpunit/includes/parser/NewParserTest.php

index 22e5ac3..dfcd177 100644 (file)
@@ -36,6 +36,8 @@ production.
 * ProfilerStandard and ProfilerSimpleTrace were removed. Make sure that any
   StartProfiler.php config is updated to reflect this. Xhprof is available
   for zend/hhvm. Also, for hhvm, one can consider using its xenon profiler.
+* Default value of $wgSVGConverters['rsvg'] now uses the 'rsvg-convert' binary
+  rather than 'rsvg'.
 
 === New features in 1.25 ===
 * (T64861) Updated plural rules to CLDR 26. Includes incompatible changes
index c19c13b..db3c0e2 100644 (file)
@@ -956,7 +956,7 @@ $wgSVGConverters = array(
        'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
        'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
                . '$output $input',
-       'rsvg' => '$path/rsvg -w $width -h $height $input $output',
+       'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
        'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
        'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
 );
index 0e43f65..6788c6f 100644 (file)
@@ -308,7 +308,7 @@ class ResourceLoaderImage {
                $svg = $this->massageSvgPathdata( $svg );
 
                if ( $wgSVGConverter === 'rsvg' ) {
-                       $command = 'rsvg-convert'; // Should be just 'rsvg'? T76476
+                       $command = 'rsvg-convert';
                        if ( $wgSVGConverterPath ) {
                                $command = wfEscapeShellArg( "$wgSVGConverterPath/" ) . $command;
                        }
index 010ae66..713c32d 100644 (file)
@@ -124,7 +124,7 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpGlobals['wgFileExtensions'][] = 'svg';
                $tmpGlobals['wgSVGConverter'] = 'rsvg';
                $tmpGlobals['wgSVGConverters']['rsvg'] =
-                       '$path/rsvg-convert -w $width -h $height $input -o $output';
+                       '$path/rsvg-convert -w $width -h $height -o $output $input';
 
                if ( $GLOBALS['wgStyleDirectory'] === false ) {
                        $tmpGlobals['wgStyleDirectory'] = "$IP/skins";