Re: git: f2d9466e2566 - main - x11-wm/phoc: unbreak build after b991d37c58ed

From: Emmanuel Vadot <manu_at_bidouilliste.com>
Date: Fri, 08 Aug 2025 14:38:55 UTC
 Hi Max,

On Fri, 08 Aug 2025 14:42:26 +0300
Max Brazhnikov <makc@freebsd.org> wrote:

> On Fri, 8 Aug 2025 12:55:46 +0200 Emmanuel Vadot wrote:
> > +LDFLAGS+=     -lm # https://cgit.FreeBSD.org/ports/commit/?id=b991d37c58ed
> > >  PLIST_FILES=  bin/${PORTNAME} \
> > >                bin/${PORTNAME}-outputs-states \
> > >                share/man/man1/${PORTNAME}-outputs-states.1.gz \
> > 
> >  Well that sucks, sorry about that. I'd really like to understand why
> > CMake generates some crap with the latest .pc for wayland but I'm a bit
> > clueless about all this stuff.
> 
> what was the reason for https://cgit.FreeBSD.org/ports/commit/?id=b991d37c58ed in the first place?

 Wayland 1.24.0 added libm to the Libs section of the pkgconfig file.
 This confuse CMake (our problem ? upstream CMake problem ? No idea)
and it generate the ninja files with some crap :
DEFINES = -D/usr/lib/libm.so" -DVK_USE_PLATFORM_DISPLAY_KHR
-DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR
-DVK_USE_PLATFORM_XLIB_KHR
-DWAYLAND_LIBRARY=\"/usr/local/lib/libwayland-client.so
-DXCB_LIBRARY=\"/usr/local/lib/libxcb.so\"
-DXLIB_LIBRARY=\"/usr/local/lib/libX11.so\"

 The problems is in -D/usr/lib/libm.so"

 AFAICT the .pc file for wayland is correct so it must be something in
CMake (or ninja I'm not sure).

 Cheers,

-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>