blob: ae02bae7c0c5e071b8d15718a406601c3b733e2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# $NetBSD: application.mk,v 1.5 2004/01/14 03:22:47 xtraeme Exp $
.include "../../lang/python/pyversion.mk"
# replace shell magic by python version specific path
# PYTHON_PATCH_SCRIPTS is a list of Python scripts to be installed,
# relative to ${WRKSRC}
_PYTHON_PATCH_SCRIPT_SED= -e "1s;^\#!.*python[^ ]*;\#!${PYTHONBIN};"
_PYTHON_PATCH_SCRIPT_SED+= ${PYTHON_PATCH_SCRIPT_SED}
.if defined(PYTHON_PATCH_SCRIPTS)
python-patch-scripts:
.for FILE in ${PYTHON_PATCH_SCRIPTS}
cd ${WRKSRC}; for file in ${FILE}; do \
${SED} ${_PYTHON_PATCH_SCRIPT_SED} \
$${file} > $${file}.fixed; \
if [ -x $${file} ]; then \
${CHMOD} +x $${file}.fixed; \
fi; \
${MV} -f $${file}.fixed $${file}; \
done
.endfor
post-patch: python-patch-scripts
.endif
|