git: 65282872b7e3 - main - devel/allegro: Fix build with CMake >= 3.31.0

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Sun, 17 Nov 2024 12:47:33 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=65282872b7e34c008ca3448412055b589120807a

commit 65282872b7e34c008ca3448412055b589120807a
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-11-17 12:09:45 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-11-17 12:47:22 +0000

    devel/allegro: Fix build with CMake >= 3.31.0
    
    For some reason, the check for XDGAQueryExtension in Xxf86dga was
    failing in previous versions of CMake, but it now succeeds, which is the
    expected result. It's an oversimplified check, however, that just adds
    the library name without path if found.
    
    Just using raw data from pkg_check_modules() results in a similar
    problem, which this project does. The ALSA option already had the
    usual workaround for this scenario (USES+=localbase:ldflags) in place,
    but the JACK option did not. Build would fail if the JACK option was
    enabled, but not ALSA even in previous versions of CMake.
    
    This version of allegro is ancient, so just elevate the workaround
    to the port level.
    
    PR:             282725
---
 devel/allegro/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/devel/allegro/Makefile b/devel/allegro/Makefile
index 22b8cb9c0d54..8a2fa8291c0b 100644
--- a/devel/allegro/Makefile
+++ b/devel/allegro/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libogg.so:audio/libogg \
 		libpng.so:graphics/png \
 		libvorbis.so:audio/libvorbis
 
-USES=		cmake gl pkgconfig xorg
+USES=		cmake gl localbase:ldflags pkgconfig xorg
 USE_GL=		gl glu
 USE_LDCONFIG=	yes
 USE_XORG=	ice sm x11 xcursor xext xpm xxf86dga xxf86vm
@@ -41,7 +41,6 @@ OPTIONS_MULTI_AUDIO=	ALSA JACK OSS SNDIO
 OPTIONS_SUB=	yes
 
 ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
-ALSA_USES=		localbase:ldflags
 ALSA_CMAKE_BOOL=	WANT_ALSA
 
 JACK_LIB_DEPENDS=	libjack.so:audio/jack