git: 0b540f35eb1b - 2023Q2 - cad/verilator: Correct the 'ar' executable path

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 21 May 2023 23:00:38 UTC
The branch 2023Q2 has been updated by yuri:

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

commit 0b540f35eb1bfcd33fa26f3d92658028f8ff08d3
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-05-21 22:50:49 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-05-21 23:00:32 +0000

    cad/verilator: Correct the 'ar' executable path
    
    PR:             271546
    Reported by:    crb@ChrisBowman.com
    
    (cherry picked from commit e43ae295f81a5af886cb2625bd38d3a6d2b45560)
---
 cad/verilator/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cad/verilator/Makefile b/cad/verilator/Makefile
index 29eb225a71b0..bed4ffa8eda1 100644
--- a/cad/verilator/Makefile
+++ b/cad/verilator/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	verilator
 DISTVERSIONPREFIX=	v
 DISTVERSION=	5.010
+PORTREVISION=	1
 CATEGORIES=	cad
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -61,6 +62,9 @@ pre-configure:
 post-build:
 	@${STRIP_CMD} ${WRKSRC}/bin/verilator_bin
 
+post-install: # workaround for https://github.com/verilator/verilator/issues/4213: share/verilator/include/verilated.mk contains non-existent AR=/usr/local/bin/ar
+	@${REINPLACE_CMD} -i '' -e 's|^AR = .*|AR = /usr/bin/ar|' ${STAGEDIR}${PREFIX}/share/verilator/include/verilated.mk
+
 post-install-INSTALL_DBG_EXECUTABLES-off:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/verilator_bin
 	@${RM} ${STAGEDIR}${PREFIX}/bin/verilator_bin_dbg ${STAGEDIR}${PREFIX}/bin/verilator_coverage_bin_dbg