git: fb052e78c139 - main - x11-wm/wlmaker: build with optimizations

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 31 Aug 2024 22:41:20 UTC
The branch main has been updated by jbeich:

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

commit fb052e78c1392cdd5d1327f43937e5e5a16c1306
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-08-31 22:21:10 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-08-31 22:39:37 +0000

    x11-wm/wlmaker: build with optimizations
    
    Any optimizations: don't downgrade -O3 to -O2.
---
 x11-wm/wlmaker/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/x11-wm/wlmaker/Makefile b/x11-wm/wlmaker/Makefile
index d43e4c5a10e3..921a6beae122 100644
--- a/x11-wm/wlmaker/Makefile
+++ b/x11-wm/wlmaker/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	wlmaker
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-wm wayland
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -24,6 +24,7 @@ USE_GNOME=	cairo
 USE_XORG=	xcb
 GH_ACCOUNT=	phkaeser
 GH_TUPLE=	phkaeser:libbase:df7ce2a:libbase/submodules/libbase
+CMAKE_OFF=	${WITH_DEBUG:D:Uconfig_DEBUG}
 PLIST_FILES=	bin/${PORTNAME} \
 		bin/wlmclock \
 		share/icons/${PORTNAME}/chrome-48x48.png \
@@ -34,6 +35,10 @@ PLIST_FILES=	bin/${PORTNAME} \
 		${NULL}
 
 post-patch:
+# Respect -O level from global CFLAGS or CMAKE_BUILD_TYPE
+	@${REINPLACE_CMD} '/-O[0-9]/d' \
+		${WRKSRC}/submodules/libbase/CMakeLists.txt \
+		${WRKSRC}/CMakeLists.txt
 # Respect PREFIX for icons
 	@${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \
 		${WRKSRC}/src/clip.c \