Bug#901446: inkscape: Bug fix latex rendering

2018-06-13 Thread Marc-Olivier Buob
Package: inkscape
Version: 0.92.3-2
Severity: normal
Tags: patch

Dear Maintainer,

This bug is related to #880650.
With the current version of inkscape, when using Extensions > Rendering > 
Latex... the latex rendering does not work.

This bug can be fixed by modifying: /usr/share/inkscape/extensions/eqtexsvg.py 
the following line (l.143)

 os.system('cd "%s" %s pstoedit -f plot-svg -dt -ssp "%s" "%s" > "%s" 
2> "%s"' \

... by:

 os.system('cd "%s" %s pstoedit -f plot-svg -dt -rdb -ssp "%s" "%s" > 
"%s" 2> "%s"' \

See man pstoedit for further details, option -rdb.

Best regards


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (90, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages inkscape depends on:
ii  libaspell150.60.7~20110707-5
ii  libatk1.0-02.28.1-1
ii  libatkmm-1.6-1v5   2.24.2-3
ii  libc6  2.27-3
ii  libcairo2  1.15.10-3
ii  libcairomm-1.0-1v5 1.12.2-3
ii  libcdr-0.1-1   0.1.4-1+b1
ii  libdbus-1-31.12.8-2
ii  libdbus-glib-1-2   0.110-2
ii  libfontconfig1 2.13.0-5
ii  libfreetype6   2.8.1-2
ii  libfribidi00.19.7-2
ii  libgc1c2   1:7.4.2-8.3
ii  libgcc11:8.1.0-5
ii  libgdk-pixbuf2.0-0 2.36.11-2
ii  libglib2.0-0   2.56.1-2
ii  libglibmm-2.4-1v5  2.56.0-2
ii  libgomp1   8.1.0-5
ii  libgsl23   2.4+dfsg-6
ii  libgslcblas0   2.4+dfsg-6
ii  libgtk2.0-02.24.32-1
ii  libgtkmm-2.4-1v5   1:2.24.5-2
ii  libgtkspell0   2.0.16-1.2
ii  libjpeg62-turbo1:1.5.2-2+b1
ii  liblcms2-2 2.9-1
ii  libmagick++-6.q16-88:6.9.9.34+dfsg-3+b1
ii  libmagickcore-6.q16-5  8:6.9.9.34+dfsg-3+b1
ii  libmagickwand-6.q16-5  8:6.9.9.34+dfsg-3+b1
ii  libpango-1.0-0 1.42.0-1
ii  libpangocairo-1.0-01.42.0-1
ii  libpangoft2-1.0-0  1.42.0-1
ii  libpangomm-1.4-1v5 2.40.1-4
ii  libpng16-161.6.34-1
ii  libpoppler-glib8   0.63.0-2
ii  libpoppler74   0.63.0-2
ii  libpopt0   1.16-11
ii  libpotrace01.15-1
ii  librevenge-0.0-0   0.0.4-6
ii  libsigc++-2.0-0v5  2.10.0-2
ii  libstdc++6 8.1.0-5
ii  libvisio-0.1-1 0.1.6-1+b1
ii  libwpg-0.3-3   0.3.1-3
ii  libx11-6   2:1.6.5-1
ii  libxml22.9.4+dfsg1-7
ii  libxslt1.1 1.1.32-2
ii  python 2.7.15-3
ii  zlib1g 1:1.2.11.dfsg-1

Versions of packages inkscape recommends:
ii  aspell   0.60.7~20110707-5
ii  fig2dev [transfig]   1:3.2.7a-1
ii  imagemagick  8:6.9.9.34+dfsg-3+b1
ii  imagemagick-6.q16 [imagemagick]  8:6.9.9.34+dfsg-3+b1
ii  libimage-magick-perl 8:6.9.9.34+dfsg-3
ii  libwmf-bin   0.2.8.4-12
ii  python-lxml  4.2.1-1
ii  python-numpy 1:1.14.4-1
ii  python-scour 0.36-3

Versions of packages inkscape suggests:
pn  dia  
pn  inkscape-tutorials   
pn  libsvg-perl  
pn  libxml-xql-perl  
ii  pstoedit 3.73-1
pn  python-uniconvertor  
ii  ruby 1:2.5.1

-- no debconf information



Bug#880650: pstoedit 3.70-5+b1 same issue (breaks inkscape latex rendering)

2018-03-29 Thread Marc-Olivier Buob
Dear Maintainer,

I did a fresh install of debian testing.
I installed inkscape and pstoedit.
When using the LaTex extension in inkscape (extensions > render > latex) I get 
the same error:

 *** WARNING - the DELAYBIND command has been deprecated, and will be

   removed in the next version. For now you can restore

   the behaviour by using -dREALLYDEALYBIND but if you

   require continued use of this command you should contact

   the Ghostscript developers. Commercial customers of

   Artifex should email their support contact, free users

   are encouraged to talk to us on the #ghostscript IRC

   channel on irc.freenode.net.



Unrecoverable error: undefined in DELAYBIND

PostScript/PDF Interpreter finished. Return status 65280 executed command : /
usr/bin/gs -I/home/mando/.fonts -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -
dNOEPS "/tmp/psinPMmdbP"

The interpreter seems to have failed, cannot proceed !

Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in 
e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
  File "eqtexsvg.py", line 154, in effect
svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
doc = inkex.etree.parse(filename)
  File "src/lxml/etree.pyx", line 3425, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1839, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1865, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1769, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1162, in 
lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 600, in 
lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError
  File "/tmp/inkscape-zoqsCO/eq.svg", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

gs suggests to rely on -dREALLYDEALYBIND :

(mando@silk) (~) $ /usr/bin/gs -I/home/mando/.fonts -q -dDELAYBIND -
dWRITESYSTEMDICT -dNODISPLAY -dNOEPS /home/mando/qp-tr.ps 

 *** WARNING - the DELAYBIND command has been deprecated, and will be
   removed in the next version. For now you can restore
   the behaviour by using -dREALLYDEALYBIND but if you
   require continued use of this command you should contact
   the Ghostscript developers. Commercial customers of
   Artifex should email their support contact, free users
   are encouraged to talk to us on the #ghostscript IRC
   channel on irc.freenode.net.

Unrecoverable error: undefined in DELAYBIND

(mando@silk) (~) $ /usr/bin/gs -I/home/mando/.fonts -q -dREALLYDELAYBIND -
dWRITESYSTEMDICT -dNODISPLAY -dNOEPS /home/mando/qp-tr.ps 
GS>

I tried to rename /usr/bin/gs to /usr/bin/gs.debian where /usr/bin/gs 
contains:

#!/bin/sh

s="/usr/bin/gs.debian " 
for arg in "$@"
do
if [ "$arg" = "-dDELAYBIND" ] ; then
s=$s" -dREALLYDELAYBIND"
else
s=$s" $arg"
fi
done
exec $s 
exit 0

... but Inkscape still does not work.

Error: /undefined in NOBIND

Operand stack:



Execution stack:

   %interp_exit   .runexec2   --nostringval--   --nostringval--   --
nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --
nostringval--   false   1   %stopped_push   2014   1   3   %oparray_pop   2013  
 
1   3   %oparray_pop   1997   1   3   %oparray_pop   1884   1   3   
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --
nostringval--

Dictionary stack:

   --dict:1236/1684(G)--   --dict:0/20(G)--   --dict:130/200(L)--

Current allocation mode is local

Current file position is 6370

GPL Ghostscript 9.22: Unrecoverable error, exit code 1

PostScript/PDF Interpreter finished. Return status 256 executed command : /
usr/bin/gs -I/home/mando/.fonts -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -
dNOEPS "/tmp/psinLregg0"

The interpreter seems to have failed, cannot proceed !

Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in 
e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
  File "eqtexsvg.py", line 154, in effect
svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
doc = inkex.etree.parse(filename)
  File "src/lxml/etree.pyx", line 3425, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1839, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1865, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1769, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1162, in 
lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 600, in 

Bug#995405: python3-pygccxml: python3.9 error: module 'time' has no attribute 'clock'

2021-09-30 Thread Marc-Olivier Buob
Package: python3-pygccxml
Version: 1.9.1-3
Severity: important

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

I try to use python3-pygccxml (for more details see this tutorial: 
https://github.com/EiffL/Tutorials)
to automatically wrap C++ objects in python3 using pyplusplus.

--
sudo apt update
sudo apt install castxml python3 python3-pygccxml python3-pip
sudo pip3 install pyplusplus
--

When running the following script:

--

#!/usr/bin/env python3

from pygccxml import parser
from pyplusplus import module_builder

# Configurations que vous pouvez avoir à changer sur votre système
module_name = "pyboost"
generator_path = "/usr/bin/castxml"
generator_name = "castxml"
compiler = "gnu"
compiler_path = "/usr/bin/gcc"

# Créé une configuration pour CastXML
xml_generator_config = parser.xml_generator_configuration_t(
xml_generator_path=generator_path,
xml_generator=generator_name,
compiler=compiler,
compiler_path=compiler_path
)

# Liste de tous les fichiers d'en-tête de votre bibliothèque
header_collection = ["bonjour.hpp"]

# Analyse les fichiers sources et créé un objet module_builder
builder = module_builder.module_builder_t(
header_collection,
xml_generator_path=generator_path,
xml_generator_config=xml_generator_config
)

# Détecte automatiquement les propriétés et les accesseurs/mutateurs associés
builder.classes().add_properties(exclude_accessors=True)

# Définit un nom pour le module
builder.build_code_creator(module_name=module_name)

# Écrit le fichier d'interface C++
builder.write_module('bindings.cpp')

---

... in a directory containing the following "bonjour.hpp" file:

---

#include 

class Bonjour
{
std::string m_msg;
public:
Bonjour(const std::string & msg);
void greet();
int sum(int x, int y);
void set_msg(const std::string & msg);
std::string get_msg() const;
};

---

... and I get this error:

(mando@silk) (~/pyboost/src) $ ./make_bindings.py 
/usr/local/lib/python3.9/dist-packages/pyplusplus-1.8.4-py3.9.egg/pyplusplus/binary_parsers/parsers.py:7:
 DeprecationWarning: invalid escape sequence \m
/usr/local/lib/python3.9/dist-packages/pyplusplus-1.8.4-py3.9.egg/pyplusplus/binary_parsers/parsers.py:7:
 DeprecationWarning: invalid escape sequence \m
INFO Parsing source file "bonjour.hpp" ... 
Traceback (most recent call last):
  File "/home/mando/pyboost/src/./make_bindings.py", line 25, in 
builder = module_builder.module_builder_t(
  File 
"/usr/local/lib/python3.9/dist-packages/pyplusplus-1.8.4-py3.9.egg/pyplusplus/module_builder/boost_python_builder.py",
 line 107, in __init__
  File 
"/usr/local/lib/python3.9/dist-packages/pyplusplus-1.8.4-py3.9.egg/pyplusplus/module_builder/boost_python_builder.py",
 line 154, in __parse_declarations
  File "/usr/lib/python3/dist-packages/pygccxml/parser/project_reader.py", line 
264, in read_files
return self.__parse_file_by_file(files)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/project_reader.py", line 
292, in __parse_file_by_file
decls = reader.read_file(header)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/source_reader.py", line 
356, in read_file
return self.read_cpp_source_file(source_file)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/source_reader.py", line 
376, in read_cpp_source_file
decls, files = self.__parse_xml_file(xml_file)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/source_reader.py", line 
474, in __parse_xml_file
patcher.fix_calldef_decls(
  File "/usr/lib/python3/dist-packages/pygccxml/parser/patcher.py", line 261, 
in fix_calldef_decls
default_arg_patcher(decl)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/patcher.py", line 25, in 
__call__
arg.default_value = fixer(decl, arg)
  File "/usr/lib/python3/dist-packages/pygccxml/parser/patcher.py", line 140, 
in __fix_invalid_integral
found = parent.variable(
  File "/usr/lib/python3/dist-packages/pygccxml/declarations/scopedef.py", line 
612, in variable
self._find_single(
  File "/usr/lib/python3/dist-packages/pygccxml/declarations/scopedef.py", line 
478, in _find_single
start_time = time.clock()
AttributeError: module 'time' has no attribute 'clock'



According to this link 
(https://stackoverflow.com/questions/58569361/attributeerror-module-time-has-no-attribute-clock-in-python-3-8),
this is because since python3.8, time.clock() no more exists and should be 
replaced e.g. by time.perf_counter() or