Opened 4 days ago
#71226 assigned defect
timg fails to build on systems without rust due to incompatible librsvg API
Reported by: | barracuda156 | Owned by: | urkle (Edward Rudd) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.4 |
Keywords: | Cc: | ||
Port: | timg |
Description
There are several problems with the port. Trivially fixable:
legacysupport
needed formemmem
.- A patch is needed to
src/timg.cc
at least to change the header tocinttypes
(done in upstream) or better use the patch attached.
Unfixed, as of now: https://github.com/hzeller/timg/issues/142
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc: In member function 'virtual bool timg::SVGImageSource::LoadAndScale(const timg::DisplayOptions&, int, int)': /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:56:5: error: 'RsvgRectangle' was not declared in this scope; did you mean 'RsvgHandle'? 56 | RsvgRectangle viewbox; | ^~~~~~~~~~~~~ | RsvgHandle /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:58:5: error: 'RsvgLength' was not declared in this scope 58 | RsvgLength svg_width, svg_height; | ^~~~~~~~~~ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:59:64: error: 'svg_width' was not declared in this scope; did you mean 'orig_width_'? 59 | rsvg_handle_get_intrinsic_dimensions(svg, &out_has_width, &svg_width, | ^~~~~~~~~ | orig_width_ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:60:60: error: 'svg_height' was not declared in this scope; did you mean 'orig_height_'? 60 | &out_has_height, &svg_height, | ^~~~~~~~~~ | orig_height_ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:61:61: error: 'viewbox' was not declared in this scope 61 | &out_has_viewbox, &viewbox); | ^~~~~~~ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:59:5: error: 'rsvg_handle_get_intrinsic_dimensions' was not declared in this scope; did you mean 'rsvg_handle_get_dimensions'? 59 | rsvg_handle_get_intrinsic_dimensions(svg, &out_has_width, &svg_width, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | rsvg_handle_get_dimensions /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:96:18: error: expected ';' before 'viewport' 96 | RsvgRectangle viewport = { | ^~~~~~~~~ | ; /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:108:58: error: 'viewport' was not declared in this scope 108 | bool success = rsvg_handle_render_document(svg, cr, &viewport, nullptr); | ^~~~~~~~ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_timg/timg/work/timg-1.6.0/src/svg-image-source.cc:108:20: error: 'rsvg_handle_render_document' was not declared in this scope; did you mean 'rsvg_handle_render_cairo'? 108 | bool success = rsvg_handle_render_document(svg, cr, &viewport, nullptr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | rsvg_handle_render_cairo make[2]: *** [src/CMakeFiles/timg.dir/svg-image-source.cc.o] Error 1
This looks like the code uses API of a rusty librsvg. It needs either a fallback (maybe upstream helps) or a patch reverting a move from GraphicsMagic to librsvg.
Attachments (1)
Change History (1)
Changed 4 days ago by barracuda156
Attachment: | 0001-timg.cc-define-__STDC_FORMAT_MACROS-if-undefined.patch added |
---|
Note: See
TracTickets for help on using
tickets.
This patch only addresses one issue