Add internal CDR input using libcdr

Bug #1104198 reported by su_v
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Fridrich
Inkscape Devlibs
Fix Released
Wishlist
jazzynico

Bug Description

Similar to recently added internal support of VISIO files based on libvisio (bug #1015572), add internal support to open CorelDRAW files based on libcdr.

Requires libcdr:
<http://www.freedesktop.org/wiki/Software/libcdr>

Related branch [1]:
<https://code.launchpad.net/~inkscape.dev/inkscape/cdr-input>

Dependencies:
libcdr depends on lcms2, zlib, and icu (libcdr >= 0.0.10).
Minimal required version of libcdr: 0.0.3

On Linux, libcdr is installed with LibreOffice.
For Windows builds: according to Fridrich Strba both icu and libcdr build ok on Windows (mingw builds available).
For OS X builds (MacPorts): icu is already installed as dependency of boost, and of recent pango versions (via harfbuzz).

TODO:
- if compiled without libcdr, fall back to UniConvertor-based input extension?
   (rename instead of delete 'cdr-input.inx', change id and name in INX file)
- verify which file types are supported by libcdr (incl. CDR version, suffix)

-----
[1] branch built and tested successfully on
- OS X 10.7.4, with libcdr from git master (fea15b833ed0057b1389aafd5fe8c57ed5eef918) and icu 4.8.1.
- Ubuntu 12.10 (64bit, VM), with libcdr 0.0.8-1 (configure.ac modified)

Tags: importing cdr

Related branches

su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

'terra.cdr' opened in Inkscape build with internal cdr-input support (branch r12060) and saved as Compressed Inkscape SVG (*.svgz).

su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

MacPorts Portfile for libcdr (git)
(port name: libcdr-devel, to be used with local portfile repository))

Revision history for this message
su_v (suv-lp) wrote :

I only checked now which version of libcdr is provided e.g. on current Ubuntu 12.10: libcdr (0.0.8-1)
<http://packages.ubuntu.com/source/quantal/libcdr>

@Fridrich - is libcdr-0.0.8 ok, too? In the initial commit to the branch I did set min version for libcdr to 0.0.9 …

su_v (suv-lp)
description: updated
su_v (suv-lp)
description: updated
su_v (suv-lp)
description: updated
jazzynico (jazzynico)
Changed in inkscape:
status: New → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Also requires lcms2, which is not in the Windows devlibs (WIP).

Revision history for this message
jazzynico (jazzynico) wrote :

Tested successfully on Windows XP, with lcms2.2.4 and libcdr-0.0.9 (libcdr-0.0.10 requires ICU, which fails to compile with mingw).

Changed in inkscape-devlibs:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
su_v (suv-lp) wrote :

JazzyNico wrote:
> Also requires lcms2, which is not in the Windows devlibs (WIP).

