Annotation of pkgsrc/lang/python/application.mk, revision 1.4
1.4 ! xtraeme 1: # $NetBSD: application.mk,v 1.3 2002/10/18 16:34:54 jlam Exp $
1.1 jlam 2:
3: .include "../../lang/python/pyversion.mk"
4:
5: # replace shell magic by python version specific path
6: # PYTHON_PATCH_SCRIPTS is a list of Python scripts to be installed,
7: # relative to ${WRKSRC}
8:
1.4 ! xtraeme 9: _PYTHON_PATCH_SCRIPT_SED= -e "1s;^\#!.*python[^ ];\#!${PYTHONBIN};"
1.3 jlam 10: _PYTHON_PATCH_SCRIPT_SED+= ${PYTHON_PATCH_SCRIPT_SED}
1.1 jlam 11:
12: .if defined(PYTHON_PATCH_SCRIPTS)
13: python-patch-scripts:
1.2 jlam 14: .for FILE in ${PYTHON_PATCH_SCRIPTS}
15: cd ${WRKSRC}; for file in ${FILE}; do \
16: ${SED} ${_PYTHON_PATCH_SCRIPT_SED} \
17: $${file} > $${file}.fixed; \
18: if [ -x $${file} ]; then \
19: ${CHMOD} +x $${file}.fixed; \
20: fi; \
21: ${MV} -f $${file}.fixed $${file}; \
22: done
1.1 jlam 23: .endfor
24:
25: post-patch: python-patch-scripts
26: .endif
CVSweb <webmaster@jp.NetBSD.org>