Opened 6 years ago

Closed 6 years ago

#56806 closed enhancement (fixed)

inkscape-devel : use CMake (and a few other improvements)

Reported by: RJVB (René Bertin) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: inkscape-devel

Description

Building Inkscape on Linux I noticed that it now uses CMake and preserves the autoconf-based build only for "just in case".

The use of cmake has a few advantages:

  • faster configure (no more autoreconf)
  • faster build when using Ninja
  • easier maintainability because of an out-of-source build directory

The attached patch converts the port to use cmake for building and as far as I can tell it indeed makes the build faster and less resource-hungry (thanks to using Ninja instead of make). The only user-visible effect of this change is the loss of the +strict variant which hasn't been ported to cmake. It was never entirely clear to me what interest this variant had and apparently the Inkscape team wasn't too convinced about this option either.

A few other (strongly) suggested improvements:

  • use git describe instead of the date of the last commit (which isn't guaranteed to be unique, nor even monotonically increasing )
  • declare explicit dependencies on libomp and glibmm which I think were missing
  • define the +gtk3 variant so it can actually be used

And a maintainer convenience tweak I use all the time:

  • make worksrcdir unversioned; I'm guessing the port maintainer doesn't clone the entire 1.5Gb or so each time he builds a new version so why not make it easy to reuse the source directory.

Attachments (4)

Inkscape-devel.patch (3.6 KB) - added by RJVB (René Bertin) 6 years ago.
inkscape-devel.patch (3.9 KB) - added by RJVB (René Bertin) 6 years ago.
patch-inkscape_base_rpath.diff (476 bytes) - added by RJVB (René Bertin) 6 years ago.
patch-inkscape_base_rpath.2.diff (1.1 KB) - added by RJVB (René Bertin) 6 years ago.

Download all attachments as: .zip

Change History (14)

Changed 6 years ago by RJVB (René Bertin)

Attachment: Inkscape-devel.patch added

comment:1 Changed 6 years ago by RJVB (René Bertin)

A propos that working copy size: it'd be great if clones were (could be) done with --depth=1. That way the .git directory is only about 29Mb after the checkout which is also a *lot* faster.

Changed 6 years ago by RJVB (René Bertin)

Attachment: inkscape-devel.patch added

Changed 6 years ago by RJVB (René Bertin)

comment:2 Changed 6 years ago by RJVB (René Bertin)

I'd forgotten a crucial patch for a bug I reported upstream (https://bugs.launchpad.net/inkscape/+bug/1781701).

While we're at it we can just as well upgrade the port to the latest development version which has a few potentially useful fixes.

Changed 6 years ago by RJVB (René Bertin)

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

I see that your patch removes configure.python ${prefix}/bin/python2.7 from the Portfile, but there's still a dependency on py27-lxml and py27-numpy. By what means does the build system now know that it should use MacPorts Python 2.7?

comment:4 Changed 6 years ago by dbevans (David B. Evans)

Owner: set to dbevans
Status: newaccepted

Thanks for your input @RJVB. Currently I'm in the process of updating/reorganizing the inkscape related ports and am reviewing your suggestions. Will update here as your comments intersect that process. WIP/TBD for now.

Last edited 6 years ago by dbevans (David B. Evans) (previous) (diff)

comment:5 Changed 6 years ago by dbevans (David B. Evans)

In faeb3c96cb114a9ad341ceb3f35a32961598fd15/macports-ports (master):

inkscape, inkscape-devel: remove vestiges of old +gtk3 variant

inkscape targets the current gtk2 release version.
inkscape-devel targets the 0.92.x gtk2 maintenance branch.

Active work on a future gtk3 port takes place in git master which
is the target of a new gtk3 port (WIP).

See #56806.

comment:6 Changed 6 years ago by dbevans (David B. Evans)

In fe31e64596390a2252ddd4bc178a23668b577724/macports-ports (master):

inkscape-devel: minimize git download size

Only clone target mainenance branch 0.92.x limiting depth to 100.

This reduces the cloned size from approximately 1.46 GiB to 45.02 MiB.

Depth of 100 is somewhat arbitrary but roughly corresponds to the age
of the branch since the last stable release allowing some leeway for
us to checkout our target commit as additional commits are added to
the branch.

Suggested by @RJVB, see #56806.

comment:7 Changed 6 years ago by mf2k (Frank Schima)

Cc: dbevans removed

comment:8 Changed 6 years ago by dbevans (David B. Evans)

In 66c18926d721fe188480c9efffad16098fa80d63/macports-ports (master):

inkscape-gkt3-devel: new port

  • recent snapshot of upstream development toward the 1.0 gtk3 port of inkscape.
  • now uses preferred cmake/ninja build
  • addresses a several outstanding inkscape/inkscape-devel issues

See #56806
See #56867

comment:9 Changed 6 years ago by dbevans (David B. Evans)

In 614879abeef2c4a07dfad26e6bb5768f4a125dfd/macports-ports (master):

inkscape: update to version 0.92.4

  • now uses preferred cmake/ninja build
  • switch to cmake fixes display of version in Help/About

See #56806
Closes #56867

comment:10 Changed 6 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: acceptedclosed

In 269936a15a19113e25c2f65f183466bb17d5398b/macports-ports (master):

inkscape-devel: update to version 0.92.4 maint branch as of 20190116

  • now uses preferred cmake/ninja build
  • switch to cmake fixes display of version in Help/About

Closes #56806

Note: See TracTickets for help on using tickets.