[arch-commits] Commit in inkscape/trunk (3 files)

Jan de Groot jgc at archlinux.org
Sat Nov 8 01:03:39 UTC 2008


    Date: Friday, November 7, 2008 @ 20:03:39
  Author: jgc
Revision: 18616

upgpkg: inkscape 0.46-8
    Fix FS#10765 and FS#11265. Enable gnome-vfs again, rebuild for poppler

Added:
  inkscape/trunk/eqtexsvg.py_linux_shell_apply.patch
  inkscape/trunk/gtk-clist.patch
Modified:
  inkscape/trunk/PKGBUILD

-------------------------------------+
 PKGBUILD                            |   19 +++++---
 eqtexsvg.py_linux_shell_apply.patch |   78 ++++++++++++++++++++++++++++++++++
 gtk-clist.patch                     |   11 ++++
 3 files changed, 101 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-11-08 01:03:19 UTC (rev 18615)
+++ PKGBUILD	2008-11-08 01:03:39 UTC (rev 18616)
@@ -4,27 +4,32 @@
 
 pkgname=inkscape
 pkgver=0.46
-pkgrel=7
+pkgrel=8
 pkgdesc="A vector-based drawing program - svg compliant"
 url="http://inkscape.sourceforge.net/"
 arch=('i686' 'x86_64')
 license=('GPL' 'LGPL')
-depends=('gtkmm>=2.12.6' 'gc>=7.0' 'desktop-file-utils' 'libxslt>=1.1.22' \
-         'perl>=5.10.0' 'pyxml' 'openssl>=0.9.8d' 'lcms' 'gtkspell' 'poppler-glib>=0.8.0' \
-         'imagemagick>=6.4.0.2' 'popt')
+depends=('gtkmm>=2.12.6' 'gc>=7.0' 'desktop-file-utils' 'libxslt>=1.1.22' 'perl>=5.10.0' 'pyxml' 'openssl>=0.9.8d' 'lcms' 'gtkspell' 'poppler-glib>=0.10.0' 'imagemagick>=6.4.0.2' 'popt' 'gnome-vfs>=2.24.0')
 makedepends=('perlxml' 'pkgconfig' 'boost')
 options=('!libtool')
 install=inkscape.install
 source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
-        perl-5.10.patch inkscape-0.46-poppler-0.8.3.patch)
+        perl-5.10.patch
+	inkscape-0.46-poppler-0.8.3.patch
+	gtk-clist.patch
+	eqtexsvg.py_linux_shell_apply.patch)
 md5sums=('3bae9034047379012127e52f9b138d32'
          'da1009efea12f6512e69cc3ec8604f4f'
-         'fffe7ed73bdadcf0f90282d5afc4df30')
+         'fffe7ed73bdadcf0f90282d5afc4df30'
+         'c68e508b390257d5a79364ce998be95d'
+         '8c8f32a44b9cc1ea829027b3197d18cb')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
   patch -Np1 -i ../perl-5.10.patch || return 1
   patch -Np1 -i ../inkscape-0.46-poppler-0.8.3.patch || return 1
+  patch -Np0 -i ../gtk-clist.patch || return 1
+  patch -Np0 -i ../eqtexsvg.py_linux_shell_apply.patch || return 1
   CFLAGS="${CFLAGS} -I/usr/include/ImageMagick" \
   CXXFLAGS="${CXXFLAGS} -I/usr/include/ImageMagick" \
    ./configure --prefix=/usr \
@@ -34,7 +39,7 @@
     --with-xft \
     --with-python \
     --with-perl \
-    --without-gnome-vfs || return 1
+    --with-gnome-vfs || return 1
   make || return 1
   make DESTDIR=${startdir}/pkg install || return 1
 }

Added: eqtexsvg.py_linux_shell_apply.patch
===================================================================
--- eqtexsvg.py_linux_shell_apply.patch	                        (rev 0)
+++ eqtexsvg.py_linux_shell_apply.patch	2008-11-08 01:03:39 UTC (rev 18616)
@@ -0,0 +1,78 @@
+Index: eqtexsvg.py
+===================================================================
+--- share/extensions/eqtexsvg.py	(revision 16441)
++++ share/extensions/eqtexsvg.py	(revision 18440)
+@@ -49,16 +49,18 @@
+     doc_sizeW = max(doc_width,doc_height)
+ 
+     def clone_and_rewrite(self, node_in):
+-        if node_in.tag != 'svg':
+-            node_out = inkex.etree.Element(inkex.addNS(node_in.tag,'svg'))
++        in_tag = node_in.tag.rsplit('}',1)[-1]
++        if in_tag != 'svg':
++            node_out = inkex.etree.Element(inkex.addNS(in_tag,'svg'))
+             for name in node_in.attrib:
+                 node_out.set(name, node_in.attrib[name])
+         else:
+             node_out = inkex.etree.Element(inkex.addNS('g','svg'))
+         for c in node_in.iterchildren():
+-            if c.tag in ('g', 'path', 'polyline', 'polygon'):
++            c_tag = c.tag.rsplit('}',1)[-1]
++            if c_tag in ('g', 'path', 'polyline', 'polygon'):
+                 child = clone_and_rewrite(self, c)
+-                if c.tag == 'g':
++                if c_tag == 'g':
+                     child.set('transform','matrix('+str(doc_sizeH/700.)+',0,0,'+str(-doc_sizeH/700.)+','+str(-doc_sizeH*0.25)+','+str(doc_sizeW*0.75)+')')
+                 node_out.append(child)
+ 
+@@ -86,6 +88,7 @@
+         dvi_file = os.path.join(base_dir, "eq.dvi")
+         svg_file = os.path.join(base_dir, "eq.svg")
+         out_file = os.path.join(base_dir, "eq.out")
++        err_file = os.path.join(base_dir, "eq.err")
+ 
+         def clean():
+             os.remove(latex_file)
+@@ -95,11 +98,13 @@
+             os.remove(dvi_file)
+             os.remove(svg_file)
+             os.remove(out_file)
++            if os.path.exists(err_file):
++                os.remove(err_file)
+             os.rmdir(base_dir)
+ 
+         create_equation_tex(latex_file, self.options.formula)
+-        #os.system('cd ' + base_dir)
+-        os.system('latex -output-directory=' + base_dir + ' -halt-on-error ' + latex_file + ' > ' + out_file)
++        os.system('latex "-output-directory=%s" -halt-on-error "%s" > "%s"' \
++                  % (base_dir, latex_file, out_file))
+ 	try:
+ 	    os.stat(dvi_file)
+ 	except OSError:
+@@ -108,9 +113,23 @@
+             print >>sys.stderr, "temporary files were left in:", base_dir
+             sys.exit(1)
+ 
+-        os.system('dvips -q -f -E -D 600 -y 5000 -o ' + ps_file + ' ' + dvi_file)
+-        #os.system('cd ' + base_dir)
+-        os.system('pstoedit -f plot-svg -dt -ssp ' + ps_file + ' ' + svg_file + '> ' + out_file)
++        os.system('dvips -q -f -E -D 600 -y 5000 -o "%s" "%s"' % (ps_file, dvi_file))
++        # cd to base_dir is necessary, because pstoedit writes
++        # temporary files to cwd and needs write permissions
++        separator = ';'
++        if os.name == 'nt':
++            separator = '&&'
++        os.system('cd "%s" %s pstoedit -f plot-svg -dt -ssp "%s" "%s" > "%s" 2> "%s"' \
++                  % (base_dir, separator, ps_file, svg_file, out_file, err_file))
++
++        # forward errors to stderr but skip pstoedit header
++        if os.path.exists(err_file):
++            err_stream = open(err_file, 'r')
++            for line in err_stream:
++                if not line.startswith('pstoedit: version'):
++                    sys.stderr.write(line + '\n')
++            err_stream.close()
++ 
+         svg_open(self, svg_file)
+ 
+         clean()

Added: gtk-clist.patch
===================================================================
--- gtk-clist.patch	                        (rev 0)
+++ gtk-clist.patch	2008-11-08 01:03:39 UTC (rev 18616)
@@ -0,0 +1,11 @@
+--- src/widgets/sp-xmlview-attr-list.h	2008/06/07 22:06:52	1.1
++++ src/widgets/sp-xmlview-attr-list.h	2008/06/07 22:09:22
+@@ -13,7 +13,7 @@
+  */
+ 
+ #include <stdio.h>
+-#include <gtk/gtkclist.h>
++#include <gtk/gtk.h>
+ #include "../xml/repr.h"
+ 
+ #include <glib.h>




More information about the arch-commits mailing list