Opened 3 years ago

Closed 3 years ago

Last modified 3 months ago

#65069 closed enhancement (fixed)

brotli: Don't use cmake

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), Dave-Allured (Dave Allured)
Port: brotli

Description

Is it possible to change the brotli port back to not using cmake?

brotli was changed to use cmake in [2bdaf076a9cb4ca4b2f91a86d6b9480318694b42/macports-ports] but the commit message doesn't explain why that was done.

The problem with it is that brotli has gained wide acceptance in web servers, so it is desirable for the curl port to use the brotli library (#65056), however brotli currently depends on cmake which depends on curl (#65068), so that results in a circular dependency (#65065).

Change History (7)

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

If we switch back from cmake to autotools, it would be important to verify that the libraries' major and minor versions don't change as a result.

If the cmake build of brotli is much better than the autotools build, then another solution could be to use the cmake-bootstrap port instead of the cmake port; the former has no dependencies (on curl or otherwise).

comment:2 Changed 3 years ago by kencu (Ken)

cmake-bootstrap is fairly recent and has no deps, btw

comment:3 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:4 Changed 3 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

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

Resolution: fixed
Status: assignedclosed

In d2aca51d29a3b894d39754dd090202e8deb85171/macports-ports (master):

brotli: Use cmake-bootstrap

Avoids a circular dependency, since cmake uses curl which now uses
brotli.

Closes: #65065
Closes: #65069

While we're here, remove unnecessary directory creations from
post-destroot.

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

I chose to go with cmake-bootstrap because it was a quick drop-in fix for the problem and the autotools build system is not mentioned in the readme whereas the cmake build system is. But there is an autotools build system which we could still investigate to get rid of the cmake-bootstrap dependency (since it is not used by anything else and it does take awhile to build from source (382 seconds on my 2016 MBP; much longer on the older systems that are more likely to need such bootstrapping) and curl is sometimes installed in a secondary MacPorts prefix (to be used to bootstrap a primary MacPorts prefix with newer curl support) where binaries are not available). The project's configure script is just a placeholder that prints this message:

Use Autotools, Bazel, CMake or Premake5 to generate projects / build files.
  Bazel: http://www.bazel.build/
  CMake: https://cmake.org/
  Premake5: https://premake.github.io/
To generate Autotools 'configure' file run './bootstrap'.
Run './configure-cmake' for Autotools-like CMake configuration.
Or simply run 'make' to build and test command line tool.

so we would need to add autoconf/automake/libtool dependencies and run ./bootstrap to generate the autotools files but those ports build much faster than cmake-bootstrap (14 seconds for autoconf, 9 seconds for automake, and 27 seconds for libtool on my 2016 MBP) and more likely to already be needed by other ports.

comment:7 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Brotli's autotools build system was removed in version 1.1.0. An upstream bug report was filed asking to maybe reinstate it.

Note: See TracTickets for help on using tickets.