[MacPorts] #71226: timg fails to build on systems without rust due to incompatible librsvg API
MacPorts
noreply at macports.org
Sat Nov 2 11:56:36 UTC 2024
#71226: timg fails to build on systems without rust due to incompatible librsvg API
--------------------------+----------------------
Reporter: barracuda156 | Owner: urkle
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.4
Keywords: | Port: timg
--------------------------+----------------------
There are several problems with the port. Trivially fixable:
1. `legacysupport` needed for `memmem`.
2. A patch is needed to `src/timg.cc` at least to change the header to
`cinttypes` (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.
--
Ticket URL: <https://trac.macports.org/ticket/71226>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list