Annotation of pkgsrc/lang/python/application.mk, revision 1.2

1.2     ! jlam        1: # $NetBSD: application.mk,v 1.1 2002/09/21 23:47:03 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: 
                      9: _PYTHON_PATCH_SCRIPT_SED=      -e "1s;^\#!.*python;\#!${PYTHONBIN};"
                     10: 
                     11: .if defined(PYTHON_PATCH_SCRIPTS)
                     12: python-patch-scripts:
1.2     ! jlam       13: .for FILE in ${PYTHON_PATCH_SCRIPTS}
        !            14:        cd ${WRKSRC}; for file in ${FILE}; do                           \
        !            15:                ${SED} ${_PYTHON_PATCH_SCRIPT_SED}                      \
        !            16:                        $${file} > $${file}.fixed;                      \
        !            17:                if [ -x $${file} ]; then                                \
        !            18:                        ${CHMOD} +x $${file}.fixed;                     \
        !            19:                fi;                                                     \
        !            20:                ${MV} -f $${file}.fixed $${file};                       \
        !            21:        done
1.1       jlam       22: .endfor
                     23: 
                     24: post-patch: python-patch-scripts
                     25: .endif

CVSweb <webmaster@jp.NetBSD.org>