Date: Monday, May 4, 2020 @ 17:34:52
  Author: arojas
Revision: 382222

Use correct options for inkscape 1.0 (FS#65934)

Added:
  imagemagick/trunk/imagemagick-inkscape-1.0.patch
Modified:
  imagemagick/trunk/PKGBUILD

--------------------------------+
 PKGBUILD                       |   14 ++++++++------
 imagemagick-inkscape-1.0.patch |   13 +++++++++++++
 2 files changed, 21 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-05-04 16:38:48 UTC (rev 382221)
+++ PKGBUILD    2020-05-04 17:34:52 UTC (rev 382222)
@@ -4,7 +4,7 @@
 pkgbase=imagemagick
 pkgname=(imagemagick imagemagick-doc)
 pkgver=7.0.10.10
-pkgrel=1
+pkgrel=2
 pkgdesc="An image viewing/manipulation program"
 url="https://www.imagemagick.org/";
 arch=(x86_64)
@@ -15,10 +15,12 @@
 _relname=ImageMagick-${pkgver%%.*}
 _tarname=ImageMagick-${pkgver%.*}-${pkgver##*.}
 source=(https://imagemagick.org/download/$_tarname.tar.xz{,.asc}
-        arch-fonts.diff)
+        arch-fonts.diff
+        imagemagick-inkscape-1.0.patch)
 sha256sums=('df1a37b73aa49423abb422c2150a0e1436920ba50dfc4377c6a3793f9826e5f1'
             'SKIP'
-            'a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73')
+            'a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73'
+            'c84c7baea1d2397a57a19b3adb8f98fe1c723d55792101ecb3b806320dd28f77')
 validpgpkeys=(D8272EF51DA223E4D05B466989AB63D48277377A)  # Lexie Parsimoniae
 
 shopt -s extglob
@@ -30,6 +32,9 @@
 
   # Fix up typemaps to match our packages, where possible
   patch -p1 -i ../arch-fonts.diff
+
+  # Use correct parameter for inkscape 1.0
+  patch -p1 -i ../imagemagick-inkscape-1.0.patch
 }
 
 build() {
@@ -106,9 +111,6 @@
 
 # Harden security policy https://bugs.archlinux.org/task/62785
   sed -e '/<\/policymap>/i \ \ <policy domain="delegate" rights="none" 
pattern="gs" \/>' -i "$pkgdir"/etc/ImageMagick-7/policy.xml
-
-# Use correct options for inkscape<1.0
-  sed -e 's|--export-file|--export-png|' -i 
"$pkgdir"/etc/ImageMagick-7/delegates.xml
 }
 
 package_imagemagick-doc() {

Added: imagemagick-inkscape-1.0.patch
===================================================================
--- imagemagick-inkscape-1.0.patch                              (rev 0)
+++ imagemagick-inkscape-1.0.patch      2020-05-04 17:34:52 UTC (rev 382222)
@@ -0,0 +1,13 @@
+diff --git a/config/delegates.xml.in b/config/delegates.xml.in
+index 442fa1aca..19baaee91 100644
+--- a/config/delegates.xml.in
++++ b/config/delegates.xml.in
+@@ -111,7 +111,7 @@
+   <delegate decode="sid" command="&quot;@MrSIDDecodeDelegate@&quot; -if sid 
-i &quot;%i&quot; -of tif -o &quot;%o&quot; &gt; &quot;%u&quot;"/>
+   <delegate decode="svg" command="&quot;@RSVGDecodeDelegate@&quot; -o 
&quot;%o&quot; &quot;%i&quot;"/>
+   <!-- Change export-png to export-file for inkscape >= 1.0 -->
+-  <delegate decode="svg:decode" stealth="True" 
command="&quot;@SVGDecodeDelegate@&quot; &quot;%s&quot; 
--export-png=&quot;%s&quot; --export-dpi=&quot;%s&quot; 
--export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; 
&gt; &quot;%s&quot; 2&gt;&amp;1"/>
++  <delegate decode="svg:decode" stealth="True" 
command="&quot;@SVGDecodeDelegate@&quot; &quot;%s&quot; 
--export-filename=&quot;%s&quot; --export-dpi=&quot;%s&quot; 
--export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; 
&gt; &quot;%s&quot; 2&gt;&amp;1"/>
+   <delegate decode="tiff" encode="launch" mode="encode" 
command="&quot;@LaunchDelegate@&quot; &quot;%i&quot;"/>
+   <delegate decode="wdp" command="@MVDelegate@ &quot;%i&quot; 
&quot;%i.jxr&quot;; &quot;@JXRDecodeDelegate@&quot; -i &quot;%i.jxr&quot; -o 
&quot;%o.bmp&quot;; @MVDelegate@ &quot;%i.jxr&quot; &quot;%i&quot;; 
@MVDelegate@ &quot;%o.bmp&quot; &quot;%o&quot;"/>
+   <delegate decode="webp" command="&quot;@WebPDecodeDelegate@&quot; -pam 
&quot;%i&quot; -o &quot;%o&quot;"/>

Reply via email to