Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/createbuildlink pkgtools/createbuildlink: use...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c9cb90e38b5
branches:  trunk
changeset: 431698:1c9cb90e38b5
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat May 16 06:24:15 2020 +0000

description:
pkgtools/createbuildlink: use SUBST instead of ad-hoc sed

This allows to show the actual changes by setting SUBST_SHOW_DIFF=yes,
and with SUBST_NOOP_OK=no it also demonstrates that no substitutions are
needed for substplistbasedirs.

Another thing this demonstrates is this wrong patch:

-echo >>$sedrules "s|@@PKGVERSION@@|@PKGVERSION@|g"
+echo >>$sedrules "s|@3.17@|3.17|g"

diffstat:

 pkgtools/createbuildlink/Makefile |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (28 lines):

diff -r dc7fa1b3d0e5 -r 1c9cb90e38b5 pkgtools/createbuildlink/Makefile
--- a/pkgtools/createbuildlink/Makefile Sat May 16 05:34:15 2020 +0000
+++ b/pkgtools/createbuildlink/Makefile Sat May 16 06:24:15 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2015/12/29 21:21:20 wiz Exp $
+# $NetBSD: Makefile,v 1.55 2020/05/16 06:24:15 rillig Exp $
 
 PKGNAME=       createbuildlink-3.17
 CATEGORIES=    pkgtools sysutils
@@ -17,12 +17,13 @@
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man8
 
+SUBST_CLASSES+=                vars
+SUBST_STAGE.vars=      pre-configure
+SUBST_FILES.vars=      ${SCRIPT}
+SUBST_VARS.vars=       PKGVERSION MAKE
+
 do-extract:
-.for scr in ${SCRIPTS}
-       ${SED}  -e 's|@PKGVERSION@|${PKGVERSION}|'              \
-               -e 's|@MAKE@|${MAKE}|'                          \
-               < ${FILESDIR:Q}/${scr:Q} > ${WRKSRC:Q}/${scr:Q}
-.endfor
+       cd ${FILESDIR} && ${CP} ${SCRIPTS} ${WRKSRC}
 
 do-install:
 .for scr in ${SCRIPTS}



Home | Main Index | Thread Index | Old Index