Opened 13 years ago
Closed 13 years ago
#33616 closed enhancement (fixed)
dia 0.97.2 Depend on librsvg to render SVG graphics
Reported by: | dia@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | haspatch | Cc: | ryandesign (Ryan Carsten Schmidt), su-v |
Port: | dia |
Description
If librsvg is available, dia is able to render/embed SVG images. Some shapes use such images (e.g. http://dia-installer.de/shapes/gradient/ ). The attached patch makes dia dependent on librsvg so that users can use SVG images and shapes.
Attachments (3)
Change History (10)
Changed 13 years ago by dia@…
Attachment: | Portfile-dia.diff added |
---|
comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Type: | defect → enhancement |
Changed 13 years ago by dia@…
Attachment: | svgtest.zip added |
---|
Sample diagram with SVG image object to illustrate the problem
comment:2 follow-ups: 4 7 Changed 13 years ago by dia@…
Dia does not directly link to this library. It's accessed via gdk-pixbuf2 I've attached a sample diagram that illustrates the problem. Just unzip and open svgtest.dia in Dia. If you're able to see the rectangle with "SVG test" inside, everything is fine. If not, SVG support in Dia image objects is broken. svgtest.dia and svgtest.svg must be places next to each other (relative path in the reference to the image file)
I know that SVG support for Dia never worked on the Mac, so your classification as "enhancement" is valid. Still I would ask you to consider it as a bug, because the Windows and Linux builds have SVG support for some time.
comment:4 follow-up: 5 Changed 13 years ago by su-v
Replying to dia@…:
I know that SVG support for Dia never worked on the Mac, so your classification as "enhancement" is valid. Still I would ask you to consider it as a bug, because the Windows and Linux builds have SVG support for some time.
The sample diagram with the SVG image object works for me out-of-the-box with dia 0.97.2 on OS X Lion 10.7.2 (see attached screenshot)
dia @0.97.2_0 (active) gtk2 @2.24.10_0+x11 (active) librsvg @2.34.2_0 (active)
(It also works for me with dia 0.97.1 installed on Mac OS X Leopard (i386), using an older version of MacPorts without the latest updates).
Changed 13 years ago by su-v
Attachment: | dia-svgtest-OSX-Lion-1.png added |
---|
comment:5 Changed 13 years ago by su-v
Replying to suv-sf@…:
> dia @0.97.2_0 (active) > gtk2 @2.24.10_0+x11 (active) > librsvg @2.34.2_0 (active)
and of course
gdk-pixbuf2 @2.24.0_0 (active)
comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
@dia: Thanks for the reproduction recipe. I'll try it out.
@suv-sf: It works for you, because you already had librsvg installed. The claim is that if you did not have librsvg installed it would not have worked. I will now look into verifying the claim, and if true, apply the patch.
comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to dia@…:
Dia does not directly link to this library. It's accessed via gdk-pixbuf2 I've attached a sample diagram that illustrates the problem. Just unzip and open svgtest.dia in Dia.
With librsvg deactivated, I get two error dialog boxes. One reads "Unable to load image-loading module: /opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: dlopen(/opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so, 1): image not found". The other reads "The image file 'svgtest.svg' was not found." With librsvg activated, it works.
I added librsvg as a runtime dependency in r90852.
Even if librsvg is available, dia does not seem to link with its library. Does dia use dlopen() to access librsvg's library? Or does dia use librsvg's executable(s) instead?
I am not familiar with how to use dia. Could you provide a reproduction recipe that shows how the existing dia does not have svg support, and that shows that your patch adds this support? Thanks.