security/py-pass-audit: Honor PREFIX

Since the update to release 1.2, the port has no longer taken PREFIX
into account. This oversight is corrected with this commit.

PR:		275561
Approved by:	submitter is maintainer
2024Q1
Tobias Rehbein 2023-12-06 12:43:27 +01:00 committed by Muhammad Moinur Rahman
parent 3a6c16488d
commit 285b19417f
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= pass-audit
PORTVERSION= 1.2
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= https://github.com/roddhjav/${PORTNAME}/releases/download/v${PORTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -26,6 +27,7 @@ NO_BUILD= yes
SHEBANG_FILES= ${WRKSRC}/pass_audit/__main__.py
post-patch:
@${REINPLACE_CMD} -e 's:%%PREFIX%%:${PREFIX}:g' ${WRKSRC}/setup.py
@${REINPLACE_CMD} -e 's:\<python3\>:${PYTHON_CMD}:g' ${WRKSRC}/audit.bash
.include <bsd.port.mk>

View File

@ -1,16 +1,18 @@
--- setup.py.orig 2023-12-04 19:45:19 UTC
--- setup.py.orig 2022-01-30 14:55:34 UTC
+++ setup.py
@@ -10,9 +10,12 @@ base = '/usr'
@@ -10,9 +10,13 @@ base = '/usr'
share = Path(sys.prefix, 'share')
base = '/usr'
-if os.uname().sysname == 'Darwin':
- base = '/usr/local'
+if os.uname().sysname == 'Darwin' or os.uname().sysname == 'FreeBSD':
base = '/usr/local'
+ base = '%%PREFIX%%'
+
lib = Path(base, 'lib', 'password-store', 'extensions')
+if os.uname().sysname == 'FreeBSD':
+ lib = Path(base, 'libexec', 'password-store', 'extensions')
+ share = Path(base, 'share')
if '--user' in sys.argv:
if 'PASSWORD_STORE_EXTENSIONS_DIR' in os.environ: