pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/createbuildlink



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat May 16 06:24:15 UTC 2020

Modified Files:
        pkgsrc/pkgtools/createbuildlink: Makefile

Log Message:
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"


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 pkgsrc/pkgtools/createbuildlink/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/createbuildlink/Makefile
diff -u pkgsrc/pkgtools/createbuildlink/Makefile:1.54 pkgsrc/pkgtools/createbuildlink/Makefile:1.55
--- pkgsrc/pkgtools/createbuildlink/Makefile:1.54       Tue Dec 29 21:21:20 2015
+++ pkgsrc/pkgtools/createbuildlink/Makefile    Sat May 16 06:24:15 2020
@@ -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 @@ REPLACE_SH+=        ${SCRIPTS}
 
 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