[Exherbo-dev] cmake [ api=2 ]

Bo Ørsted Andresen zlin at exherbo.org
Sun Apr 1 17:05:25 UTC 2012

cmake.exlib until now has been really dumb.

Where econf() uses ECONF_SOURCE for the sources and WORK as the build
directory, cmake.exlib has been using WORK for the sources and ECMAKE_BUILD_DIR
as the build directory.

This is backwards. It also causes a lot of unnecessary code and makes it hard
to combine it with other exlibs such as easy-multibuild.

Therefore I have committed a second api for cmake.exlib that everything should
be converted to using.

A new api exparam was added which defaults to the old behaviour for

To use the new api packages need to require cmake [ api=2 ]
When converting to api=2 ECMAKE_BUILD_DIR and CMAKE_SRC_COMPILE_PARAMS are no
longer available. ECMAKE_BUILD_DIR was replaced with WORK, and old WORK was
replaced with CMAKE_SOURCE. Use DEFAULT_SRC_COMPILE_PARAMS in place of
src_compile() and src_test() are no longer exported. Use default() instead.

src_unpack() is now exported in order to create WORK before src_prepare(). Make
sure to handle any collisions with other exlibs that export src_unpack().

cmake_run() no longer exists.

Because src_prepare() starts in WORK which is now the build dir, you will
probably have to edo cd "${CMAKE_SOURCE}" before applying any patches.

I already converted some packages to api=2 and will continue to do so, but any
help will be appreciated.

More information about the Exherbo-dev mailing list