git: 8bc0ccb51f75 - main - security/gef: Do not depend on "python3" executable

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Thu, 19 May 2022 13:51:36 UTC
The branch main has been updated by 0mp:

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

commit 8bc0ccb51f755fec4f8007abf558680f461a44a7
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2022-04-30 16:34:20 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2022-05-19 13:50:36 +0000

    security/gef: Do not depend on "python3" executable
    
    Instead, use "pythonX.Y", as recommended by the ports framework.
    
    MFH:            2022Q2
---
 security/gef/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/security/gef/Makefile b/security/gef/Makefile
index 989d04273d6b..f922656ce851 100644
--- a/security/gef/Makefile
+++ b/security/gef/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gef
 DISTVERSION=	2022.01
+PORTREVISION=	1
 CATEGORIES=	security python
 
 MAINTAINER=	0mp@FreeBSD.org
@@ -34,6 +35,9 @@ OPTIONALDEPS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}capstone>0:devel/py-capstone@${
 
 _UTILITY_NAME=	gef.py
 
+post-patch:
+	${REINPLACE_CMD} 's|%%PYTHON%%|${PYTHON_CMD:T}|g' ${WRKSRC}/${_UTILITY_NAME}
+
 do-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/${_UTILITY_NAME} ${STAGEDIR}${DATADIR}