tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (lots of) USE_CMAKE considered harmful



On Mon, Aug 19, 2024 at 01:18:22PM -0400, Greg Troxel wrote:
> We have about 450 packages with USE_CMAKE, and only about that many with
> ../../devel/cmake/build.mk.  This results in people seeing wrong code
> and copying it.  It would be good to get them converted so we can remove
> the (not clearly marked as wrong) USE_CMAKE support.
> 
> I've done a few and they were quite easy.  If you are maintaining or
> looking after a package that has USE_CMAKE, please see about flipping.
> Basically:
> 
>   Where the USE_CMAKE line is, replace it with
>    .include "../../devel/cmake/build.mk"
> 
>   Convert CMAKE_ARGS to CMAKE_CONFIGURE_ARGS, usually.
> 
>   Remove any kludges to create and use a build directory; the new way
>   does that automatically.
> 
>   Build test it.

Since I saw in

http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20240821.2158/sra-tools-3.0.6nb3/configure.log


=> Checking for portability problems in extracted files
Variable CMAKE_CONFIGURE_ARGS is recursive.

make[1]: stopped in /amd/pkgsrc/CHROOT/P/pkgsrc/biology/sra-tools
*** Error code 2

I've just globally replaced CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
(except for the two places in the infrastructure where they were
initialized from each other) and updated the guide.

So this step

>   Convert CMAKE_ARGS to CMAKE_CONFIGURE_ARGS, usually.

is now not necessary any longer.
 Thomas


Home | Main Index | Thread Index | Old Index