pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python use REPLACE_INTERPRETER instead of our pri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9ceaf819a0b6
branches:  trunk
changeset: 469900:9ceaf819a0b6
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Tue Mar 02 15:26:02 2004 +0000

description:
use REPLACE_INTERPRETER instead of our private implementation

diffstat:

 lang/python/application.mk |  22 +++++-----------------
 1 files changed, 5 insertions(+), 17 deletions(-)

diffs (35 lines):

diff -r 6276bf1958cf -r 9ceaf819a0b6 lang/python/application.mk
--- a/lang/python/application.mk        Tue Mar 02 15:25:23 2004 +0000
+++ b/lang/python/application.mk        Tue Mar 02 15:26:02 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: application.mk,v 1.5 2004/01/14 03:22:47 xtraeme Exp $
+# $NetBSD: application.mk,v 1.6 2004/03/02 15:26:02 drochner Exp $
 
 .include "../../lang/python/pyversion.mk"
 
@@ -6,21 +6,9 @@
 # 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
+REPLACE_INTERPRETER+=  python
+_REPLACE.python.old=   .*python[^ ]*
+_REPLACE.python.new=   ${PYTHONBIN}
+_REPLACE_FILES.python= ${PYTHON_PATCH_SCRIPTS}
 .endif



Home | Main Index | Thread Index | Old Index