Sorry I forgot to mention it explicitly (it's a an indirect dependency already with recent poppler and ImageMagic versions on OS X).

su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Branch merged in r12087

Changed in inkscape:
assignee: nobody → Fridrich (fridrich-strba)
milestone: none → 0.49
status: In Progress → Fix Committed
Revision history for this message
jazzynico (jazzynico) wrote :

Libs added to the devlibs, revision 43.
Trunk modified for win32, revision 12091.

Changed in inkscape-devlibs:
status: In Progress → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Test files:

From sk1project.org/UniConvertor:
<http://uniconvertor.svn.sourceforge.net/viewvc/uniconvertor/formats/CDR/>
SVN checkout:
$ svn co https://uniconvertor.svn.sourceforge.net/svnroot/uniconvertor/formats/CDR

CorelDraw Templates (stocklayouts.com):
<http://www.stocklayouts.com/Templates/Corel-CorelDraw/Corel-CorelDraw-Templates-Designs.aspx>
(scroll down to 'Free Sample Templates', site requires registration)

Files from bugs.fdo:
<http://tinyurl.com/c7paepe>
(bugzilla search for 'libcdr' reports)

Revision history for this message
su_v (suv-lp) wrote :

JFTR: MacPorts now offers stable libcdr 0.0.10:
<http://www.macports.org/ports.php?by=name&substr=libcdr>
and has inkscape-devel updated to include libcdr support:
<https://trac.macports.org/changeset/102746/trunk/dports/graphics/inkscape-devel/Portfile>

Revision history for this message
Victor (gaploid) wrote :

Please update libcdr the latest version right now is 0.0.14. And libvisio the latest version libvisio-0.0.31.zip inkscape use right now version 0.0.23

Revision history for this message
su_v (suv-lp) wrote :

@Viktor - please file a new request here:
<https://bugs.launchpad.net/inkscape-devlibs/+filebug>

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@Viktor - just to confirm... you're talking about updating the versions of libcdr/libvisio shipped in the Windows devlibs, right? Does anything need to be done in Inkscape trunk itself to support the new versions?

Revision history for this message
su_v (suv-lp) wrote :

@Alex - yes, it was about the Windows packages. Viktor had asked about it in the forum first:
<http://www.inkscapeforum.com/viewtopic.php?f=5&t=16409>

The request now has been filed for the Windows devlibs:
<https://bugs.launchpad.net/inkscape-devlibs/+bug/1247139>

> Does anything need to be done in Inkscape trunk itself to support the new versions?
Not to my knowledge. I use git head of libvisio and libcdr with Inkscape trunk without any problems.

Revision history for this message
jazzynico (jazzynico) wrote :

@Viktor, @all - The devlibs versions are a bit old indeed. I'm going to take a look.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Alex Valavanis, why you compiled Inkscape in ppa:inkscape.dev/stable without libcdr ? I've just installed from https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable and noticed, that Inkscape 0.91 doesn't open CorelDraw files until python-uniconvertor is installed.
Please fix packaging code at lp:~inkscape.dev/inkscape/debian-packaging-stable to add libcdr-dev build-deps according to bug #1104198
Ubuntu 14.04 has libcdr 0.0.15 , newer libcdr 0.1 is uploaded to Ubuntu 14.10 and 15.04.
If you need newer libcdr you can simply upload newer libcdr version to Ubuntu 14.04 or even Ubuntu 12.04 section at https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable PPA

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Alex Valavanis, I've noticed, that Inscape from Debian experimental already depends on libcdr-dev, see
http://anonscm.debian.org/cgit/collab-maint/inkscape.git/tree/debian?h=experimental

I think you should simply copy packaging code from Debian experimental to lp:~inkscape.dev/inkscape/debian-packaging-stable

Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Thanks for noticing the oversight. Build queued for stable PPA. It should fix the missing libcdr/libvisio dependency in Ubuntu versions where it's available, but this unfortunately doesn't include Precise. I'll look into the possibility of backporting the libraries to Precise tomorrow.

We can't just copy the entire Debian packaging tree, because this is a native package, not a quilt (patched) format. We also don't want to override the unit tests. I'll happily (manually) merge useful stuff from Debian though.

Revision history for this message
su_v (suv-lp) wrote :

On 2015-02-02 01:38 (+0100), Alex Valavanis wrote:
> It should fix the missing libcdr/libvisio dependency in Ubuntu
> versions where it's available

@Alex - this doesn't seem to work yet as expected: from the build log of 14.10:

checking for LIBWPG03... yes
checking for LIBVISIO01... no
checking for LIBVISIO00... no
checking for LIBCDR01... no
checking for LIBCDR00... no
<https://launchpadlibrarian.net/196352058/buildlog_ubuntu-utopic-amd64.inkscape_0.91.0%2B40~ubuntu14.10.1_UPLOADING.txt.gz>

Another user on Ubuntu 14.10 reported successful detection of libcdr and libvisio (for local trunk build) after installing the packages libicu-devtools and libicu-dev: possibly this is related - since after having those packages installed, Inkscape's configure detected the requirements for cdr and visio support as expected. The user's original config.log unfortunately was overwritten, and personally I don't have a VM with 14.10 at hand to verify what is causing the failure to detect libcdr-0.1 and libvisio-0.1 as expected.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Confirmed... it's a packaging error in Ubuntu. See bug #1359824.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.