pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Thu May 23 19:23:24 UTC 2019

Modified Files:
        pkgsrc/archivers/freeze: Makefile
        pkgsrc/archivers/ruby-xz: Makefile
        pkgsrc/audio/ampache: Makefile
        pkgsrc/audio/juke: Makefile
        pkgsrc/audio/mt-daapd: Makefile
        pkgsrc/audio/nas: Makefile
        pkgsrc/audio/solfege: Makefile
        pkgsrc/benchmarks/hbench: Makefile
        pkgsrc/cad/qcad: Makefile
        pkgsrc/chat/anope: Makefile
        pkgsrc/chat/bitchx: Makefile
        pkgsrc/chat/inspircd: Makefile
        pkgsrc/chat/psybnc: Makefile
        pkgsrc/chat/silc-server: Makefile
        pkgsrc/chat/spectrum: Makefile
        pkgsrc/comms/asterisk: options.mk
        pkgsrc/comms/asterisk13: options.mk
        pkgsrc/comms/asterisk14: options.mk
        pkgsrc/comms/asterisk15: options.mk
        pkgsrc/comms/fidogate: Makefile
        pkgsrc/comms/op_panel: Makefile
        pkgsrc/converters/wkhtmltopdf: Makefile
        pkgsrc/databases/phpmyadmin: Makefile
        pkgsrc/databases/unixodbc: Makefile
        pkgsrc/devel/apache-ant: Makefile
        pkgsrc/devel/apache-ant19: Makefile
        pkgsrc/devel/bugzilla: Makefile
        pkgsrc/devel/bugzilla3: Makefile
        pkgsrc/devel/glib: Makefile
        pkgsrc/devel/gps: Makefile
        pkgsrc/devel/gradle: Makefile
        pkgsrc/devel/libnet10: Makefile
        pkgsrc/devel/mantis: Makefile
        pkgsrc/devel/monotone-server: Makefile
        pkgsrc/devel/ncc: Makefile
        pkgsrc/devel/nss: Makefile
        pkgsrc/devel/ocaml-findlib: Makefile
        pkgsrc/devel/p5-File-BaseDir: Makefile
        pkgsrc/devel/pwlib: Makefile
        pkgsrc/devel/py-jupyter_core: Makefile
        pkgsrc/devel/quilt: Makefile
        pkgsrc/devel/rt3: Makefile.install
        pkgsrc/devel/ruby-mkrf: Makefile
        pkgsrc/devel/ruby-redmine: Makefile options.mk
        pkgsrc/devel/sgb: Makefile
        pkgsrc/devel/sloccount: Makefile
        pkgsrc/devel/tmake: Makefile
        pkgsrc/editors/TeXmacs: Makefile
        pkgsrc/editors/ce-doc: Makefile
        pkgsrc/editors/lpe: Makefile
        pkgsrc/emulators/b-em: Makefile
        pkgsrc/emulators/dynagen: Makefile
        pkgsrc/filesystems/fuse-gmailfs: Makefile
        pkgsrc/finance/tclticker: Makefile
        pkgsrc/fonts/t1lib: Makefile
        pkgsrc/games/0verkill: Makefile
        pkgsrc/games/et: Makefile
        pkgsrc/games/onscripter: Makefile
        pkgsrc/games/polyglot: Makefile
        pkgsrc/games/xevil: Makefile
        pkgsrc/graphics/camlimages: Makefile
        pkgsrc/graphics/circos: Makefile
        pkgsrc/graphics/frameworks: Makefile
        pkgsrc/graphics/libbpg: Makefile
        pkgsrc/graphics/magicpoint: Makefile
        pkgsrc/graphics/xpaint: Makefile
        pkgsrc/graphics/xv: Makefile
        pkgsrc/lang/clojure: Makefile
        pkgsrc/lang/ghc: Makefile
        pkgsrc/lang/ghc-bootstrap: Makefile
        pkgsrc/lang/mono: Makefile
        pkgsrc/lang/mono2: Makefile
        pkgsrc/lang/openjdk7: Makefile
        pkgsrc/lang/openjdk8: Makefile
        pkgsrc/lang/pear: Makefile
        pkgsrc/lang/php56: Makefile
        pkgsrc/lang/php71: Makefile
        pkgsrc/lang/php72: Makefile
        pkgsrc/lang/php73: Makefile
        pkgsrc/lang/ruby: platform.mk
        pkgsrc/lang/sather: Makefile
        pkgsrc/lang/sbcl: Makefile
        pkgsrc/lang/scala: Makefile
        pkgsrc/lang/tinyscheme: Makefile
        pkgsrc/mail/amavisd-new: Makefile
        pkgsrc/mail/courier-maildir: Makefile
        pkgsrc/mail/courier-mta: Makefile
        pkgsrc/mail/deliver: Makefile
        pkgsrc/mail/dkim-milter: Makefile
        pkgsrc/mail/dot-forward: Makefile
        pkgsrc/mail/dovecot: Makefile
        pkgsrc/mail/dspam: Makefile
        pkgsrc/mail/exim3: Makefile
        pkgsrc/mail/fastforward: Makefile
        pkgsrc/mail/fml4: Makefile
        pkgsrc/mail/freepops: Makefile
        pkgsrc/mail/imp: Makefile
        pkgsrc/mail/ingo: Makefile
        pkgsrc/mail/mailman: Makefile
        pkgsrc/mail/mailsync: Makefile
        pkgsrc/mail/mimp: Makefile
        pkgsrc/mail/mush: Makefile
        pkgsrc/mail/newspipe: Makefile
        pkgsrc/mail/opensmtpd: Makefile
        pkgsrc/mail/p5-Mail-Ezmlm: Makefile
        pkgsrc/mail/pfqueue: Makefile options.mk
        pkgsrc/mail/poppassd: Makefile
        pkgsrc/mail/postfix: Makefile
        pkgsrc/mail/qmqtool: Makefile
        pkgsrc/mail/qpopper: Makefile
        pkgsrc/mail/queue-fix: Makefile
        pkgsrc/mail/relay-ctrl: Makefile
        pkgsrc/mail/roundcube: Makefile
        pkgsrc/mail/serialmail: Makefile
        pkgsrc/mail/spamassassin: Makefile
        pkgsrc/mail/spamdyke: Makefile
        pkgsrc/mail/squirrelmail: Makefile
        pkgsrc/mail/ssmtp: Makefile
        pkgsrc/mail/turba: Makefile
        pkgsrc/mail/up-imapproxy: Makefile
        pkgsrc/math/octave: Makefile
        pkgsrc/misc/screen: Makefile
        pkgsrc/net/djbdnscurve6: Makefile
        pkgsrc/net/hf6to4: Makefile
        pkgsrc/net/hping3: Makefile
        pkgsrc/net/icinga-base: Makefile
        pkgsrc/net/knot: Makefile
        pkgsrc/net/mrtg: Makefile
        pkgsrc/net/nagios-base: Makefile
        pkgsrc/net/nagstamon: Makefile
        pkgsrc/net/netdisco: Makefile
        pkgsrc/net/ocsinventory-agent: Makefile
        pkgsrc/net/py-pcap: Makefile
        pkgsrc/net/rinetd: Makefile
        pkgsrc/net/ruby-stompserver: Makefile
        pkgsrc/net/scapy: Makefile
        pkgsrc/net/smokeping: Makefile
        pkgsrc/net/tinyfugue: Makefile
        pkgsrc/net/tsocks: Makefile
        pkgsrc/net/vnc: Makefile
        pkgsrc/net/vpnc: Makefile
        pkgsrc/net/xnap: Makefile
        pkgsrc/net/yale-tftpd: Makefile
        pkgsrc/news/flnews: Makefile
        pkgsrc/pkgtools/autoswc: Makefile
        pkgsrc/pkgtools/dfdisk: Makefile
        pkgsrc/pkgtools/libkver: Makefile
        pkgsrc/pkgtools/pkg_alternatives: Makefile
        pkgsrc/pkgtools/pkg_distinst: Makefile
        pkgsrc/pkgtools/pkg_filecheck: Makefile
        pkgsrc/pkgtools/pkg_notify: Makefile
        pkgsrc/pkgtools/pkg_p5up2date: Makefile
        pkgsrc/pkgtools/pkgclean: Makefile
        pkgsrc/pkgtools/pkglint4: Makefile
        pkgsrc/pkgtools/pkgsrc-todo: Makefile
        pkgsrc/pkgtools/url2pkg: Makefile
        pkgsrc/pkgtools/verifypc: Makefile
        pkgsrc/print/cups-base: Makefile
        pkgsrc/print/cups15: Makefile
        pkgsrc/print/papersize: Makefile
        pkgsrc/print/tex-musixtex: Makefile
        pkgsrc/print/xpdf: Makefile
        pkgsrc/security/Bastille: Makefile
        pkgsrc/security/amap: Makefile
        pkgsrc/security/base: Makefile
        pkgsrc/security/cvm: Makefile
        pkgsrc/security/gpgme: Makefile
        pkgsrc/security/john: Makefile
        pkgsrc/security/libprelude: Makefile.common
        pkgsrc/security/logcheck: Makefile
        pkgsrc/security/lynis: Makefile
        pkgsrc/security/opendnssec: Makefile
        pkgsrc/security/pam-tacplus: Makefile
        pkgsrc/security/prelude-correlator: Makefile
        pkgsrc/security/prelude-lml: Makefile
        pkgsrc/security/prelude-manager: Makefile
        pkgsrc/security/prelude-pflogger: Makefile
        pkgsrc/security/py-prewikka: Makefile
        pkgsrc/security/py-tlslite: Makefile
        pkgsrc/security/softhsm: Makefile
        pkgsrc/sysutils/ansible: Makefile
        pkgsrc/sysutils/atitvout: Makefile
        pkgsrc/sysutils/backuppc: Makefile
        pkgsrc/sysutils/estd: Makefile
        pkgsrc/sysutils/gnometoaster: Makefile
        pkgsrc/sysutils/smbldap-tools: Makefile
        pkgsrc/sysutils/tob: Makefile
        pkgsrc/sysutils/xcdroast: Makefile
        pkgsrc/sysutils/xe-guest-utilities: Makefile
        pkgsrc/textproc/awf: Makefile
        pkgsrc/textproc/ruby-rdtool: Makefile
        pkgsrc/textproc/sphinxsearch: Makefile
        pkgsrc/time/cardboard-schedule: Makefile
        pkgsrc/time/kronolith: Makefile
        pkgsrc/time/leapsunpack: Makefile
        pkgsrc/wm/awesome: Makefile
        pkgsrc/wm/compiz: Makefile
        pkgsrc/wm/enlightenment: Makefile
        pkgsrc/wm/fvwm-devel: Makefile
        pkgsrc/wm/golem: Makefile
        pkgsrc/wm/larswm: Makefile
        pkgsrc/wm/mlvwm: Makefile
        pkgsrc/wm/musca: Makefile
        pkgsrc/www/apache24: Makefile
        pkgsrc/www/aws-demos: Makefile
        pkgsrc/www/awstats: Makefile
        pkgsrc/www/bannerfilter: Makefile
        pkgsrc/www/geeklog: Makefile
        pkgsrc/www/horde: Makefile
        pkgsrc/www/htmllint: Makefile
        pkgsrc/www/mediawiki: Makefile
        pkgsrc/www/moodle: Makefile
        pkgsrc/www/mserv-php: Makefile
        pkgsrc/www/privoxy: Makefile
        pkgsrc/www/shibboleth-sp: Makefile
        pkgsrc/www/siege: Makefile
        pkgsrc/www/thttpd: Makefile
        pkgsrc/www/tinyproxy: Makefile
        pkgsrc/www/viewvc: Makefile
        pkgsrc/www/webalizer: Makefile
        pkgsrc/www/websvn: Makefile
        pkgsrc/www/wordpress: Makefile
        pkgsrc/www/wwwoffle: Makefile
        pkgsrc/x11/alacarte: Makefile
        pkgsrc/x11/avant-window-navigator: Makefile
        pkgsrc/x11/gnome-screensaver: Makefile
        pkgsrc/x11/kde-runtime4: Makefile
        pkgsrc/x11/kde-workspace4: Makefile
        pkgsrc/x11/kdelibs4: Makefile
        pkgsrc/x11/py-qt5: Makefile
        pkgsrc/x11/py-sip: Makefile.common
        pkgsrc/x11/ruby-wxruby: Makefile
        pkgsrc/x11/slim: Makefile
        pkgsrc/x11/wxGTK28: Makefile.common
        pkgsrc/x11/wxGTK30: Makefile
        pkgsrc/x11/xcolorsel: Makefile
        pkgsrc/x11/xpns: Makefile
        pkgsrc/x11/xteddy2: Makefile
        pkgsrc/x11/xview-clients: Makefile
        pkgsrc/x11/xworld: Makefile

Log Message:
all: replace SUBST_SED with the simpler SUBST_VARS

pkglint -Wall -r --only "substitution command" -F

With manual review and indentation fixes since pkglint doesn't get that
part correct in every case.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/archivers/freeze/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/archivers/ruby-xz/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/audio/ampache/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/audio/juke/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/audio/mt-daapd/Makefile
cvs rdiff -u -r1.97 -r1.98 pkgsrc/audio/nas/Makefile
cvs rdiff -u -r1.66 -r1.67 pkgsrc/audio/solfege/Makefile
cvs rdiff -u -r1.58 -r1.59 pkgsrc/benchmarks/hbench/Makefile
cvs rdiff -u -r1.72 -r1.73 pkgsrc/cad/qcad/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/chat/anope/Makefile
cvs rdiff -u -r1.59 -r1.60 pkgsrc/chat/bitchx/Makefile
cvs rdiff -u -r1.63 -r1.64 pkgsrc/chat/inspircd/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/chat/psybnc/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/chat/silc-server/Makefile
cvs rdiff -u -r1.80 -r1.81 pkgsrc/chat/spectrum/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/comms/asterisk/options.mk
cvs rdiff -u -r1.3 -r1.4 pkgsrc/comms/asterisk13/options.mk
cvs rdiff -u -r1.2 -r1.3 pkgsrc/comms/asterisk14/options.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/asterisk15/options.mk
cvs rdiff -u -r1.75 -r1.76 pkgsrc/comms/fidogate/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/comms/op_panel/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/converters/wkhtmltopdf/Makefile
cvs rdiff -u -r1.156 -r1.157 pkgsrc/databases/phpmyadmin/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/databases/unixodbc/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/devel/apache-ant/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/apache-ant19/Makefile
cvs rdiff -u -r1.48 -r1.49 pkgsrc/devel/bugzilla/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/bugzilla3/Makefile
cvs rdiff -u -r1.94 -r1.95 pkgsrc/devel/glib/Makefile
cvs rdiff -u -r1.58 -r1.59 pkgsrc/devel/gps/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/devel/gradle/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/libnet10/Makefile
cvs rdiff -u -r1.50 -r1.51 pkgsrc/devel/mantis/Makefile
cvs rdiff -u -r1.60 -r1.61 pkgsrc/devel/monotone-server/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/devel/ncc/Makefile
cvs rdiff -u -r1.166 -r1.167 pkgsrc/devel/nss/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/devel/ocaml-findlib/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/p5-File-BaseDir/Makefile
cvs rdiff -u -r1.70 -r1.71 pkgsrc/devel/pwlib/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-jupyter_core/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/quilt/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/rt3/Makefile.install
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/ruby-mkrf/Makefile
cvs rdiff -u -r1.38 -r1.39 pkgsrc/devel/ruby-redmine/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/ruby-redmine/options.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/sgb/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/sloccount/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/tmake/Makefile
cvs rdiff -u -r1.124 -r1.125 pkgsrc/editors/TeXmacs/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/editors/ce-doc/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/editors/lpe/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/emulators/b-em/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/emulators/dynagen/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/filesystems/fuse-gmailfs/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/finance/tclticker/Makefile
cvs rdiff -u -r1.52 -r1.53 pkgsrc/fonts/t1lib/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/games/0verkill/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/games/et/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/games/onscripter/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/games/polyglot/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/games/xevil/Makefile
cvs rdiff -u -r1.117 -r1.118 pkgsrc/graphics/camlimages/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/graphics/circos/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/graphics/frameworks/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/libbpg/Makefile
cvs rdiff -u -r1.100 -r1.101 pkgsrc/graphics/magicpoint/Makefile
cvs rdiff -u -r1.76 -r1.77 pkgsrc/graphics/xpaint/Makefile
cvs rdiff -u -r1.93 -r1.94 pkgsrc/graphics/xv/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/clojure/Makefile
cvs rdiff -u -r1.58 -r1.59 pkgsrc/lang/ghc/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/ghc-bootstrap/Makefile
cvs rdiff -u -r1.184 -r1.185 pkgsrc/lang/mono/Makefile
cvs rdiff -u -r1.34 -r1.35 pkgsrc/lang/mono2/Makefile
cvs rdiff -u -r1.133 -r1.134 pkgsrc/lang/openjdk7/Makefile
cvs rdiff -u -r1.77 -r1.78 pkgsrc/lang/openjdk8/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/lang/pear/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/lang/php56/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/lang/php71/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/lang/php72/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/php73/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ruby/platform.mk
cvs rdiff -u -r1.65 -r1.66 pkgsrc/lang/sather/Makefile
cvs rdiff -u -r1.78 -r1.79 pkgsrc/lang/sbcl/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/scala/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/lang/tinyscheme/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/mail/amavisd-new/Makefile
cvs rdiff -u -r1.34 -r1.35 pkgsrc/mail/courier-maildir/Makefile
cvs rdiff -u -r1.52 -r1.53 pkgsrc/mail/courier-mta/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/mail/deliver/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/mail/dkim-milter/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/mail/dot-forward/Makefile
cvs rdiff -u -r1.193 -r1.194 pkgsrc/mail/dovecot/Makefile
cvs rdiff -u -r1.97 -r1.98 pkgsrc/mail/dspam/Makefile
cvs rdiff -u -r1.53 -r1.54 pkgsrc/mail/exim3/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/mail/fastforward/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/mail/fml4/Makefile
cvs rdiff -u -r1.38 -r1.39 pkgsrc/mail/freepops/Makefile
cvs rdiff -u -r1.65 -r1.66 pkgsrc/mail/imp/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/mail/ingo/Makefile
cvs rdiff -u -r1.86 -r1.87 pkgsrc/mail/mailman/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/mail/mailsync/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/mail/mimp/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/mail/mush/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mail/newspipe/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/mail/opensmtpd/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/mail/p5-Mail-Ezmlm/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mail/pfqueue/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/pfqueue/options.mk
cvs rdiff -u -r1.28 -r1.29 pkgsrc/mail/poppassd/Makefile
cvs rdiff -u -r1.309 -r1.310 pkgsrc/mail/postfix/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mail/qmqtool/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/mail/qpopper/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/queue-fix/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mail/relay-ctrl/Makefile
cvs rdiff -u -r1.89 -r1.90 pkgsrc/mail/roundcube/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/serialmail/Makefile
cvs rdiff -u -r1.133 -r1.134 pkgsrc/mail/spamassassin/Makefile
cvs rdiff -u -r1.37 -r1.38 pkgsrc/mail/spamdyke/Makefile
cvs rdiff -u -r1.135 -r1.136 pkgsrc/mail/squirrelmail/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/mail/ssmtp/Makefile
cvs rdiff -u -r1.46 -r1.47 pkgsrc/mail/turba/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/mail/up-imapproxy/Makefile
cvs rdiff -u -r1.187 -r1.188 pkgsrc/math/octave/Makefile
cvs rdiff -u -r1.109 -r1.110 pkgsrc/misc/screen/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/djbdnscurve6/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/net/hf6to4/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/net/hping3/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/net/icinga-base/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/net/knot/Makefile
cvs rdiff -u -r1.127 -r1.128 pkgsrc/net/mrtg/Makefile
cvs rdiff -u -r1.76 -r1.77 pkgsrc/net/nagios-base/Makefile
cvs rdiff -u -r1.54 -r1.55 pkgsrc/net/nagstamon/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/net/netdisco/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/net/ocsinventory-agent/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/net/py-pcap/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/net/rinetd/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/net/ruby-stompserver/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/net/scapy/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/net/smokeping/Makefile
cvs rdiff -u -r1.33 -r1.34 pkgsrc/net/tinyfugue/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/net/tsocks/Makefile
cvs rdiff -u -r1.58 -r1.59 pkgsrc/net/vnc/Makefile
cvs rdiff -u -r1.44 -r1.45 pkgsrc/net/vpnc/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/xnap/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/net/yale-tftpd/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/news/flnews/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/pkgtools/autoswc/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/pkgtools/dfdisk/Makefile
cvs rdiff -u -r1.39 -r1.40 pkgsrc/pkgtools/libkver/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/pkgtools/pkg_alternatives/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/pkgtools/pkg_distinst/Makefile
cvs rdiff -u -r1.45 -r1.46 pkgsrc/pkgtools/pkg_filecheck/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/pkgtools/pkg_notify/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/pkgtools/pkg_p5up2date/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/pkgtools/pkgclean/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/pkgtools/pkglint4/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/pkgtools/pkgsrc-todo/Makefile
cvs rdiff -u -r1.89 -r1.90 pkgsrc/pkgtools/url2pkg/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/pkgtools/verifypc/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/print/cups-base/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/print/cups15/Makefile
cvs rdiff -u -r1.29 -r1.30 pkgsrc/print/papersize/Makefile
cvs rdiff -u -r1.39 -r1.40 pkgsrc/print/tex-musixtex/Makefile
cvs rdiff -u -r1.86 -r1.87 pkgsrc/print/xpdf/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/security/Bastille/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/security/amap/Makefile
cvs rdiff -u -r1.44 -r1.45 pkgsrc/security/base/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/security/cvm/Makefile
cvs rdiff -u -r1.92 -r1.93 pkgsrc/security/gpgme/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/security/john/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/security/libprelude/Makefile.common
cvs rdiff -u -r1.21 -r1.22 pkgsrc/security/logcheck/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/lynis/Makefile
cvs rdiff -u -r1.74 -r1.75 pkgsrc/security/opendnssec/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/security/pam-tacplus/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/security/prelude-correlator/Makefile
cvs rdiff -u -r1.42 -r1.43 pkgsrc/security/prelude-lml/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/security/prelude-manager/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/security/prelude-pflogger/Makefile
cvs rdiff -u -r1.49 -r1.50 pkgsrc/security/py-prewikka/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/security/py-tlslite/Makefile
cvs rdiff -u -r1.42 -r1.43 pkgsrc/security/softhsm/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/sysutils/ansible/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/atitvout/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/backuppc/Makefile
cvs rdiff -u -r1.33 -r1.34 pkgsrc/sysutils/estd/Makefile
cvs rdiff -u -r1.29 -r1.30 pkgsrc/sysutils/gnometoaster/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/sysutils/smbldap-tools/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/sysutils/tob/Makefile
cvs rdiff -u -r1.81 -r1.82 pkgsrc/sysutils/xcdroast/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/xe-guest-utilities/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/textproc/awf/Makefile
cvs rdiff -u -r1.45 -r1.46 pkgsrc/textproc/ruby-rdtool/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/textproc/sphinxsearch/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/time/cardboard-schedule/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/time/kronolith/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/time/leapsunpack/Makefile
cvs rdiff -u -r1.65 -r1.66 pkgsrc/wm/awesome/Makefile
cvs rdiff -u -r1.116 -r1.117 pkgsrc/wm/compiz/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/wm/enlightenment/Makefile
cvs rdiff -u -r1.54 -r1.55 pkgsrc/wm/fvwm-devel/Makefile
cvs rdiff -u -r1.33 -r1.34 pkgsrc/wm/golem/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/wm/larswm/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/wm/mlvwm/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/wm/musca/Makefile
cvs rdiff -u -r1.78 -r1.79 pkgsrc/www/apache24/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/www/aws-demos/Makefile
cvs rdiff -u -r1.61 -r1.62 pkgsrc/www/awstats/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/www/bannerfilter/Makefile
cvs rdiff -u -r1.45 -r1.46 pkgsrc/www/geeklog/Makefile
cvs rdiff -u -r1.83 -r1.84 pkgsrc/www/horde/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/www/htmllint/Makefile
cvs rdiff -u -r1.75 -r1.76 pkgsrc/www/mediawiki/Makefile
cvs rdiff -u -r1.72 -r1.73 pkgsrc/www/moodle/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/www/mserv-php/Makefile
cvs rdiff -u -r1.62 -r1.63 pkgsrc/www/privoxy/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/www/shibboleth-sp/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/www/siege/Makefile
cvs rdiff -u -r1.51 -r1.52 pkgsrc/www/thttpd/Makefile
cvs rdiff -u -r1.39 -r1.40 pkgsrc/www/tinyproxy/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/www/viewvc/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/www/webalizer/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/www/websvn/Makefile
cvs rdiff -u -r1.85 -r1.86 pkgsrc/www/wordpress/Makefile
cvs rdiff -u -r1.85 -r1.86 pkgsrc/www/wwwoffle/Makefile
cvs rdiff -u -r1.79 -r1.80 pkgsrc/x11/alacarte/Makefile
cvs rdiff -u -r1.49 -r1.50 pkgsrc/x11/avant-window-navigator/Makefile
cvs rdiff -u -r1.79 -r1.80 pkgsrc/x11/gnome-screensaver/Makefile
cvs rdiff -u -r1.96 -r1.97 pkgsrc/x11/kde-runtime4/Makefile
cvs rdiff -u -r1.73 -r1.74 pkgsrc/x11/kde-workspace4/Makefile
cvs rdiff -u -r1.98 -r1.99 pkgsrc/x11/kdelibs4/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/x11/py-qt5/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/x11/py-sip/Makefile.common
cvs rdiff -u -r1.30 -r1.31 pkgsrc/x11/ruby-wxruby/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/slim/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/x11/wxGTK28/Makefile.common
cvs rdiff -u -r1.32 -r1.33 pkgsrc/x11/wxGTK30/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/x11/xcolorsel/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/x11/xpns/Makefile
cvs rdiff -u -r1.44 -r1.45 pkgsrc/x11/xteddy2/Makefile
cvs rdiff -u -r1.38 -r1.39 pkgsrc/x11/xview-clients/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/x11/xworld/Makefile

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

Modified files:

Index: pkgsrc/archivers/freeze/Makefile
diff -u pkgsrc/archivers/freeze/Makefile:1.27 pkgsrc/archivers/freeze/Makefile:1.28
--- pkgsrc/archivers/freeze/Makefile:1.27       Wed Jul  4 13:40:07 2018
+++ pkgsrc/archivers/freeze/Makefile    Thu May 23 19:22:54 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2018/07/04 13:40:07 jperkin Exp $
+# $NetBSD: Makefile,v 1.28 2019/05/23 19:22:54 rillig Exp $
 
 DISTNAME=      freeze-2.5
 PKGREVISION=   3
@@ -21,6 +21,6 @@ INSTALLATION_DIRS=    bin ${PKGMANDIR}/man1
 SUBST_CLASSES+=                freeze
 SUBST_STAGE.freeze=    pre-configure
 SUBST_FILES.freeze=    *.1
-SUBST_SED.freeze=      -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.freeze=     PREFIX
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/archivers/ruby-xz/Makefile
diff -u pkgsrc/archivers/ruby-xz/Makefile:1.17 pkgsrc/archivers/ruby-xz/Makefile:1.18
--- pkgsrc/archivers/ruby-xz/Makefile:1.17      Mon Apr 15 06:11:32 2019
+++ pkgsrc/archivers/ruby-xz/Makefile   Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2019/04/15 06:11:32 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=      ruby-xz-1.0.0
 PKGNAME=       ${RUBY_PKGPREFIX}-${DISTNAME:S/ruby-//}
@@ -16,7 +16,7 @@ RUBY_VERSIONS_ACCEPTED=       24 25 26
 SUBST_CLASSES+=                path
 SUBST_STAGE.path=      pre-configure
 SUBST_FILES.path=      lib/xz/lib_lzma.rb
-SUBST_SED.path+=       -e "s,@LOCALBASE@,${LOCALBASE},g"
+SUBST_VARS.path=       LOCALBASE
 SUBST_SED.path+=       -e "s,@SHLIB_EXT@,${RUBY_SLEXT},g"
 
 .include "../../lang/ruby/gem.mk"

Index: pkgsrc/audio/ampache/Makefile
diff -u pkgsrc/audio/ampache/Makefile:1.15 pkgsrc/audio/ampache/Makefile:1.16
--- pkgsrc/audio/ampache/Makefile:1.15  Sun Mar 12 07:20:51 2017
+++ pkgsrc/audio/ampache/Makefile       Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2017/03/12 07:20:51 maya Exp $
+# $NetBSD: Makefile,v 1.16 2019/05/23 19:22:55 rillig Exp $
 #
 
 DISTNAME=      ampache-3.5.3
@@ -32,7 +32,7 @@ FILES_SUBST+=         INSTDIR=${INSTDIR:Q}
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     do-configure
 SUBST_FILES.files=     ampache.conf
-SUBST_SED.files=       -e "s|@INSTDIR@|${INSTDIR}|g"
+SUBST_VARS.files=      INSTDIR
 SUBST_MESSAGE.files=   Substituting paths into apache config fragment
 
 CONF_FILES=            ${EGDIR}/ampache.conf \

Index: pkgsrc/audio/juke/Makefile
diff -u pkgsrc/audio/juke/Makefile:1.19 pkgsrc/audio/juke/Makefile:1.20
--- pkgsrc/audio/juke/Makefile:1.19     Wed Jul  4 13:40:08 2018
+++ pkgsrc/audio/juke/Makefile  Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/07/04 13:40:08 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:22:55 rillig Exp $
 #
 
 DISTNAME=      juke-0.7
@@ -21,7 +21,7 @@ CONF_FILES=   ${EGDIR}/juke.conf.default $
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     doc/juke.1 MANUAL src/conf.c
 SUBST_STAGE.paths=     pre-configure
-SUBST_SED.paths=       -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 
 INSTALLATION_DIRS=     ${EGDIR} share/doc/juke
 

Index: pkgsrc/audio/mt-daapd/Makefile
diff -u pkgsrc/audio/mt-daapd/Makefile:1.19 pkgsrc/audio/mt-daapd/Makefile:1.20
--- pkgsrc/audio/mt-daapd/Makefile:1.19 Wed Jul  4 13:40:09 2018
+++ pkgsrc/audio/mt-daapd/Makefile      Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/07/04 13:40:09 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=      mt-daapd-0.2.4.2
 PKGREVISION=   5
@@ -41,10 +41,10 @@ OWN_DIRS_PERMS=             ${VARBASE}/cache/mt-daa
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      contrib/mt-daapd.conf
-SUBST_SED.conf=                -e "s,@PREFIX@,${PREFIX},"
-SUBST_SED.conf+=       -e "s,@VARBASE@,${VARBASE},g"
-SUBST_SED.conf+=       -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},"
-SUBST_SED.conf+=       -e "s,@MTDAAPD_USER@,${MTDAAPD_USER},"
+SUBST_VARS.conf=       PREFIX
+SUBST_VARS.conf+=      VARBASE
+SUBST_VARS.conf+=      PKG_SYSCONFDIR
+SUBST_VARS.conf+=      MTDAAPD_USER
 
 SUBST_CLASSES+=                paths
 SUBST_MESSAGE.paths=   Fixing hardcoded paths.

Index: pkgsrc/audio/nas/Makefile
diff -u pkgsrc/audio/nas/Makefile:1.97 pkgsrc/audio/nas/Makefile:1.98
--- pkgsrc/audio/nas/Makefile:1.97      Mon Nov 13 12:23:36 2017
+++ pkgsrc/audio/nas/Makefile   Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.97 2017/11/13 12:23:36 khorben Exp $
+# $NetBSD: Makefile,v 1.98 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=      nas-1.9.4.src
 PKGNAME=       ${DISTNAME:S/.src//}
@@ -27,12 +27,12 @@ PKG_SYSCONFSUBDIR=  nas
 SUBST_CLASSES+=                sysconf
 SUBST_STAGE.sysconf=   pre-configure
 SUBST_FILES.sysconf=   config/NetAudio.def
-SUBST_SED.sysconf=     -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.sysconf=    PKG_SYSCONFDIR
 
 SUBST_CLASSES+=                ossaudio
 SUBST_STAGE.ossaudio=  pre-configure
 SUBST_FILES.ossaudio=  server/nasd.conf.eg server/dda/voxware/auvoxware.c
-SUBST_SED.ossaudio=    -e "s|@DEVOSSAUDIO@|${DEVOSSAUDIO}|g"
+SUBST_VARS.ossaudio=   DEVOSSAUDIO
 
 SUBST_CLASSES+=                mungeman
 SUBST_STAGE.mungeman=  pre-configure

Index: pkgsrc/audio/solfege/Makefile
diff -u pkgsrc/audio/solfege/Makefile:1.66 pkgsrc/audio/solfege/Makefile:1.67
--- pkgsrc/audio/solfege/Makefile:1.66  Fri Apr 26 13:13:43 2019
+++ pkgsrc/audio/solfege/Makefile       Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.66 2019/04/26 13:13:43 maya Exp $
+# $NetBSD: Makefile,v 1.67 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=              solfege-3.14.1
 PKGREVISION=           32
@@ -32,10 +32,10 @@ PYTHON_VERSIONS_INCOMPATIBLE=        36 37 # p
 SUBST_CLASSES+=                sound
 SUBST_STAGE.sound=     do-configure
 SUBST_FILES.sound=     default.config
-SUBST_SED.sound=       -e 's|@WAVPLAYER@|${WAVPLAYER}|g'
-SUBST_SED.sound+=      -e 's|@MIDIPLAYER@|${MIDIPLAYER}|g'
-SUBST_SED.sound+=      -e 's|@MP3PLAYER@|${MP3PLAYER}|g'
-SUBST_SED.sound+=      -e 's|@OGGPLAYER@|${OGGPLAYER}|g'
+SUBST_VARS.sound=      WAVPLAYER
+SUBST_VARS.sound+=     MIDIPLAYER
+SUBST_VARS.sound+=     MP3PLAYER
+SUBST_VARS.sound+=     OGGPLAYER
 SUBST_MESSAGE.sound=   Setting default audio player.
 
 EGDIR=                 ${PREFIX}/share/examples/solfege

Index: pkgsrc/benchmarks/hbench/Makefile
diff -u pkgsrc/benchmarks/hbench/Makefile:1.58 pkgsrc/benchmarks/hbench/Makefile:1.59
--- pkgsrc/benchmarks/hbench/Makefile:1.58      Wed Aug 22 09:42:58 2018
+++ pkgsrc/benchmarks/hbench/Makefile   Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2018/08/22 09:42:58 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=              hbench-OS-1.1
 PKGNAME=               hbench-1.1
@@ -43,8 +43,8 @@ SUBST_MESSAGE.hb=     Replacing bin with lib
 SUBST_FILES.hb=                do-install
 SUBST_FILES.hb+=       scripts/*
 SUBST_FILES.hb+=       Results/Makefile
-SUBST_SED.hb=          -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.hb+=         -e 's,/bin/hbench,/libexec/hbench,g'
+SUBST_VARS.hb=         PREFIX
+SUBST_SED.hb=          -e 's,/bin/hbench,/libexec/hbench,g'
 
 INSTALLATION_DIRS=     bin
 

Index: pkgsrc/cad/qcad/Makefile
diff -u pkgsrc/cad/qcad/Makefile:1.72 pkgsrc/cad/qcad/Makefile:1.73
--- pkgsrc/cad/qcad/Makefile:1.72       Fri Jul 27 14:12:41 2018
+++ pkgsrc/cad/qcad/Makefile    Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.72 2018/07/27 14:12:41 plunky Exp $
+# $NetBSD: Makefile,v 1.73 2019/05/23 19:22:55 rillig Exp $
 #
 
 DISTNAME=              qcad-3.21.2.3
@@ -27,7 +27,7 @@ SUBST_MESSAGE.paths=  Attending to hard-c
 SUBST_FILES.paths+=    shared.pri src/core/RS.cpp src/core/RSettings.cpp
 SUBST_FILES.paths+=    scripts/Help/ShowReadme/ShowReadme.js
 SUBST_FILES.paths+=    scripts/Widgets/LibraryBrowser/LibraryBrowser.js
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 
 AUTO_MKDIRS=   yes
 

Index: pkgsrc/chat/anope/Makefile
diff -u pkgsrc/chat/anope/Makefile:1.25 pkgsrc/chat/anope/Makefile:1.26
--- pkgsrc/chat/anope/Makefile:1.25     Fri May  3 11:05:10 2019
+++ pkgsrc/chat/anope/Makefile  Thu May 23 19:22:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2019/05/03 11:05:10 nia Exp $
+# $NetBSD: Makefile,v 1.26 2019/05/23 19:22:55 rillig Exp $
 
 DISTNAME=      anope-2.0.6-source
 PKGNAME=       ${DISTNAME:S/-source//}
@@ -48,9 +48,9 @@ SUBST_CLASSES+=               conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_MESSAGE.conf=    Set variables in configuration file.
 SUBST_FILES.conf+=     data/example.conf
-SUBST_SED.conf+=       -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.conf+=       -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g"
-SUBST_SED.conf+=       -e "s,@PKGLOCALEDIR@,${PKGLOCALEDIR},g"
+SUBST_VARS.conf=       PREFIX
+SUBST_VARS.conf+=      PKG_SYSCONFDIR
+SUBST_VARS.conf+=      PKGLOCALEDIR
 
 RCD_SCRIPTS=   anope
 

Index: pkgsrc/chat/bitchx/Makefile
diff -u pkgsrc/chat/bitchx/Makefile:1.59 pkgsrc/chat/bitchx/Makefile:1.60
--- pkgsrc/chat/bitchx/Makefile:1.59    Wed Jul  4 13:40:10 2018
+++ pkgsrc/chat/bitchx/Makefile Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.59 2018/07/04 13:40:10 jperkin Exp $
+# $NetBSD: Makefile,v 1.60 2019/05/23 19:22:56 rillig Exp $
 
 DISTNAME=      bitchx-1.2.1
 PKGREVISION=   1
@@ -22,7 +22,7 @@ CFLAGS.Darwin+=       -DBIND_8_COMPAT
 SUBST_CLASSES+=                manpage
 SUBST_STAGE.manpage=   pre-configure
 SUBST_FILES.manpage+=  doc/BitchX.1
-SUBST_SED.manpage+=    -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.manpage=    PREFIX
 
 .include "../../archivers/bzip2/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"

Index: pkgsrc/chat/inspircd/Makefile
diff -u pkgsrc/chat/inspircd/Makefile:1.63 pkgsrc/chat/inspircd/Makefile:1.64
--- pkgsrc/chat/inspircd/Makefile:1.63  Wed Apr  3 00:32:27 2019
+++ pkgsrc/chat/inspircd/Makefile       Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2019/04/03 00:32:27 ryoon Exp $
+# $NetBSD: Makefile,v 1.64 2019/05/23 19:22:56 rillig Exp $
 
 DISTNAME=      inspircd-2.0.27
 PKGREVISION=   2
@@ -60,8 +60,8 @@ SUBST_CLASSES+=               conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_MESSAGE.conf=    Set variables in configuration file.
 SUBST_FILES.conf+=     conf/inspircd.conf
-SUBST_SED.conf+=       -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.conf+=       -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g"
+SUBST_VARS.conf=       PREFIX
+SUBST_VARS.conf+=      PKG_SYSCONFDIR
 
 INSTALLATION_DIRS+=    ${EGDIR}
 

Index: pkgsrc/chat/psybnc/Makefile
diff -u pkgsrc/chat/psybnc/Makefile:1.4 pkgsrc/chat/psybnc/Makefile:1.5
--- pkgsrc/chat/psybnc/Makefile:1.4     Wed Jul  4 13:40:10 2018
+++ pkgsrc/chat/psybnc/Makefile Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2018/07/04 13:40:10 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2019/05/23 19:22:56 rillig Exp $
 #
 
 DISTNAME=      psyBNC-2.4BETA2
@@ -27,7 +27,7 @@ CONF_FILES=   share/examples/psybnc/psybnc
 
 SUBST_CLASSES+=                prefix
 SUBST_FILES.prefix=    tools/autoconf.c
-SUBST_SED.prefix=      -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.prefix=     PREFIX
 SUBST_STAGE.prefix=    pre-configure
 
 SUBST_CLASSES+=         openssl

Index: pkgsrc/chat/silc-server/Makefile
diff -u pkgsrc/chat/silc-server/Makefile:1.69 pkgsrc/chat/silc-server/Makefile:1.70
--- pkgsrc/chat/silc-server/Makefile:1.69       Wed Jul  4 13:40:11 2018
+++ pkgsrc/chat/silc-server/Makefile    Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2018/07/04 13:40:11 jperkin Exp $
+# $NetBSD: Makefile,v 1.70 2019/05/23 19:22:56 rillig Exp $
 
 DISTNAME=      silc-server-1.1.18
 PKGREVISION=   2
@@ -66,7 +66,7 @@ OWN_DIRS_PERMS+=      ${VARBASE}/log/silcd ${
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     motd.txt
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},'
+SUBST_VARS.paths=      PREFIX
 
 post-extract:
        ${CP} ${FILESDIR}/motd.txt ${WRKSRC}

Index: pkgsrc/chat/spectrum/Makefile
diff -u pkgsrc/chat/spectrum/Makefile:1.80 pkgsrc/chat/spectrum/Makefile:1.81
--- pkgsrc/chat/spectrum/Makefile:1.80  Sun May  5 22:49:46 2019
+++ pkgsrc/chat/spectrum/Makefile       Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.80 2019/05/05 22:49:46 ryoon Exp $
+# $NetBSD: Makefile,v 1.81 2019/05/23 19:22:56 rillig Exp $
 
 DISTNAME=              spectrum-1.4.8
 PKGREVISION=           53
@@ -68,7 +68,7 @@ SUBST_CLASSES+=               manpath
 SUBST_STAGE.manpath=   pre-configure
 SUBST_FILES.manpath=   CMakeLists.txt
 SUBST_MESSAGE.manpath= Correcting man page directory
-SUBST_SED.manpath+=    -e 's,@PKGMANDIR@,${PKGMANDIR},g'
+SUBST_VARS.manpath=    PKGMANDIR
 
 SUBST_CLASSES+=                users
 SUBST_STAGE.users=     pre-configure

Index: pkgsrc/comms/asterisk/options.mk
diff -u pkgsrc/comms/asterisk/options.mk:1.9 pkgsrc/comms/asterisk/options.mk:1.10
--- pkgsrc/comms/asterisk/options.mk:1.9        Wed Jul  4 13:40:11 2018
+++ pkgsrc/comms/asterisk/options.mk    Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.9 2018/07/04 13:40:11 jperkin Exp $
+# $NetBSD: options.mk,v 1.10 2019/05/23 19:22:56 rillig Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.asterisk
 PKG_SUPPORTED_OPTIONS=         zaptel x11 unixodbc ilbc webvmail ldap spandsp
@@ -80,8 +80,8 @@ DEPENDS+=             p5-DBI-[0-9]*:../../databases
 SUBST_CLASSES+=                webvmail
 SUBST_STAGE.webvmail=  pre-configure
 SUBST_FILES.webvmail=  contrib/scripts/vmail.cgi
-SUBST_SED.webvmail+=   -e 's|@ASTETCDIR@|${ASTETCDIR}|'
-SUBST_SED.webvmail+=   -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
+SUBST_VARS.webvmail=   ASTETCDIR
+SUBST_VARS.webvmail+=  ASTSPOOLDIR
 INSTALLATION_DIRS+=    ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
 SPECIAL_PERMS+=                ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
 INSTALL_TARGET+=       webvmail

Index: pkgsrc/comms/asterisk13/options.mk
diff -u pkgsrc/comms/asterisk13/options.mk:1.3 pkgsrc/comms/asterisk13/options.mk:1.4
--- pkgsrc/comms/asterisk13/options.mk:1.3      Wed Jul  4 13:40:11 2018
+++ pkgsrc/comms/asterisk13/options.mk  Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.3 2018/07/04 13:40:11 jperkin Exp $
+# $NetBSD: options.mk,v 1.4 2019/05/23 19:22:56 rillig Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.asterisk
 PKG_SUPPORTED_OPTIONS=         zaptel x11 unixodbc ilbc webvmail ldap spandsp
@@ -80,8 +80,8 @@ DEPENDS+=             p5-DBI-[0-9]*:../../databases
 SUBST_CLASSES+=                webvmail
 SUBST_STAGE.webvmail=  pre-configure
 SUBST_FILES.webvmail=  contrib/scripts/vmail.cgi
-SUBST_SED.webvmail+=   -e 's|@ASTETCDIR@|${ASTETCDIR}|'
-SUBST_SED.webvmail+=   -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
+SUBST_VARS.webvmail=   ASTETCDIR
+SUBST_VARS.webvmail+=  ASTSPOOLDIR
 INSTALLATION_DIRS+=    ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
 SPECIAL_PERMS+=                ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
 INSTALL_TARGET+=       webvmail

Index: pkgsrc/comms/asterisk14/options.mk
diff -u pkgsrc/comms/asterisk14/options.mk:1.2 pkgsrc/comms/asterisk14/options.mk:1.3
--- pkgsrc/comms/asterisk14/options.mk:1.2      Wed Jul  4 13:40:11 2018
+++ pkgsrc/comms/asterisk14/options.mk  Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2018/07/04 13:40:11 jperkin Exp $
+# $NetBSD: options.mk,v 1.3 2019/05/23 19:22:56 rillig Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.asterisk
 PKG_SUPPORTED_OPTIONS=         zaptel x11 unixodbc ilbc webvmail ldap spandsp
@@ -80,8 +80,8 @@ DEPENDS+=             p5-DBI-[0-9]*:../../databases
 SUBST_CLASSES+=                webvmail
 SUBST_STAGE.webvmail=  pre-configure
 SUBST_FILES.webvmail=  contrib/scripts/vmail.cgi
-SUBST_SED.webvmail+=   -e 's|@ASTETCDIR@|${ASTETCDIR}|'
-SUBST_SED.webvmail+=   -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
+SUBST_VARS.webvmail=   ASTETCDIR
+SUBST_VARS.webvmail+=  ASTSPOOLDIR
 INSTALLATION_DIRS+=    ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
 SPECIAL_PERMS+=                ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
 INSTALL_TARGET+=       webvmail

Index: pkgsrc/comms/asterisk15/options.mk
diff -u pkgsrc/comms/asterisk15/options.mk:1.1 pkgsrc/comms/asterisk15/options.mk:1.2
--- pkgsrc/comms/asterisk15/options.mk:1.1      Mon Jul 16 21:53:04 2018
+++ pkgsrc/comms/asterisk15/options.mk  Thu May 23 19:22:56 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2018/07/16 21:53:04 joerg Exp $
+# $NetBSD: options.mk,v 1.2 2019/05/23 19:22:56 rillig Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.asterisk
 PKG_SUPPORTED_OPTIONS=         x11 unixodbc ilbc webvmail ldap spandsp
@@ -80,8 +80,8 @@ DEPENDS+=             p5-DBI-[0-9]*:../../databases
 SUBST_CLASSES+=                webvmail
 SUBST_STAGE.webvmail=  post-patch
 SUBST_FILES.webvmail=  contrib/scripts/vmail.cgi
-SUBST_SED.webvmail+=   -e 's|@ASTETCDIR@|${ASTETCDIR}|'
-SUBST_SED.webvmail+=   -e "s|@ASTSPOOLDIR@|${ASTSPOOLDIR}|"
+SUBST_VARS.webvmail=   ASTETCDIR
+SUBST_VARS.webvmail+=  ASTSPOOLDIR
 INSTALLATION_DIRS+=    ${PREFIX}/libexec/cgi-bin ${PREFIX}/share/httpd/htdocs
 SPECIAL_PERMS+=                ${PREFIX}/libexec/cgi-bin/vmail ${ASTERISK_USER} ${ASTERISK_GROUP} 04555
 INSTALL_TARGET+=       webvmail

Index: pkgsrc/comms/fidogate/Makefile
diff -u pkgsrc/comms/fidogate/Makefile:1.75 pkgsrc/comms/fidogate/Makefile:1.76
--- pkgsrc/comms/fidogate/Makefile:1.75 Wed Aug 22 09:43:03 2018
+++ pkgsrc/comms/fidogate/Makefile      Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.75 2018/08/22 09:43:03 wiz Exp $
+# $NetBSD: Makefile,v 1.76 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      fidogate-4.4.10
 PKGREVISION=   11
@@ -29,9 +29,9 @@ NO_CONFIGURE= yes
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     config.make
-SUBST_SED.paths=       -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.paths+=      -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g"
-SUBST_SED.paths+=      -e "s,@PKGINFODIR@,${PKGINFODIR},g"
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     PKGINFODIR
 SUBST_SED.paths+=      -e "s,@PERL@,${TOOLS_PATH.perl},g"
 SUBST_STAGE.paths=     pre-build
 

Index: pkgsrc/comms/op_panel/Makefile
diff -u pkgsrc/comms/op_panel/Makefile:1.12 pkgsrc/comms/op_panel/Makefile:1.13
--- pkgsrc/comms/op_panel/Makefile:1.12 Wed Aug 22 09:43:04 2018
+++ pkgsrc/comms/op_panel/Makefile      Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/08/22 09:43:04 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2019/05/23 19:22:57 rillig Exp $
 #
 
 DISTNAME=      op_panel-0.29
@@ -50,10 +50,10 @@ CONF_FILES+=                ${EGDIR}/op_panel.conf ${P
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/${FOP}.conf.dist
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@SMDIR@,${SMDIR},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=      -e 's,@PERL5@,${PERL5},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     SMDIR
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     PERL5
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS+=    share/examples/${FOP}

Index: pkgsrc/converters/wkhtmltopdf/Makefile
diff -u pkgsrc/converters/wkhtmltopdf/Makefile:1.5 pkgsrc/converters/wkhtmltopdf/Makefile:1.6
--- pkgsrc/converters/wkhtmltopdf/Makefile:1.5  Thu Apr 25 07:32:40 2019
+++ pkgsrc/converters/wkhtmltopdf/Makefile      Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2019/04/25 07:32:40 maya Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=       wkhtmltox-0.12.4
 PKGNAME=       wkhtmltopdf-0.12.4
@@ -24,7 +24,7 @@ SUBST_CLASSES+=               x11
 SUBST_MESSAGE.x11=     Fixing x11 options.
 SUBST_STAGE.x11=       pre-configure
 SUBST_FILES.x11+=      qt/mkspecs/netbsd-g++/qmake.conf
-SUBST_SED.x11=         -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.x11=                X11BASE
 
 
 do-configure:

Index: pkgsrc/databases/phpmyadmin/Makefile
diff -u pkgsrc/databases/phpmyadmin/Makefile:1.156 pkgsrc/databases/phpmyadmin/Makefile:1.157
--- pkgsrc/databases/phpmyadmin/Makefile:1.156  Thu Dec 13 08:22:42 2018
+++ pkgsrc/databases/phpmyadmin/Makefile        Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.156 2018/12/13 08:22:42 tm Exp $
+# $NetBSD: Makefile,v 1.157 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      phpMyAdmin-4.8.4-all-languages
 PKGNAME=       ${PHP_PKG_PREFIX}-${DISTNAME:S/-all-languages//:tl}
@@ -75,8 +75,8 @@ NO_BUILD=             yes
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths+=    ${WRKDIR}/phpmyadmin.conf
 SUBST_FILES.paths+=    ${WRKSRC}/libraries/vendor_config.php
-SUBST_SED.paths+=      -e "s|@PMDIR@|${PMDIR}|g"
-SUBST_SED.paths+=      -e "s|@PMVARDIR@|${PMVARDIR}|g"
+SUBST_VARS.paths=      PMDIR
+SUBST_VARS.paths+=     PMVARDIR
 SUBST_SED.paths+=      -e "s|@PMCONFDIR@|${PMCONFDIR}/|g"
 SUBST_STAGE.paths=     post-configure
 

Index: pkgsrc/databases/unixodbc/Makefile
diff -u pkgsrc/databases/unixodbc/Makefile:1.40 pkgsrc/databases/unixodbc/Makefile:1.41
--- pkgsrc/databases/unixodbc/Makefile:1.40     Tue Aug 14 13:04:24 2018
+++ pkgsrc/databases/unixodbc/Makefile  Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2018/08/14 13:04:24 adam Exp $
+# $NetBSD: Makefile,v 1.41 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      unixODBC-2.3.7
 PKGNAME=       ${DISTNAME:S/ODBC/odbc/}
@@ -54,8 +54,8 @@ OWN_DIRS=             ${PKG_SYSCONFDIR}/ODBCDataSou
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     ${WRKDIR}/odbc.ini
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@UNIXODBC_DRIVERS_DIR@,${UNIXODBC_DRIVERS_DIR},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     UNIXODBC_DRIVERS_DIR
 
 SUBST_CLASSES+=                mutex
 SUBST_STAGE.mutex=     pre-configure

Index: pkgsrc/devel/apache-ant/Makefile
diff -u pkgsrc/devel/apache-ant/Makefile:1.47 pkgsrc/devel/apache-ant/Makefile:1.48
--- pkgsrc/devel/apache-ant/Makefile:1.47       Mon May 20 14:57:58 2019
+++ pkgsrc/devel/apache-ant/Makefile    Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2019/05/20 14:57:58 ryoon Exp $
+# $NetBSD: Makefile,v 1.48 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      apache-ant-1.10.6-bin
 PKGNAME=       ${DISTNAME:S/-bin//}
@@ -25,7 +25,7 @@ SUBST_CLASSES+=               ant
 SUBST_FILES.ant=       bin/ant
 SUBST_STAGE.ant=       pre-configure
 SUBST_SED.ant=         -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
-SUBST_SED.ant+=                -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.ant=                PREFIX
 
 INSTALLATION_DIRS=     bin lib/java/ant share/doc/java/ant
 

Index: pkgsrc/devel/apache-ant19/Makefile
diff -u pkgsrc/devel/apache-ant19/Makefile:1.1 pkgsrc/devel/apache-ant19/Makefile:1.2
--- pkgsrc/devel/apache-ant19/Makefile:1.1      Tue Jul 24 16:24:50 2018
+++ pkgsrc/devel/apache-ant19/Makefile  Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/07/24 16:24:50 jperkin Exp $
+# $NetBSD: Makefile,v 1.2 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      apache-ant-1.9.13-bin
 PKGNAME=       ${DISTNAME:S/-bin//}
@@ -27,7 +27,7 @@ SUBST_CLASSES+=               ant
 SUBST_FILES.ant=       bin/ant
 SUBST_STAGE.ant=       pre-configure
 SUBST_SED.ant=         -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
-SUBST_SED.ant+=                -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.ant=                PREFIX
 
 INSTALLATION_DIRS=     bin lib/java/ant share/doc/java/ant
 

Index: pkgsrc/devel/bugzilla/Makefile
diff -u pkgsrc/devel/bugzilla/Makefile:1.48 pkgsrc/devel/bugzilla/Makefile:1.49
--- pkgsrc/devel/bugzilla/Makefile:1.48 Wed Aug 22 09:43:28 2018
+++ pkgsrc/devel/bugzilla/Makefile      Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2018/08/22 09:43:28 wiz Exp $
+# $NetBSD: Makefile,v 1.49 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      bugzilla-5.0.3
 PKGREVISION=   1
@@ -95,11 +95,11 @@ SUBST_CLASSES+=             conf
 SUBST_STAGE.conf=      pre-install
 SUBST_MESSAGE.conf=    Fixing configuration files.
 SUBST_FILES.conf=      bugzilla.conf localconfig Bugzilla/BugMail.pm
-SUBST_SED.conf=                -e "s|@BZ_WEB_GROUP@|${BZ_WEB_GROUP}|g"
-SUBST_SED.conf+=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.conf+=       -e "s|@BZDIR@|${BZDIR}|g"
-SUBST_SED.conf+=       -e "s|@CVS@|${CVS}|g"
-SUBST_SED.conf+=       -e "s|@DBDRIVER@|${DBDRIVER}|g"
+SUBST_VARS.conf=       BZ_WEB_GROUP
+SUBST_VARS.conf+=      PREFIX
+SUBST_VARS.conf+=      BZDIR
+SUBST_VARS.conf+=      CVS
+SUBST_VARS.conf+=      DBDRIVER
 SUBST_SED.conf+=       -e "s|/usr/lib/sendmail|${SENDMAIL}|g"
 
 SUBST_CLASSES+=                diff

Index: pkgsrc/devel/bugzilla3/Makefile
diff -u pkgsrc/devel/bugzilla3/Makefile:1.28 pkgsrc/devel/bugzilla3/Makefile:1.29
--- pkgsrc/devel/bugzilla3/Makefile:1.28        Wed Aug 22 09:43:28 2018
+++ pkgsrc/devel/bugzilla3/Makefile     Thu May 23 19:22:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2018/08/22 09:43:28 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/23 19:22:57 rillig Exp $
 
 DISTNAME=      bugzilla-3.6.8
 PKGREVISION=   1
@@ -49,11 +49,11 @@ SUBST_CLASSES+=             conf
 SUBST_STAGE.conf=      pre-install
 SUBST_MESSAGE.conf=    Fixing configuration files.
 SUBST_FILES.conf=      bugzilla.conf localconfig Bugzilla/BugMail.pm
-SUBST_SED.conf=                -e "s|@BZ_WEB_GROUP@|${BZ_WEB_GROUP}|g"
-SUBST_SED.conf+=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.conf+=       -e "s|@BZDIR@|${BZDIR}|g"
-SUBST_SED.conf+=       -e "s|@CVS@|${CVS}|g"
-SUBST_SED.conf+=       -e "s|@DBDRIVER@|${DBDRIVER}|g"
+SUBST_VARS.conf=       BZ_WEB_GROUP
+SUBST_VARS.conf+=      PREFIX
+SUBST_VARS.conf+=      BZDIR
+SUBST_VARS.conf+=      CVS
+SUBST_VARS.conf+=      DBDRIVER
 SUBST_SED.conf+=       -e "s|/usr/lib/sendmail|${SENDMAIL}|g"
 
 INSTALLATION_DIRS+=    ${DOCDIR} ${DOCDIR}/en ${EGDIR} ${BZDIR} ${BZDIR}/Bugzilla

Index: pkgsrc/devel/glib/Makefile
diff -u pkgsrc/devel/glib/Makefile:1.94 pkgsrc/devel/glib/Makefile:1.95
--- pkgsrc/devel/glib/Makefile:1.94     Tue Aug  1 14:58:56 2017
+++ pkgsrc/devel/glib/Makefile  Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.94 2017/08/01 14:58:56 wiz Exp $
+# $NetBSD: Makefile,v 1.95 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=              glib-1.2.10
 PKGREVISION=           11
@@ -48,7 +48,7 @@ SUBST_MESSAGE.shlib1= Fixing shared libr
 SUBST_STAGE.shlib1=    pre-configure
 SUBST_FILES.shlib1=    glib-config.in docs/glib-config.1.in glib.pc.in \
                        gmodule.pc.in gthread.pc.in
-SUBST_SED.shlib1=      -e "s|@GLIB_VERSION@|${GLIB_VERSION}|g"
+SUBST_VARS.shlib1=     GLIB_VERSION
 SUBST_SED.shlib1+=     -e "s|@VERSION@|${GLIB_VERSION}|g"
 
 SUBST_CLASSES+=                shlib2

Index: pkgsrc/devel/gps/Makefile
diff -u pkgsrc/devel/gps/Makefile:1.58 pkgsrc/devel/gps/Makefile:1.59
--- pkgsrc/devel/gps/Makefile:1.58      Thu Apr 25 07:32:46 2019
+++ pkgsrc/devel/gps/Makefile   Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2019/04/25 07:32:46 maya Exp $
+# $NetBSD: Makefile,v 1.59 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=      gps-${GPS_VERSION}
 PKGREVISION=   22
@@ -35,7 +35,7 @@ CONFIGURE_ARGS+=      --disable-shared --with
 SUBST_CLASSES+=        coll python
 SUBST_STAGE.coll=      pre-configure
 SUBST_FILES.coll=      gnatlib/src/gnatcoll_readline.gpr.in
-SUBST_SED.coll=                -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.coll=       PREFIX
 SUBST_SED.coll+=       -e "s|-rpath|${LINKER_RPATH_FLAG}|g"
 SUBST_STAGE.python=    pre-configure
 SUBST_FILES.python=    share/plug-ins/gps_utils/console_process.py

Index: pkgsrc/devel/gradle/Makefile
diff -u pkgsrc/devel/gradle/Makefile:1.19 pkgsrc/devel/gradle/Makefile:1.20
--- pkgsrc/devel/gradle/Makefile:1.19   Tue Nov 20 21:26:39 2018
+++ pkgsrc/devel/gradle/Makefile        Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/11/20 21:26:39 schmonz Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=      gradle-4.10.2-bin
 PKGNAME=       ${DISTNAME:S/-bin//}
@@ -27,7 +27,7 @@ SUBST_CLASSES+=               launcher
 SUBST_FILES.launcher=  gradle-launcher
 SUBST_STAGE.launcher=  post-configure
 SUBST_SED.launcher=    -e 's,@APP_HOME@,${PREFIX}/lib/java/gradle,g'
-SUBST_SED.launcher+=   -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.launcher=   PREFIX
 SUBST_SED.launcher+=   -e 's,@APP_LAUNCHER@,lib/gradle-launcher-${PKGVERSION_NOREV}\.jar,g'
 SUBST_SED.launcher+=   -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
 

Index: pkgsrc/devel/libnet10/Makefile
diff -u pkgsrc/devel/libnet10/Makefile:1.8 pkgsrc/devel/libnet10/Makefile:1.9
--- pkgsrc/devel/libnet10/Makefile:1.8  Wed Aug 16 20:45:35 2017
+++ pkgsrc/devel/libnet10/Makefile      Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2017/08/16 20:45:35 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:22:58 rillig Exp $
 #
 
 DISTNAME=      libnet-1.0.2a
@@ -25,7 +25,7 @@ SUBST_CLASSES+=               vars
 SUBST_STAGE.vars=      pre-configure
 SUBST_FILES.vars=      Makefile.in libnet-config.in
 SUBST_SED.vars=                -e 's,@MAN_PREFIX@,${PREFIX}/${PKGMANDIR}/man3,g'
-SUBST_SED.vars+=       -e 's!@COMPILER_RPATH_FLAG@!${COMPILER_RPATH_FLAG}!g'
+SUBST_VARS.vars=       COMPILER_RPATH_FLAG
 
 INSTALLATION_DIRS=     bin lib share/examples ${PKGMANDIR}/man3
 

Index: pkgsrc/devel/mantis/Makefile
diff -u pkgsrc/devel/mantis/Makefile:1.50 pkgsrc/devel/mantis/Makefile:1.51
--- pkgsrc/devel/mantis/Makefile:1.50   Sun May 21 07:16:49 2017
+++ pkgsrc/devel/mantis/Makefile        Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2017/05/21 07:16:49 ryoon Exp $
+# $NetBSD: Makefile,v 1.51 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=      mantisbt-2.4.1
 PKGNAME=       ${DISTNAME:S/mantisbt/mantis/}
@@ -35,7 +35,7 @@ MANTIS_EG=            config_inc.php mantis.conf m
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-install
 SUBST_FILES.conf=      mantis.conf
-SUBST_SED.conf=                -e "s|@MANTIS_HOME@|${MANTIS_HOME}|g"
+SUBST_VARS.conf=       MANTIS_HOME
 SUBST_MESSAGE.conf=    Fixing configuration files.
 
 REPLACE_BASH+=         scripts/travis_before_script.sh

Index: pkgsrc/devel/monotone-server/Makefile
diff -u pkgsrc/devel/monotone-server/Makefile:1.60 pkgsrc/devel/monotone-server/Makefile:1.61
--- pkgsrc/devel/monotone-server/Makefile:1.60  Fri Jul 12 10:44:55 2013
+++ pkgsrc/devel/monotone-server/Makefile       Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2013/07/12 10:44:55 jperkin Exp $
+# $NetBSD: Makefile,v 1.61 2019/05/23 19:22:58 rillig Exp $
 #
 
 DISTNAME=      monotone-1.0
@@ -59,12 +59,12 @@ SUBST_CLASSES+=     vars
 SUBST_STAGE.vars=      do-configure
 SUBST_MESSAGE.vars=    Configuring sources.
 SUBST_FILES.vars=      ${WRKDIR}/monotone-server.7
-SUBST_SED.vars+=       -e 's|@MONOTONE_HOME@|${MONOTONE_HOME}|g'
-SUBST_SED.vars+=       -e 's|@MONOTONE_LOGFILE@|${MONOTONE_LOGFILE}|g'
-SUBST_SED.vars+=       -e 's|@MONOTONE_USER@|${MONOTONE_USER}|g'
-SUBST_SED.vars+=       -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.vars+=       -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.vars+=       -e 's|@RCD_SCRIPTS_DIR@|${RCD_SCRIPTS_DIR}|g'
+SUBST_VARS.vars=       MONOTONE_HOME
+SUBST_VARS.vars+=      MONOTONE_LOGFILE
+SUBST_VARS.vars+=      MONOTONE_USER
+SUBST_VARS.vars+=      PKG_SYSCONFDIR
+SUBST_VARS.vars+=      PREFIX
+SUBST_VARS.vars+=      RCD_SCRIPTS_DIR
 
 FILES_SUBST+=          DIGEST=${PREFIX:Q}/bin/digest
 FILES_SUBST+=          MONOTONE=${PREFIX:Q}/bin/mtn

Index: pkgsrc/devel/ncc/Makefile
diff -u pkgsrc/devel/ncc/Makefile:1.13 pkgsrc/devel/ncc/Makefile:1.14
--- pkgsrc/devel/ncc/Makefile:1.13      Thu Apr 25 07:32:48 2019
+++ pkgsrc/devel/ncc/Makefile   Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2019/04/25 07:32:48 maya Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:22:58 rillig Exp $
 #
 
 DISTNAME=              ncc-2.8
@@ -19,7 +19,7 @@ SUBST_CLASSES+=               prefix
 SUBST_STAGE.prefix=    pre-configure
 SUBST_MESSAGE.prefix=  Fixing hardcoded paths
 SUBST_FILES.prefix=    config.h
-SUBST_SED.prefix=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.prefix=     PREFIX
 
 REPLACE_PYTHON+=       scripts/nccstrip2.py
 

Index: pkgsrc/devel/nss/Makefile
diff -u pkgsrc/devel/nss/Makefile:1.166 pkgsrc/devel/nss/Makefile:1.167
--- pkgsrc/devel/nss/Makefile:1.166     Thu May 16 14:08:16 2019
+++ pkgsrc/devel/nss/Makefile   Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.166 2019/05/16 14:08:16 ryoon Exp $
+# $NetBSD: Makefile,v 1.167 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=              nss-${NSS_RELEASE:S/.0$//}
 NSS_RELEASE=           3.44.0
@@ -95,11 +95,11 @@ NSS_DIST_DIR_VERSION=       ${NSS_MAJOR_VERSIO
 
 
 SUBST_CLASSES+=                config
-SUBST_SED.config+=     -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.config+=     -e "s,@NSS_MAJOR_VERSION@,${NSS_MAJOR_VERSION},"
-SUBST_SED.config+=     -e "s,@NSS_MINOR_VERSION@,${NSS_MINOR_VERSION},"
-SUBST_SED.config+=     -e "s,@NSS_PATCH_VERSION@,${NSS_PATCH_VERSION},"
-SUBST_SED.config+=     -e "s!@COMPILER_RPATH_FLAG@!${COMPILER_RPATH_FLAG}!"
+SUBST_VARS.config=     PREFIX
+SUBST_VARS.config+=    NSS_MAJOR_VERSION
+SUBST_VARS.config+=    NSS_MINOR_VERSION
+SUBST_VARS.config+=    NSS_PATCH_VERSION
+SUBST_VARS.config+=    COMPILER_RPATH_FLAG
 SUBST_SED.config+=     -e "s,@PTHREAD@,${BUILDLINK_LIBS.pthread:Q},"
 SUBST_STAGE.config=    pre-build
 SUBST_MESSAGE.config=  Preparing *-config files.

Index: pkgsrc/devel/ocaml-findlib/Makefile
diff -u pkgsrc/devel/ocaml-findlib/Makefile:1.43 pkgsrc/devel/ocaml-findlib/Makefile:1.44
--- pkgsrc/devel/ocaml-findlib/Makefile:1.43    Tue May 14 15:55:44 2019
+++ pkgsrc/devel/ocaml-findlib/Makefile Thu May 23 19:22:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2019/05/14 15:55:44 jaapb Exp $
+# $NetBSD: Makefile,v 1.44 2019/05/23 19:22:58 rillig Exp $
 
 DISTNAME=              findlib-1.8.0
 PKGNAME=               ocaml-${DISTNAME}
@@ -51,9 +51,9 @@ FILES_SUBST+=         OCAML_FINDLIB_DIRS="${OCA
 SUBST_CLASSES+=                ofr
 SUBST_STAGE.ofr=       pre-configure
 SUBST_FILES.ofr=       ocaml-findlib-register.sh
-SUBST_SED.ofr=         -e 's,@SH@,'${SH:Q}','
-SUBST_SED.ofr+=                -e 's,@PREFIX@,${PREFIX},'
-SUBST_SED.ofr+=                -e 's,@FGREP@,'${FGREP:Q}','
+SUBST_VARS.ofr=                SH
+SUBST_VARS.ofr+=       PREFIX
+SUBST_VARS.ofr+=       FGREP
 
 SUBST_CLASSES+=                pathes
 SUBST_STAGE.pathes=    post-install

Index: pkgsrc/devel/p5-File-BaseDir/Makefile
diff -u pkgsrc/devel/p5-File-BaseDir/Makefile:1.28 pkgsrc/devel/p5-File-BaseDir/Makefile:1.29
--- pkgsrc/devel/p5-File-BaseDir/Makefile:1.28  Wed Aug 22 09:43:59 2018
+++ pkgsrc/devel/p5-File-BaseDir/Makefile       Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2018/08/22 09:43:59 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=              File-BaseDir-0.08
 PKGNAME=               p5-${DISTNAME}
@@ -21,7 +21,7 @@ SHAREDIR_SPLIT=               ${SHAREDIR:S/\// /g}
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     post-configure
 SUBST_FILES.paths=     lib/File/BaseDir.pm t/01_vars.t t/03_OO.t
-SUBST_SED.paths=       -e 's|@SHAREDIR_SPLIT@|${SHAREDIR_SPLIT}|g'
+SUBST_VARS.paths=      SHAREDIR_SPLIT
 
 PERL5_MODULE_TYPE=     Module::Build
 PERL5_PACKLIST=                auto/File/BaseDir/.packlist

Index: pkgsrc/devel/pwlib/Makefile
diff -u pkgsrc/devel/pwlib/Makefile:1.70 pkgsrc/devel/pwlib/Makefile:1.71
--- pkgsrc/devel/pwlib/Makefile:1.70    Wed Jul  4 13:40:15 2018
+++ pkgsrc/devel/pwlib/Makefile Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.70 2018/07/04 13:40:15 jperkin Exp $
+# $NetBSD: Makefile,v 1.71 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=      pwlib-v1_8_3-src
 PKGNAME=       pwlib-1.8.3
@@ -32,12 +32,12 @@ MAKE_ENV+=          PWLIBDIR=${WRKSRC:Q} CC=${CC
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     make/unix.mak make/lib.mak make/common.mak make/pwlib.mak
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@LIBTOOL@,${LIBTOOL},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     LIBTOOL
 SUBST_SED.paths+=      -e 's,@BSD_INSTALL_LIB@,${INSTALL_LIB},g'
 SUBST_SED.paths+=      -e 's,@BSD_INSTALL_PROGRAM@,${INSTALL_PROGRAM},g'
 SUBST_SED.paths+=      -e 's,@PTHREAD_FLAGS@,${PTHREAD_LDFLAGS} ${PTHREAD_LIBS},g'
-SUBST_SED.paths+=      -e 's,@LIBOSSAUDIO@,${LIBOSSAUDIO},g'
+SUBST_VARS.paths+=     LIBOSSAUDIO
 SUBST_STAGE.paths=     pre-configure
 
 post-extract:

Index: pkgsrc/devel/py-jupyter_core/Makefile
diff -u pkgsrc/devel/py-jupyter_core/Makefile:1.3 pkgsrc/devel/py-jupyter_core/Makefile:1.4
--- pkgsrc/devel/py-jupyter_core/Makefile:1.3   Tue Feb  6 01:40:48 2018
+++ pkgsrc/devel/py-jupyter_core/Makefile       Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/02/06 01:40:48 minskim Exp $
+# $NetBSD: Makefile,v 1.4 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=      jupyter_core-4.4.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -20,7 +20,7 @@ SUBST_CLASSES+=                       fix-prefix
 SUBST_STAGE.fix-prefix=                pre-configure
 SUBST_MESSAGE.fix-prefix=      Fixing prefix.
 SUBST_FILES.fix-prefix=                jupyter_core/paths.py
-SUBST_SED.fix-prefix=          -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.fix-prefix=         PREFIX
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \

Index: pkgsrc/devel/quilt/Makefile
diff -u pkgsrc/devel/quilt/Makefile:1.21 pkgsrc/devel/quilt/Makefile:1.22
--- pkgsrc/devel/quilt/Makefile:1.21    Wed Aug 22 09:44:59 2018
+++ pkgsrc/devel/quilt/Makefile Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2018/08/22 09:44:59 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:22:59 rillig Exp $
 #
 
 DISTNAME=      quilt-0.64
@@ -54,7 +54,7 @@ REPLACE_FILES.conf-bash=*.in */*.in */*/
 SUBST_CLASSES+=                bash
 SUBST_MESSAGE.bash=    Fixing non-shellbang references to bash.
 SUBST_STAGE.bash=      pre-configure
-SUBST_SED.bash=                -e 's,@BASH@,${BASH},g'
+SUBST_VARS.bash=       BASH
 SUBST_FILES.bash=      quilt/scripts/inspect.in
 
 SUBST_CLASSES+=                etc

Index: pkgsrc/devel/rt3/Makefile.install
diff -u pkgsrc/devel/rt3/Makefile.install:1.22 pkgsrc/devel/rt3/Makefile.install:1.23
--- pkgsrc/devel/rt3/Makefile.install:1.22      Wed Jul  4 13:40:15 2018
+++ pkgsrc/devel/rt3/Makefile.install   Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.install,v 1.22 2018/07/04 13:40:15 jperkin Exp $
+# $NetBSD: Makefile.install,v 1.23 2019/05/23 19:22:59 rillig Exp $
 
 .include "dirs.mk"
 
@@ -18,7 +18,7 @@ OWN_DIRS_PERMS+=      ${RT_VAR_DIR}/session_d
 
 SUBST_CLASSES+=                prefix
 SUBST_FILES.prefix=    config.layout
-SUBST_SED.prefix=      -e s,@PREFIX@,${PREFIX},
+SUBST_VARS.prefix=     PREFIX
 SUBST_SED.prefix+=     -e s,@PKGSYSCONFDIR@,${PKG_SYSCONFDIR},
 SUBST_SED.prefix+=     -e s,@RTLIBDIR@,${RT_LIB_DIR},
 SUBST_SED.prefix+=     -e s,@RTSHAREDIR@,${RT_SHARE_DIR},

Index: pkgsrc/devel/ruby-mkrf/Makefile
diff -u pkgsrc/devel/ruby-mkrf/Makefile:1.4 pkgsrc/devel/ruby-mkrf/Makefile:1.5
--- pkgsrc/devel/ruby-mkrf/Makefile:1.4 Mon Sep  4 18:00:53 2017
+++ pkgsrc/devel/ruby-mkrf/Makefile     Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2017/09/04 18:00:53 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=      mkrf-0.2.3
 PKGREVISION=   1
@@ -14,7 +14,7 @@ USE_RAKE=     RUN
 SUBST_CLASSES+=                rake
 SUBST_STAGE.rake=      pre-configure
 SUBST_FILES.rake=      lib/mkrf/rakehelper.rb
-SUBST_SED.rake=                -e "s|@RAKE@|${RAKE}|"
+SUBST_VARS.rake=       RAKE
 SUBST_MESSAGE.rake=    Fixate rake's path.
 
 .include "../../lang/ruby/gem.mk"

Index: pkgsrc/devel/ruby-redmine/Makefile
diff -u pkgsrc/devel/ruby-redmine/Makefile:1.38 pkgsrc/devel/ruby-redmine/Makefile:1.39
--- pkgsrc/devel/ruby-redmine/Makefile:1.38     Wed Apr  3 00:32:39 2019
+++ pkgsrc/devel/ruby-redmine/Makefile  Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2019/04/03 00:32:39 ryoon Exp $
+# $NetBSD: Makefile,v 1.39 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=      redmine-3.3.2
 PKGNAME=       ${RUBY_PKGPREFIX}-${DISTNAME}
@@ -136,9 +136,9 @@ SUBST_SED.rake=             -e "s|/usr/bin/env rake
 SUBST_CLASSES+=                shell
 SUBST_FILES.shell=     ${DESTDIR}${PREFIX}/bin/redmine_*${RUBY_SUFFIX}.sh
 SUBST_MESSAGE.shell=   Fixing paths in helper shell scripts.
-SUBST_SED.shell=       -e "s|@PREFIX@|${PREFIX}|g;s|@GEM@|${GEM}|g"
-SUBST_SED.shell+=      -e "s|@RUBY@|${RUBY}|g"
-SUBST_SED.shell+=      -e "s|@RUBY_PKGPREFIX@|${RUBY_PKGPREFIX}|g"
+SUBST_VARS.shell=      PREFIX
+SUBST_VARS.shell+=     RUBY
+SUBST_VARS.shell+=     RUBY_PKGPREFIX
 SUBST_STAGE.shell=     post-install
 
 REPLACE_BASH+= nokogiri-1.6.7.2/build_all nokogiri-1.6.7.2/test_all

Index: pkgsrc/devel/ruby-redmine/options.mk
diff -u pkgsrc/devel/ruby-redmine/options.mk:1.5 pkgsrc/devel/ruby-redmine/options.mk:1.6
--- pkgsrc/devel/ruby-redmine/options.mk:1.5    Wed Jan  4 23:05:12 2017
+++ pkgsrc/devel/ruby-redmine/options.mk        Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.5 2017/01/04 23:05:12 rodent Exp $
+# $NetBSD: options.mk,v 1.6 2019/05/23 19:22:59 rillig Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.redmine
 
@@ -52,7 +52,7 @@ SUBST_CLASSES+=                       prefix
 SUBST_STAGE.prefix=            pre-configure
 SUBST_MESSAGE.prefix=          Setting PREFIX and RUBY_PKGPREFIX.
 SUBST_FILES.prefix=            ${WRKDIR}/unicorn.rb
-SUBST_SED.prefix+=             -e "s|@RUBY_PKGPREFIX@|${RUBY_PKGPREFIX}|g"
+SUBST_VARS.prefix=             RUBY_PKGPREFIX
 SUBST_VARS.prefix+=            PREFIX
 
 RCD_SCRIPTS+=  redmine_unicorn${RUBY_SUFFIX}

Index: pkgsrc/devel/sgb/Makefile
diff -u pkgsrc/devel/sgb/Makefile:1.7 pkgsrc/devel/sgb/Makefile:1.8
--- pkgsrc/devel/sgb/Makefile:1.7       Sun Nov 24 02:53:46 2013
+++ pkgsrc/devel/sgb/Makefile   Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2013/11/24 02:53:46 dholland Exp $
+# $NetBSD: Makefile,v 1.8 2019/05/23 19:22:59 rillig Exp $
 
 DISTNAME=      sgb-2007-03.28
 PKGNAME=       sgb-20070328
@@ -24,7 +24,7 @@ SUBST_CLASSES+=               paths
 SUBST_MESSAGE.paths=   Fixing hardcoded paths.
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     Makefile
-SUBST_SED.paths=       -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      LOCALBASE
 SUBST_SED.paths+=      -e 's,@PREFIX@,$${DESTDIR}${PREFIX},g'
 
 post-install:

Index: pkgsrc/devel/sloccount/Makefile
diff -u pkgsrc/devel/sloccount/Makefile:1.4 pkgsrc/devel/sloccount/Makefile:1.5
--- pkgsrc/devel/sloccount/Makefile:1.4 Wed Aug 22 09:45:00 2018
+++ pkgsrc/devel/sloccount/Makefile     Thu May 23 19:22:59 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2018/08/22 09:45:00 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2019/05/23 19:22:59 rillig Exp $
 
 
 DISTNAME=      sloccount-2.26
@@ -59,7 +59,7 @@ SUBST_FILES.generic=  ada_count awk_count
 SUBST_CLASSES+=                prefix
 SUBST_MESSAGE.prefix=  Fixing path to internal binaries.
 SUBST_STAGE.prefix=    pre-configure
-SUBST_SED.prefix=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.prefix=     PREFIX
 SUBST_FILES.prefix=    compute_all compute_sloc_lang lex_count sloccount
 
 post-install:

Index: pkgsrc/devel/tmake/Makefile
diff -u pkgsrc/devel/tmake/Makefile:1.21 pkgsrc/devel/tmake/Makefile:1.22
--- pkgsrc/devel/tmake/Makefile:1.21    Wed Aug 22 09:45:00 2018
+++ pkgsrc/devel/tmake/Makefile Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2018/08/22 09:45:00 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:23:00 rillig Exp $
 #
 
 DISTNAME=      tmake-1.13
@@ -20,14 +20,14 @@ INSTALLATION_DIRS=  bin
 SUBST_CLASSES+=                tmake
 SUBST_STAGE.tmake=     do-build
 SUBST_FILES.tmake=     bin/tmake
-SUBST_SED.tmake+=      -e 's;@TMAKEPATH@;'${TMAKEPATH:Q}';g'
+SUBST_VARS.tmake=      TMAKEPATH
 
 SUBST_CLASSES+=                tmakeconf
 SUBST_STAGE.tmakeconf= do-build
 SUBST_FILES.tmakeconf= lib/netbsd-g++/tmake.conf
-SUBST_SED.tmakeconf=   -e 's;@LOCALBASE@;${LOCALBASE};g'
-SUBST_SED.tmakeconf+=  -e 's;@X11BASE@;${X11BASE};g'
-SUBST_SED.tmakeconf+=  -e 's;@GLBASE@;${GLBASE};g'
+SUBST_VARS.tmakeconf=  LOCALBASE
+SUBST_VARS.tmakeconf+= X11BASE
+SUBST_VARS.tmakeconf+= GLBASE
 
 REPLACE_PERL+=         bin/tmake bin/progen
 

Index: pkgsrc/editors/TeXmacs/Makefile
diff -u pkgsrc/editors/TeXmacs/Makefile:1.124 pkgsrc/editors/TeXmacs/Makefile:1.125
--- pkgsrc/editors/TeXmacs/Makefile:1.124       Thu Apr 25 07:32:51 2019
+++ pkgsrc/editors/TeXmacs/Makefile     Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.124 2019/04/25 07:32:51 maya Exp $
+# $NetBSD: Makefile,v 1.125 2019/05/23 19:23:00 rillig Exp $
 #
 # changelog at http://www.texmacs.org/tmweb/about/changes.en.html
 
@@ -37,7 +37,7 @@ REPLACE_PYTHON+=      plugins/mathematica/bin
 SUBST_CLASSES+=                init
 SUBST_STAGE.init=      pre-configure
 SUBST_FILES.init=      plugins/python/progs/init-python.scm
-SUBST_SED.init=                -e 's,@PYTHONBIN@,${PYTHONBIN},g'
+SUBST_VARS.init=       PYTHONBIN
 
 REPLACE_SH+=           plugins/asymptote/bin/tm_asy
 REPLACE_SH+=           plugins/dratex/bin/tm_dratex

Index: pkgsrc/editors/ce-doc/Makefile
diff -u pkgsrc/editors/ce-doc/Makefile:1.11 pkgsrc/editors/ce-doc/Makefile:1.12
--- pkgsrc/editors/ce-doc/Makefile:1.11 Thu Oct  9 14:06:32 2014
+++ pkgsrc/editors/ce-doc/Makefile      Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2014/10/09 14:06:32 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2019/05/23 19:23:00 rillig Exp $
 #
 
 .include "../../editors/ce/Makefile.common"
@@ -17,7 +17,7 @@ INSTALLATION_DIRS=    bin share/doc/ce
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     teach-ce.in
-SUBST_SED.paths=       -e 's|@LN@|${LN}|g'
+SUBST_VARS.paths=      LN
 SUBST_SED.paths+=      -e '1s,/bin/bash,'${SH:Q}','
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/editors/lpe/Makefile
diff -u pkgsrc/editors/lpe/Makefile:1.26 pkgsrc/editors/lpe/Makefile:1.27
--- pkgsrc/editors/lpe/Makefile:1.26    Wed Jul  4 13:40:16 2018
+++ pkgsrc/editors/lpe/Makefile Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2018/07/04 13:40:16 jperkin Exp $
+# $NetBSD: Makefile,v 1.27 2019/05/23 19:23:00 rillig Exp $
 #
 
 DISTNAME=      lpe-1.2.6
@@ -28,7 +28,7 @@ CFLAGS=                       -DPREFIX="\"${PREFIX}\""
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     man/lpe.1.cs man/lpe.1.de man/lpe.1.en man/lpe.1.es
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},'
+SUBST_VARS.paths=      PREFIX
 
 .include "../../devel/libslang/buildlink3.mk"
 

Index: pkgsrc/emulators/b-em/Makefile
diff -u pkgsrc/emulators/b-em/Makefile:1.8 pkgsrc/emulators/b-em/Makefile:1.9
--- pkgsrc/emulators/b-em/Makefile:1.8  Sat Jul 16 00:20:27 2016
+++ pkgsrc/emulators/b-em/Makefile      Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2016/07/16 00:20:27 markd Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:23:00 rillig Exp $
 
 DISTNAME=      B-emv2.2Linux
 PKGNAME=       b-em-2.2
@@ -23,7 +23,7 @@ SUBST_CLASSES+=               paths d2u
 SUBST_MESSAGE.paths=   Fixing non-existing paths.
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     src/linux.c src/win.c
-SUBST_SED.paths=       -e 's,@BEMDATADIR@,${BEMDATADIR},g'
+SUBST_VARS.paths=      BEMDATADIR
 
 SUBST_MESSAGE.d2u=     Removing CR end-of-line markers
 SUBST_STAGE.d2u=       post-extract

Index: pkgsrc/emulators/dynagen/Makefile
diff -u pkgsrc/emulators/dynagen/Makefile:1.9 pkgsrc/emulators/dynagen/Makefile:1.10
--- pkgsrc/emulators/dynagen/Makefile:1.9       Thu Apr 25 07:32:52 2019
+++ pkgsrc/emulators/dynagen/Makefile   Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2019/04/25 07:32:52 maya Exp $
+# $NetBSD: Makefile,v 1.10 2019/05/23 19:23:00 rillig Exp $
 
 DISTNAME=      dynagen-0.11.0
 PKGREVISION=   5
@@ -21,7 +21,7 @@ SUBST_CLASSES+=               paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     dynagen
 SUBST_SED.paths=       -e "s|@SYSCONFDIR@|${PKG_SYSCONFDIR}|"
-SUBST_SED.paths+=      -e "s|@PREFIX@|${PREFIX}|"
+SUBST_VARS.paths=      PREFIX
 
 CONF_FILES+=           share/examples/dynagen/dynagen.ini ${PKG_SYSCONFDIR}/dynagen.ini
 

Index: pkgsrc/filesystems/fuse-gmailfs/Makefile
diff -u pkgsrc/filesystems/fuse-gmailfs/Makefile:1.18 pkgsrc/filesystems/fuse-gmailfs/Makefile:1.19
--- pkgsrc/filesystems/fuse-gmailfs/Makefile:1.18       Fri Apr 26 13:13:56 2019
+++ pkgsrc/filesystems/fuse-gmailfs/Makefile    Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2019/04/26 13:13:56 maya Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:00 rillig Exp $
 
 DISTNAME=      gmailfs-0.7.2
 PKGREVISION=   4
@@ -20,8 +20,8 @@ CONF_FILES=           ${PREFIX}/share/examples/gm
 SUBST_CLASSES+=                config
 SUBST_STAGE.config=    pre-configure
 SUBST_FILES.config=    gmailfs.py mount.gmailfs
-SUBST_SED.config=      -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
-SUBST_SED.config+=     -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.config=     PKG_SYSCONFDIR
+SUBST_VARS.config+=    PREFIX
 SUBST_SED.config+=     -e "s|@PYSITELIB@|${PREFIX}/${PYSITELIB}|g"
 SUBST_MESSAGE.config=   Fixing paths.
 

Index: pkgsrc/finance/tclticker/Makefile
diff -u pkgsrc/finance/tclticker/Makefile:1.19 pkgsrc/finance/tclticker/Makefile:1.20
--- pkgsrc/finance/tclticker/Makefile:1.19      Wed Jul  4 13:40:18 2018
+++ pkgsrc/finance/tclticker/Makefile   Thu May 23 19:23:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/07/04 13:40:18 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:00 rillig Exp $
 #
 
 DISTNAME=      tclticker-1.1
@@ -20,7 +20,7 @@ SUBST_CLASSES+=               paths
 SUBST_MESSAGE.paths=   Fixing hardcoded paths and command names.
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     tclticker mailquote
-SUBST_SED.paths=       -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.paths=      PREFIX
 
 INSTALLATION_DIRS=     bin
 

Index: pkgsrc/fonts/t1lib/Makefile
diff -u pkgsrc/fonts/t1lib/Makefile:1.52 pkgsrc/fonts/t1lib/Makefile:1.53
--- pkgsrc/fonts/t1lib/Makefile:1.52    Wed Jul  4 13:40:18 2018
+++ pkgsrc/fonts/t1lib/Makefile Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2018/07/04 13:40:18 jperkin Exp $
+# $NetBSD: Makefile,v 1.53 2019/05/23 19:23:01 rillig Exp $
 
 DISTNAME=      t1lib-5.1.2
 PKGREVISION=   6
@@ -36,8 +36,8 @@ CONFIGURE_ARGS+=      --without-x
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     t1lib.config.sample
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     LOCALBASE
 SUBST_STAGE.paths=     pre-configure
 
 post-extract:

Index: pkgsrc/games/0verkill/Makefile
diff -u pkgsrc/games/0verkill/Makefile:1.12 pkgsrc/games/0verkill/Makefile:1.13
--- pkgsrc/games/0verkill/Makefile:1.12 Wed Jul  4 13:40:18 2018
+++ pkgsrc/games/0verkill/Makefile      Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/07/04 13:40:18 jperkin Exp $
+# $NetBSD: Makefile,v 1.13 2019/05/23 19:23:01 rillig Exp $
 
 DISTNAME=      0verkill-0.16
 PKGREVISION=   1
@@ -25,7 +25,7 @@ SUBST_CLASSES+=               prefix
 SUBST_STAGE.prefix=    pre-configure
 SUBST_MESSAGE.prefix=  Fix game configuration path prefix
 SUBST_FILES.prefix=    cfg.h
-SUBST_SED.prefix=      -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.prefix=     PREFIX
 
 CFLAGS.SunOS+=         -Du_int32_t=uint32_t
 

Index: pkgsrc/games/et/Makefile
diff -u pkgsrc/games/et/Makefile:1.19 pkgsrc/games/et/Makefile:1.20
--- pkgsrc/games/et/Makefile:1.19       Wed Jul  4 13:40:19 2018
+++ pkgsrc/games/et/Makefile    Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/07/04 13:40:19 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:01 rillig Exp $
 #
 
 DISTNAME=      et-linux-2.56-2.x86
@@ -26,8 +26,8 @@ INSTALLATION_DIRS=    bin
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/et ${WRKDIR}/etded
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     pre-configure
 
 pre-extract:

Index: pkgsrc/games/onscripter/Makefile
diff -u pkgsrc/games/onscripter/Makefile:1.43 pkgsrc/games/onscripter/Makefile:1.44
--- pkgsrc/games/onscripter/Makefile:1.43       Mon Mar 12 11:16:35 2018
+++ pkgsrc/games/onscripter/Makefile    Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2018/03/12 11:16:35 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2019/05/23 19:23:01 rillig Exp $
 #
 
 DISTNAME=              onscripter-20161102
@@ -26,11 +26,11 @@ USE_TOOLS+= pkg-config
 SUBST_CLASSES+=                fix
 SUBST_STAGE.fix=       pre-configure
 SUBST_FILES.fix=       ${MAKE_FILE}
-SUBST_SED.fix=         -e 's!@RM@!${RM}!g'
-SUBST_SED.fix+=                -e 's!@CXX@!${CXX:Q}!g'
-SUBST_SED.fix+=                -e 's!@LD@!${LD:Q}!g'
-SUBST_SED.fix+=                -e 's!@CXXFLAGS@!${CXXFLAGS:Q}!g'
-SUBST_SED.fix+=                -e 's!@PDA_DEFS@!${PDA_DEFS:Q}!g'
+SUBST_VARS.fix=                RM
+SUBST_VARS.fix+=       CXX
+SUBST_VARS.fix+=       LD
+SUBST_VARS.fix+=       CXXFLAGS
+SUBST_VARS.fix+=       PDA_DEFS
 
 do-install:
 .for f in nsaconv nsadec onscripter sarconv sardec

Index: pkgsrc/games/polyglot/Makefile
diff -u pkgsrc/games/polyglot/Makefile:1.5 pkgsrc/games/polyglot/Makefile:1.6
--- pkgsrc/games/polyglot/Makefile:1.5  Sat Oct  6 11:54:50 2012
+++ pkgsrc/games/polyglot/Makefile      Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2012/10/06 11:54:50 asau Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:01 rillig Exp $
 #
 
 DISTNAME=              polyglot_14
@@ -24,7 +24,7 @@ post-extract:
 SUBST_CLASSES+=                ini
 SUBST_STAGE.ini=       post-configure
 SUBST_FILES.ini=       fruit.ini
-SUBST_SED.ini=         -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.ini=                LOCALBASE
 
 SRCS=          adapter.cpp attack.cpp board.cpp book.cpp book_make.cpp \
                book_merge.cpp colour.cpp engine.cpp epd.cpp fen.cpp    \

Index: pkgsrc/games/xevil/Makefile
diff -u pkgsrc/games/xevil/Makefile:1.24 pkgsrc/games/xevil/Makefile:1.25
--- pkgsrc/games/xevil/Makefile:1.24    Wed Jul 18 00:06:17 2018
+++ pkgsrc/games/xevil/Makefile Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2018/07/18 00:06:17 joerg Exp $
+# $NetBSD: Makefile,v 1.25 2019/05/23 19:23:01 rillig Exp $
 
 DISTNAME=      xevilsrc2.02r2
 PKGNAME=       xevil-2.02
@@ -32,7 +32,7 @@ do-install:
 SUBST_CLASSES+=                uname
 SUBST_STAGE.uname=     pre-configure
 SUBST_FILES.uname=     cmn/utils.cpp
-SUBST_SED.uname=       -e 's,@UNAME@,${UNAME},g'
+SUBST_VARS.uname=      UNAME
 
 .include "../../x11/libXpm/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"

Index: pkgsrc/graphics/camlimages/Makefile
diff -u pkgsrc/graphics/camlimages/Makefile:1.117 pkgsrc/graphics/camlimages/Makefile:1.118
--- pkgsrc/graphics/camlimages/Makefile:1.117   Sun May  5 22:49:48 2019
+++ pkgsrc/graphics/camlimages/Makefile Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.117 2019/05/05 22:49:48 ryoon Exp $
+# $NetBSD: Makefile,v 1.118 2019/05/23 19:23:01 rillig Exp $
 
 VERSION=               4.0.1
 PKGNAME=               camlimages-${VERSION}
@@ -23,9 +23,9 @@ WRKSRC=                       ${WRKDIR}/camlspotter-camlimag
 SUBST_CLASSES+=                omf
 SUBST_STAGE.omf=       pre-configure
 SUBST_FILES.omf=       OMakefile
-SUBST_SED.omf=         -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.omf+=                -e 's,@X11BASE@,${X11BASE},g'
-SUBST_SED.omf+=                -e s%@LDFLAGS@%${LDFLAGS:Q}%g
+SUBST_VARS.omf=                PREFIX
+SUBST_VARS.omf+=       X11BASE
+SUBST_VARS.omf+=       LDFLAGS
 SUBST_SED.omf+=                -e 's,@OCAMLFIND_DESTDIR@,${DESTDIR}${PREFIX}/lib/ocaml/site-lib,g'
 SUBST_SED.omf+=                -e 's,@OCAMLFIND_LDCONF@,/dev/null,g'
 SUBST_MESSAGE.omf=     Fixing vars in OMakefile

Index: pkgsrc/graphics/circos/Makefile
diff -u pkgsrc/graphics/circos/Makefile:1.11 pkgsrc/graphics/circos/Makefile:1.12
--- pkgsrc/graphics/circos/Makefile:1.11        Wed Aug 22 09:45:11 2018
+++ pkgsrc/graphics/circos/Makefile     Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2018/08/22 09:45:11 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2019/05/23 19:23:01 rillig Exp $
 #
 
 DISTNAME=      circos-0.49
@@ -37,7 +37,7 @@ SUBST_CLASSES+=               paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     */*/*/circos*.conf bin/circos
 SUBST_SED.paths+=      -e 's|<<include etc/\(.*\)>>|<<include ${PKG_SYSCONFDIR}/\1>>|g'
-SUBST_SED.paths+=      -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.paths=      PREFIX
 
 REPLACE_PERL+= data/3/make_random_highlights data/6/hist.random.make
 REPLACE_PERL+= svg/textrotation.svg

Index: pkgsrc/graphics/frameworks/Makefile
diff -u pkgsrc/graphics/frameworks/Makefile:1.36 pkgsrc/graphics/frameworks/Makefile:1.37
--- pkgsrc/graphics/frameworks/Makefile:1.36    Wed Nov 14 22:21:37 2018
+++ pkgsrc/graphics/frameworks/Makefile Thu May 23 19:23:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2018/11/14 22:21:37 kleink Exp $
+# $NetBSD: Makefile,v 1.37 2019/05/23 19:23:01 rillig Exp $
 #
 
 DISTNAME=      frameworks-0.3.7
@@ -20,7 +20,7 @@ SUBST_CLASSES=                xdg
 SUBST_STAGE.xdg=       pre-configure
 SUBST_MESSAGE.xdg=     Fixing paths in xdg menu entries.
 SUBST_FILES.xdg=       frameworks.desktop
-SUBST_SED.xdg=         -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.xdg=        PREFIX
 
 INSTALLATION_DIRS=     share/applications share/icons/hicolor/48x48/apps
 

Index: pkgsrc/graphics/libbpg/Makefile
diff -u pkgsrc/graphics/libbpg/Makefile:1.2 pkgsrc/graphics/libbpg/Makefile:1.3
--- pkgsrc/graphics/libbpg/Makefile:1.2 Wed Aug 16 20:21:09 2017
+++ pkgsrc/graphics/libbpg/Makefile     Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2017/08/16 20:21:09 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      libbpg-0.9.2
 CATEGORIES=    graphics
@@ -18,7 +18,7 @@ SUBST_CLASSES+= config
 SUBST_MESSAGE.config= config.h file substitutions
 SUBST_STAGE.config= pre-configure
 SUBST_FILES.config= config.h
-SUBST_SED.config=      -e "s,@PREFIX@,${PREFIX},g"
+SUBST_VARS.config=     PREFIX
 
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"

Index: pkgsrc/graphics/magicpoint/Makefile
diff -u pkgsrc/graphics/magicpoint/Makefile:1.100 pkgsrc/graphics/magicpoint/Makefile:1.101
--- pkgsrc/graphics/magicpoint/Makefile:1.100   Wed Aug 22 09:45:14 2018
+++ pkgsrc/graphics/magicpoint/Makefile Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.100 2018/08/22 09:45:14 wiz Exp $
+# $NetBSD: Makefile,v 1.101 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=              magicpoint-1.13a
 PKGREVISION=           30
@@ -54,9 +54,9 @@ MGP_PRE_STAGE=                ctlwords.h grammar.c sca
 
 SUBST_CLASSES+=                conf
 SUBST_FILES.conf+=     sample/default.mgp
-SUBST_SED.conf+=       -e 's|@MGP_TFONT@|${MGP_TFONT}|g'
-SUBST_SED.conf+=       -e 's|@MGP_VFONT@|${MGP_VFONT}|g'
-SUBST_SED.conf+=       -e 's|@MGP_XFONT@|${MGP_XFONT}|g'
+SUBST_VARS.conf=       MGP_TFONT
+SUBST_VARS.conf+=      MGP_VFONT
+SUBST_VARS.conf+=      MGP_XFONT
 SUBST_STAGE.conf=      post-configure
 
 post-configure:

Index: pkgsrc/graphics/xpaint/Makefile
diff -u pkgsrc/graphics/xpaint/Makefile:1.76 pkgsrc/graphics/xpaint/Makefile:1.77
--- pkgsrc/graphics/xpaint/Makefile:1.76        Wed Oct 14 20:17:27 2015
+++ pkgsrc/graphics/xpaint/Makefile     Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.76 2015/10/14 20:17:27 wiz Exp $
+# $NetBSD: Makefile,v 1.77 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      xpaint-2.7.8.1
 PKGREVISION=   11
@@ -17,8 +17,8 @@ MAKE_JOBS_SAFE=               NO
 SUBST_CLASSES+=                foo
 SUBST_STAGE.foo=       pre-configure
 SUBST_FILES.foo=       Local.config configure
-SUBST_SED.foo=         -e "s|@LOCALBASE@|${LOCALBASE}|g"
-SUBST_SED.foo+=                -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.foo=                LOCALBASE
+SUBST_VARS.foo+=       PREFIX
 SUBST_SED.foo+=                -e "s|@XAWDIR@|${BUILDLINK_PREFIX.libXaw3d}|g"
 SUBST_SED.foo+=                -e "s|@XPMDIR@|${BUILDLINK_PREFIX.libXpm}|g"
 

Index: pkgsrc/graphics/xv/Makefile
diff -u pkgsrc/graphics/xv/Makefile:1.93 pkgsrc/graphics/xv/Makefile:1.94
--- pkgsrc/graphics/xv/Makefile:1.93    Thu Feb 21 01:37:14 2019
+++ pkgsrc/graphics/xv/Makefile Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.93 2019/02/21 01:37:14 tsutsui Exp $
+# $NetBSD: Makefile,v 1.94 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      xv-3.10a
 PKGREVISION=   25
@@ -38,7 +38,7 @@ BUILD_TARGET= depend all
 
 SUBST_CLASSES+=                gspath
 SUBST_FILES.gspath=    config.h
-SUBST_SED.gspath=      -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.gspath=     PREFIX
 SUBST_STAGE.gspath=    post-configure
 SUBST_MESSAGE.gspath=  Fixing path to ghostscript interpreter.
 

Index: pkgsrc/lang/clojure/Makefile
diff -u pkgsrc/lang/clojure/Makefile:1.5 pkgsrc/lang/clojure/Makefile:1.6
--- pkgsrc/lang/clojure/Makefile:1.5    Mon Jan  1 18:16:36 2018
+++ pkgsrc/lang/clojure/Makefile        Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/01/01 18:16:36 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      clojure-1.5.1
 CATEGORIES=    lang
@@ -30,7 +30,7 @@ SUBST_STAGE.java=     pre-install
 SUBST_MESSAGE.java=    Set Java
 SUBST_FILES.java=      clj.sh
 SUBST_SED.java=                -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
-SUBST_SED.java+=       -e 's,@SH@,${SH},'
+SUBST_VARS.java=       SH
 
 pre-patch:
        ${INSTALL_DATA} ${FILESDIR}/clj.sh ${WRKSRC}

Index: pkgsrc/lang/ghc/Makefile
diff -u pkgsrc/lang/ghc/Makefile:1.58 pkgsrc/lang/ghc/Makefile:1.59
--- pkgsrc/lang/ghc/Makefile:1.58       Wed Aug 22 09:45:20 2018
+++ pkgsrc/lang/ghc/Makefile    Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2018/08/22 09:45:20 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      ghc-6.8.3
 PKGREVISION=   8
@@ -37,7 +37,7 @@ SUBST_FILES.prefix+=  ../ghc-6.4.2/librar
 SUBST_FILES.prefix+=   libraries/readline/configure
 SUBST_FILES.prefix+=   libraries/readline/readline.cabal
 SUBST_FILES.prefix+=   rts/package.conf.in
-SUBST_SED.prefix=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.prefix=     PREFIX
 
 pre-configure:
        cd ${WRKDIR}/ghc-6.4.2 && \

Index: pkgsrc/lang/ghc-bootstrap/Makefile
diff -u pkgsrc/lang/ghc-bootstrap/Makefile:1.6 pkgsrc/lang/ghc-bootstrap/Makefile:1.7
--- pkgsrc/lang/ghc-bootstrap/Makefile:1.6      Wed Aug 22 09:45:20 2018
+++ pkgsrc/lang/ghc-bootstrap/Makefile  Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2018/08/22 09:45:20 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      ghc-6.8.3
 PKGNAME=       ghc-bootstrap-6.8.3
@@ -37,7 +37,7 @@ SUBST_FILES.prefix+=  mk/bootstrap.mk
 SUBST_FILES.prefix+=   libraries/readline/configure
 SUBST_FILES.prefix+=   libraries/readline/readline.cabal
 SUBST_FILES.prefix+=   rts/package.conf.in
-SUBST_SED.prefix=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.prefix=     PREFIX
 
 #
 # Build system settings.

Index: pkgsrc/lang/mono/Makefile
diff -u pkgsrc/lang/mono/Makefile:1.184 pkgsrc/lang/mono/Makefile:1.185
--- pkgsrc/lang/mono/Makefile:1.184     Thu Apr 25 07:33:03 2019
+++ pkgsrc/lang/mono/Makefile   Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.184 2019/04/25 07:33:03 maya Exp $
+# $NetBSD: Makefile,v 1.185 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      mono-4.0.4.1
 PKGREVISION=   16
@@ -134,7 +134,7 @@ SUBST_CLASSES+=                     fix-libx11
 SUBST_STAGE.fix-libx11=                pre-configure
 SUBST_MESSAGE.fix-libx11=      Fixing libX11 search path configuration
 SUBST_FILES.fix-libx11=                configure
-SUBST_SED.fix-libx11=          -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.fix-libx11=         X11BASE
 
 PLIST_VARS=    libgc monodoc
 

Index: pkgsrc/lang/mono2/Makefile
diff -u pkgsrc/lang/mono2/Makefile:1.34 pkgsrc/lang/mono2/Makefile:1.35
--- pkgsrc/lang/mono2/Makefile:1.34     Thu Apr 25 07:33:03 2019
+++ pkgsrc/lang/mono2/Makefile  Thu May 23 19:23:02 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2019/04/25 07:33:03 maya Exp $
+# $NetBSD: Makefile,v 1.35 2019/05/23 19:23:02 rillig Exp $
 
 DISTNAME=      mono-2.10.9
 PKGREVISION=   28
@@ -143,7 +143,7 @@ SUBST_CLASSES+=                     fix-libx11
 SUBST_STAGE.fix-libx11=                pre-configure
 SUBST_MESSAGE.fix-libx11=      Fixing libX11 search path configuration
 SUBST_FILES.fix-libx11=                configure
-SUBST_SED.fix-libx11=          -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.fix-libx11=         X11BASE
 
 .include "../../mk/bsd.prefs.mk"
 

Index: pkgsrc/lang/openjdk7/Makefile
diff -u pkgsrc/lang/openjdk7/Makefile:1.133 pkgsrc/lang/openjdk7/Makefile:1.134
--- pkgsrc/lang/openjdk7/Makefile:1.133 Wed Mar 20 11:55:11 2019
+++ pkgsrc/lang/openjdk7/Makefile       Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.133 2019/03/20 11:55:11 wiz Exp $
+# $NetBSD: Makefile,v 1.134 2019/05/23 19:23:03 rillig Exp $
 
 JDK_MICRO=     141
 DISTNAME=      openjdk-1.7.${JDK_MICRO}-20170813
@@ -194,8 +194,8 @@ SUBST_STAGE.fontpaths=              pre-build
 SUBST_MESSAGE.fontpaths=       fixing font paths
 SUBST_FILES.fontpaths=         jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties
 SUBST_FILES.fontpaths+=                jdk/src/solaris/native/sun/awt/fontpath.c
-SUBST_SED.fontpaths=           -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.fontpaths+=          -e 's|@BUILDLINK_PREFIX.fontconfig@|${BUILDLINK_PREFIX.fontconfig}|g'
+SUBST_VARS.fontpaths=          PREFIX
+SUBST_VARS.fontpaths+=         BUILDLINK_PREFIX.fontconfig
 
 PLIST_VARS+=   i386
 .if ${MACHINE_ARCH} == "i386"

Index: pkgsrc/lang/openjdk8/Makefile
diff -u pkgsrc/lang/openjdk8/Makefile:1.77 pkgsrc/lang/openjdk8/Makefile:1.78
--- pkgsrc/lang/openjdk8/Makefile:1.77  Wed Mar 20 11:10:25 2019
+++ pkgsrc/lang/openjdk8/Makefile       Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2019/03/20 11:10:25 wiz Exp $
+# $NetBSD: Makefile,v 1.78 2019/05/23 19:23:03 rillig Exp $
 
 DISTNAME=      openjdk-1.8.202-20190219
 PKGNAME=       openjdk8-1.8.202
@@ -159,8 +159,8 @@ SUBST_STAGE.fontpaths=              pre-build
 SUBST_MESSAGE.fontpaths=       fixing font paths
 SUBST_FILES.fontpaths=         jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties
 SUBST_FILES.fontpaths+=                jdk/src/solaris/native/sun/awt/fontpath.c
-SUBST_SED.fontpaths=           -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.fontpaths+=          -e 's|@BUILDLINK_PREFIX.fontconfig@|${BUILDLINK_PREFIX.fontconfig}|g'
+SUBST_VARS.fontpaths=          PREFIX
+SUBST_VARS.fontpaths+=         BUILDLINK_PREFIX.fontconfig
 
 SUBST_CLASSES+=                        zlibpath
 SUBST_STAGE.zlibpath=          pre-build

Index: pkgsrc/lang/pear/Makefile
diff -u pkgsrc/lang/pear/Makefile:1.47 pkgsrc/lang/pear/Makefile:1.48
--- pkgsrc/lang/pear/Makefile:1.47      Tue Apr 30 03:29:07 2019
+++ pkgsrc/lang/pear/Makefile   Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2019/04/30 03:29:07 taca Exp $
+# $NetBSD: Makefile,v 1.48 2019/05/23 19:23:03 rillig Exp $
 #
 
 DISTNAME=      PEAR-1.10.9
@@ -55,8 +55,8 @@ DISTFILES+=           ${XMLUTIL_SRCS}
 SUBST_CLASSES+=                config
 SUBST_STAGE.config=    pre-configure
 SUBST_FILES.config=    install/go-pear.php
-SUBST_SED.config=      -e "s|@WRKSRC@|${WRKSRC}|g"
-SUBST_SED.config+=     -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.config=     WRKSRC
+SUBST_VARS.config+=    PREFIX
 SUBST_MESSAGE.config=  Fixing configuration files.
 
 REPLACE_SH+=           script/pear.sh

Index: pkgsrc/lang/php56/Makefile
diff -u pkgsrc/lang/php56/Makefile:1.21 pkgsrc/lang/php56/Makefile:1.22
--- pkgsrc/lang/php56/Makefile:1.21     Sun Mar 31 20:48:40 2019
+++ pkgsrc/lang/php56/Makefile  Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2019/03/31 20:48:40 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:23:03 rillig Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -37,8 +37,8 @@ SUBST_STAGE.path=     pre-configure
 SUBST_FILES.path=      ext/phar/phar/phar.php
 SUBST_FILES.path+=     php.ini-development php.ini-production run-tests.php
 SUBST_FILES.path+=     sapi/cgi/Makefile.frag
-SUBST_SED.path=                -e 's,@CGIDIR@,${CGIDIR},g'
-SUBST_SED.path+=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.path=       CGIDIR
+SUBST_VARS.path+=      PREFIX
 
 INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
 

Index: pkgsrc/lang/php71/Makefile
diff -u pkgsrc/lang/php71/Makefile:1.18 pkgsrc/lang/php71/Makefile:1.19
--- pkgsrc/lang/php71/Makefile:1.18     Sat Jan 12 14:56:47 2019
+++ pkgsrc/lang/php71/Makefile  Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2019/01/12 14:56:47 taca Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:03 rillig Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -36,8 +36,8 @@ SUBST_STAGE.path=     pre-configure
 SUBST_FILES.path=      ext/phar/phar/phar.php
 SUBST_FILES.path+=     php.ini-development php.ini-production run-tests.php
 SUBST_FILES.path+=     sapi/cgi/Makefile.frag
-SUBST_SED.path=                -e 's,@CGIDIR@,${CGIDIR},g'
-SUBST_SED.path+=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.path=       CGIDIR
+SUBST_VARS.path+=      PREFIX
 
 INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
 

Index: pkgsrc/lang/php72/Makefile
diff -u pkgsrc/lang/php72/Makefile:1.18 pkgsrc/lang/php72/Makefile:1.19
--- pkgsrc/lang/php72/Makefile:1.18     Tue Mar 12 04:13:42 2019
+++ pkgsrc/lang/php72/Makefile  Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2019/03/12 04:13:42 taca Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:03 rillig Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -35,8 +35,8 @@ SUBST_STAGE.path=     pre-configure
 SUBST_FILES.path=      ext/phar/phar/phar.php
 SUBST_FILES.path+=     php.ini-development php.ini-production run-tests.php
 SUBST_FILES.path+=     sapi/cgi/Makefile.frag
-SUBST_SED.path=                -e 's,@CGIDIR@,${CGIDIR},g'
-SUBST_SED.path+=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.path=       CGIDIR
+SUBST_VARS.path+=      PREFIX
 
 INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
 

Index: pkgsrc/lang/php73/Makefile
diff -u pkgsrc/lang/php73/Makefile:1.3 pkgsrc/lang/php73/Makefile:1.4
--- pkgsrc/lang/php73/Makefile:1.3      Tue Mar 12 04:15:03 2019
+++ pkgsrc/lang/php73/Makefile  Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2019/03/12 04:15:03 taca Exp $
+# $NetBSD: Makefile,v 1.4 2019/05/23 19:23:03 rillig Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -35,8 +35,8 @@ SUBST_STAGE.path=     pre-configure
 SUBST_FILES.path=      ext/phar/phar/phar.php
 SUBST_FILES.path+=     php.ini-development php.ini-production run-tests.php
 SUBST_FILES.path+=     sapi/cgi/Makefile.frag
-SUBST_SED.path=                -e 's,@CGIDIR@,${CGIDIR},g'
-SUBST_SED.path+=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.path=       CGIDIR
+SUBST_VARS.path+=      PREFIX
 
 INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
 

Index: pkgsrc/lang/ruby/platform.mk
diff -u pkgsrc/lang/ruby/platform.mk:1.4 pkgsrc/lang/ruby/platform.mk:1.5
--- pkgsrc/lang/ruby/platform.mk:1.4    Tue Aug 29 14:47:35 2017
+++ pkgsrc/lang/ruby/platform.mk        Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.4 2017/08/29 14:47:35 jmcneill Exp $
+# $NetBSD: platform.mk,v 1.5 2019/05/23 19:23:03 rillig Exp $
 #
 
 #
@@ -23,7 +23,7 @@ REQD_DIRS+=   ${GEM_HOME}/doc
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-install
 SUBST_FILES.conf=      lib/rubygems/config_file.rb
-SUBST_SED.conf=                -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.conf=       PKG_SYSCONFDIR
 SUBST_MESSAGE.conf=    Fixing configuration files.
 
 #

Index: pkgsrc/lang/sather/Makefile
diff -u pkgsrc/lang/sather/Makefile:1.65 pkgsrc/lang/sather/Makefile:1.66
--- pkgsrc/lang/sather/Makefile:1.65    Wed Aug 22 09:45:22 2018
+++ pkgsrc/lang/sather/Makefile Thu May 23 19:23:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2018/08/22 09:45:22 wiz Exp $
+# $NetBSD: Makefile,v 1.66 2019/05/23 19:23:03 rillig Exp $
 
 DISTNAME=              sather-1.2.3
 PKGREVISION=           14
@@ -39,16 +39,16 @@ SUBST_FILES.sather-configure=                       \
        Browser/Web/gen_mml_sa_files            \
        Browser/Web/gen_mml_shortflat           \
        Browser/Web/graph2dot
-SUBST_SED.sather-configure=    -e s:@CC@:${CC:Q}:g
-SUBST_SED.sather-configure+=   -e s:@CFLAGS@:${CFLAGS:Q}:g
-SUBST_SED.sather-configure+=   -e s:@GMAKE@:${GMAKE:Q}:g
-SUBST_SED.sather-configure+=   -e s:@PREFIX@:${PREFIX}:g
-SUBST_SED.sather-configure+=   -e s:@X11BASE@:${X11BASE}:g
+SUBST_VARS.sather-configure=   CC
+SUBST_VARS.sather-configure+=  CFLAGS
+SUBST_VARS.sather-configure+=  GMAKE
+SUBST_VARS.sather-configure+=  PREFIX
+SUBST_VARS.sather-configure+=  X11BASE
 SUBST_SED.sather-configure+=   -e s:@GC_PREFIX@:${BUILDLINK_PREFIX.boehm-gc}:g
 SUBST_SED.sather-configure+=   -e s:@TCL_PREFIX@:${BUILDLINK_PREFIX.tcl}:g
 SUBST_SED.sather-configure+=   -e s:@TK_PREFIX@:${BUILDLINK_PREFIX.tk}:g
-SUBST_SED.sather-configure+=   -e s:@LINKER_RPATH_FLAG@:${LINKER_RPATH_FLAG}:g
-SUBST_SED.sather-configure+=   -e s:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g
+SUBST_VARS.sather-configure+=  LINKER_RPATH_FLAG
+SUBST_VARS.sather-configure+=  COMPILER_RPATH_FLAG
 
 INSTALLATION_DIRS=     bin ${PKGINFODIR} ${PKGMANDIR}/man1 share/doc/sather \
                        lib/sather lib/sather/Bin share/emacs/site-lisp

Index: pkgsrc/lang/sbcl/Makefile
diff -u pkgsrc/lang/sbcl/Makefile:1.78 pkgsrc/lang/sbcl/Makefile:1.79
--- pkgsrc/lang/sbcl/Makefile:1.78      Wed Oct 17 12:59:49 2018
+++ pkgsrc/lang/sbcl/Makefile   Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.78 2018/10/17 12:59:49 leot Exp $
+# $NetBSD: Makefile,v 1.79 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=              ${PKGNAME_NOREV}-source
 PKGNAME=               sbcl-1.4.3
@@ -57,14 +57,14 @@ SUBST_CLASSES+=                     fix-paths
 SUBST_STAGE.fix-paths=         pre-configure
 SUBST_MESSAGE.fix-paths=       Fixing absolute paths.
 SUBST_FILES.fix-paths=         install.sh src/runtime/runtime.c doc/sbcl.1
-SUBST_SED.fix-paths=           -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.fix-paths=          PREFIX
 SUBST_SED.fix-paths+=           -e 's,/var/log,${VARBASE}/log,g'
 
 SUBST_CLASSES+=                        fix-gtar
 SUBST_STAGE.fix-gtar=          pre-configure
 SUBST_MESSAGE.fix-gtar=                Fixing GNU tar references.
 SUBST_FILES.fix-gtar=          contrib/asdf-install/installer.lisp
-SUBST_SED.fix-gtar=            -e 's,@GTAR@,${GTAR},'
+SUBST_VARS.fix-gtar=           GTAR
 
 SUBST_CLASSES+=                        fix-bins
 SUBST_STAGE.fix-bins=          pre-configure

Index: pkgsrc/lang/scala/Makefile
diff -u pkgsrc/lang/scala/Makefile:1.13 pkgsrc/lang/scala/Makefile:1.14
--- pkgsrc/lang/scala/Makefile:1.13     Sun Dec 16 10:07:11 2018
+++ pkgsrc/lang/scala/Makefile  Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/12/16 10:07:11 ryoon Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      scala-2.12.8
 CATEGORIES=    lang
@@ -23,9 +23,9 @@ SCALA_HOME=   ${PREFIX}/share/${DISTNAME}
 SUBST_CLASSES+=                scala
 SUBST_FILES.scala=     bin/fsc bin/scala bin/scalac bin/scaladoc bin/scalap
 SUBST_STAGE.scala=     pre-configure
-SUBST_SED.scala=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.scala=      PREFIX
 SUBST_SED.scala+=      -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
-SUBST_SED.scala+=      -e 's,@SCALA_HOME@,${SCALA_HOME},g'
+SUBST_VARS.scala+=     SCALA_HOME
 
 PLIST_SUBST+=  DISTNAME=${DISTNAME}
 

Index: pkgsrc/lang/tinyscheme/Makefile
diff -u pkgsrc/lang/tinyscheme/Makefile:1.18 pkgsrc/lang/tinyscheme/Makefile:1.19
--- pkgsrc/lang/tinyscheme/Makefile:1.18        Tue Apr 29 19:18:16 2014
+++ pkgsrc/lang/tinyscheme/Makefile     Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2014/04/29 19:18:16 agc Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      tinyscheme-1.40
 CATEGORIES=    lang
@@ -24,7 +24,7 @@ SUBST_CLASSES+=               initpath
 SUBST_STAGE.initpath=  pre-configure
 SUBST_MESSAGE.initpath=        Fix location of init.scm file
 SUBST_FILES.initpath=  scheme.c
-SUBST_SED.initpath=    -e 's|@PREFIX@|${PREFIX}|'
+SUBST_VARS.initpath=   PREFIX
 
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/mail/amavisd-new/Makefile
diff -u pkgsrc/mail/amavisd-new/Makefile:1.24 pkgsrc/mail/amavisd-new/Makefile:1.25
--- pkgsrc/mail/amavisd-new/Makefile:1.24       Sun Dec  9 21:05:33 2018
+++ pkgsrc/mail/amavisd-new/Makefile    Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2018/12/09 21:05:33 adam Exp $
+# $NetBSD: Makefile,v 1.25 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      amavisd-new-${VERSION}${PATCHLEVEL}
 PKGNAME=       amavisd-new-${VERSION}${PATCHLEVEL:S/-//}
@@ -84,12 +84,12 @@ SUBST_CLASSES+=             amavisd
 SUBST_STAGE.amavisd=   pre-build
 SUBST_FILES.amavisd=   amavisd amavisd.conf
 SUBST_SED.amavisd=     -e "s|/etc/amavisd.conf|${PKG_SYSCONFDIR}/amavisd.conf|"
-SUBST_SED.amavisd+=    -e "s|@AMAVIS_DIR@|${AMAVIS_DIR}|g"
-SUBST_SED.amavisd+=    -e "s|@AMAVIS_USER@|${AMAVIS_USER}|g"
-SUBST_SED.amavisd+=    -e "s|@AMAVIS_GROUP@|${AMAVIS_GROUP}|g"
-SUBST_SED.amavisd+=    -e "s|@AMAVIS_QUARANTINE@|${AMAVIS_QUARANTINE}|g"
-SUBST_SED.amavisd+=    -e "s|@LOCALBASE@|${LOCALBASE}|g"
-SUBST_SED.amavisd+=    -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.amavisd=    AMAVIS_DIR
+SUBST_VARS.amavisd+=   AMAVIS_USER
+SUBST_VARS.amavisd+=   AMAVIS_GROUP
+SUBST_VARS.amavisd+=   AMAVIS_QUARANTINE
+SUBST_VARS.amavisd+=   LOCALBASE
+SUBST_VARS.amavisd+=   PREFIX
 
 INSTALLATION_DIRS+=    sbin ${DOCDIR} ${EGDIR}
 

Index: pkgsrc/mail/courier-maildir/Makefile
diff -u pkgsrc/mail/courier-maildir/Makefile:1.34 pkgsrc/mail/courier-maildir/Makefile:1.35
--- pkgsrc/mail/courier-maildir/Makefile:1.34   Wed Aug 22 09:45:24 2018
+++ pkgsrc/mail/courier-maildir/Makefile        Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2018/08/22 09:45:24 wiz Exp $
+# $NetBSD: Makefile,v 1.35 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      courier-${COURIER_VERSION}
 PKGNAME=       ${DISTNAME:S/-/-maildir-/}
@@ -57,12 +57,12 @@ CONF_FILES_PERMS+=  ${EGDIR}/sharedindexu
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/sharedindexupdate.sh
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=      -e 's,@MKDIR@,${MKDIR},g'
-SUBST_SED.paths+=      -e 's,@RM@,${RM},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
-SUBST_SED.paths+=      -e 's,@TEST@,${TEST},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     MKDIR
+SUBST_VARS.paths+=     RM
+SUBST_VARS.paths+=     SH
+SUBST_VARS.paths+=     TEST
 SUBST_STAGE.paths=     pre-configure
 
 post-extract:

Index: pkgsrc/mail/courier-mta/Makefile
diff -u pkgsrc/mail/courier-mta/Makefile:1.52 pkgsrc/mail/courier-mta/Makefile:1.53
--- pkgsrc/mail/courier-mta/Makefile:1.52       Wed Aug 22 09:45:24 2018
+++ pkgsrc/mail/courier-mta/Makefile    Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2018/08/22 09:45:24 wiz Exp $
+# $NetBSD: Makefile,v 1.53 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      courier-${COURIER_VERSION}
 PKGNAME=       ${DISTNAME:S/-/-mta-/}
@@ -81,7 +81,7 @@ SUBST_STAGE.perms=    pre-configure
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/mailer.conf
-SUBST_SED.paths+=      -e "s,@PREFIX@,${PREFIX},g"
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 REPLACE_PERL+= courier/webadmin/*.pl courier/webadmin/*.pl.in webadmin/*.pl

Index: pkgsrc/mail/deliver/Makefile
diff -u pkgsrc/mail/deliver/Makefile:1.18 pkgsrc/mail/deliver/Makefile:1.19
--- pkgsrc/mail/deliver/Makefile:1.18   Wed Jul  4 13:40:23 2018
+++ pkgsrc/mail/deliver/Makefile        Thu May 23 19:23:04 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/07/04 13:40:23 jperkin Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:04 rillig Exp $
 
 DISTNAME=      deliver-2.1.14
 PKGREVISION=   3
@@ -38,7 +38,7 @@ SUBST_STAGE.sources=          pre-configure
 SUBST_MESSAGE.sources=         Fixing source code.
 SUBST_FILES.sources=           config.h deliver.8 conf/os-netbsd.h
 SUBST_SED.sources=             -e 's,@DELIVER_CONF_PREFIX@,${PKG_SYSCONFDIR},g'
-SUBST_SED.sources+=            -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.sources=            PREFIX
 
 pre-configure:
        set -e; cd ${WRKSRC};                                                   \

Index: pkgsrc/mail/dkim-milter/Makefile
diff -u pkgsrc/mail/dkim-milter/Makefile:1.32 pkgsrc/mail/dkim-milter/Makefile:1.33
--- pkgsrc/mail/dkim-milter/Makefile:1.32       Tue Aug  1 14:59:01 2017
+++ pkgsrc/mail/dkim-milter/Makefile    Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2017/08/01 14:59:01 wiz Exp $
+# $NetBSD: Makefile,v 1.33 2019/05/23 19:23:05 rillig Exp $
 
 DISTNAME=      dkim-milter-2.8.3
 PKGREVISION=   5
@@ -40,8 +40,8 @@ SUBST_SED.libs+=      -e 's|@SSLBASE@|${BUILD
 SUBST_SED.libs+=       -e 's|@LMBASE@|${BUILDLINK_PREFIX.libmilter}|g'
 SUBST_SED.libs+=       -e 's|@PTHREAD@|${BUILDLINK_PREFIX.pthread}|g'
 SUBST_SED.libs+=       -e 's|@PTHREAD_LDFLAGS@|${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}|g'
-SUBST_SED.libs+=       -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.libs+=       -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
+SUBST_VARS.libs=       PREFIX
+SUBST_VARS.libs+=      PKGMANDIR
 SUBST_SED.libs+=       -e 's|/etc/mail|${PKG_SYSCONFDIR}|g'
 SUBST_SED.libs+=       -e 's|.I /etc/dkim-filter.conf|.I ${PKG_SYSCONFDIR}/dkim-filter.conf|g'
 SUBST_MESSAGE.libs=    Fixing Makefile references and man pages.

Index: pkgsrc/mail/dot-forward/Makefile
diff -u pkgsrc/mail/dot-forward/Makefile:1.26 pkgsrc/mail/dot-forward/Makefile:1.27
--- pkgsrc/mail/dot-forward/Makefile:1.26       Fri Sep  1 04:02:11 2017
+++ pkgsrc/mail/dot-forward/Makefile    Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2017/09/01 04:02:11 schmonz Exp $
+# $NetBSD: Makefile,v 1.27 2019/05/23 19:23:05 rillig Exp $
 #
 
 DISTNAME=              dot-forward-0.71
@@ -22,7 +22,7 @@ INSTALLATION_DIRS=    ${PKGMANDIR}
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     hier.c
-SUBST_SED.paths=       -e 's,@PKGMANDIR@,${PKGMANDIR},g'
+SUBST_VARS.paths=      PKGMANDIR
 
 .include "../../mk/djbware.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/mail/dovecot/Makefile
diff -u pkgsrc/mail/dovecot/Makefile:1.193 pkgsrc/mail/dovecot/Makefile:1.194
--- pkgsrc/mail/dovecot/Makefile:1.193  Wed Apr  3 00:32:51 2019
+++ pkgsrc/mail/dovecot/Makefile        Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.193 2019/04/03 00:32:51 ryoon Exp $
+# $NetBSD: Makefile,v 1.194 2019/05/23 19:23:05 rillig Exp $
 
 DOVECOT_VERSION=       1.2
 DOVECOT_SUBVERSION=    .17
@@ -52,7 +52,7 @@ INSTALLATION_DIRS+=   libexec/dovecot sbin
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     dovecot-example.conf
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 BUILD_DEFS+=           VARBASE

Index: pkgsrc/mail/dspam/Makefile
diff -u pkgsrc/mail/dspam/Makefile:1.97 pkgsrc/mail/dspam/Makefile:1.98
--- pkgsrc/mail/dspam/Makefile:1.97     Wed Apr  3 00:32:51 2019
+++ pkgsrc/mail/dspam/Makefile  Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.97 2019/04/03 00:32:51 ryoon Exp $
+# $NetBSD: Makefile,v 1.98 2019/05/23 19:23:05 rillig Exp $
 
 DISTNAME=      dspam-3.10.2
 PKGREVISION=   25
@@ -117,9 +117,9 @@ SUBST_STAGE.conf=   pre-install
 SUBST_FILES.conf=      src/dspam.conf.in
 SUBST_SED.conf=                -e "s|@dspam_home@|${DSPAM_HOME}|g"
 SUBST_SED.conf+=       -e "s|@delivery_agent@|${DSPAM_DELIVERY_AGENT_BIN}|g"
-SUBST_SED.conf+=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.conf+=       -e "s|@VARBASE@|${VARBASE}|g"
-SUBST_SED.conf+=       -e "s|@DSPAM_PIDDIR@|${DSPAM_PIDDIR}|g"
+SUBST_VARS.conf=       PREFIX
+SUBST_VARS.conf+=      VARBASE
+SUBST_VARS.conf+=      DSPAM_PIDDIR
 SUBST_MESSAGE.conf=    Fixing configuration file.
 
 post-extract:

Index: pkgsrc/mail/exim3/Makefile
diff -u pkgsrc/mail/exim3/Makefile:1.53 pkgsrc/mail/exim3/Makefile:1.54
--- pkgsrc/mail/exim3/Makefile:1.53     Wed Aug 22 09:45:25 2018
+++ pkgsrc/mail/exim3/Makefile  Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2018/08/22 09:45:25 wiz Exp $
+# $NetBSD: Makefile,v 1.54 2019/05/23 19:23:05 rillig Exp $
 
 DISTNAME=      exim-3.36
 PKGREVISION=   19
@@ -73,12 +73,12 @@ MAKE_ENV+=          LOOKUP_LIBS=${LOOKUP_LIBS:Q}
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     Local/Makefile.pkgsrc ${WRKDIR}/mailer.conf
 SUBST_FILES.paths+=    ${WRKDIR}/exim_newaliases
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=      -e 's,@GZIP_CMD@,${GZIP_CMD},g'
-SUBST_SED.paths+=      -e 's,@GZCAT@,${GZCAT},g'
-SUBST_SED.paths+=      -e 's,@PERL5@,${PERL5},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     GZIP_CMD
+SUBST_VARS.paths+=     GZCAT
+SUBST_VARS.paths+=     PERL5
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin share/examples/exim

Index: pkgsrc/mail/fastforward/Makefile
diff -u pkgsrc/mail/fastforward/Makefile:1.25 pkgsrc/mail/fastforward/Makefile:1.26
--- pkgsrc/mail/fastforward/Makefile:1.25       Fri Sep  1 03:58:45 2017
+++ pkgsrc/mail/fastforward/Makefile    Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2017/09/01 03:58:45 schmonz Exp $
+# $NetBSD: Makefile,v 1.26 2019/05/23 19:23:05 rillig Exp $
 #
 
 DISTNAME=              fastforward-0.51
@@ -24,7 +24,7 @@ SUBST_FILES.djbware+= cdb_seek.c
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     hier.c
-SUBST_SED.paths=       -e 's,@PKGMANDIR@,${PKGMANDIR},g'
+SUBST_VARS.paths=      PKGMANDIR
 
 .include "../../mk/djbware.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/mail/fml4/Makefile
diff -u pkgsrc/mail/fml4/Makefile:1.19 pkgsrc/mail/fml4/Makefile:1.20
--- pkgsrc/mail/fml4/Makefile:1.19      Tue Apr 30 03:38:59 2019
+++ pkgsrc/mail/fml4/Makefile   Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2019/04/30 03:38:59 taca Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:05 rillig Exp $
 #
 
 DISTNAME=      fml-4.0-stable-20040215
@@ -35,8 +35,8 @@ REPLACE_PERL= databases/examples/ldap-to
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths+=    sbin/makefml
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX:Q},g'
-SUBST_SED.paths+=      -e 's,@FML_DATADIR@,${FML_DATADIR:Q},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     FML_DATADIR
 SUBST_STAGE.paths=     pre-configure
 
 MAKE_ENV+=             _PATH_PERL=${PERL5} HOSTNAME="fml.example.net"

Index: pkgsrc/mail/freepops/Makefile
diff -u pkgsrc/mail/freepops/Makefile:1.38 pkgsrc/mail/freepops/Makefile:1.39
--- pkgsrc/mail/freepops/Makefile:1.38  Thu Dec 13 19:52:07 2018
+++ pkgsrc/mail/freepops/Makefile       Thu May 23 19:23:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2018/12/13 19:52:07 adam Exp $
+# $NetBSD: Makefile,v 1.39 2019/05/23 19:23:05 rillig Exp $
 #
 
 DISTNAME=      freepops-0.2.9
@@ -42,9 +42,9 @@ SUBST_CLASSES+=               paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     config.h doc/freepopsd.1 src/freepops.h
 SUBST_FILES.paths+=    src/lua/freepops.lua
-SUBST_SED.paths=       -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.paths+=      -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.paths+=      -e 's|@VARBASE@|${VARBASE}|g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     VARBASE
 SUBST_MESSAGE.paths=   Adjusting paths.
 
 BUILD_DEFS+=           VARBASE

Index: pkgsrc/mail/imp/Makefile
diff -u pkgsrc/mail/imp/Makefile:1.65 pkgsrc/mail/imp/Makefile:1.66
--- pkgsrc/mail/imp/Makefile:1.65       Wed Aug 16 20:21:10 2017
+++ pkgsrc/mail/imp/Makefile    Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2017/08/16 20:21:10 wiz Exp $
+# $NetBSD: Makefile,v 1.66 2019/05/23 19:23:06 rillig Exp $
 
 DISTNAME=      imp-h3-${IMPVER}
 PKGNAME=       imp-${IMPVER}
@@ -74,7 +74,7 @@ CONF_FILES_PERMS+=    ${IMPDIR}/config/trai
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     imp.conf.dist
-SUBST_SED.files=       -e "s|@IMPDIR@|${IMPDIR}|g"
+SUBST_VARS.files=      IMPDIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 REPLACE_INTERPRETER+=  php

Index: pkgsrc/mail/ingo/Makefile
diff -u pkgsrc/mail/ingo/Makefile:1.26 pkgsrc/mail/ingo/Makefile:1.27
--- pkgsrc/mail/ingo/Makefile:1.26      Wed Aug 16 20:21:10 2017
+++ pkgsrc/mail/ingo/Makefile   Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2017/08/16 20:21:10 wiz Exp $
+# $NetBSD: Makefile,v 1.27 2019/05/23 19:23:06 rillig Exp $
 
 DISTNAME=      ingo-h3-${INGOVER}
 PKGNAME=       ingo-${INGOVER}
@@ -37,7 +37,7 @@ USE_PKGINSTALL=               yes
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     ingo.conf.dist
-SUBST_SED.files=       -e "s|@INGODIR@|${INGODIR}|g"
+SUBST_VARS.files=      INGODIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 REPLACE_INTERPRETER+=  php

Index: pkgsrc/mail/mailman/Makefile
diff -u pkgsrc/mail/mailman/Makefile:1.86 pkgsrc/mail/mailman/Makefile:1.87
--- pkgsrc/mail/mailman/Makefile:1.86   Fri Apr 26 14:12:41 2019
+++ pkgsrc/mail/mailman/Makefile        Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.86 2019/04/26 14:12:41 maya Exp $
+# $NetBSD: Makefile,v 1.87 2019/05/23 19:23:06 rillig Exp $
 
 DISTNAME=      mailman-2.1.29
 PKGNAME=       mailman-2.1.29
@@ -94,8 +94,8 @@ BUILD_DEFS+=          MAILMAN_CGIEXT
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/mailman.conf.dist
-SUBST_SED.paths+=      -e 's,@EXECDIR@,${EXECDIR},g'
-SUBST_SED.paths+=      -e 's,@MAILMAN_DATADIR@,${MAILMAN_DATADIR},g'
+SUBST_VARS.paths=      EXECDIR
+SUBST_VARS.paths+=     MAILMAN_DATADIR
 SUBST_STAGE.paths=     pre-configure
 
 DOCFILELIST=   ACKNOWLEDGMENTS BUGS FAQ INSTALL NEWS README \

Index: pkgsrc/mail/mailsync/Makefile
diff -u pkgsrc/mail/mailsync/Makefile:1.36 pkgsrc/mail/mailsync/Makefile:1.37
--- pkgsrc/mail/mailsync/Makefile:1.36  Sat Mar  5 11:28:49 2016
+++ pkgsrc/mail/mailsync/Makefile       Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2016/03/05 11:28:49 jperkin Exp $
+# $NetBSD: Makefile,v 1.37 2019/05/23 19:23:06 rillig Exp $
 #
 
 DISTNAME=      mailsync_5.2.1.orig
@@ -23,7 +23,7 @@ CONFIGURE_ARGS+=      --without-krb5
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      configure doc/examples/mailsync doc/mailsync.1
-SUBST_SED.conf=                -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g"
+SUBST_VARS.conf=       BUILDLINK_DIR
 SUBST_SED.conf+=       -e "s|@SSLBASE@|${BUILDLINK_PREFIX.openssl}|g"
 SUBST_SED.conf+=       -e "s|/usr/share|${PREFIX}/share|g"
 SUBST_MESSAGE.conf=    Fixing configure script.

Index: pkgsrc/mail/mimp/Makefile
diff -u pkgsrc/mail/mimp/Makefile:1.7 pkgsrc/mail/mimp/Makefile:1.8
--- pkgsrc/mail/mimp/Makefile:1.7       Wed Aug 16 20:21:10 2017
+++ pkgsrc/mail/mimp/Makefile   Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2017/08/16 20:21:10 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2019/05/23 19:23:06 rillig Exp $
 
 DISTNAME=      mimp-h3-${MIMPVER}
 PKGNAME=       mimp-${MIMPVER}
@@ -53,7 +53,7 @@ CONF_FILES_PERMS+=    ${MIMPDIR}/config/pre
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     mimp.conf.dist
-SUBST_SED.files=       -e "s|@MIMPDIR@|${MIMPDIR}|g"
+SUBST_VARS.files=      MIMPDIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 REPLACE_INTERPRETER+=  php

Index: pkgsrc/mail/mush/Makefile
diff -u pkgsrc/mail/mush/Makefile:1.30 pkgsrc/mail/mush/Makefile:1.31
--- pkgsrc/mail/mush/Makefile:1.30      Wed Jul  4 13:40:24 2018
+++ pkgsrc/mail/mush/Makefile   Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2018/07/04 13:40:24 jperkin Exp $
+# $NetBSD: Makefile,v 1.31 2019/05/23 19:23:06 rillig Exp $
 
 DISTNAME=      mush-7.2.5
 PKGNAME=       mush-7.2.6.b4.pl1
@@ -38,7 +38,7 @@ PLAT_MAKEFILE.*=              makefile.${LOWER_OPSYS
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     config.h-dist ${PLAT_MAKEFILE}
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_SED.paths+=      -e 's,@MANDIR@,${PREFIX}/${PKGMANDIR},g'
 SUBST_STAGE.paths=     pre-configure
 

Index: pkgsrc/mail/newspipe/Makefile
diff -u pkgsrc/mail/newspipe/Makefile:1.14 pkgsrc/mail/newspipe/Makefile:1.15
--- pkgsrc/mail/newspipe/Makefile:1.14  Thu Apr 25 07:33:04 2019
+++ pkgsrc/mail/newspipe/Makefile       Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2019/04/25 07:33:04 maya Exp $
+# $NetBSD: Makefile,v 1.15 2019/05/23 19:23:06 rillig Exp $
 #
 
 DISTNAME=              newspipe.1.1.9
@@ -24,9 +24,9 @@ REPLACE_PYTHON=       *.py
 SUBST_CLASSES+=                bin
 SUBST_STAGE.bin=       do-configure
 SUBST_FILES.bin=       newspipe.py newspipe
-SUBST_SED.bin=         -e 's|@LOCALBASE@|${LOCALBASE}|g'
-SUBST_SED.bin+=                -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.bin+=                -e 's|@PYTHONBIN@|${PYTHONBIN}|g'
+SUBST_VARS.bin=                LOCALBASE
+SUBST_VARS.bin+=       PREFIX
+SUBST_VARS.bin+=       PYTHONBIN
 
 INSTALLATION_DIRS=     bin share/newspipe share/doc/newspipe
 INSTALLATION_DIRS+=    share/examples/newspipe

Index: pkgsrc/mail/opensmtpd/Makefile
diff -u pkgsrc/mail/opensmtpd/Makefile:1.11 pkgsrc/mail/opensmtpd/Makefile:1.12
--- pkgsrc/mail/opensmtpd/Makefile:1.11 Wed Jul  4 13:40:24 2018
+++ pkgsrc/mail/opensmtpd/Makefile      Thu May 23 19:23:06 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2018/07/04 13:40:24 jperkin Exp $
+# $NetBSD: Makefile,v 1.12 2019/05/23 19:23:06 rillig Exp $
 
 VERSION=       5.7.3p2
 DISTNAME=      opensmtpd-${VERSION}
@@ -47,7 +47,7 @@ RCD_SCRIPTS=  opensmtpd
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/mailer.conf
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 SUBST_CLASSES+=                        exampledir

Index: pkgsrc/mail/p5-Mail-Ezmlm/Makefile
diff -u pkgsrc/mail/p5-Mail-Ezmlm/Makefile:1.19 pkgsrc/mail/p5-Mail-Ezmlm/Makefile:1.20
--- pkgsrc/mail/p5-Mail-Ezmlm/Makefile:1.19     Wed Aug 22 09:45:31 2018
+++ pkgsrc/mail/p5-Mail-Ezmlm/Makefile  Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/08/22 09:45:31 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=              Ezmlm-0.08.2
@@ -19,8 +19,8 @@ MAKE_ENV+=            BSD_BATCH_INSTALL=1     # skip i
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     Ezmlm.pm
-SUBST_SED.paths=       -e 's|@LOCALBASE@|${LOCALBASE}|g'
-SUBST_SED.paths+=      -e 's|@QMAILDIR@|${QMAILDIR}|g'
+SUBST_VARS.paths=      LOCALBASE
+SUBST_VARS.paths+=     QMAILDIR
 SUBST_MESSAGE.paths=   Configuring paths.
 
 PERL5_PACKLIST=                auto/Mail/Ezmlm/.packlist

Index: pkgsrc/mail/pfqueue/Makefile
diff -u pkgsrc/mail/pfqueue/Makefile:1.15 pkgsrc/mail/pfqueue/Makefile:1.16
--- pkgsrc/mail/pfqueue/Makefile:1.15   Wed Jul  4 13:40:24 2018
+++ pkgsrc/mail/pfqueue/Makefile        Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2018/07/04 13:40:24 jperkin Exp $
+# $NetBSD: Makefile,v 1.16 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=      pfqueue-0.5.6
@@ -34,7 +34,7 @@ SUBST_CLASSES+=               conf
 SUBST_MESSAGE.conf=    Fixing path to config file
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      pfqconfig.c pfqueue.conf.5
-SUBST_SED.conf=                -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_VARS.conf=       PKG_SYSCONFDIR
 
 post-install:
        ${INSTALL_DATA} ${FILESDIR}/pfqueue.conf ${DESTDIR}${PREFIX}/share/examples/pfqueue

Index: pkgsrc/mail/pfqueue/options.mk
diff -u pkgsrc/mail/pfqueue/options.mk:1.2 pkgsrc/mail/pfqueue/options.mk:1.3
--- pkgsrc/mail/pfqueue/options.mk:1.2  Wed Jul  4 13:40:24 2018
+++ pkgsrc/mail/pfqueue/options.mk      Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2018/07/04 13:40:24 jperkin Exp $
+# $NetBSD: options.mk,v 1.3 2019/05/23 19:23:07 rillig Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.pfqueue
 
@@ -37,4 +37,4 @@ SUBST_CLASSES+=               backends
 SUBST_STAGE.backends=  pre-configure
 SUBST_MESSAGE.backends=        Enabling backends
 SUBST_FILES.backends=  backends/Makefile.in
-SUBST_SED.backends=    -e 's|@PFQ_BACKENDS@|${PFQ_BACKENDS:Q}|'
+SUBST_VARS.backends=   PFQ_BACKENDS

Index: pkgsrc/mail/poppassd/Makefile
diff -u pkgsrc/mail/poppassd/Makefile:1.28 pkgsrc/mail/poppassd/Makefile:1.29
--- pkgsrc/mail/poppassd/Makefile:1.28  Mon Oct  8 12:19:27 2012
+++ pkgsrc/mail/poppassd/Makefile       Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2012/10/08 12:19:27 asau Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=              qpopper${VERSION}
@@ -17,7 +17,7 @@ COMMENT=              Qualcomm's password change ser
 SUBST_CLASSES+=                prefix
 SUBST_STAGE.prefix=    pre-configure
 SUBST_FILES.prefix=    man/poppassd.8 password/poppassd.c
-SUBST_SED.prefix=      -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.prefix=     PREFIX
 
 .include "../../mail/qpopper/Makefile.common"
 

Index: pkgsrc/mail/postfix/Makefile
diff -u pkgsrc/mail/postfix/Makefile:1.309 pkgsrc/mail/postfix/Makefile:1.310
--- pkgsrc/mail/postfix/Makefile:1.309  Tue Apr 30 03:41:51 2019
+++ pkgsrc/mail/postfix/Makefile        Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.309 2019/04/30 03:41:51 taca Exp $
+# $NetBSD: Makefile,v 1.310 2019/05/23 19:23:07 rillig Exp $
 
 .include "../../mail/postfix/Makefile.common"
 
@@ -48,7 +48,7 @@ CONF_FILES_PERMS=     # empty
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/mailer.conf
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS+=    ${LIBEXECDIR} ${METADIR} ${SHLIBDIR} ${EXAMPLEDIR} ${DOCDIR}

Index: pkgsrc/mail/qmqtool/Makefile
diff -u pkgsrc/mail/qmqtool/Makefile:1.14 pkgsrc/mail/qmqtool/Makefile:1.15
--- pkgsrc/mail/qmqtool/Makefile:1.14   Wed Aug 22 09:45:34 2018
+++ pkgsrc/mail/qmqtool/Makefile        Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2018/08/22 09:45:34 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=              qmqtool-1.15
@@ -25,15 +25,15 @@ BUILD_TARGET=               qmqtool
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     src/qmqtool
-SUBST_SED.paths+=      -e 's,@PS@,${PS},g'
-SUBST_SED.paths+=      -e 's,@GREP@,${GREP},g'
-SUBST_SED.paths+=      -e 's,@RCD_SCRIPTS_DIR@,${RCD_SCRIPTS_DIR},g'
+SUBST_VARS.paths=      PS
+SUBST_VARS.paths+=     GREP
+SUBST_VARS.paths+=     RCD_SCRIPTS_DIR
 
 SUBST_CLASSES+=                users
 SUBST_STAGE.users=     pre-configure
 SUBST_FILES.users=     src/qmqtool
-SUBST_SED.users=       -e 's,@QMAIL_SEND_USER@,${QMAIL_SEND_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_QUEUE_USER@,${QMAIL_QUEUE_USER:Q},g'
+SUBST_VARS.users=      QMAIL_SEND_USER
+SUBST_VARS.users+=     QMAIL_QUEUE_USER
 
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin
 INSTALLATION_DIRS+=    share/doc/qmqtool share/examples/qmqtool

Index: pkgsrc/mail/qpopper/Makefile
diff -u pkgsrc/mail/qpopper/Makefile:1.69 pkgsrc/mail/qpopper/Makefile:1.70
--- pkgsrc/mail/qpopper/Makefile:1.69   Sat Mar 26 23:52:37 2016
+++ pkgsrc/mail/qpopper/Makefile        Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2016/03/26 23:52:37 joerg Exp $
+# $NetBSD: Makefile,v 1.70 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=              qpopper${VERSION}
@@ -44,12 +44,12 @@ PKG_USERS=          ${QPOPPER_USER}:${QPOPPER_GR
 SUBST_CLASSES+=                prefix
 SUBST_STAGE.prefix=    pre-configure
 SUBST_FILES.prefix=    man/popper.8
-SUBST_SED.prefix=      -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.prefix=     PREFIX
 
 SUBST_CLASSES+=                sysconf
 SUBST_STAGE.sysconf=   pre-configure
 SUBST_FILES.sysconf=   man/popauth.8
-SUBST_SED.sysconf=     -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.sysconf=    PKG_SYSCONFDIR
 
 SUBST_CLASSES+=                varbase
 SUBST_STAGE.varbase=   pre-configure

Index: pkgsrc/mail/queue-fix/Makefile
diff -u pkgsrc/mail/queue-fix/Makefile:1.10 pkgsrc/mail/queue-fix/Makefile:1.11
--- pkgsrc/mail/queue-fix/Makefile:1.10 Tue Apr  4 07:46:14 2017
+++ pkgsrc/mail/queue-fix/Makefile      Thu May 23 19:23:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2017/04/04 07:46:14 schmonz Exp $
+# $NetBSD: Makefile,v 1.11 2019/05/23 19:23:07 rillig Exp $
 #
 
 DISTNAME=              queue-fix-1.4
@@ -17,14 +17,14 @@ DJB_RESTRICTED=             NO
 SUBST_CLASSES+=                groups
 SUBST_STAGE.groups=    do-configure
 SUBST_FILES.groups=    queue-fix.c
-SUBST_SED.groups=      -e 's,@QMAIL_QMAIL_GROUP@,${QMAIL_QMAIL_GROUP:Q},g'
+SUBST_VARS.groups=     QMAIL_QMAIL_GROUP
 
 SUBST_CLASSES+=                users
 SUBST_STAGE.users=     do-configure
 SUBST_FILES.users=     queue-fix.c
-SUBST_SED.users+=      -e 's,@QMAIL_QUEUE_USER@,${QMAIL_QUEUE_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_REMOTE_USER@,${QMAIL_REMOTE_USER:Q},g'
-SUBST_SED.users+=      -e 's,@QMAIL_SEND_USER@,${QMAIL_SEND_USER:Q},g'
+SUBST_VARS.users=      QMAIL_QUEUE_USER
+SUBST_VARS.users+=     QMAIL_REMOTE_USER
+SUBST_VARS.users+=     QMAIL_SEND_USER
 
 BUILD_DEFS+=           QMAIL_QUEUE_USER QMAIL_REMOTE_USER QMAIL_SEND_USER
 BUILD_DEFS+=           QMAIL_QMAIL_GROUP

Index: pkgsrc/mail/relay-ctrl/Makefile
diff -u pkgsrc/mail/relay-ctrl/Makefile:1.6 pkgsrc/mail/relay-ctrl/Makefile:1.7
--- pkgsrc/mail/relay-ctrl/Makefile:1.6 Thu Apr 27 20:41:26 2017
+++ pkgsrc/mail/relay-ctrl/Makefile     Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2017/04/27 20:41:26 schmonz Exp $
+# $NetBSD: Makefile,v 1.7 2019/05/23 19:23:08 rillig Exp $
 #
 
 DISTNAME=              relay-ctrl-3.2
@@ -24,11 +24,11 @@ ADDON_SCRIPTS=              dovecot-settcpremoteip i
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${ADDON_SCRIPTS}
-SUBST_SED.paths=       -e 's,@ECHO@,${ECHO},g'
-SUBST_SED.paths+=      -e 's,@GREP@,${GREP},g'
-SUBST_SED.paths+=      -e 's,@SED@,${SED},g'
-SUBST_SED.paths+=      -e 's,@SETENV@,${SETENV},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      ECHO
+SUBST_VARS.paths+=     GREP
+SUBST_VARS.paths+=     SED
+SUBST_VARS.paths+=     SETENV
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     do-configure
 
 CFLAGS.SunOS+=         -DSOL_TCP=SOL_SOCKET

Index: pkgsrc/mail/roundcube/Makefile
diff -u pkgsrc/mail/roundcube/Makefile:1.89 pkgsrc/mail/roundcube/Makefile:1.90
--- pkgsrc/mail/roundcube/Makefile:1.89 Wed May 16 08:14:40 2018
+++ pkgsrc/mail/roundcube/Makefile      Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.89 2018/05/16 08:14:40 triaxx Exp $
+# $NetBSD: Makefile,v 1.90 2019/05/23 19:23:08 rillig Exp $
 
 DISTNAME=      roundcubemail-${RC_VERS}
 PKGNAME=       ${PHP_PKG_PREFIX}-${DISTNAME:S/mail-/-/}
@@ -72,11 +72,11 @@ SUBST_FILES.files+= config/config.inc.ph
 SUBST_FILES.files+=    program/include/iniset.php
 SUBST_FILES.files+=    program/lib/Roundcube/rcube_mime.php
 SUBST_VARS.files=      RCDIR VARBASE PKG_EXAMPLES PKG_SYSCONFBASE PKG_SYSCONFDIR
-SUBST_SED.files=       -e "s|@RCDIR@|${RCDIR}|g"
-SUBST_SED.files+=      -e "s|@VARBASE@|${VARBASE}|g"
+SUBST_VARS.files+=     RCDIR
+SUBST_VARS.files+=     VARBASE
 SUBST_SED.files+=      -e "s|@PKG_EXAMPLES@|${PREFIX}/share/examples/roundcube|g"
-SUBST_SED.files+=      -e "s|@PKG_SYSCONFBASE@|${PKG_SYSCONFBASE}|g"
-SUBST_SED.files+=      -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.files+=     PKG_SYSCONFBASE
+SUBST_VARS.files+=     PKG_SYSCONFDIR
 
 REPLACE_INTERPRETER+=  php
 REPLACE.php.old=       /usr/bin/env php

Index: pkgsrc/mail/serialmail/Makefile
diff -u pkgsrc/mail/serialmail/Makefile:1.10 pkgsrc/mail/serialmail/Makefile:1.11
--- pkgsrc/mail/serialmail/Makefile:1.10        Sat Apr  8 17:50:33 2017
+++ pkgsrc/mail/serialmail/Makefile     Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2017/04/08 17:50:33 schmonz Exp $
+# $NetBSD: Makefile,v 1.11 2019/05/23 19:23:08 rillig Exp $
 #
 
 DISTNAME=              serialmail-0.75
@@ -23,7 +23,7 @@ SUBST_FILES.djbware+= leapsecs_read.c
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     hier.c
-SUBST_SED.paths=       -e 's,@PKGMANDIR@,${PKGMANDIR},g'
+SUBST_VARS.paths=      PKGMANDIR
 
 .include "../../mk/djbware.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/mail/spamassassin/Makefile
diff -u pkgsrc/mail/spamassassin/Makefile:1.133 pkgsrc/mail/spamassassin/Makefile:1.134
--- pkgsrc/mail/spamassassin/Makefile:1.133     Sat Jan 26 18:23:05 2019
+++ pkgsrc/mail/spamassassin/Makefile   Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.133 2019/01/26 18:23:05 abs Exp $
+# $NetBSD: Makefile,v 1.134 2019/05/23 19:23:08 rillig Exp $
 
 DISTNAME=      Mail-SpamAssassin-3.4.2
 PKGNAME=       spamassassin-3.4.2
@@ -132,8 +132,8 @@ SUBST_MESSAGE.sa2=  Setting correct paths
 SUBST_STAGE.sa2=       pre-configure
 SUBST_FILES.sa2=       README spamd/spamd.raw
 SUBST_SED.sa2=         -e s!@@PREFIX@@!${PREFIX}!g
-SUBST_SED.sa2+=                -e s!@PKG_SYSCONFDIR@!${PKG_SYSCONFDIR}!g
-SUBST_SED.sa2+=                -e s!@VARBASE@!${VARBASE}!g
+SUBST_VARS.sa2=                PKG_SYSCONFDIR
+SUBST_VARS.sa2+=       VARBASE
 
 SUBST_CLASSES+=                sa3
 SUBST_MESSAGE.sa3=     Setting correct paths for pkgsrc (part 2)

Index: pkgsrc/mail/spamdyke/Makefile
diff -u pkgsrc/mail/spamdyke/Makefile:1.37 pkgsrc/mail/spamdyke/Makefile:1.38
--- pkgsrc/mail/spamdyke/Makefile:1.37  Sun Jul 29 08:41:18 2018
+++ pkgsrc/mail/spamdyke/Makefile       Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2018/07/29 08:41:18 schmonz Exp $
+# $NetBSD: Makefile,v 1.38 2019/05/23 19:23:08 rillig Exp $
 #
 
 DISTNAME=              spamdyke-5.0.1
@@ -21,8 +21,8 @@ MAKE_FLAGS+=          LDFLAGS=${LDFLAGS:Q}
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     spamdyke.h
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX:Q},g'
-SUBST_SED.paths+=      -e 's,@QMAILDIR@,${QMAILDIR:Q},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     QMAILDIR
 SUBST_STAGE.paths=     do-configure
 
 BUILD_DEFS+=           QMAILDIR

Index: pkgsrc/mail/squirrelmail/Makefile
diff -u pkgsrc/mail/squirrelmail/Makefile:1.135 pkgsrc/mail/squirrelmail/Makefile:1.136
--- pkgsrc/mail/squirrelmail/Makefile:1.135     Wed Aug 22 09:45:34 2018
+++ pkgsrc/mail/squirrelmail/Makefile   Thu May 23 19:23:08 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.135 2018/08/22 09:45:34 wiz Exp $
+# $NetBSD: Makefile,v 1.136 2019/05/23 19:23:08 rillig Exp $
 
 DISTNAME=      squirrelmail-webmail-1.4.23pre14764
 PKGNAME=       ${DISTNAME:S/-webmail//}
@@ -62,9 +62,9 @@ OWN_DIRS_PERMS+=      ${USER_PREFS_DIR} ${APA
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/squirrelmail.conf.dist
 SUBST_FILES.paths+=    config/config_default.php
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@ATTACHMENTS_DIR@,${ATTACHMENTS_DIR},g'
-SUBST_SED.paths+=      -e 's,@USER_PREFS_DIR@,${USER_PREFS_DIR},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     ATTACHMENTS_DIR
+SUBST_VARS.paths+=     USER_PREFS_DIR
 SUBST_SED.paths+=      -e 's,@SMDIR@,${PREFIX}/${SMDIR},g'
 SUBST_STAGE.paths=     pre-configure
 

Index: pkgsrc/mail/ssmtp/Makefile
diff -u pkgsrc/mail/ssmtp/Makefile:1.32 pkgsrc/mail/ssmtp/Makefile:1.33
--- pkgsrc/mail/ssmtp/Makefile:1.32     Wed Mar  9 03:24:19 2016
+++ pkgsrc/mail/ssmtp/Makefile  Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2016/03/09 03:24:19 tnn Exp $
+# $NetBSD: Makefile,v 1.33 2019/05/23 19:23:09 rillig Exp $
 #
 # TLS functionality needs testing. Please let me know the result,
 # and preferably info about your system.
@@ -33,7 +33,7 @@ MAKE_DIRS+=           ${PKG_SYSCONFDIR}
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/mailer.conf ssmtp.c ssmtp.conf ssmtp.8
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_SED.paths+=      -e 's,/etc/ssl/certs,${PKG_SYSCONFDIR},g'
 SUBST_SED.paths+=      -e 's,/etc/ssmtp,${PKG_SYSCONFDIR},g'
 SUBST_STAGE.paths=     pre-configure

Index: pkgsrc/mail/turba/Makefile
diff -u pkgsrc/mail/turba/Makefile:1.46 pkgsrc/mail/turba/Makefile:1.47
--- pkgsrc/mail/turba/Makefile:1.46     Wed Aug 22 09:45:35 2018
+++ pkgsrc/mail/turba/Makefile  Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2018/08/22 09:45:35 wiz Exp $
+# $NetBSD: Makefile,v 1.47 2019/05/23 19:23:09 rillig Exp $
 
 DISTNAME=      turba-h3-${TURBAVER}
 PKGNAME=       turba-${TURBAVER}
@@ -38,7 +38,7 @@ BUILD_DEFS=           APACHE_USER
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     turba.conf.dist
-SUBST_SED.files=       -e "s|@TURBADIR@|${TURBADIR}|g"
+SUBST_VARS.files=      TURBADIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 REPLACE_INTERPRETER+=  php

Index: pkgsrc/mail/up-imapproxy/Makefile
diff -u pkgsrc/mail/up-imapproxy/Makefile:1.13 pkgsrc/mail/up-imapproxy/Makefile:1.14
--- pkgsrc/mail/up-imapproxy/Makefile:1.13      Wed Jul  4 13:40:24 2018
+++ pkgsrc/mail/up-imapproxy/Makefile   Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/07/04 13:40:24 jperkin Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:09 rillig Exp $
 
 DISTNAME=      up-imapproxy-1.2.5
 PKGREVISION=   7
@@ -15,7 +15,7 @@ RCD_SCRIPTS=  upimapproxy
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     include/imapproxy.h
-SUBST_SED.paths=       -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 SUBST_MESSAGE.paths=   Fixing hard coded paths.
 
 CONF_FILES=    ${PREFIX}/share/examples/up-imapproxy/imapproxy.conf \

Index: pkgsrc/math/octave/Makefile
diff -u pkgsrc/math/octave/Makefile:1.187 pkgsrc/math/octave/Makefile:1.188
--- pkgsrc/math/octave/Makefile:1.187   Wed Apr  3 00:32:53 2019
+++ pkgsrc/math/octave/Makefile Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.187 2019/04/03 00:32:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.188 2019/05/23 19:23:09 rillig Exp $
 
 DISTNAME=      octave-5.1.0
 PKGREVISION=   2
@@ -71,7 +71,7 @@ SUBST_CLASSES+=                       fix-make
 SUBST_STAGE.fix-make=          pre-configure
 SUBST_MESSAGE.fix-make=                Fixing path to gmake.
 SUBST_FILES.fix-make=          scripts/pkg/private/configure_make.m
-SUBST_SED.fix-make=            -e 's:@GMAKE@:${GMAKE}:g'
+SUBST_VARS.fix-make=           GMAKE
 
 SUBST_CLASSES+=                        qt5-pkg-config
 SUBST_STAGE.qt5-pkg-config=    pre-configure

Index: pkgsrc/misc/screen/Makefile
diff -u pkgsrc/misc/screen/Makefile:1.109 pkgsrc/misc/screen/Makefile:1.110
--- pkgsrc/misc/screen/Makefile:1.109   Sat May 11 22:47:05 2019
+++ pkgsrc/misc/screen/Makefile Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.109 2019/05/11 22:47:05 kim Exp $
+# $NetBSD: Makefile,v 1.110 2019/05/23 19:23:09 rillig Exp $
 
 DISTNAME=      screen-4.6.2
 PKGREVISION=   1
@@ -37,7 +37,7 @@ INFO_FILES=           YES
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     etc/etcscreenrc doc/screen.1
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 SUBST_SED.paths+=      -e 's,@EXAMPLES@,${PREFIX}/share/examples/screen,g'
 SUBST_STAGE.paths=     pre-configure
 

Index: pkgsrc/net/djbdnscurve6/Makefile
diff -u pkgsrc/net/djbdnscurve6/Makefile:1.2 pkgsrc/net/djbdnscurve6/Makefile:1.3
--- pkgsrc/net/djbdnscurve6/Makefile:1.2        Mon Mar 18 20:19:31 2019
+++ pkgsrc/net/djbdnscurve6/Makefile    Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2019/03/18 20:19:31 schmonz Exp $
+# $NetBSD: Makefile,v 1.3 2019/05/23 19:23:09 rillig Exp $
 
 DISTNAME=              djbdnscurve6-34
 CATEGORIES=            net
@@ -27,7 +27,7 @@ SUBST_MESSAGE.etc=    Fixing prefix.
 SUBST_CLASSES+=                sysconfdir
 SUBST_STAGE.sysconfdir=        do-configure
 SUBST_FILES.sysconfdir=        src/dnscache-conf.c
-SUBST_SED.sysconfdir=  -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_VARS.sysconfdir= PKG_SYSCONFDIR
 SUBST_MESSAGE.sysconfdir=Fixing sysconfdir.
 
 EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}

Index: pkgsrc/net/hf6to4/Makefile
diff -u pkgsrc/net/hf6to4/Makefile:1.18 pkgsrc/net/hf6to4/Makefile:1.19
--- pkgsrc/net/hf6to4/Makefile:1.18     Thu Mar 21 10:45:18 2019
+++ pkgsrc/net/hf6to4/Makefile  Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2019/03/21 10:45:18 taca Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:09 rillig Exp $
 #
 
 DISTNAME=              hf6to4-1.3
@@ -29,8 +29,8 @@ INSTALLATION_DIRS=    ${PKGMANDIR}/man8 sbi
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     hf6to4
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     pre-install
 
 post-extract:

Index: pkgsrc/net/hping3/Makefile
diff -u pkgsrc/net/hping3/Makefile:1.8 pkgsrc/net/hping3/Makefile:1.9
--- pkgsrc/net/hping3/Makefile:1.8      Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/Makefile  Thu May 23 19:23:09 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2017/06/14 12:17:30 jperkin Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:23:09 rillig Exp $
 #
 
 DISTNAME=              hping3-alpha-2
@@ -15,7 +15,7 @@ LICENSE=              gnu-gpl-v2 AND original-bsd
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=      pre-configure
 SUBST_FILES.paths=     Makefile.in configure
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 
 USE_TOOLS=             gmake
 USE_PKGLOCALEDIR=      yes

Index: pkgsrc/net/icinga-base/Makefile
diff -u pkgsrc/net/icinga-base/Makefile:1.19 pkgsrc/net/icinga-base/Makefile:1.20
--- pkgsrc/net/icinga-base/Makefile:1.19        Wed Aug 22 09:45:53 2018
+++ pkgsrc/net/icinga-base/Makefile     Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/08/22 09:45:53 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:10 rillig Exp $
 #
 
 DISTNAME=      icinga-1.9.4
@@ -76,7 +76,7 @@ OWN_DIRS_PERMS+=${ICINGADIR}/checkresult
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     icinga.conf.dist
-SUBST_SED.files=       -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.files=      PREFIX
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 pre-build:

Index: pkgsrc/net/knot/Makefile
diff -u pkgsrc/net/knot/Makefile:1.43 pkgsrc/net/knot/Makefile:1.44
--- pkgsrc/net/knot/Makefile:1.43       Thu Apr 25 07:33:11 2019
+++ pkgsrc/net/knot/Makefile    Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2019/04/25 07:33:11 maya Exp $
+# $NetBSD: Makefile,v 1.44 2019/05/23 19:23:10 rillig Exp $
 
 DISTNAME=      knot-2.8.1
 PKGREVISION=   1
@@ -51,7 +51,7 @@ PKG_SYSCONFSUBDIR=    knot
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKSRC}/samples/Makefile.in
 SUBST_STAGE.paths=     pre-configure
-SUBST_SED.paths=       -e 's,@EGDIR@,${EGDIR},'
+SUBST_VARS.paths=      EGDIR
 
 CONF_FILES=    ${EGDIR}/knot.sample.conf \
                        ${PKG_SYSCONFDIR}/knot.conf

Index: pkgsrc/net/mrtg/Makefile
diff -u pkgsrc/net/mrtg/Makefile:1.127 pkgsrc/net/mrtg/Makefile:1.128
--- pkgsrc/net/mrtg/Makefile:1.127      Sun Apr 14 21:50:36 2019
+++ pkgsrc/net/mrtg/Makefile    Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.127 2019/04/14 21:50:36 jnemeth Exp $
+# $NetBSD: Makefile,v 1.128 2019/05/23 19:23:10 rillig Exp $
 
 DISTNAME=      mrtg-2.17.7
 #PKGREVISION=  12
@@ -30,7 +30,7 @@ SUBST_CLASSES+=               files
 SUBST_STAGE.files=     pre-configure
 SUBST_FILES.files=     ../mrtg.conf.example ../netstat2mrtg    \
                        ../sys2mrtg ../envstat2mrtg
-SUBST_SED.files=       -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.files=      PREFIX
 SUBST_MESSAGE.files=   Fixing default configuration files.
 
 INSTALLATION_DIRS+=    ${EGDIR} libexec

Index: pkgsrc/net/nagios-base/Makefile
diff -u pkgsrc/net/nagios-base/Makefile:1.76 pkgsrc/net/nagios-base/Makefile:1.77
--- pkgsrc/net/nagios-base/Makefile:1.76        Wed Aug 22 09:45:54 2018
+++ pkgsrc/net/nagios-base/Makefile     Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.76 2018/08/22 09:45:54 wiz Exp $
+# $NetBSD: Makefile,v 1.77 2019/05/23 19:23:10 rillig Exp $
 #
 
 DISTNAME=              nagios-4.3.2
@@ -82,7 +82,7 @@ SPECIAL_PERMS+=       share/nagios/jsonquery.h
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     nagios.conf.dist
-SUBST_SED.files=       -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.files=      PREFIX
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 pre-build:

Index: pkgsrc/net/nagstamon/Makefile
diff -u pkgsrc/net/nagstamon/Makefile:1.54 pkgsrc/net/nagstamon/Makefile:1.55
--- pkgsrc/net/nagstamon/Makefile:1.54  Fri Apr 26 14:12:43 2019
+++ pkgsrc/net/nagstamon/Makefile       Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2019/04/26 14:12:43 maya Exp $
+# $NetBSD: Makefile,v 1.55 2019/05/23 19:23:10 rillig Exp $
 
 VERSION=       1.0.1
 DISTNAME=      Nagstamon-${VERSION}
@@ -29,7 +29,7 @@ PYTHON_VERSIONS_INCOMPATIBLE= 36 37 # py
 
 SUBST_CLASSES+=                mandir
 SUBST_STAGE.mandir=    pre-configure
-SUBST_SED.mandir=      -e s,@PKGMANDIR@,${PKGMANDIR},g
+SUBST_VARS.mandir=     PKGMANDIR
 SUBST_FILES.mandir=    setup.py
 
 # Upstream renamed script from nagstamon to nagstamon.py

Index: pkgsrc/net/netdisco/Makefile
diff -u pkgsrc/net/netdisco/Makefile:1.43 pkgsrc/net/netdisco/Makefile:1.44
--- pkgsrc/net/netdisco/Makefile:1.43   Wed Aug 22 09:45:55 2018
+++ pkgsrc/net/netdisco/Makefile        Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2018/08/22 09:45:55 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2019/05/23 19:23:10 rillig Exp $
 
 DISTNAME=              netdisco-${PKGVERSION}_with_mibs
 PKGNAME=               netdisco-${PKGVERSION}
@@ -87,7 +87,7 @@ SUBST_MESSAGE.path=           Fixing hardcoded pa
 
 SUBST_STAGE.varbase=           pre-configure
 SUBST_FILES.varbase=           netdisco.conf
-SUBST_SED.varbase=             -e "s|@VARBASE@|${VARBASE}|g"
+SUBST_VARS.varbase=            VARBASE
 SUBST_MESSAGE.varbase=         Fixing data directory.
 
 NETDISCOUSER?=                 netdisco

Index: pkgsrc/net/ocsinventory-agent/Makefile
diff -u pkgsrc/net/ocsinventory-agent/Makefile:1.18 pkgsrc/net/ocsinventory-agent/Makefile:1.19
--- pkgsrc/net/ocsinventory-agent/Makefile:1.18 Wed Aug 22 09:45:56 2018
+++ pkgsrc/net/ocsinventory-agent/Makefile      Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/08/22 09:45:56 wiz Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:10 rillig Exp $
 #
 VERS=                  1.1.2.1
 PKGREVISION=           10
@@ -44,7 +44,7 @@ SUBST_CLASSES+=                       sysconfdir path varbas
 SUBST_STAGE.sysconfdir=                pre-configure
 SUBST_FILES.sysconfdir=                lib/Ocsinventory/Agent/Config.pm
 SUBST_FILES.sysconfdir+=       postinst.pl
-SUBST_SED.sysconfdir=          -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.sysconfdir=         PKG_SYSCONFDIR
 SUBST_MESSAGE.sysconfdir=      Fixing hardcoded install directory path.
 
 SUBST_STAGE.path=      pre-configure

Index: pkgsrc/net/py-pcap/Makefile
diff -u pkgsrc/net/py-pcap/Makefile:1.13 pkgsrc/net/py-pcap/Makefile:1.14
--- pkgsrc/net/py-pcap/Makefile:1.13    Fri Apr 26 13:14:10 2019
+++ pkgsrc/net/py-pcap/Makefile Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2019/04/26 13:14:10 maya Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:10 rillig Exp $
 
 DISTNAME=      pypcap-1.1
 PKGNAME=       ${PYPKGPREFIX}-pcap-1.1
@@ -20,7 +20,7 @@ SUBST_STAGE.python=   pre-configure
 
 SUBST_CLASSES+=                prefix
 SUBST_FILES.prefix=    Makefile
-SUBST_SED.prefix=      -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.prefix=     PREFIX
 SUBST_STAGE.prefix=    pre-configure
 
 PYDISTUTILSPKG=                        yes

Index: pkgsrc/net/rinetd/Makefile
diff -u pkgsrc/net/rinetd/Makefile:1.18 pkgsrc/net/rinetd/Makefile:1.19
--- pkgsrc/net/rinetd/Makefile:1.18     Wed Jul  4 13:40:30 2018
+++ pkgsrc/net/rinetd/Makefile  Thu May 23 19:23:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/07/04 13:40:30 jperkin Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:10 rillig Exp $
 #
 
 DISTNAME=              rinetd
@@ -22,8 +22,8 @@ RCD_SCRIPTS=          rinetd
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     rinetd.8
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 LDFLAGS.SunOS+=                -lsocket -lnsl

Index: pkgsrc/net/ruby-stompserver/Makefile
diff -u pkgsrc/net/ruby-stompserver/Makefile:1.9 pkgsrc/net/ruby-stompserver/Makefile:1.10
--- pkgsrc/net/ruby-stompserver/Makefile:1.9    Wed Jul  4 13:40:30 2018
+++ pkgsrc/net/ruby-stompserver/Makefile        Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2018/07/04 13:40:30 jperkin Exp $
+# $NetBSD: Makefile,v 1.10 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=      drizztbsd-stompserver-1c7a275
 PKGNAME=       ${RUBY_PKGPREFIX}-stompserver-1.0.0
@@ -77,13 +77,13 @@ OWN_DIRS_PERMS+=    ${ST_ROOT}/${STOMPSERVE
 SUBST_CLASSES+=                cfg
 SUBST_STAGE.cfg=       pre-configure
 SUBST_FILES.cfg=       config/stompserver.conf
-SUBST_SED.cfg=         -e 's,@STOMPSERVER_WRKDIR@,${STOMPSERVER_WRKDIR},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_LOGDIR@,${STOMPSERVER_LOGDIR},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_PIDFILE@,${STOMPSERVER_PIDFILE},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_CFGDIR@,${STOMPSERVER_CFGDIR},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_STORAGE@,${STOMPSERVER_STORAGE},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_USER@,${STOMPSERVER_USER},g'
-SUBST_SED.cfg+=                -e 's,@STOMPSERVER_GROUP@,${STOMPSERVER_GROUP},g'
+SUBST_VARS.cfg=                STOMPSERVER_WRKDIR
+SUBST_VARS.cfg+=       STOMPSERVER_LOGDIR
+SUBST_VARS.cfg+=       STOMPSERVER_PIDFILE
+SUBST_VARS.cfg+=       STOMPSERVER_CFGDIR
+SUBST_VARS.cfg+=       STOMPSERVER_STORAGE
+SUBST_VARS.cfg+=       STOMPSERVER_USER
+SUBST_VARS.cfg+=       STOMPSERVER_GROUP
 
 FILES_SUBST+=          STOMPSERVER_RCD_CFG=${ST_ROOT}/${STOMPSERVER_CFGDIR}
 FILES_SUBST+=          STOMPSERVER_RCD_PID=${ST_ROOT}/${STOMPSERVER_PIDFILE}

Index: pkgsrc/net/scapy/Makefile
diff -u pkgsrc/net/scapy/Makefile:1.26 pkgsrc/net/scapy/Makefile:1.27
--- pkgsrc/net/scapy/Makefile:1.26      Fri Apr 26 13:14:10 2019
+++ pkgsrc/net/scapy/Makefile   Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2019/04/26 13:14:10 maya Exp $
+# $NetBSD: Makefile,v 1.27 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=      scapy-2.3.2
 PKGREVISION=   1
@@ -29,7 +29,7 @@ CONF_FILES=   ${PREFIX}/share/examples/sca
 SUBST_CLASSES+=                config
 SUBST_STAGE.config=    pre-configure
 SUBST_FILES.config=    scapy/data.py setup.py
-SUBST_SED.config=      -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.config=     PKG_SYSCONFDIR
 SUBST_SED.config+=     -e "s|share/man|${PKGMANDIR}|g"
 SUBST_MESSAGE.config=  Fixing paths.
 

Index: pkgsrc/net/smokeping/Makefile
diff -u pkgsrc/net/smokeping/Makefile:1.40 pkgsrc/net/smokeping/Makefile:1.41
--- pkgsrc/net/smokeping/Makefile:1.40  Wed Aug 22 09:46:07 2018
+++ pkgsrc/net/smokeping/Makefile       Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2018/08/22 09:46:07 wiz Exp $
+# $NetBSD: Makefile,v 1.41 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=      smokeping-2.6.7
 PKGREVISION=   7
@@ -52,11 +52,11 @@ SUBST_STAGE.files=  pre-configure
 SUBST_FILES.files=     etc/config.dist.in bin/smokeping \
                        bin/smokeping_cgi bin/tSmoke \
                        htdocs/Makefile.in smokeping.conf
-SUBST_SED.files=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.files+=      -e "s|@VARBASE@|${VARBASE}|g"
-SUBST_SED.files+=      -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
-SUBST_SED.files+=      -e "s|@INTERP@|${INTERP}|g"
-SUBST_SED.files+=      -e "s|@SPDIR@|${SPDIR}|g"
+SUBST_VARS.files=      PREFIX
+SUBST_VARS.files+=     VARBASE
+SUBST_VARS.files+=     PKG_SYSCONFDIR
+SUBST_VARS.files+=     INTERP
+SUBST_VARS.files+=     SPDIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 SUBST_CLASSES+=                libs

Index: pkgsrc/net/tinyfugue/Makefile
diff -u pkgsrc/net/tinyfugue/Makefile:1.33 pkgsrc/net/tinyfugue/Makefile:1.34
--- pkgsrc/net/tinyfugue/Makefile:1.33  Thu Jan 19 18:52:21 2017
+++ pkgsrc/net/tinyfugue/Makefile       Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2017/01/19 18:52:21 agc Exp $
+# $NetBSD: Makefile,v 1.34 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=      tf-40s1
 PKGNAME=       tf-4.0s1
@@ -26,7 +26,7 @@ SUBST_CLASSES+=                       fix-paths
 SUBST_MESSAGE.fix-paths=       late-addition DESTDIR
 SUBST_STAGE.fix-paths=         pre-configure
 SUBST_FILES.fix-paths=         unix/Config
-SUBST_SED.fix-paths=           -e 's,@DESTDIR@,'${DESTDIR}',g'
+SUBST_VARS.fix-paths=          DESTDIR
 
 LDFLAGS.SunOS+=        -lz
 

Index: pkgsrc/net/tsocks/Makefile
diff -u pkgsrc/net/tsocks/Makefile:1.17 pkgsrc/net/tsocks/Makefile:1.18
--- pkgsrc/net/tsocks/Makefile:1.17     Sat Apr  6 21:07:34 2013
+++ pkgsrc/net/tsocks/Makefile  Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2013/04/06 21:07:34 rodent Exp $
+# $NetBSD: Makefile,v 1.18 2019/05/23 19:23:11 rillig Exp $
 #
 
 DISTNAME=      tsocks-1.8beta5
@@ -26,8 +26,8 @@ SUBST_CLASSES+=               tsocks
 SUBST_STAGE.tsocks=    post-configure
 SUBST_MESSAGE.tsocks=  Generating tsocks wrapper script.
 SUBST_FILES.tsocks=    tsocks
-SUBST_SED.tsocks=      -e "s|@SH@|${SH}|g"
-SUBST_SED.tsocks+=     -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.tsocks=     SH
+SUBST_VARS.tsocks+=    PREFIX
 
 INSTALLATION_DIRS+=    ${EGDIR}
 

Index: pkgsrc/net/vnc/Makefile
diff -u pkgsrc/net/vnc/Makefile:1.58 pkgsrc/net/vnc/Makefile:1.59
--- pkgsrc/net/vnc/Makefile:1.58        Wed Aug 22 09:46:08 2018
+++ pkgsrc/net/vnc/Makefile     Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2018/08/22 09:46:08 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=              vnc-3.3.3r2
 PKGNAME=               vnc-3.3.3.2
@@ -50,7 +50,7 @@ patch-sockets:
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     vncserver
-SUBST_SED.paths+=      -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.paths=      X11BASE
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS=     bin share/doc/vnc

Index: pkgsrc/net/vpnc/Makefile
diff -u pkgsrc/net/vpnc/Makefile:1.44 pkgsrc/net/vpnc/Makefile:1.45
--- pkgsrc/net/vpnc/Makefile:1.44       Wed Aug 22 09:46:08 2018
+++ pkgsrc/net/vpnc/Makefile    Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2018/08/22 09:46:08 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2019/05/23 19:23:11 rillig Exp $
 #
 
 DISTNAME=              vpnc-0.5.3
@@ -24,12 +24,12 @@ SUBST_MESSAGE.paths=        fixing pathnames
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     config.c vpnc-script.in makeman.pl pcf2vpnc
 SUBST_FILES.paths+=    vpnc.8.template vpnc-disconnect
-SUBST_SED.paths=       -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.paths+=      -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.paths+=      -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
-SUBST_SED.paths+=      -e 's|@VARBASE@|${VARBASE}|g'
-SUBST_SED.paths+=      -e 's|@PERL5@|${PERL5}|g'
-SUBST_SED.paths+=      -e 's|@SH@|${SH}|g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
+SUBST_VARS.paths+=     PREFIX
+SUBST_VARS.paths+=     PKGMANDIR
+SUBST_VARS.paths+=     VARBASE
+SUBST_VARS.paths+=     PERL5
+SUBST_VARS.paths+=     SH
 
 
 BUILD_DEFS+=           VARBASE

Index: pkgsrc/net/xnap/Makefile
diff -u pkgsrc/net/xnap/Makefile:1.15 pkgsrc/net/xnap/Makefile:1.16
--- pkgsrc/net/xnap/Makefile:1.15       Tue Oct 23 17:19:21 2012
+++ pkgsrc/net/xnap/Makefile    Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2012/10/23 17:19:21 asau Exp $
+# $NetBSD: Makefile,v 1.16 2019/05/23 19:23:11 rillig Exp $
 #
 
 DISTNAME=      xnap-2.0
@@ -22,7 +22,7 @@ SUBST_STAGE.path=     pre-configure
 SUBST_MESSAGE.path=    fixing java path
 SUBST_FILES.path=      xnap.sh
 SUBST_SED.path=                -e 's,@JAVA_HOME@,${PKG_JAVA_HOME}/,g'
-SUBST_SED.path+=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.path=       PREFIX
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKSRC}/xnap.sh ${DESTDIR}${PREFIX}/bin/xnap

Index: pkgsrc/net/yale-tftpd/Makefile
diff -u pkgsrc/net/yale-tftpd/Makefile:1.23 pkgsrc/net/yale-tftpd/Makefile:1.24
--- pkgsrc/net/yale-tftpd/Makefile:1.23 Thu Sep 12 11:15:12 2013
+++ pkgsrc/net/yale-tftpd/Makefile      Thu May 23 19:23:11 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2013/09/12 11:15:12 jperkin Exp $
+# $NetBSD: Makefile,v 1.24 2019/05/23 19:23:11 rillig Exp $
 
 DISTNAME=      yale-tftpd-3.0
 PKGREVISION=   6
@@ -26,7 +26,7 @@ SUBST_STAGE.ytftpdman=                post-configure
 SUBST_MESSAGE.ytftpdman=       Fixing pathnames references
 SUBST_FILES.ytftpdman=         tftpd.8
 SUBST_SED.ytftpdman=           -e 's|@ETCDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.ytftpdman+=          -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.ytftpdman=          PREFIX
 
 INSTALLATION_DIRS=     libexec ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8
 

Index: pkgsrc/news/flnews/Makefile
diff -u pkgsrc/news/flnews/Makefile:1.3 pkgsrc/news/flnews/Makefile:1.4
--- pkgsrc/news/flnews/Makefile:1.3     Mon Jan 21 12:03:41 2019
+++ pkgsrc/news/flnews/Makefile Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2019/01/21 12:03:41 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2019/05/23 19:23:12 rillig Exp $
 
 FLNEWS_VERSION=        0.16
 
@@ -32,7 +32,7 @@ SUBST_STAGE.edit-config=      pre-configure
 SUBST_MESSAGE.edit-config=     Preparing CONFIG file ...
 SUBST_FILES.edit-config=       CONFIG
 SUBST_SED.edit-config=         -e 's,@VERSION@,${FLNEWS_VERSION},g'
-SUBST_SED.edit-config+=                -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.edit-config=                PREFIX
 SUBST_SED.edit-config+=                -e 's,@MAINT@,${FLNEWS_MAINTAINER},g'
 SUBST_SED.edit-config+=                -e 's,@IP6@,${FLNEWS_OPT_DISABLE_IP6},g'
 SUBST_SED.edit-config+=                -e 's,@NLS@,${FLNEWS_OPT_DISABLE_NLS},g'

Index: pkgsrc/pkgtools/autoswc/Makefile
diff -u pkgsrc/pkgtools/autoswc/Makefile:1.22 pkgsrc/pkgtools/autoswc/Makefile:1.23
--- pkgsrc/pkgtools/autoswc/Makefile:1.22       Wed Nov 25 12:52:47 2015
+++ pkgsrc/pkgtools/autoswc/Makefile    Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2015/11/25 12:52:47 jperkin Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:12 rillig Exp $
 
 PKGNAME=               autoswc-1.6
 CATEGORIES=            pkgtools sysutils
@@ -29,13 +29,13 @@ SUBST_FILES.build+= config.site
 SUBST_SED.build=       -e 's|@ACLOCAL@|${LOCALBASE}/bin/aclocal|g'
 SUBST_SED.build+=      -e 's|@AUTOCONF@|${LOCALBASE}/bin/autoconf|g'
 SUBST_SED.build+=      -e 's|@AUTOMAKE@|${LOCALBASE}/bin/automake|g'
-SUBST_SED.build+=      -e 's|@CACHEDIR@|${CACHEDIR}|g'
+SUBST_VARS.build=      CACHEDIR
 SUBST_SED.build+=      -e 's|@LIBTOOLIZE@|${LOCALBASE}/bin/libtoolize|g'
-SUBST_SED.build+=      -e 's|@MACHINE_GNU_PLATFORM@|${MACHINE_GNU_PLATFORM}|g'
-SUBST_SED.build+=      -e 's|@MAKE@|${MAKE}|g'
-SUBST_SED.build+=      -e 's|@MKCONF@|${MKCONF}|g'
-SUBST_SED.build+=      -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.build+=      -e 's|@SH@|${SH}|g'
+SUBST_VARS.build+=     MACHINE_GNU_PLATFORM
+SUBST_VARS.build+=     MAKE
+SUBST_VARS.build+=     MKCONF
+SUBST_VARS.build+=     PREFIX
+SUBST_VARS.build+=     SH
 SUBST_SED.build+=      -e 's|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
 
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin share/autoswc

Index: pkgsrc/pkgtools/dfdisk/Makefile
diff -u pkgsrc/pkgtools/dfdisk/Makefile:1.18 pkgsrc/pkgtools/dfdisk/Makefile:1.19
--- pkgsrc/pkgtools/dfdisk/Makefile:1.18        Thu Sep 27 23:02:57 2018
+++ pkgsrc/pkgtools/dfdisk/Makefile     Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/09/27 23:02:57 tnn Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:12 rillig Exp $
 #
 
 PKGNAME=       dfdisk-1.0
@@ -27,12 +27,12 @@ INSTALLATION_DIRS=  bin ${PKGMANDIR}/man1
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     dfdisk.sh dfdisk.1 dfdisk.conf
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=      -e 's,@PKGVERSION@,${PKGVERSION},g'
-SUBST_SED.paths+=      -e 's,@PKGBASE@,${PKGBASE},g'
-SUBST_SED.paths+=      -e 's,@FTP@,${FTP},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     PKGVERSION
+SUBST_VARS.paths+=     PKGBASE
+SUBST_VARS.paths+=     FTP
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     pre-install
 
 post-extract:

Index: pkgsrc/pkgtools/libkver/Makefile
diff -u pkgsrc/pkgtools/libkver/Makefile:1.39 pkgsrc/pkgtools/libkver/Makefile:1.40
--- pkgsrc/pkgtools/libkver/Makefile:1.39       Wed Jul  4 13:40:32 2018
+++ pkgsrc/pkgtools/libkver/Makefile    Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2018/07/04 13:40:32 jperkin Exp $
+# $NetBSD: Makefile,v 1.40 2019/05/23 19:23:12 rillig Exp $
 
 PKGNAME=               libkver-${VERSION}
 CATEGORIES=            pkgtools
@@ -32,8 +32,8 @@ FILES_SUBST+=         HAS_SYSCTL=false
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     kver/kver.sh kver/kver.8 lib/kver.3
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     SH
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS+=    sbin ${PKGMANDIR}/man8 ${PKGMANDIR}/cat8

Index: pkgsrc/pkgtools/pkg_alternatives/Makefile
diff -u pkgsrc/pkgtools/pkg_alternatives/Makefile:1.22 pkgsrc/pkgtools/pkg_alternatives/Makefile:1.23
--- pkgsrc/pkgtools/pkg_alternatives/Makefile:1.22      Thu Oct  9 14:06:49 2014
+++ pkgsrc/pkgtools/pkg_alternatives/Makefile   Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2014/10/09 14:06:49 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:12 rillig Exp $
 #
 
 PKGNAME=       pkg_alternatives-1.6
@@ -28,14 +28,14 @@ SUBST_STAGE.vars=   do-configure
 SUBST_MESSAGE.vars=    Configuring sources.
 SUBST_FILES.vars=      pkg_alternatives.8 pkg_alternatives.sh
 SUBST_SED.vars=                -e 's|@CONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.vars+=       -e 's|@DATADIR@|${DATADIR}|g'
-SUBST_SED.vars+=       -e 's|@DBDIR@|${DBDIR}|g'
-SUBST_SED.vars+=       -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
-SUBST_SED.vars+=       -e 's|@PKG_DBDIR@|${PKG_DBDIR}|g'
-SUBST_SED.vars+=       -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.vars=       DATADIR
+SUBST_VARS.vars+=      DBDIR
+SUBST_VARS.vars+=      PKGMANDIR
+SUBST_VARS.vars+=      PKG_DBDIR
+SUBST_VARS.vars+=      PREFIX
 SUBST_SED.vars+=       -e 's|@ROOT_USER@|${REAL_ROOT_USER}|g'
-SUBST_SED.vars+=       -e 's|@ID@|${ID}|g'
-SUBST_SED.vars+=       -e 's|@SH@|${SH}|g'
+SUBST_VARS.vars+=      ID
+SUBST_VARS.vars+=      SH
 
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin
 

Index: pkgsrc/pkgtools/pkg_distinst/Makefile
diff -u pkgsrc/pkgtools/pkg_distinst/Makefile:1.12 pkgsrc/pkgtools/pkg_distinst/Makefile:1.13
--- pkgsrc/pkgtools/pkg_distinst/Makefile:1.12  Wed Aug 22 09:46:11 2018
+++ pkgsrc/pkgtools/pkg_distinst/Makefile       Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/08/22 09:46:11 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2019/05/23 19:23:12 rillig Exp $
 
 PKGNAME=       pkg_distinst-0.02
 PKGREVISION=   6
@@ -16,9 +16,9 @@ AUTO_MKDIRS=  yes
 SUBST_CLASSES+=                di
 SUBST_STAGE.di=                do-configure
 SUBST_FILES.di=                pkg_distinst.pl
-SUBST_SED.di=          -e 's,@PERL5@,${PERL5},g'
-SUBST_SED.di+=         -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
-SUBST_SED.di+=         -e 's,@MAKE@,${MAKE},g'
+SUBST_VARS.di=         PERL5
+SUBST_VARS.di+=                PKGSRCDIR
+SUBST_VARS.di+=                MAKE
 SUBST_MESSAGE.di=      Fixing script for installation.
 
 do-extract:

Index: pkgsrc/pkgtools/pkg_filecheck/Makefile
diff -u pkgsrc/pkgtools/pkg_filecheck/Makefile:1.45 pkgsrc/pkgtools/pkg_filecheck/Makefile:1.46
--- pkgsrc/pkgtools/pkg_filecheck/Makefile:1.45 Wed Aug 22 09:46:11 2018
+++ pkgsrc/pkgtools/pkg_filecheck/Makefile      Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2018/08/22 09:46:11 wiz Exp $
+# $NetBSD: Makefile,v 1.46 2019/05/23 19:23:12 rillig Exp $
 #
 
 PKGNAME=       pkg_filecheck-0.4
@@ -27,10 +27,10 @@ INSTALLATION_DIRS= \
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     builddb.pl builddb.1 pkg_filecheck.conf
 SUBST_FILES.paths+=    pkg_filecheck.conf.5 pkg_filecheck.c pkg_filecheck.1
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PERL5@,${PERL5},g'
-SUBST_SED.paths+=      -e 's,@PKG_DBDIR@,${PKG_DBDIR},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PERL5
+SUBST_VARS.paths+=     PKG_DBDIR
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 post-extract:

Index: pkgsrc/pkgtools/pkg_notify/Makefile
diff -u pkgsrc/pkgtools/pkg_notify/Makefile:1.28 pkgsrc/pkgtools/pkg_notify/Makefile:1.29
--- pkgsrc/pkgtools/pkg_notify/Makefile:1.28    Thu Sep 27 23:00:48 2018
+++ pkgsrc/pkgtools/pkg_notify/Makefile Thu May 23 19:23:12 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2018/09/27 23:00:48 tnn Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/23 19:23:12 rillig Exp $
 
 PKGNAME=       pkg_notify-0.4.6
 PKGREVISION=   1
@@ -26,11 +26,11 @@ SUBST_CLASSES+=                     pkg_notify
 SUBST_STAGE.pkg_notify=                pre-install
 SUBST_FILES.pkg_notify=                pkg_notify
 SUBST_FILES.pkg_notify+=       pkg_notify.1
-SUBST_SED.pkg_notify=          -e 's|@PKGSRCDIR@|${PKGSRCDIR}|'
-SUBST_SED.pkg_notify+=         -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.pkg_notify+=         -e 's|@MAKE@|${MAKE:Q}|g'
+SUBST_VARS.pkg_notify=         PKGSRCDIR
+SUBST_VARS.pkg_notify+=                PREFIX
+SUBST_VARS.pkg_notify+=                MAKE
 SUBST_SED.pkg_notify+=         -e 's|@PERL@|${PERL5:Q}|g'
-SUBST_SED.pkg_notify+=         -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_VARS.pkg_notify+=                PKG_SYSCONFDIR
 
 INSTALLATION_DIRS=     bin ${EGDIR} ${PKGMANDIR}/man1
 

Index: pkgsrc/pkgtools/pkg_p5up2date/Makefile
diff -u pkgsrc/pkgtools/pkg_p5up2date/Makefile:1.17 pkgsrc/pkgtools/pkg_p5up2date/Makefile:1.18
--- pkgsrc/pkgtools/pkg_p5up2date/Makefile:1.17 Wed Aug 22 09:46:11 2018
+++ pkgsrc/pkgtools/pkg_p5up2date/Makefile      Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2018/08/22 09:46:11 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2019/05/23 19:23:13 rillig Exp $
 
 PKGNAME=       pkg_p5up2date-0.06
 PKGREVISION=   4
@@ -28,7 +28,7 @@ SUBST_CLASSES+=                       pkgsrcdir
 SUBST_STAGE.pkgsrcdir=         pre-configure
 SUBST_MESSAGE.pkgsrcdir=       Recording default path of pkgsrc base directory.
 SUBST_FILES.pkgsrcdir=         pkg_p5up2date.pl
-SUBST_SED.pkgsrcdir=           -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
+SUBST_VARS.pkgsrcdir=          PKGSRCDIR
 
 # REPLACE_PERL+=               pkg_p5up2date.pl
 

Index: pkgsrc/pkgtools/pkgclean/Makefile
diff -u pkgsrc/pkgtools/pkgclean/Makefile:1.21 pkgsrc/pkgtools/pkgclean/Makefile:1.22
--- pkgsrc/pkgtools/pkgclean/Makefile:1.21      Fri Sep 14 16:31:28 2018
+++ pkgsrc/pkgtools/pkgclean/Makefile   Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2018/09/14 16:31:28 leot Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:23:13 rillig Exp $
 
 PKGNAME=       pkgclean-20051116
 CATEGORIES=    pkgtools
@@ -21,8 +21,8 @@ do-install:
 SUBST_CLASSES+=                path
 SUBST_STAGE.path=      pre-configure
 SUBST_FILES.path=      pkgclean.sh pkgclean.1
-SUBST_SED.path+=       -e 's,@SH@,${SH},g'
-SUBST_SED.path+=       -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
+SUBST_VARS.path=       SH
+SUBST_VARS.path+=      PKGSRCDIR
 SUBST_MESSAGE.path=    Adjusting pkgsrc directory.
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/pkgtools/pkglint4/Makefile
diff -u pkgsrc/pkgtools/pkglint4/Makefile:1.10 pkgsrc/pkgtools/pkglint4/Makefile:1.11
--- pkgsrc/pkgtools/pkglint4/Makefile:1.10      Wed Aug 22 09:46:11 2018
+++ pkgsrc/pkgtools/pkglint4/Makefile   Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2018/08/22 09:46:11 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2019/05/23 19:23:13 rillig Exp $
 
 PKGNAME=       pkglint4-4.164
 PKGREVISION=   1
@@ -34,11 +34,11 @@ SUBST_FILES.pkglint+=       build.pl pkglint.p
 .if defined(BATCH)
 SUBST_SED.pkglint+=    -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
 .else
-SUBST_SED.pkglint+=    -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
+SUBST_VARS.pkglint=    PKGSRCDIR
 .endif
-SUBST_SED.pkglint+=    -e s\|@PREFIX@\|${PREFIX}\|g
+SUBST_VARS.pkglint=    PREFIX
 SUBST_SED.pkglint+=    -e s\|@DISTVER@\|${PKGNAME:S/pkglint-//}\|g
-SUBST_SED.pkglint+=    -e s\|@MAKE@\|${MAKE:Q}\|g
+SUBST_VARS.pkglint+=   MAKE
 SUBST_SED.pkglint+=    -e s\|@PERL@\|${PERL5:Q}\|g
 SUBST_SED.pkglint+=    -e s\|@DATADIR@\|${FILESDIR}\|g
 

Index: pkgsrc/pkgtools/pkgsrc-todo/Makefile
diff -u pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.13 pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.14
--- pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.13   Wed Aug 22 09:46:11 2018
+++ pkgsrc/pkgtools/pkgsrc-todo/Makefile        Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/08/22 09:46:11 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:13 rillig Exp $
 
 PKGNAME=       pkgsrc-todo-1.3
 PKGREVISION=   3
@@ -27,10 +27,10 @@ SUBST_FILES.todo+=  list_todo.sh
 SUBST_FILES.todo+=     obsolete_todo.pl
 SUBST_FILES.todo+=     obsolete_todo.1
 SUBST_SED.todo+=       -e s\|pkgsrc/\|${PKGSRCDIR}/\|g
-SUBST_SED.todo+=       -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
+SUBST_VARS.todo=       PKGSRCDIR
 SUBST_SED.todo+=       -e s\|@PERL@\|${PERL5:Q}\|g
-SUBST_SED.todo+=       -e s\|@SED@\|${SED:Q}\|g
-SUBST_SED.todo+=       -e s\|@PKG_INFO@\|${PKG_INFO:Q}\|g
+SUBST_VARS.todo+=      SED
+SUBST_VARS.todo+=      PKG_INFO
 
 do-extract:
        cd ${FILESDIR} && ${CP} add_todo.1 add_todo.pl list_todo.sh \

Index: pkgsrc/pkgtools/url2pkg/Makefile
diff -u pkgsrc/pkgtools/url2pkg/Makefile:1.89 pkgsrc/pkgtools/url2pkg/Makefile:1.90
--- pkgsrc/pkgtools/url2pkg/Makefile:1.89       Wed Aug 22 09:46:12 2018
+++ pkgsrc/pkgtools/url2pkg/Makefile    Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.89 2018/08/22 09:46:12 wiz Exp $
+# $NetBSD: Makefile,v 1.90 2019/05/23 19:23:13 rillig Exp $
 
 PKGNAME=       url2pkg-2.29
 PKGREVISION=   1
@@ -25,13 +25,13 @@ SUBST_CLASSES+=             up
 SUBST_STAGE.up=                do-configure
 SUBST_MESSAGE.up=      Replacing variable placeholders
 SUBST_FILES.up=                url2pkg.pl MakeMaker.pm
-SUBST_SED.up=          -e 's,@MAKE@,'${MAKE:Q}',g'
+SUBST_VARS.up=         MAKE
 SUBST_SED.up+=         -e 's,@PERL@,${PERL5},g'
 SUBST_SED.up+=         -e 's,@PERLLIBDIR@,${PREFIX}/lib/url2pkg,g'
 .if defined(BATCH)
 SUBST_SED.up+=         -e 's,@PKGSRCDIR@,/usr/pkgsrc,g'
 .else
-SUBST_SED.up+=         -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
+SUBST_VARS.up+=                PKGSRCDIR
 .endif
 
 do-install:

Index: pkgsrc/pkgtools/verifypc/Makefile
diff -u pkgsrc/pkgtools/verifypc/Makefile:1.16 pkgsrc/pkgtools/verifypc/Makefile:1.17
--- pkgsrc/pkgtools/verifypc/Makefile:1.16      Tue Feb 20 02:55:15 2018
+++ pkgsrc/pkgtools/verifypc/Makefile   Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2018/02/20 02:55:15 dholland Exp $
+# $NetBSD: Makefile,v 1.17 2019/05/23 19:23:13 rillig Exp $
 #
 
 PKGNAME=       verifypc-1.7
@@ -15,8 +15,8 @@ SUBST_CLASSES+=               vars
 SUBST_STAGE.vars=      do-configure
 SUBST_MESSAGE.vars=    Configuring sources.
 SUBST_FILES.vars=      *
-SUBST_SED.vars=                -e s\|@MAKE@\|${MAKE:Q}\|g
-SUBST_SED.vars+=       -e s\|@SH@\|${SH:Q}\|g
+SUBST_VARS.vars=       MAKE
+SUBST_VARS.vars+=      SH
 
 INSTALLATION_DIRS=     ${PKGMANDIR}/man1 bin
 

Index: pkgsrc/print/cups-base/Makefile
diff -u pkgsrc/print/cups-base/Makefile:1.18 pkgsrc/print/cups-base/Makefile:1.19
--- pkgsrc/print/cups-base/Makefile:1.18        Mon Dec 10 07:54:49 2018
+++ pkgsrc/print/cups-base/Makefile     Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2018/12/10 07:54:49 leot Exp $
+# $NetBSD: Makefile,v 1.19 2019/05/23 19:23:13 rillig Exp $
 
 .include "../../print/cups/Makefile.common"
 
@@ -113,7 +113,7 @@ OWN_DIRS_PERMS+=    ${CUPS_CACHE}/rss ${REA
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/cups.pam
-SUBST_SED.paths+=      -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      LOCALBASE
 SUBST_STAGE.paths=     pre-configure
 
 SUBST_CLASSES+=                rpathfix

Index: pkgsrc/print/cups15/Makefile
diff -u pkgsrc/print/cups15/Makefile:1.22 pkgsrc/print/cups15/Makefile:1.23
--- pkgsrc/print/cups15/Makefile:1.22   Wed Aug 22 09:46:12 2018
+++ pkgsrc/print/cups15/Makefile        Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2018/08/22 09:46:12 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:13 rillig Exp $
 #
 # The CUPS author is very good about taking back changes into the main
 # CUPS distribution.  The correct place to send patches or bug-fixes is:
@@ -142,7 +142,7 @@ OWN_DIRS_PERMS+=    ${CUPS_CACHE}/rss ${REA
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/cups.pam
-SUBST_SED.paths+=      -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      LOCALBASE
 SUBST_STAGE.paths=     pre-configure
 
 SUBST_CLASSES+=                rpathfix

Index: pkgsrc/print/papersize/Makefile
diff -u pkgsrc/print/papersize/Makefile:1.29 pkgsrc/print/papersize/Makefile:1.30
--- pkgsrc/print/papersize/Makefile:1.29        Mon Oct  8 13:45:43 2012
+++ pkgsrc/print/papersize/Makefile     Thu May 23 19:23:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2012/10/08 13:45:43 asau Exp $
+# $NetBSD: Makefile,v 1.30 2019/05/23 19:23:13 rillig Exp $
 #
 
 DISTNAME=      papersize-1.0.8
@@ -18,18 +18,18 @@ INSTALLATION_DIRS=  bin ${PKGMANDIR}/man1
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     getpapersize setpapersize
-SUBST_SED.paths=       -e 's,@SH@,${SH},'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},'
-SUBST_SED.paths+=      -e 's,@X11BASE@,${X11BASE},'
-SUBST_SED.paths+=      -e 's,@ECHO@,${ECHO},'
-SUBST_SED.paths+=      -e 's,@AWK@,${AWK},'
-SUBST_SED.paths+=      -e 's,@LOCALBASE@,${LOCALBASE},'
-SUBST_SED.paths+=      -e 's,@SED@,${SED},'
-SUBST_SED.paths+=      -e 's,@GREP@,${GREP},'
-SUBST_SED.paths+=      -e 's,@MV@,${MV},'
-SUBST_SED.paths+=      -e 's,@TR@,${TR},'
-SUBST_SED.paths+=      -e 's,@RM@,${RM},'
-SUBST_SED.paths+=      -e 's,@CHMOD@,${CHMOD},'
+SUBST_VARS.paths=      SH
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     X11BASE
+SUBST_VARS.paths+=     ECHO
+SUBST_VARS.paths+=     AWK
+SUBST_VARS.paths+=     LOCALBASE
+SUBST_VARS.paths+=     SED
+SUBST_VARS.paths+=     GREP
+SUBST_VARS.paths+=     MV
+SUBST_VARS.paths+=     TR
+SUBST_VARS.paths+=     RM
+SUBST_VARS.paths+=     CHMOD
 
 do-extract:
        cd ${FILESDIR} && cp setpapersize getpapersize ${WRKSRC}/.

Index: pkgsrc/print/tex-musixtex/Makefile
diff -u pkgsrc/print/tex-musixtex/Makefile:1.39 pkgsrc/print/tex-musixtex/Makefile:1.40
--- pkgsrc/print/tex-musixtex/Makefile:1.39     Fri Jan 25 19:26:55 2019
+++ pkgsrc/print/tex-musixtex/Makefile  Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2019/01/25 19:26:55 markd Exp $
+# $NetBSD: Makefile,v 1.40 2019/05/23 19:23:14 rillig Exp $
 
 DISTNAME=      musixtex
 PKGNAME=       tex-${DISTNAME}-1.29
@@ -19,7 +19,7 @@ SUBST_CLASSES+=               paths
 SUBST_MESSAGE.paths=   Setting paths to commands.
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     bin/musixtex
-SUBST_SED.paths=       -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      LOCALBASE
 
 REPLACE_TEXLUA=                bin/musixflx bin/musixtex
 

Index: pkgsrc/print/xpdf/Makefile
diff -u pkgsrc/print/xpdf/Makefile:1.86 pkgsrc/print/xpdf/Makefile:1.87
--- pkgsrc/print/xpdf/Makefile:1.86     Wed Jul  4 13:40:33 2018
+++ pkgsrc/print/xpdf/Makefile  Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.86 2018/07/04 13:40:33 jperkin Exp $
+# $NetBSD: Makefile,v 1.87 2019/05/23 19:23:14 rillig Exp $
 
 DISTNAME=      xpdf-3.04
 CATEGORIES=    print
@@ -38,8 +38,8 @@ SUBST_CLASSES+=               paths
 #SUBST_FILES.paths=    doc/pdffonts.1 doc/pdfimages.1 doc/pdfinfo.1
 #SUBST_FILES.paths+=   doc/pdftoppm.1 doc/pdftops.1 doc/pdftotext.1
 SUBST_FILES.paths+=    doc/sample-xpdfrc doc/xpdf.1 doc/xpdfrc.5
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 OWN_DIRS=              share/xpdf

Index: pkgsrc/security/Bastille/Makefile
diff -u pkgsrc/security/Bastille/Makefile:1.13 pkgsrc/security/Bastille/Makefile:1.14
--- pkgsrc/security/Bastille/Makefile:1.13      Wed Aug 22 09:46:16 2018
+++ pkgsrc/security/Bastille/Makefile   Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/08/22 09:46:16 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:14 rillig Exp $
 #
 
 DISTNAME=      Bastille-3.0.9
@@ -34,9 +34,9 @@ SUBST_SED.b+=         -e 's,\$$RPM_BUILD_ROOT/v
 SUBST_CLASSES+=                b2
 SUBST_STAGE.b2=                pre-configure
 SUBST_FILES.b2=                bin/bastille Bastille/API.pm
-SUBST_SED.b2=          -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.b2+=         -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.b2+=         -e 's,@VARBASE@,${VARBASE},g'
+SUBST_VARS.b2=         PKG_SYSCONFDIR
+SUBST_VARS.b2+=                PREFIX
+SUBST_VARS.b2+=                VARBASE
 
 SUBST_CLASSES+=                b3
 SUBST_STAGE.b3=                pre-configure

Index: pkgsrc/security/amap/Makefile
diff -u pkgsrc/security/amap/Makefile:1.26 pkgsrc/security/amap/Makefile:1.27
--- pkgsrc/security/amap/Makefile:1.26  Wed Aug 16 20:45:44 2017
+++ pkgsrc/security/amap/Makefile       Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2017/08/16 20:45:44 wiz Exp $
+# $NetBSD: Makefile,v 1.27 2019/05/23 19:23:14 rillig Exp $
 #
 
 DISTNAME=      amap-5.2
@@ -24,13 +24,13 @@ CONF_FILES+=        ${EGDIR}/appdefs.trig ${PKG
 SUBST_CLASSES+=                conf
 SUBST_FILES.conf=      configure
 SUBST_STAGE.conf=      pre-configure
-SUBST_SED.conf=                -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.conf=       PREFIX
 SUBST_SED.conf+=       -e 's|@MANDIR@|${PREFIX}/man|g'
-SUBST_SED.conf+=       -e 's|@COMPILER_RPATH_FLAG@|${COMPILER_RPATH_FLAG}|g'
+SUBST_VARS.conf+=      COMPILER_RPATH_FLAG
 SUBST_SED.conf+=       -e 's|@SSLBASE@|${BUILDLINK_PREFIX.openssl}|g'
-SUBST_SED.conf+=       -e "s|@UNAME@|${UNAME}|g"
-SUBST_SED.conf+=       -e "s|@GREP@|${GREP}|g"
-SUBST_SED.conf+=       -e "s|@SED@|${SED}|g"
+SUBST_VARS.conf+=      UNAME
+SUBST_VARS.conf+=      GREP
+SUBST_VARS.conf+=      SED
 SUBST_MESSAGE.conf=    Fixing configure script.
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1 ${EGDIR}

Index: pkgsrc/security/base/Makefile
diff -u pkgsrc/security/base/Makefile:1.44 pkgsrc/security/base/Makefile:1.45
--- pkgsrc/security/base/Makefile:1.44  Wed Aug 22 09:46:17 2018
+++ pkgsrc/security/base/Makefile       Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2018/08/22 09:46:17 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2019/05/23 19:23:14 rillig Exp $
 
 DISTNAME=      base-1.4.3.1
 PKGREVISION=   13
@@ -60,9 +60,9 @@ BUILD_DEFS+=          APACHE_USER APACHE_GROUP
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      base.conf base_conf.php.dist
-SUBST_SED.conf=                -e "s|@BASE_DIR@|${BASE_DIR}|g"
-SUBST_SED.conf+=       -e "s|@DBTYPE@|${DBTYPE}|g"
-SUBST_SED.conf+=       -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.conf=       BASE_DIR
+SUBST_VARS.conf+=      DBTYPE
+SUBST_VARS.conf+=      PREFIX
 SUBST_MESSAGE.conf=    Fixing configuration files.
 
 INSTALLATION_DIRS=     ${BASE_DIR} ${EGDIR} share/doc/base

Index: pkgsrc/security/cvm/Makefile
diff -u pkgsrc/security/cvm/Makefile:1.22 pkgsrc/security/cvm/Makefile:1.23
--- pkgsrc/security/cvm/Makefile:1.22   Mon Jul 31 20:34:17 2017
+++ pkgsrc/security/cvm/Makefile        Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2017/07/31 20:34:17 schmonz Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:14 rillig Exp $
 #
 
 DISTNAME=              cvm-0.97
@@ -30,7 +30,7 @@ SUBST_MESSAGE.paths=  Fixing paths.
 SUBST_CLASSES+=                shlibs
 SUBST_STAGE.shlibs=    do-configure
 SUBST_FILES.shlibs=    INSTHIER
-SUBST_SED.shlibs=      -e 's|@CVM_LIB_EXT@|${CVM_LIB_EXT}|g'
+SUBST_VARS.shlibs=     CVM_LIB_EXT
 SUBST_MESSAGE.shlibs=  Fixing shlibs.
 
 RCD_SCRIPTS=           cvm

Index: pkgsrc/security/gpgme/Makefile
diff -u pkgsrc/security/gpgme/Makefile:1.92 pkgsrc/security/gpgme/Makefile:1.93
--- pkgsrc/security/gpgme/Makefile:1.92 Wed Apr  3 14:28:57 2019
+++ pkgsrc/security/gpgme/Makefile      Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.92 2019/04/03 14:28:57 adam Exp $
+# $NetBSD: Makefile,v 1.93 2019/05/23 19:23:14 rillig Exp $
 
 DISTNAME=      gpgme-1.13.0
 CATEGORIES=    security
@@ -20,7 +20,7 @@ INFO_FILES=           yes
 SUBST_CLASSES+=                pthread
 SUBST_FILES.pthread=   src/gpgme-config.in
 SUBST_SED.pthread+=    -e 's,@PTHREAD_LIBS@,${PTHREAD_LDFLAGS} ${PTHREAD_LIBS},g'
-SUBST_SED.pthread+=    -e 's,@PTHREAD_CFLAGS@,${PTHREAD_CFLAGS},g'
+SUBST_VARS.pthread=    PTHREAD_CFLAGS
 SUBST_STAGE.pthread=   pre-configure
 
 CPPFLAGS.Darwin=       -D_POSIX_C_SOURCE=200809L

Index: pkgsrc/security/john/Makefile
diff -u pkgsrc/security/john/Makefile:1.25 pkgsrc/security/john/Makefile:1.26
--- pkgsrc/security/john/Makefile:1.25  Thu Aug 24 17:22:58 2017
+++ pkgsrc/security/john/Makefile       Thu May 23 19:23:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2017/08/24 17:22:58 jperkin Exp $
+# $NetBSD: Makefile,v 1.26 2019/05/23 19:23:14 rillig Exp $
 #
 
 DISTNAME=      john-1.8.0
@@ -73,7 +73,7 @@ INSTALLATION_DIRS=    bin share/john
 SUBST_CLASSES+=                john
 SUBST_STAGE.john=      pre-build
 SUBST_FILES.john=      src/params.h
-SUBST_SED.john=                -e "s+@PREFIX@+${PREFIX}+g"
+SUBST_VARS.john=       PREFIX
 
 do-install:
        # programs and scripts

Index: pkgsrc/security/libprelude/Makefile.common
diff -u pkgsrc/security/libprelude/Makefile.common:1.13 pkgsrc/security/libprelude/Makefile.common:1.14
--- pkgsrc/security/libprelude/Makefile.common:1.13     Wed Jul  4 13:40:34 2018
+++ pkgsrc/security/libprelude/Makefile.common  Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.13 2018/07/04 13:40:34 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.14 2019/05/23 19:23:15 rillig Exp $
 #
 # used by security/libprelude/Makefile
 # used by security/libprelude-lua/Makefile
@@ -52,7 +52,7 @@ MAKE_DIRS_PERMS+=     ${PKG_SYSCONFDIR}/prof
 SUBST_CLASSES+=                make
 SUBST_STAGE.make=      pre-configure
 SUBST_FILES.make=      Makefile.in
-SUBST_SED.make=                -e 's,@EGDIR@,${EGDIR},g'
+SUBST_VARS.make=       EGDIR
 
 INSTALLATION_DIRS=     share/examples/libprelude
 

Index: pkgsrc/security/logcheck/Makefile
diff -u pkgsrc/security/logcheck/Makefile:1.21 pkgsrc/security/logcheck/Makefile:1.22
--- pkgsrc/security/logcheck/Makefile:1.21      Wed Aug 16 20:21:14 2017
+++ pkgsrc/security/logcheck/Makefile   Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2017/08/16 20:21:14 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:23:15 rillig Exp $
 
 DISTNAME=      logcheck-1.1.1
 PKGREVISION=   1
@@ -24,8 +24,8 @@ SUBST_STAGE.prefix=   pre-configure
 SUBST_MESSAGE.prefix=  Fixing hard-coded paths.
 SUBST_FILES.prefix=    Makefile systems/freebsd/logcheck.sh
 SUBST_SED.prefix=      -e "s+/usr/local+${PREFIX}+g"
-SUBST_SED.prefix+=     -e "s+@PKG_SYSCONFDIR@+${PKG_SYSCONFDIR}+g"
-SUBST_SED.prefix+=     -e "s+@TEMPDIR@+${TEMPDIR}+g"
+SUBST_VARS.prefix=     PKG_SYSCONFDIR
+SUBST_VARS.prefix+=    TEMPDIR
 
 INSTALLATION_DIRS+=    bin ${EGDIR}
 

Index: pkgsrc/security/lynis/Makefile
diff -u pkgsrc/security/lynis/Makefile:1.5 pkgsrc/security/lynis/Makefile:1.6
--- pkgsrc/security/lynis/Makefile:1.5  Mon Feb 26 17:42:54 2018
+++ pkgsrc/security/lynis/Makefile      Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/02/26 17:42:54 sborrill Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:15 rillig Exp $
 #
 
 DISTNAME=      lynis-2.6.2
@@ -17,13 +17,13 @@ SUBST_CLASSES+=             libdir
 SUBST_STAGE.libdir=    pre-install
 SUBST_MESSAGE.libdir=  Fixing lib path
 SUBST_FILES.libdir=    lynis
-SUBST_SED.libdir=      -e "s,@PREFIX@,${PREFIX},"
+SUBST_VARS.libdir=     PREFIX
 
 SUBST_CLASSES+=                vardir
 SUBST_STAGE.vardir=    pre-install
 SUBST_MESSAGE.vardir=  Fixing var path
 SUBST_FILES.vardir=    lynis
-SUBST_SED.vardir=      -e "s,@VARBASE@,${VARBASE},"
+SUBST_VARS.vardir=     VARBASE
 
 SUBST_CLASSES+=                confdir
 SUBST_STAGE.confdir=   pre-install

Index: pkgsrc/security/opendnssec/Makefile
diff -u pkgsrc/security/opendnssec/Makefile:1.74 pkgsrc/security/opendnssec/Makefile:1.75
--- pkgsrc/security/opendnssec/Makefile:1.74    Wed Apr  3 00:33:05 2019
+++ pkgsrc/security/opendnssec/Makefile Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.74 2019/04/03 00:33:05 ryoon Exp $
+# $NetBSD: Makefile,v 1.75 2019/05/23 19:23:15 rillig Exp $
 #
 
 DISTNAME=      opendnssec-1.4.13
@@ -51,7 +51,7 @@ PKG_SYSCONFSUBDIR=    opendnssec
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKSRC}/conf/Makefile.in
 SUBST_STAGE.paths=     pre-configure
-SUBST_SED.paths=       -e 's,@EGDIR@,${EGDIR},'
+SUBST_VARS.paths=      EGDIR
 
 CXXFLAGS.NetBSD+=      -D_NETBSD_SOURCE
 

Index: pkgsrc/security/pam-tacplus/Makefile
diff -u pkgsrc/security/pam-tacplus/Makefile:1.8 pkgsrc/security/pam-tacplus/Makefile:1.9
--- pkgsrc/security/pam-tacplus/Makefile:1.8    Wed Jul  4 13:40:34 2018
+++ pkgsrc/security/pam-tacplus/Makefile        Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2018/07/04 13:40:34 jperkin Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:23:15 rillig Exp $
 #
 
 DISTNAME=      pam_tacplus-1.3.6
@@ -19,7 +19,7 @@ GNU_CONFIGURE=yes
 SUBST_CLASSES+=                egdir
 SUBST_STAGE.egdir=     pre-configure
 SUBST_FILES.egdir=     Makefile.in
-SUBST_SED.egdir=       -e "s,@EGDIR@,${EGDIR},"
+SUBST_VARS.egdir=      EGDIR
 
 .include "../../mk/pam.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/security/prelude-correlator/Makefile
diff -u pkgsrc/security/prelude-correlator/Makefile:1.21 pkgsrc/security/prelude-correlator/Makefile:1.22
--- pkgsrc/security/prelude-correlator/Makefile:1.21    Fri Apr 26 14:12:45 2019
+++ pkgsrc/security/prelude-correlator/Makefile Thu May 23 19:23:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2019/04/26 14:12:45 maya Exp $
+# $NetBSD: Makefile,v 1.22 2019/05/23 19:23:15 rillig Exp $
 
 DISTNAME=      prelude-correlator-0.9.0-beta8
 PKGNAME=       prelude-correlator-${DISTNAME:S/-beta/beta/:C/.*-//}
@@ -38,9 +38,9 @@ SUBST_CLASSES+=               code
 SUBST_STAGE.code=      pre-configure
 SUBST_FILES.code=      run-prelude-correlator.c
 SUBST_FILES.code+=     ${WRKSRC}/*.py
-SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.code+=       -e 's,@PRELUDE_USER@,${PRELUDE_USER},g'
-SUBST_SED.code+=       -e 's,@PRELUDE_HOME@,${PRELUDE_HOME},g'
+SUBST_VARS.code=       PREFIX
+SUBST_VARS.code+=      PRELUDE_USER
+SUBST_VARS.code+=      PRELUDE_HOME
 
 CONF_FILES+=           ${EGDIR}/prelude-correlator.conf ${PKG_SYSCONFDIR}/prelude-correlator/prelude-correlator.conf
 CONF_FILES+=           ${EGDIR}/dshield.dat ${PRELUDE_HOME}/dshield.dat

Index: pkgsrc/security/prelude-lml/Makefile
diff -u pkgsrc/security/prelude-lml/Makefile:1.42 pkgsrc/security/prelude-lml/Makefile:1.43
--- pkgsrc/security/prelude-lml/Makefile:1.42   Wed Jul  4 13:40:35 2018
+++ pkgsrc/security/prelude-lml/Makefile        Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2018/07/04 13:40:35 jperkin Exp $
+# $NetBSD: Makefile,v 1.43 2019/05/23 19:23:16 rillig Exp $
 #
 
 DISTNAME=              prelude-lml-0.9.15
@@ -51,13 +51,13 @@ FILES_SUBST+=       PRELUDE_GROUP=${PRELUDE_GR
 SUBST_CLASSES+=                code
 SUBST_STAGE.code=      pre-configure
 SUBST_FILES.code=      run-prelude-lml.c
-SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.code+=       -e 's,@PRELUDE_USER@,${PRELUDE_USER},g'
+SUBST_VARS.code=       PREFIX
+SUBST_VARS.code+=      PRELUDE_USER
 
 SUBST_CLASSES+=                make
 SUBST_STAGE.make=      pre-configure
 SUBST_FILES.make=      Makefile.in
-SUBST_SED.make=                -e 's,@EGDIR@,${EGDIR},g'
+SUBST_VARS.make=       EGDIR
 
 PKG_SYSCONFSUBDIR=     prelude-lml
 CONF_FILES_PERMS+=     ${EGDIR}/plugins.rules ${PKG_SYSCONFDIR}/plugins.rules \

Index: pkgsrc/security/prelude-manager/Makefile
diff -u pkgsrc/security/prelude-manager/Makefile:1.47 pkgsrc/security/prelude-manager/Makefile:1.48
--- pkgsrc/security/prelude-manager/Makefile:1.47       Wed Jul  4 13:40:35 2018
+++ pkgsrc/security/prelude-manager/Makefile    Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2018/07/04 13:40:35 jperkin Exp $
+# $NetBSD: Makefile,v 1.48 2019/05/23 19:23:16 rillig Exp $
 #
 
 DISTNAME=              prelude-manager-0.9.15
@@ -50,8 +50,8 @@ FILES_SUBST+=         PRELUDE_GROUP=${PRELUDE_U
 SUBST_CLASSES+=                code
 SUBST_STAGE.code=      pre-configure
 SUBST_FILES.code=      run-prelude-manager.c
-SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.code+=       -e 's,@PRELUDE_USER@,${PRELUDE_USER},g'
+SUBST_VARS.code=       PREFIX
+SUBST_VARS.code+=      PRELUDE_USER
 
 EGDIR=                 share/examples/prelude-manager/
 CONF_FILES+=           ${EGDIR}/prelude-manager.conf ${PKG_SYSCONFDIR}/prelude-manager/prelude-manager.conf

Index: pkgsrc/security/prelude-pflogger/Makefile
diff -u pkgsrc/security/prelude-pflogger/Makefile:1.19 pkgsrc/security/prelude-pflogger/Makefile:1.20
--- pkgsrc/security/prelude-pflogger/Makefile:1.19      Wed Jul  4 13:40:35 2018
+++ pkgsrc/security/prelude-pflogger/Makefile   Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/07/04 13:40:35 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:16 rillig Exp $
 #
 
 DISTNAME=      prelude-pflogger-0.9.0-rc2
@@ -45,13 +45,13 @@ MESSAGE_SUBST+=     PRELUDE_GROUP=${PRELUDE_
 SUBST_CLASSES+=                code
 SUBST_STAGE.code=      pre-configure
 SUBST_FILES.code=      run-prelude-pflogger.c
-SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.code+=       -e 's,@PRELUDE_USER@,${PRELUDE_USER},g'
+SUBST_VARS.code=       PREFIX
+SUBST_VARS.code+=      PRELUDE_USER
 
 SUBST_CLASSES+=         make
 SUBST_STAGE.make=       pre-configure
 SUBST_FILES.make=       Makefile.am
-SUBST_SED.make=         -e 's,@EGDIR@,${EGDIR},g'
+SUBST_VARS.make=       EGDIR
 
 RCD_SCRIPTS=           pflogger
 

Index: pkgsrc/security/py-prewikka/Makefile
diff -u pkgsrc/security/py-prewikka/Makefile:1.49 pkgsrc/security/py-prewikka/Makefile:1.50
--- pkgsrc/security/py-prewikka/Makefile:1.49   Fri Apr 26 13:14:13 2019
+++ pkgsrc/security/py-prewikka/Makefile        Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2019/04/26 13:14:13 maya Exp $
+# $NetBSD: Makefile,v 1.50 2019/05/23 19:23:16 rillig Exp $
 
 DISTNAME=              prewikka-${VERSION}
 PKGNAME=               ${PYPKGPREFIX}-prewikka-${VERSION}
@@ -44,9 +44,9 @@ PKG_USERS_VARS+=      PREWIKKA_USER
 SUBST_CLASSES+=                code
 SUBST_STAGE.code=      pre-configure
 SUBST_FILES.code=      runPrewikka.c
-SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.code+=       -e 's,@PREWIKKA_USER@,${PREWIKKA_USER},g'
-SUBST_SED.code+=       -e 's,@PYTHONBIN@,${PYTHONBIN},g'
+SUBST_VARS.code=       PREFIX
+SUBST_VARS.code+=      PREWIKKA_USER
+SUBST_VARS.code+=      PYTHONBIN
 
 FILES_SUBST+=  PREWIKKA_USER=${PREWIKKA_USER:Q}
 

Index: pkgsrc/security/py-tlslite/Makefile
diff -u pkgsrc/security/py-tlslite/Makefile:1.15 pkgsrc/security/py-tlslite/Makefile:1.16
--- pkgsrc/security/py-tlslite/Makefile:1.15    Sun Jul 23 22:30:03 2017
+++ pkgsrc/security/py-tlslite/Makefile Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2017/07/23 22:30:03 schmonz Exp $
+# $NetBSD: Makefile,v 1.16 2019/05/23 19:23:16 rillig Exp $
 
 DISTNAME=              tlslite-0.4.9
 PKGNAME=               ${PYPKGPREFIX}-${DISTNAME}
@@ -24,8 +24,8 @@ REPLACE_PYTHON=               setup.py tests/httpscli
 SUBST_CLASSES+=                pyclash
 SUBST_STAGE.pyclash=   do-configure
 SUBST_FILES.pyclash=   setup.py tests/tlstest.py tests/httpsserver.sh
-SUBST_SED.pyclash=     -e 's|@PYTHONBIN@|${PYTHONBIN}|g'
-SUBST_SED.pyclash+=    -e 's|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g'
+SUBST_VARS.pyclash=    PYTHONBIN
+SUBST_VARS.pyclash+=   PYVERSSUFFIX
 
 .include "../../lang/python/distutils.mk"
 .include "../../lang/python/application.mk"

Index: pkgsrc/security/softhsm/Makefile
diff -u pkgsrc/security/softhsm/Makefile:1.42 pkgsrc/security/softhsm/Makefile:1.43
--- pkgsrc/security/softhsm/Makefile:1.42       Wed Apr  3 00:33:05 2019
+++ pkgsrc/security/softhsm/Makefile    Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2019/04/03 00:33:05 ryoon Exp $
+# $NetBSD: Makefile,v 1.43 2019/05/23 19:23:16 rillig Exp $
 #
 
 DISTNAME=      softhsm-1.3.7
@@ -25,7 +25,7 @@ EGDIR=                        ${PREFIX}/share/examples/sofths
 SUBST_CLASSES+=         paths
 SUBST_FILES.paths=      ${WRKSRC}/Makefile.in
 SUBST_STAGE.paths=      pre-configure
-SUBST_SED.paths=        -e 's,@EGDIR@,${EGDIR},'
+SUBST_VARS.paths=      EGDIR
 
 CXXFLAGS.NetBSD+=      -D_NETBSD_SOURCE
 

Index: pkgsrc/sysutils/ansible/Makefile
diff -u pkgsrc/sysutils/ansible/Makefile:1.23 pkgsrc/sysutils/ansible/Makefile:1.24
--- pkgsrc/sysutils/ansible/Makefile:1.23       Fri Apr 26 13:14:14 2019
+++ pkgsrc/sysutils/ansible/Makefile    Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2019/04/26 13:14:14 maya Exp $
+# $NetBSD: Makefile,v 1.24 2019/05/23 19:23:16 rillig Exp $
 
 DISTNAME=      ansible-1.9.4
 PKGREVISION=   2
@@ -37,9 +37,9 @@ SUBST_FILES.prefix+=    lib/ansible/modu
 SUBST_FILES.prefix+=    plugins/README.md plugins/inventory/cobbler.py
 SUBST_FILES.prefix+=    plugins/inventory/collins.py
 SUBST_MESSAGE.prefix=   Fixing PREFIX path.
-SUBST_SED.prefix=       -e "s,@PREFIX@,${PREFIX},"
-SUBST_SED.prefix+=      -e "s,@PKG_SYSCONFBASE@,${PKG_SYSCONFBASE},"
-SUBST_SED.prefix+=      -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},"
+SUBST_VARS.prefix=     PREFIX
+SUBST_VARS.prefix+=    PKG_SYSCONFBASE
+SUBST_VARS.prefix+=    PKG_SYSCONFDIR
 
 SUBST_CLASSES+=         pythonbin
 SUBST_STAGE.pythonbin=  pre-configure

Index: pkgsrc/sysutils/atitvout/Makefile
diff -u pkgsrc/sysutils/atitvout/Makefile:1.15 pkgsrc/sysutils/atitvout/Makefile:1.16
--- pkgsrc/sysutils/atitvout/Makefile:1.15      Sun Jul 10 10:45:40 2016
+++ pkgsrc/sysutils/atitvout/Makefile   Thu May 23 19:23:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2016/07/10 10:45:40 rillig Exp $
+# $NetBSD: Makefile,v 1.16 2019/05/23 19:23:16 rillig Exp $
 
 DISTNAME=      atitvout-0.4
 PKGREVISION=   1
@@ -33,7 +33,7 @@ REPLACE_FILES.bash=   test.sh
 SUBST_CLASSES+=        sh
 SUBST_STAGE.sh=        pre-configure
 SUBST_FILES.sh=        test.sh
-SUBST_SED.sh=  -e "s,@PREFIX@,${PREFIX},"
+SUBST_VARS.sh= PREFIX
 
 INSTALLATION_DIRS=     sbin share/doc/atitvout
 

Index: pkgsrc/sysutils/backuppc/Makefile
diff -u pkgsrc/sysutils/backuppc/Makefile:1.8 pkgsrc/sysutils/backuppc/Makefile:1.9
--- pkgsrc/sysutils/backuppc/Makefile:1.8       Wed Aug 22 09:46:31 2018
+++ pkgsrc/sysutils/backuppc/Makefile   Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2018/08/22 09:46:31 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:23:17 rillig Exp $
 
 DISTNAME=      BackupPC-3.3.1
 PKGNAME=       ${DISTNAME:tl}
@@ -77,13 +77,13 @@ SUBST_FILES.fix-paths+=             ${WRKSRC}/build
 SUBST_FILES.fix-paths+=                ${WRKSRC}/backuppc.conf
 SUBST_FILES.fix-paths+=                ${WRKSRC}/cgiwrapper.c
 SUBST_SED.fix-paths=           -e 's,${PREFIX}/share/examples/BackupPC,${PKG_SYSCONFDIR},g'
-SUBST_SED.fix-paths+=          -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.fix-paths+=          -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.fix-paths+=          -e 's,@APACHE_USER@,${APACHE_USER},g'
-SUBST_SED.fix-paths+=          -e 's,@APACHE_GROUP@,${APACHE_GROUP},g'
-SUBST_SED.fix-paths+=          -e 's,@BACKUPPC_USER@,${BACKUPPC_USER},g'
-SUBST_SED.fix-paths+=          -e 's,@BACKUPPC_GROUP@,${BACKUPPC_GROUP},g'
-SUBST_SED.fix-paths+=          -e 's,@PERL5@,${PERL5},g'
+SUBST_VARS.fix-paths=          PREFIX
+SUBST_VARS.fix-paths+=         PKG_SYSCONFDIR
+SUBST_VARS.fix-paths+=         APACHE_USER
+SUBST_VARS.fix-paths+=         APACHE_GROUP
+SUBST_VARS.fix-paths+=         BACKUPPC_USER
+SUBST_VARS.fix-paths+=         BACKUPPC_GROUP
+SUBST_VARS.fix-paths+=         PERL5
 
 FILES_SUBST+=                  BACKUPPC_USER=${BACKUPPC_USER:Q} BACKUPPC_GROUP=${BACKUPPC_GROUP:Q}
 

Index: pkgsrc/sysutils/estd/Makefile
diff -u pkgsrc/sysutils/estd/Makefile:1.33 pkgsrc/sysutils/estd/Makefile:1.34
--- pkgsrc/sysutils/estd/Makefile:1.33  Tue Apr  9 11:08:13 2019
+++ pkgsrc/sysutils/estd/Makefile       Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2019/04/09 11:08:13 sevan Exp $
+# $NetBSD: Makefile,v 1.34 2019/05/23 19:23:17 rillig Exp $
 
 DISTNAME=      estd-r11
 PKGNAME=       estd-0.11
@@ -30,7 +30,7 @@ SUBST_CLASSES+=               rcd
 SUBST_STAGE.rcd=       do-configure
 SUBST_MESSAGE.rcd=     Fixing startup script.
 SUBST_FILES.rcd=       estd.sh
-SUBST_SED.rcd=         -e 's|@PREFIX@|${PREFIX}|'
-SUBST_SED.rcd+=                -e 's|@ECHO@|${ECHO}|'
+SUBST_VARS.rcd=                PREFIX
+SUBST_VARS.rcd+=       ECHO
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/gnometoaster/Makefile
diff -u pkgsrc/sysutils/gnometoaster/Makefile:1.29 pkgsrc/sysutils/gnometoaster/Makefile:1.30
--- pkgsrc/sysutils/gnometoaster/Makefile:1.29  Wed Jul  4 13:40:37 2018
+++ pkgsrc/sysutils/gnometoaster/Makefile       Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2018/07/04 13:40:37 jperkin Exp $
+# $NetBSD: Makefile,v 1.30 2019/05/23 19:23:17 rillig Exp $
 #
 
 DISTNAME=      gtoaster1.0Beta5
@@ -23,7 +23,7 @@ LDFLAGS.DragonFly=    -lintl
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     audio_oss.c
-SUBST_SED.paths+=      -e 's,@DEVOSSAUDIO@,${DEVOSSAUDIO},g'
+SUBST_VARS.paths=      DEVOSSAUDIO
 SUBST_STAGE.paths=     pre-configure
 
 .include "../../x11/gtk/buildlink3.mk"

Index: pkgsrc/sysutils/smbldap-tools/Makefile
diff -u pkgsrc/sysutils/smbldap-tools/Makefile:1.14 pkgsrc/sysutils/smbldap-tools/Makefile:1.15
--- pkgsrc/sysutils/smbldap-tools/Makefile:1.14 Wed Aug 22 09:46:40 2018
+++ pkgsrc/sysutils/smbldap-tools/Makefile      Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2018/08/22 09:46:40 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2019/05/23 19:23:17 rillig Exp $
 
 DISTNAME=      smbldap-tools-${VERS}
 PKGREVISION=   7
@@ -43,10 +43,10 @@ SUBST_CLASSES+=             path
 SUBST_STAGE.path=      pre-install
 SUBST_FILES.path=      configure.pl doc/slapd.conf doc/smb.conf
 SUBST_FILES.path+=     smbldap_tools.pm smbldap.conf
-SUBST_SED.path=                -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.path+=       -e "s,@OPENLDAP_VARDIR@,${OPENLDAP_VARDIR},g"
-SUBST_SED.path+=       -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g"
-SUBST_SED.path+=       -e "s,@SAMBA_PIDDIR@,${SAMBA_PIDDIR},g"
+SUBST_VARS.path=       PREFIX
+SUBST_VARS.path+=      OPENLDAP_VARDIR
+SUBST_VARS.path+=      PKG_SYSCONFDIR
+SUBST_VARS.path+=      SAMBA_PIDDIR
 
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-install

Index: pkgsrc/sysutils/tob/Makefile
diff -u pkgsrc/sysutils/tob/Makefile:1.14 pkgsrc/sysutils/tob/Makefile:1.15
--- pkgsrc/sysutils/tob/Makefile:1.14   Wed Sep  6 10:40:33 2017
+++ pkgsrc/sysutils/tob/Makefile        Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2017/09/06 10:40:33 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2019/05/23 19:23:17 rillig Exp $
 
 DISTNAME=      tob-0.25
 PKGREVISION=   2
@@ -24,8 +24,8 @@ SUBST_CLASSES+=               confdir
 SUBST_STAGE.confdir=   do-build
 SUBST_MESSAGE.confdir= Adjusting configuration directory
 SUBST_FILES.confdir=   tob tob.rc
-SUBST_SED.confdir=     -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.confdir+=    -e 's|@VARBASE@|${VARBASE}|g'
+SUBST_VARS.confdir=    PKG_SYSCONFDIR
+SUBST_VARS.confdir+=   VARBASE
 
 BUILD_DEFS+=           VARBASE
 

Index: pkgsrc/sysutils/xcdroast/Makefile
diff -u pkgsrc/sysutils/xcdroast/Makefile:1.81 pkgsrc/sysutils/xcdroast/Makefile:1.82
--- pkgsrc/sysutils/xcdroast/Makefile:1.81      Wed Nov 14 22:22:28 2018
+++ pkgsrc/sysutils/xcdroast/Makefile   Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.81 2018/11/14 22:22:28 kleink Exp $
+# $NetBSD: Makefile,v 1.82 2019/05/23 19:23:17 rillig Exp $
 
 DISTNAME=      xcdroast-1.18
 PKGREVISION=   3
@@ -34,7 +34,7 @@ SUBST_CLASSES+=                       devossaudio
 SUBST_STAGE.devossaudio=       pre-build
 SUBST_MESSAGE.devossaudio=     Fixing path to audio device.
 SUBST_FILES.devossaudio=       io.c wavplay.c
-SUBST_SED.devossaudio=         -e "s,@DEVOSSAUDIO@,${DEVOSSAUDIO},g"
+SUBST_VARS.devossaudio=                DEVOSSAUDIO
 
 INSTALLATION_DIRS=     ${DOCDIR}
 SPECIAL_PERMS+=                lib/xcdroast/bin/xcdrwrap {REAL_ROOT_USER} ${REAL_ROOT_GROUP} 4711

Index: pkgsrc/sysutils/xe-guest-utilities/Makefile
diff -u pkgsrc/sysutils/xe-guest-utilities/Makefile:1.12 pkgsrc/sysutils/xe-guest-utilities/Makefile:1.13
--- pkgsrc/sysutils/xe-guest-utilities/Makefile:1.12    Fri Oct 26 09:15:06 2018
+++ pkgsrc/sysutils/xe-guest-utilities/Makefile Thu May 23 19:23:17 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/10/26 09:15:06 sborrill Exp $
+# $NetBSD: Makefile,v 1.13 2019/05/23 19:23:17 rillig Exp $
 #
 
 # Values from XenServer 7.0 = 7, 0, 0, 125243
@@ -37,16 +37,16 @@ RCD_SCRIPTS=                xenguest
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-install
 SUBST_FILES.paths=     ${SRCFILES}
-SUBST_SED.paths=       -e "s,@VARBASE@,${VARBASE},g"
-SUBST_SED.paths+=      -e "s,@PREFIX@,${PREFIX},g"
+SUBST_VARS.paths=      VARBASE
+SUBST_VARS.paths+=     PREFIX
 
 SUBST_CLASSES+=                version
 SUBST_STAGE.version=   pre-install
 SUBST_FILES.version=   xe-update-guest-attrs
-SUBST_SED.version=     -e "s,@XENMAJOR@,${XENMAJOR},g"
-SUBST_SED.version+=    -e "s,@XENMINOR@,${XENMINOR},g"
-SUBST_SED.version+=    -e "s,@XENTEENY@,${XENTEENY},g"
-SUBST_SED.version+=    -e "s,@XENBUILD@,${XENBUILD},g"
+SUBST_VARS.version=    XENMAJOR
+SUBST_VARS.version+=   XENMINOR
+SUBST_VARS.version+=   XENTEENY
+SUBST_VARS.version+=   XENBUILD
 
 INSTALLATION_DIRS=     sbin
 

Index: pkgsrc/textproc/awf/Makefile
diff -u pkgsrc/textproc/awf/Makefile:1.13 pkgsrc/textproc/awf/Makefile:1.14
--- pkgsrc/textproc/awf/Makefile:1.13   Sat Apr  6 12:04:02 2013
+++ pkgsrc/textproc/awf/Makefile        Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2013/04/06 12:04:02 rodent Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:18 rillig Exp $
 #
 
 DISTNAME=      nroff-clone
@@ -19,7 +19,7 @@ SUBST_CLASSES+=               awflib
 SUBST_MESSAGE.awflib=  Fixing awf library path and awk pathname.
 SUBST_FILES.awflib=    Makefile awf awf.1
 SUBST_SED.awflib+=     -e 's|/usr/lib/awf|${PREFIX}/share/awf|'
-SUBST_SED.awflib+=     -e 's|@AWK@|${AWK}|g'
+SUBST_VARS.awflib=     AWK
 SUBST_STAGE.awflib=    pre-configure
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1

Index: pkgsrc/textproc/ruby-rdtool/Makefile
diff -u pkgsrc/textproc/ruby-rdtool/Makefile:1.45 pkgsrc/textproc/ruby-rdtool/Makefile:1.46
--- pkgsrc/textproc/ruby-rdtool/Makefile:1.45   Tue May 30 14:22:41 2017
+++ pkgsrc/textproc/ruby-rdtool/Makefile        Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2017/05/30 14:22:41 taca Exp $
+# $NetBSD: Makefile,v 1.46 2019/05/23 19:23:18 rillig Exp $
 
 DISTNAME=      rdtool-0.6.38
 PKGREVISION=   2
@@ -14,7 +14,7 @@ CONF_FILES+=  ${GEM_LIBDIR}/lib/rd/dot.rd
 SUBST_CLASSES+=                path
 SUBST_STAGE.path=      post-configure
 SUBST_FILES.path=      bin/rd2
-SUBST_SED.path=                -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|"
+SUBST_VARS.path=       PKG_SYSCONFDIR
 SUBST_MESSAGE.path=    Fixing PKG_SYSCONFDIR paths.
 
 RUBYGEM_OPTIONS+=      --format-executable

Index: pkgsrc/textproc/sphinxsearch/Makefile
diff -u pkgsrc/textproc/sphinxsearch/Makefile:1.13 pkgsrc/textproc/sphinxsearch/Makefile:1.14
--- pkgsrc/textproc/sphinxsearch/Makefile:1.13  Sat Dec 15 21:12:24 2018
+++ pkgsrc/textproc/sphinxsearch/Makefile       Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/12/15 21:12:24 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2019/05/23 19:23:18 rillig Exp $
 #
 
 DISTNAME=      sphinx-2.2.11-release
@@ -51,7 +51,7 @@ SUBST_SED.paths+=     -e 's,@CONFDIR@/log/se
 SUBST_SED.paths+=      -e 's,@CONFDIR@,${SPHINX_DIR},g'
 SUBST_SED.paths+=      -e 's,@localstatedir@,${SPHINX_DIR},g'
 SUBST_SED.paths+=      -e 's,@egdir@,${EGDIR},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 
 MAKE_JOBS_SAFE=                no
 

Index: pkgsrc/time/cardboard-schedule/Makefile
diff -u pkgsrc/time/cardboard-schedule/Makefile:1.31 pkgsrc/time/cardboard-schedule/Makefile:1.32
--- pkgsrc/time/cardboard-schedule/Makefile:1.31        Tue Aug  1 17:40:17 2017
+++ pkgsrc/time/cardboard-schedule/Makefile     Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2017/08/01 17:40:17 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2019/05/23 19:23:18 rillig Exp $
 #
 
 DISTNAME=      cs113ins
@@ -49,8 +49,8 @@ INSTALLATION_DIRS=    bin lib/cardboard-sch
 SUBST_CLASSES+=                cs
 SUBST_STAGE.cs=                do-configure
 SUBST_FILES.cs=                csched.sh
-SUBST_SED.cs+=         -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.cs+=         -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.cs=         PREFIX
+SUBST_VARS.cs+=                LOCALBASE
 SUBST_SED.cs+=         -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
 
 post-extract:

Index: pkgsrc/time/kronolith/Makefile
diff -u pkgsrc/time/kronolith/Makefile:1.27 pkgsrc/time/kronolith/Makefile:1.28
--- pkgsrc/time/kronolith/Makefile:1.27 Wed Aug 16 20:21:16 2017
+++ pkgsrc/time/kronolith/Makefile      Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2017/08/16 20:21:16 wiz Exp $
+# $NetBSD: Makefile,v 1.28 2019/05/23 19:23:18 rillig Exp $
 
 DISTNAME=      kronolith-h3-${KRONOLITHVER}
 PKGNAME=       kronolith-${KRONOLITHVER}
@@ -50,7 +50,7 @@ USE_PKGINSTALL=               YES
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     kronolith.conf.dist
-SUBST_SED.files=       -e "s|@KRONOLITHDIR@|${KRONOLITHDIR}|g"
+SUBST_VARS.files=      KRONOLITHDIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 PKG_USERS_VARS+=       APACHE_USER

Index: pkgsrc/time/leapsunpack/Makefile
diff -u pkgsrc/time/leapsunpack/Makefile:1.6 pkgsrc/time/leapsunpack/Makefile:1.7
--- pkgsrc/time/leapsunpack/Makefile:1.6        Wed Aug 16 20:45:46 2017
+++ pkgsrc/time/leapsunpack/Makefile    Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2017/08/16 20:45:46 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2019/05/23 19:23:18 rillig Exp $
 #
 
 DISTNAME=              leapsunpack-0.05
@@ -18,7 +18,7 @@ LDFLAGS.SunOS+=               -lsocket -lnsl
 SUBST_CLASSES+=                files
 SUBST_STAGE.files=     do-configure
 SUBST_FILES.files=     leapsinstall.sh
-SUBST_SED.files=       -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.files=      PKG_SYSCONFDIR
 SUBST_MESSAGE.files=   Fixing configuration files.
 
 INSTALLATION_DIRS=     bin share/doc/${PKGBASE}

Index: pkgsrc/wm/awesome/Makefile
diff -u pkgsrc/wm/awesome/Makefile:1.65 pkgsrc/wm/awesome/Makefile:1.66
--- pkgsrc/wm/awesome/Makefile:1.65     Wed Nov 14 22:22:32 2018
+++ pkgsrc/wm/awesome/Makefile  Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2018/11/14 22:22:32 kleink Exp $
+# $NetBSD: Makefile,v 1.66 2019/05/23 19:23:18 rillig Exp $
 
 DISTNAME=      awesome-4.2
 PKGREVISION=   5
@@ -44,7 +44,7 @@ SUBST_MESSAGE.lua=    Fixing lua prefix
 SUBST_STAGE.lua=       pre-configure
 SUBST_FILES.lua=       CMakeLists.txt awesomeConfig.cmake build-utils/lgi-check.sh \
                        tests/examples/CMakeLists.txt
-SUBST_SED.lua=         -e "s,@LUA_INTERPRETER@,${LUA_INTERPRETER},"
+SUBST_VARS.lua=                LUA_INTERPRETER
 
 SUBST_CLASSES+=                ldoc
 SUBST_MESSAGE.ldoc=    Fixing ldoc executable

Index: pkgsrc/wm/compiz/Makefile
diff -u pkgsrc/wm/compiz/Makefile:1.116 pkgsrc/wm/compiz/Makefile:1.117
--- pkgsrc/wm/compiz/Makefile:1.116     Sun May  5 22:49:51 2019
+++ pkgsrc/wm/compiz/Makefile   Thu May 23 19:23:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.116 2019/05/05 22:49:51 ryoon Exp $
+# $NetBSD: Makefile,v 1.117 2019/05/23 19:23:18 rillig Exp $
 #
 
 PKGVER=                0.8.8
@@ -58,7 +58,7 @@ PKGCONFIG_OVERRIDE+=  libdecoration/libde
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     metadata/decoration.xml.in
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 .include "options.mk"

Index: pkgsrc/wm/enlightenment/Makefile
diff -u pkgsrc/wm/enlightenment/Makefile:1.69 pkgsrc/wm/enlightenment/Makefile:1.70
--- pkgsrc/wm/enlightenment/Makefile:1.69       Wed Aug 22 09:47:21 2018
+++ pkgsrc/wm/enlightenment/Makefile    Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2018/08/22 09:47:21 wiz Exp $
+# $NetBSD: Makefile,v 1.70 2019/05/23 19:23:19 rillig Exp $
 
 DISTNAME=      e16-0.16.8.8
 PKGNAME=       ${DISTNAME:S/e16/enlightenment/}
@@ -32,9 +32,9 @@ REPLACE_PERL+=                scripts/e_gen_menu
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     scripts/e_gen_menu
-SUBST_SED.paths=       -e 's,@LOCALBASE@,${LOCALBASE},g'
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+=      -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.paths=      LOCALBASE
+SUBST_VARS.paths+=     PREFIX
+SUBST_VARS.paths+=     X11BASE
 
 PLIST_VARS+=   libhack
 

Index: pkgsrc/wm/fvwm-devel/Makefile
diff -u pkgsrc/wm/fvwm-devel/Makefile:1.54 pkgsrc/wm/fvwm-devel/Makefile:1.55
--- pkgsrc/wm/fvwm-devel/Makefile:1.54  Wed Aug 22 09:47:21 2018
+++ pkgsrc/wm/fvwm-devel/Makefile       Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2018/08/22 09:47:21 wiz Exp $
+# $NetBSD: Makefile,v 1.55 2019/05/23 19:23:19 rillig Exp $
 
 DISTNAME=      fvwm-${FVWM_VER}
 PKGREVISION=   13
@@ -51,7 +51,7 @@ SUBST_CLASSES+=               mail
 SUBST_STAGE.mail=      pre-configure
 SUBST_MESSAGE.mail=    Fixing mail address
 SUBST_FILES.mail+=     bin/fvwm-bug.in
-SUBST_SED.mail=                -e "s|@MAINTAINER@|${MAINTAINER}|"
+SUBST_VARS.mail=       MAINTAINER
 
 post-install:
        cd ${WRKSRC}/sample.fvwmrc && ${INSTALL_DATA} \

Index: pkgsrc/wm/golem/Makefile
diff -u pkgsrc/wm/golem/Makefile:1.33 pkgsrc/wm/golem/Makefile:1.34
--- pkgsrc/wm/golem/Makefile:1.33       Wed Jul  4 13:40:40 2018
+++ pkgsrc/wm/golem/Makefile    Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2018/07/04 13:40:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.34 2019/05/23 19:23:19 rillig Exp $
 #
 
 DISTNAME=      golem-0.0.5
@@ -41,7 +41,7 @@ CONF_FILES=   ${EGDIR}/golemrc.default ${P
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     sample.golem/golemrc
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS=     ${EGDIR}

Index: pkgsrc/wm/larswm/Makefile
diff -u pkgsrc/wm/larswm/Makefile:1.20 pkgsrc/wm/larswm/Makefile:1.21
--- pkgsrc/wm/larswm/Makefile:1.20      Wed Jul  4 13:40:40 2018
+++ pkgsrc/wm/larswm/Makefile   Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2018/07/04 13:40:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.21 2019/05/23 19:23:19 rillig Exp $
 #
 
 DISTNAME=      larswm-7.5.3
@@ -26,7 +26,7 @@ CPPFLAGS+=    -DPKG_SYSCONFDIR=\"${PKG_SYSC
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     larswm.man
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 INSTALLATION_DIRS=     share/doc/larswm share/examples/larswm

Index: pkgsrc/wm/mlvwm/Makefile
diff -u pkgsrc/wm/mlvwm/Makefile:1.11 pkgsrc/wm/mlvwm/Makefile:1.12
--- pkgsrc/wm/mlvwm/Makefile:1.11       Tue Oct 23 10:24:14 2012
+++ pkgsrc/wm/mlvwm/Makefile    Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2012/10/23 10:24:14 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2019/05/23 19:23:19 rillig Exp $
 #
 
 DISTNAME=      mlvwm091
@@ -28,7 +28,7 @@ post-install:
 SUBST_CLASSES+=                xpm
 SUBST_STAGE.xpm=       post-configure
 SUBST_FILES.xpm=       sample_rc/Mlvwmrc
-SUBST_SED.xpm=         -e "s,@PREFIX@,${PREFIX},"
+SUBST_VARS.xpm=                PREFIX
 SUBST_MESSAGE.xpm=     Fixing configuration file.
 
 .include "../../x11/libXext/buildlink3.mk"

Index: pkgsrc/wm/musca/Makefile
diff -u pkgsrc/wm/musca/Makefile:1.5 pkgsrc/wm/musca/Makefile:1.6
--- pkgsrc/wm/musca/Makefile:1.5        Wed Mar  7 11:57:32 2018
+++ pkgsrc/wm/musca/Makefile    Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/03/07 11:57:32 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:19 rillig Exp $
 
 DISTNAME=      musca-0.9.24
 PKGREVISION=   2
@@ -19,7 +19,7 @@ SUBST_CLASSES+=               makefile
 SUBST_STAGE.makefile=  pre-build
 SUBST_MESSAGE.makefile=        Fixing Makefile
 SUBST_FILES.makefile=  Makefile
-SUBST_SED.makefile+=   -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.makefile=   X11BASE
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/apis ${DESTDIR}${PREFIX}/bin

Index: pkgsrc/www/apache24/Makefile
diff -u pkgsrc/www/apache24/Makefile:1.78 pkgsrc/www/apache24/Makefile:1.79
--- pkgsrc/www/apache24/Makefile:1.78   Fri Apr  5 13:48:38 2019
+++ pkgsrc/www/apache24/Makefile        Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.78 2019/04/05 13:48:38 jperkin Exp $
+# $NetBSD: Makefile,v 1.79 2019/05/23 19:23:19 rillig Exp $
 #
 # When updating this package, make sure that no strings like
 # "PR 12345" are in the commit message. Upstream likes
@@ -119,10 +119,10 @@ SUBST_CLASSES+=           paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_MESSAGE.paths=   Fixing paths.
 SUBST_FILES.paths=     config.layout Makefile.in support/apxs.in
-SUBST_SED.paths=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.paths+=      -e "s|@VARBASE@|${VARBASE}|g"
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     VARBASE
 SUBST_SED.paths+=      -e "s|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
-SUBST_SED.paths+=      -e "s|@PAX@|${PAX}|g"
+SUBST_VARS.paths+=     PAX
 SUBST_SED.paths+=      -e "s|@LOCALBASE@|${PREFIX}|g"
 
 SUBST_CLASSES+=                apr-lt

Index: pkgsrc/www/aws-demos/Makefile
diff -u pkgsrc/www/aws-demos/Makefile:1.22 pkgsrc/www/aws-demos/Makefile:1.23
--- pkgsrc/www/aws-demos/Makefile:1.22  Wed Jul  4 13:40:40 2018
+++ pkgsrc/www/aws-demos/Makefile       Thu May 23 19:23:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2018/07/04 13:40:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:19 rillig Exp $
 
 DISTNAME=      aws-${AWS_VERSION}
 PKGNAME=       aws-demos-${AWS_VERSION}
@@ -35,7 +35,7 @@ SUBST_CLASSES+=       lpath
 SUBST_STAGE.lpath=     pre-configure
 SUBST_MESSAGE.lpath=   Add library path for ldap
 SUBST_FILES.lpath=     demos/test_ldap/test_ldap.gpr
-SUBST_SED.lpath=       -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.lpath=      PREFIX
 
 DEMO_DIRS+=    auth
 DEMO_DIRS+=    autobahn

Index: pkgsrc/www/awstats/Makefile
diff -u pkgsrc/www/awstats/Makefile:1.61 pkgsrc/www/awstats/Makefile:1.62
--- pkgsrc/www/awstats/Makefile:1.61    Wed Aug 22 09:47:23 2018
+++ pkgsrc/www/awstats/Makefile Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.61 2018/08/22 09:47:23 wiz Exp $
+# $NetBSD: Makefile,v 1.62 2019/05/23 19:23:20 rillig Exp $
 
 DISTNAME=      awstats-7.6
 PKGREVISION=   1
@@ -42,9 +42,9 @@ SUBST_FILES.conf=     tools/awstats_configur
                        tools/awstats_updateall.pl \
                        wwwroot/cgi-bin/awstats.model.conf \
                        wwwroot/cgi-bin/awstats.pl
-SUBST_SED.conf=                -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.conf+=       -e "s|@VARBASE@|${VARBASE}|g"
-SUBST_SED.conf+=       -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.conf=       PREFIX
+SUBST_VARS.conf+=      VARBASE
+SUBST_VARS.conf+=      PKG_SYSCONFDIR
 SUBST_SED.conf+=       -e "s|\"/etc/awstats|\"${PKG_SYSCONFDIR}|g"
 SUBST_SED.conf+=       -e "s|\"/usr/local/awstats/wwwroot|\"${PREFIX}/awstats|g"
 SUBST_SED.conf+=       -e "s|/var/log/httpd/mylog.log|${VARBASE}/log/httpd/access_log|g"

Index: pkgsrc/www/bannerfilter/Makefile
diff -u pkgsrc/www/bannerfilter/Makefile:1.19 pkgsrc/www/bannerfilter/Makefile:1.20
--- pkgsrc/www/bannerfilter/Makefile:1.19       Wed Aug 22 09:47:23 2018
+++ pkgsrc/www/bannerfilter/Makefile    Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/08/22 09:47:23 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2019/05/23 19:23:20 rillig Exp $
 #
 
 DISTNAME=      bannerfilter-1.31
@@ -20,7 +20,7 @@ REPLACE_PERL= redirector.pl
 SUBST_CLASSES+=        bf
 SUBST_STAGE.bf=        pre-configure
 SUBST_FILES.bf=        bannerfilter.conf
-SUBST_SED.bf=  -e s,@SHAREDIR@,${SHAREDIR},g
+SUBST_VARS.bf= SHAREDIR
 
 INSTALLATION_DIRS=     bin ${SHAREDIR}/www ${SHAREDIR}/doc ${SHAREDIR}/data
 

Index: pkgsrc/www/geeklog/Makefile
diff -u pkgsrc/www/geeklog/Makefile:1.45 pkgsrc/www/geeklog/Makefile:1.46
--- pkgsrc/www/geeklog/Makefile:1.45    Sun Dec 13 14:55:35 2015
+++ pkgsrc/www/geeklog/Makefile Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2015/12/13 14:55:35 taca Exp $
+# $NetBSD: Makefile,v 1.46 2019/05/23 19:23:20 rillig Exp $
 #
 
 DISTNAME=      geeklog-${VER}
@@ -73,11 +73,11 @@ SUBST_CLASSES+=             paths
 SUBST_FILES.paths+=    ${WRKDIR}/README
 SUBST_FILES.paths+=    ${WRKSRC}/emailgeeklogstories
 SUBST_FILES.paths+=    ${WRKDIR}/geeklog.conf
-SUBST_SED.paths+=      -e 's,@GEEKLOG_BASE@,${GEEKLOG_BASE:Q},g'
-SUBST_SED.paths+=      -e 's,@GEEKLOG_PUB@,${GEEKLOG_PUB:Q},g'
-SUBST_SED.paths+=      -e 's,@GEEKLOG_SITESUBDIR@,${GEEKLOG_SITESUBDIR:Q},g'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX:Q},g'
+SUBST_VARS.paths=      GEEKLOG_BASE
+SUBST_VARS.paths+=     GEEKLOG_PUB
+SUBST_VARS.paths+=     GEEKLOG_SITESUBDIR
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     PREFIX
 .if empty(GEEKLOG_SITEBASE)
 SUBST_SED.conf+=       -e '/^Alias/s,^,\#,'
 .endif

Index: pkgsrc/www/horde/Makefile
diff -u pkgsrc/www/horde/Makefile:1.83 pkgsrc/www/horde/Makefile:1.84
--- pkgsrc/www/horde/Makefile:1.83      Wed Feb 21 12:26:45 2018
+++ pkgsrc/www/horde/Makefile   Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.83 2018/02/21 12:26:45 wiz Exp $
+# $NetBSD: Makefile,v 1.84 2019/05/23 19:23:20 rillig Exp $
 
 DISTNAME=      horde-3.3.13
 PKGREVISION=   4
@@ -90,7 +90,7 @@ SUBST_CLASSES+=               files
 SUBST_STAGE.files=     post-build
 SUBST_FILES.files=     horde.conf.dist config/conf.xml config/conf.xml.dist \
                        scripts/set_perms.sh
-SUBST_SED.files=       -e "s|@HORDEDIR@|${HORDEDIR}|g"
+SUBST_VARS.files=      HORDEDIR
 SUBST_SED.files+=      -e "s|/usr/lib/sendmail|${SENDMAIL}|g"
 SUBST_SED.files+=      -e "s|/bin/sh|${SH}|g"
 SUBST_MESSAGE.files=   Fixing configuration files.

Index: pkgsrc/www/htmllint/Makefile
diff -u pkgsrc/www/htmllint/Makefile:1.36 pkgsrc/www/htmllint/Makefile:1.37
--- pkgsrc/www/htmllint/Makefile:1.36   Wed Aug 22 09:47:25 2018
+++ pkgsrc/www/htmllint/Makefile        Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2018/08/22 09:47:25 wiz Exp $
+# $NetBSD: Makefile,v 1.37 2019/05/23 19:23:20 rillig Exp $
 #
 
 DISTNAME=      htmllint
@@ -32,7 +32,7 @@ SUBST_CLASSES+=               hl
 SUBST_STAGE.hl=                pre-configure
 SUBST_MESSAGE.hl=      Setting PREFIX.
 SUBST_FILES.hl=                faq.html htmllintenv htmllint htmllint.caller
-SUBST_SED.hl=          -e 's!@PREFIX@!${PREFIX}!g'
+SUBST_VARS.hl=         PREFIX
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKSRC}/htmllint.caller ${DESTDIR}${PREFIX}/bin/htmllint

Index: pkgsrc/www/mediawiki/Makefile
diff -u pkgsrc/www/mediawiki/Makefile:1.75 pkgsrc/www/mediawiki/Makefile:1.76
--- pkgsrc/www/mediawiki/Makefile:1.75  Wed May  8 02:12:07 2019
+++ pkgsrc/www/mediawiki/Makefile       Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.75 2019/05/08 02:12:07 wen Exp $
+# $NetBSD: Makefile,v 1.76 2019/05/23 19:23:20 rillig Exp $
 
 DISTNAME=      mediawiki-${VER}.${PVER}
 CATEGORIES=    www
@@ -41,7 +41,7 @@ SUBST_CLASSES+=               paths
 SUBST_MESSAGE.paths=   Fixing pathnames in configuration file.
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     ../mediawiki.conf
-SUBST_SED.paths=       -e "s,@MEDIAWIKI@,${MEDIAWIKI},g"
+SUBST_VARS.paths=      MEDIAWIKI
 
 SUBST_CLASSES+=                sh
 SUBST_STAGE.sh=                pre-configure

Index: pkgsrc/www/moodle/Makefile
diff -u pkgsrc/www/moodle/Makefile:1.72 pkgsrc/www/moodle/Makefile:1.73
--- pkgsrc/www/moodle/Makefile:1.72     Mon Mar 11 07:52:06 2019
+++ pkgsrc/www/moodle/Makefile  Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.72 2019/03/11 07:52:06 wen Exp $
+# $NetBSD: Makefile,v 1.73 2019/05/23 19:23:20 rillig Exp $
 
 DISTNAME=      moodle-3.6.3
 CATEGORIES=    www
@@ -58,8 +58,8 @@ SUBST_CLASSES+=               conf
 SUBST_MESSAGE.conf=    Fixing pathnames in configuration file.
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      ../moodle.conf
-SUBST_SED.conf=                -e "s,@MOODLEDIR@,${MOODLEDIR},g"
-SUBST_SED.conf+=       -e "s,@MOODLEDATADIR@,${MOODLEDATADIR},g"
+SUBST_VARS.conf=       MOODLEDIR
+SUBST_VARS.conf+=      MOODLEDATADIR
 .if ${PKG_APACHE} == "apache24"
 SUBST_SED.conf+=       -e "/Order allow,deny/d"
 SUBST_SED.conf+=       -e "s,Allow from all,Require all granted,g"

Index: pkgsrc/www/mserv-php/Makefile
diff -u pkgsrc/www/mserv-php/Makefile:1.8 pkgsrc/www/mserv-php/Makefile:1.9
--- pkgsrc/www/mserv-php/Makefile:1.8   Sat Jul  9 13:11:58 2016
+++ pkgsrc/www/mserv-php/Makefile       Thu May 23 19:23:20 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2016/07/09 13:11:58 rillig Exp $
+# $NetBSD: Makefile,v 1.9 2019/05/23 19:23:20 rillig Exp $
 #
 
 DISTNAME=      mserv-php-090
@@ -23,7 +23,7 @@ DOCDIR=               ${PREFIX}/share/doc/mserv-php
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     ${WRKDIR}/config.php
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     post-build
 
 INSTALLATION_DIRS+=    share/mserv-php share/mserv-php/image share/doc/mserv-php

Index: pkgsrc/www/privoxy/Makefile
diff -u pkgsrc/www/privoxy/Makefile:1.62 pkgsrc/www/privoxy/Makefile:1.63
--- pkgsrc/www/privoxy/Makefile:1.62    Wed Aug 22 09:47:57 2018
+++ pkgsrc/www/privoxy/Makefile Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2018/08/22 09:47:57 wiz Exp $
+# $NetBSD: Makefile,v 1.63 2019/05/23 19:23:21 rillig Exp $
 #
 
 DISTNAME=      ${PKGNAME_NOREV}-stable-src
@@ -62,7 +62,7 @@ FILES_SUBST+=         PRIVOXY_USER=${PRIVOXY_US
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     config
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 .include "options.mk"

Index: pkgsrc/www/shibboleth-sp/Makefile
diff -u pkgsrc/www/shibboleth-sp/Makefile:1.30 pkgsrc/www/shibboleth-sp/Makefile:1.31
--- pkgsrc/www/shibboleth-sp/Makefile:1.30      Thu Jan 24 16:46:21 2019
+++ pkgsrc/www/shibboleth-sp/Makefile   Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2019/01/24 16:46:21 perseant Exp $
+# $NetBSD: Makefile,v 1.31 2019/05/23 19:23:21 rillig Exp $
 #
 
 DISTNAME=      shibboleth-sp-2.5.5
@@ -35,8 +35,8 @@ SUBST_CLASSES+=               paths
 SUBST_FILES.paths=     ${WRKSRC}/configs/Makefile.in
 SUBST_FILES.paths+=    ${WRKSRC}/configs/keygen.sh
 SUBST_STAGE.paths=     pre-configure
-SUBST_SED.paths=       -e 's,@EGDIR@,${EGDIR},'
-SUBST_SED.paths+=      -e 's,@SHIB_CONFDIR@,${SHIB_CONFDIR},'
+SUBST_VARS.paths=      EGDIR
+SUBST_VARS.paths+=     SHIB_CONFDIR
 
 REPLACE_BASH=  configs/metagen.sh
 

Index: pkgsrc/www/siege/Makefile
diff -u pkgsrc/www/siege/Makefile:1.5 pkgsrc/www/siege/Makefile:1.6
--- pkgsrc/www/siege/Makefile:1.5       Wed Jul  4 13:40:42 2018
+++ pkgsrc/www/siege/Makefile   Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/07/04 13:40:42 jperkin Exp $
+# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:21 rillig Exp $
 #
 
 DISTNAME=              siege-3.1.3
@@ -27,7 +27,7 @@ CONF_FILES+=          ${EGDIR}/siegerc ${PKG_SYS
 SUBST_CLASSES+=                siege
 SUBST_STAGE.siege=     pre-configure
 SUBST_FILES.siege=     doc/Makefile.am doc/Makefile.in
-SUBST_SED.siege+=      -e "s|@EGDIR@|${EGDIR}|g"
+SUBST_VARS.siege=      EGDIR
 
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}/log/

Index: pkgsrc/www/thttpd/Makefile
diff -u pkgsrc/www/thttpd/Makefile:1.51 pkgsrc/www/thttpd/Makefile:1.52
--- pkgsrc/www/thttpd/Makefile:1.51     Mon Aug  6 15:54:38 2018
+++ pkgsrc/www/thttpd/Makefile  Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.51 2018/08/06 15:54:38 nia Exp $
+# $NetBSD: Makefile,v 1.52 2019/05/23 19:23:21 rillig Exp $
 
 DISTNAME=      thttpd-2.29
 CATEGORIES=    www
@@ -33,7 +33,7 @@ INSTALLATION_DIRS=    ${PKGMANDIR}/man1 sha
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     thttpd.conf
-SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.paths=      PREFIX
 SUBST_STAGE.paths=     pre-configure
 
 MAKE_JOBS_SAFE=        no

Index: pkgsrc/www/tinyproxy/Makefile
diff -u pkgsrc/www/tinyproxy/Makefile:1.39 pkgsrc/www/tinyproxy/Makefile:1.40
--- pkgsrc/www/tinyproxy/Makefile:1.39  Fri Oct 12 13:57:46 2018
+++ pkgsrc/www/tinyproxy/Makefile       Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2018/10/12 13:57:46 adam Exp $
+# $NetBSD: Makefile,v 1.40 2019/05/23 19:23:21 rillig Exp $
 
 DISTNAME=      tinyproxy-1.10.0
 CATEGORIES=    www
@@ -39,10 +39,10 @@ CONF_FILES= ${EGDIR}/tinyproxy.conf.defa
 SUBST_CLASSES+=                docs
 SUBST_STAGE.docs=      pre-configure
 SUBST_FILES.docs=      docs/man5/tinyproxy.conf.txt.in docs/man8/tinyproxy.txt.in etc/tinyproxy.conf.in
-SUBST_SED.docs+=       -e 's,@TINYPROXY_USER@,${TINYPROXY_USER},g'
-SUBST_SED.docs+=       -e 's,@TINYPROXY_GROUP@,${TINYPROXY_GROUP},g'
-SUBST_SED.docs+=       -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.docs+=       -e 's,@VARBASE@,${VARBASE},g'
+SUBST_VARS.docs=       TINYPROXY_USER
+SUBST_VARS.docs+=      TINYPROXY_GROUP
+SUBST_VARS.docs+=      PKG_SYSCONFDIR
+SUBST_VARS.docs+=      VARBASE
 
 INSTALLATION_DIRS=     ${EGDIR} share/doc/tinyproxy
 

Index: pkgsrc/www/viewvc/Makefile
diff -u pkgsrc/www/viewvc/Makefile:1.32 pkgsrc/www/viewvc/Makefile:1.33
--- pkgsrc/www/viewvc/Makefile:1.32     Fri Apr 26 14:12:49 2019
+++ pkgsrc/www/viewvc/Makefile  Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2019/04/26 14:12:49 maya Exp $
+# $NetBSD: Makefile,v 1.33 2019/05/23 19:23:21 rillig Exp $
 
 DISTNAME=      viewvc-1.1.26
 PKGREVISION=   1
@@ -37,10 +37,10 @@ SUBST_STAGE.conf=   pre-configure
 SUBST_MESSAGE.conf=    Fixing configuration files.
 SUBST_FILES.conf=      conf/viewvc.conf.dist
 SUBST_FILES.conf+=     conf/cvsgraph.conf.dist
-SUBST_SED.conf=                -e "s|@VIEWVCDIR@|${VIEWVCDIR}|g"
-SUBST_SED.conf+=       -e "s|@PREFIX@|${PREFIX}|g"
-SUBST_SED.conf+=       -e "s|@PHP_OPT@|${PHP_OPT}|g"
-SUBST_SED.conf+=       -e "s|@CVSGRAPH_OPT@|${CVSGRAPH_OPT}|g"
+SUBST_VARS.conf=       VIEWVCDIR
+SUBST_VARS.conf+=      PREFIX
+SUBST_VARS.conf+=      PHP_OPT
+SUBST_VARS.conf+=      CVSGRAPH_OPT
 
 .if defined(RCS_PKG) && ${RCS_PKG} == "YES"
 SUBST_SED.conf+=       -e "s|@RCS_PREFIX@|${PREFIX}|g"

Index: pkgsrc/www/webalizer/Makefile
diff -u pkgsrc/www/webalizer/Makefile:1.69 pkgsrc/www/webalizer/Makefile:1.70
--- pkgsrc/www/webalizer/Makefile:1.69  Sat Apr 21 13:38:07 2018
+++ pkgsrc/www/webalizer/Makefile       Thu May 23 19:23:21 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2018/04/21 13:38:07 wiz Exp $
+# $NetBSD: Makefile,v 1.70 2019/05/23 19:23:21 rillig Exp $
 
 DISTNAME=      webalizer-2.21-02-src
 PKGNAME=       webalizer-2.21.2
@@ -28,7 +28,7 @@ INSTALLATION_DIRS=    bin ${PKGMANDIR}/man1
 SUBST_CLASSES+=                webalizer
 SUBST_STAGE.webalizer= post-build
 SUBST_FILES.webalizer= sample.conf webalizer.1
-SUBST_SED.webalizer=   -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.webalizer=  PKG_SYSCONFDIR
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.webalizer
 PKG_SUPPORTED_OPTIONS= bzip2 geoip

Index: pkgsrc/www/websvn/Makefile
diff -u pkgsrc/www/websvn/Makefile:1.23 pkgsrc/www/websvn/Makefile:1.24
--- pkgsrc/www/websvn/Makefile:1.23     Sat Mar 16 07:21:26 2013
+++ pkgsrc/www/websvn/Makefile  Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2013/03/16 07:21:26 obache Exp $
+# $NetBSD: Makefile,v 1.24 2019/05/23 19:23:22 rillig Exp $
 #
 
 DISTNAME=      websvn-2.2.1
@@ -31,8 +31,8 @@ SUBST_CLASSES+=               conf
 SUBST_STAGE.conf=      do-configure
 SUBST_MESSAGE.conf=    Fixing paths to configuration files.
 SUBST_FILES.conf=      include/setup.php
-SUBST_SED.conf=                -e "s|@EGDIR@|${EGDIR}|g"
-SUBST_SED.conf+=       -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_VARS.conf=       EGDIR
+SUBST_VARS.conf+=      PKG_SYSCONFDIR
 
 INSTALLATION_DIRS=     ${HTTPD_ROOT}/websvn share/examples/websvn
 

Index: pkgsrc/www/wordpress/Makefile
diff -u pkgsrc/www/wordpress/Makefile:1.85 pkgsrc/www/wordpress/Makefile:1.86
--- pkgsrc/www/wordpress/Makefile:1.85  Sat Mar 16 17:55:04 2019
+++ pkgsrc/www/wordpress/Makefile       Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2019/03/16 17:55:04 jklos Exp $
+# $NetBSD: Makefile,v 1.86 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=              wordpress-${VERSION}
 VERSION=               5.1.1
@@ -47,7 +47,7 @@ SUBST_CLASSES+=               conf
 SUBST_MESSAGE.conf=    Fixing pathnames in configuration file.
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      ../wordpress.conf
-SUBST_SED.conf=                -e "s,@WPHOME@,${WPHOME},g"
+SUBST_VARS.conf=       WPHOME
 .if !empty(PKG_OPTIONS:Map-php) && ${PKG_APACHE} == "apache24"
 SUBST_SED.conf+=       -e "/Order allow,deny/d"
 SUBST_SED.conf+=       -e "s,Allow from all,Require all granted,g"

Index: pkgsrc/www/wwwoffle/Makefile
diff -u pkgsrc/www/wwwoffle/Makefile:1.85 pkgsrc/www/wwwoffle/Makefile:1.86
--- pkgsrc/www/wwwoffle/Makefile:1.85   Wed Aug 22 09:48:00 2018
+++ pkgsrc/www/wwwoffle/Makefile        Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2018/08/22 09:48:00 wiz Exp $
+# $NetBSD: Makefile,v 1.86 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=      wwwoffle-2.9j
 PKGREVISION=   3
@@ -32,7 +32,7 @@ SUBST_STAGE.fix-paths=                pre-configure
 SUBST_MESSAGE.fix-paths=       Fixing absolute paths.
 SUBST_FILES.fix-paths=         cache/search/namazu/scripts/wwwoffle-namazu
 SUBST_FILES.fix-paths+=                cache/search/hyperestraier/scripts/wwwoffle-estseek
-SUBST_SED.fix-paths=           -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.fix-paths=          PREFIX
 
 .include "options.mk"
 

Index: pkgsrc/x11/alacarte/Makefile
diff -u pkgsrc/x11/alacarte/Makefile:1.79 pkgsrc/x11/alacarte/Makefile:1.80
--- pkgsrc/x11/alacarte/Makefile:1.79   Fri Apr 26 14:12:49 2019
+++ pkgsrc/x11/alacarte/Makefile        Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.79 2019/04/26 14:12:49 maya Exp $
+# $NetBSD: Makefile,v 1.80 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=      alacarte-0.13.1
 PKGREVISION=   43
@@ -20,8 +20,8 @@ PYTHON_VERSIONS_INCOMPATIBLE= 36 37 # py
 SUBST_CLASSES+=        paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     Alacarte/util.py
-SUBST_SED.paths=       -e "s;@PREFIX@;${PREFIX};g"
-SUBST_SED.paths+=      -e "s;@PKG_SYSCONFBASE@;${PKG_SYSCONFBASE};g"
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFBASE
 
 .include "../../lang/python/application.mk"
 .include "../../lang/python/extension.mk"

Index: pkgsrc/x11/avant-window-navigator/Makefile
diff -u pkgsrc/x11/avant-window-navigator/Makefile:1.49 pkgsrc/x11/avant-window-navigator/Makefile:1.50
--- pkgsrc/x11/avant-window-navigator/Makefile:1.49     Fri Apr 26 13:14:23 2019
+++ pkgsrc/x11/avant-window-navigator/Makefile  Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2019/04/26 13:14:23 maya Exp $
+# $NetBSD: Makefile,v 1.50 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=      avant-window-navigator-0.4.0
 PKGREVISION=   34
@@ -29,7 +29,7 @@ SUBST_CLASSES+=               python
 SUBST_STAGE.python=    pre-configure
 SUBST_MESSAGE.python=  Fixing python path
 SUBST_FILES.python=    applet-activation/main.c
-SUBST_SED.python=      -e "s,@PYTHONBIN@,${PYTHONBIN},"
+SUBST_VARS.python=     PYTHONBIN
 
 SUBST_CLASSES+=                pathfix
 SUBST_STAGE.pathfix=   pre-configure

Index: pkgsrc/x11/gnome-screensaver/Makefile
diff -u pkgsrc/x11/gnome-screensaver/Makefile:1.79 pkgsrc/x11/gnome-screensaver/Makefile:1.80
--- pkgsrc/x11/gnome-screensaver/Makefile:1.79  Wed Nov 14 22:22:40 2018
+++ pkgsrc/x11/gnome-screensaver/Makefile       Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.79 2018/11/14 22:22:40 kleink Exp $
+# $NetBSD: Makefile,v 1.80 2019/05/23 19:23:22 rillig Exp $
 #
 
 DISTNAME=      gnome-screensaver-2.30.2
@@ -39,7 +39,7 @@ INSTALLATION_DIRS=    ${EGDIR}/pam.d
 SUBST_CLASSES+=                flavour
 SUBST_STAGE.flavour=   pre-install
 SUBST_FILES.flavour=   savers/netbsd-floaters.desktop.in
-SUBST_SED.flavour=     -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.flavour=    PREFIX
 SUBST_MESSAGE.flavour= Preparing NetBSD flavoured screensaver
 
 post-extract:

Index: pkgsrc/x11/kde-runtime4/Makefile
diff -u pkgsrc/x11/kde-runtime4/Makefile:1.96 pkgsrc/x11/kde-runtime4/Makefile:1.97
--- pkgsrc/x11/kde-runtime4/Makefile:1.96       Thu Apr 25 07:33:30 2019
+++ pkgsrc/x11/kde-runtime4/Makefile    Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.96 2019/04/25 07:33:30 maya Exp $
+# $NetBSD: Makefile,v 1.97 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=      kde-runtime-15.12.0
 PKGNAME=       ${DISTNAME:S/-1/4-1/}
@@ -51,7 +51,7 @@ SUBST_SED.htdig=      -e s:/srv/www/cgi-bin:$
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     kioslave/info/kde-info2html.conf
-SUBST_SED.paths=       -e 's,@LOCALBASE@,${LOCALBASE},g'
+SUBST_VARS.paths=      LOCALBASE
 SUBST_STAGE.paths=     pre-configure
 
 REPLACE_PERL+= \

Index: pkgsrc/x11/kde-workspace4/Makefile
diff -u pkgsrc/x11/kde-workspace4/Makefile:1.73 pkgsrc/x11/kde-workspace4/Makefile:1.74
--- pkgsrc/x11/kde-workspace4/Makefile:1.73     Thu Apr 25 07:33:30 2019
+++ pkgsrc/x11/kde-workspace4/Makefile  Thu May 23 19:23:22 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.73 2019/04/25 07:33:30 maya Exp $
+# $NetBSD: Makefile,v 1.74 2019/05/23 19:23:22 rillig Exp $
 
 DISTNAME=      kde-workspace-4.11.22
 PKGNAME=       ${DISTNAME:S/-4/4-4/}
@@ -86,7 +86,7 @@ CONF_FILES+=          ${PREFIX}/share/examples/k
 
 SUBST_CLASSES+=                paths
 SUBST_FILES.paths=     kdm/kcm/main.cpp
-SUBST_SED.paths=       -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
+SUBST_VARS.paths=      PKG_SYSCONFDIR
 SUBST_STAGE.paths=     pre-configure
 
 SUBST_CLASSES+=                qtpath

Index: pkgsrc/x11/kdelibs4/Makefile
diff -u pkgsrc/x11/kdelibs4/Makefile:1.98 pkgsrc/x11/kdelibs4/Makefile:1.99
--- pkgsrc/x11/kdelibs4/Makefile:1.98   Thu Dec 13 19:51:39 2018
+++ pkgsrc/x11/kdelibs4/Makefile        Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.98 2018/12/13 19:51:39 adam Exp $
+# $NetBSD: Makefile,v 1.99 2019/05/23 19:23:23 rillig Exp $
 
 DISTNAME=      kdelibs-4.14.38
 PKGNAME=       ${DISTNAME:S/-4/4-4/}
@@ -56,7 +56,7 @@ SUBST_STAGE.kdelibsfix=               pre-configure
 SUBST_MESSAGE.kdelibsfix=      Fixing hardcoded paths.
 SUBST_FILES.kdelibsfix=                kde3support/kdeui/k3sconfig.cpp
 SUBST_FILES.kdelibsfix+=       kio/kssl/kopenssl.cpp
-SUBST_SED.kdelibsfix=          -e 's:@LOCALBASE@:${LOCALBASE}:g'
+SUBST_VARS.kdelibsfix=         LOCALBASE
 
 # Avoid the WRKDIR path in the installed cmake file
 SUBST_CLASSES+=                        phononrelpath

Index: pkgsrc/x11/py-qt5/Makefile
diff -u pkgsrc/x11/py-qt5/Makefile:1.43 pkgsrc/x11/py-qt5/Makefile:1.44
--- pkgsrc/x11/py-qt5/Makefile:1.43     Wed Apr  3 00:33:17 2019
+++ pkgsrc/x11/py-qt5/Makefile  Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2019/04/03 00:33:17 ryoon Exp $
+# $NetBSD: Makefile,v 1.44 2019/05/23 19:23:23 rillig Exp $
 
 DISTNAME=      PyQt5_gpl-5.11.3
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/PyQt5_gpl/qt5/}
@@ -39,7 +39,7 @@ SUBST_FILES.x11lib+=  configure.py
 SUBST_FILES.x11lib+=   designer/designer.pro-in
 SUBST_FILES.x11lib+=   qmlscene/qmlscene.pro-in
 SUBST_SED.x11lib+=     -e 's,@X11LIB@,${X11BASE}/lib,'
-SUBST_SED.x11lib+=     -e 's,@PREFIX@,${PREFIX},'
+SUBST_VARS.x11lib=     PREFIX
 
 do-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \

Index: pkgsrc/x11/py-sip/Makefile.common
diff -u pkgsrc/x11/py-sip/Makefile.common:1.1 pkgsrc/x11/py-sip/Makefile.common:1.2
--- pkgsrc/x11/py-sip/Makefile.common:1.1       Thu Nov 22 02:25:11 2018
+++ pkgsrc/x11/py-sip/Makefile.common   Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2018/11/22 02:25:11 markd Exp $
+# $NetBSD: Makefile.common,v 1.2 2019/05/23 19:23:23 rillig Exp $
 #
 # used by x11/py-sip/Makefile
 # used by x11/py-sip-qt5/Makefile
@@ -57,5 +57,5 @@ BUILDLINK_TRANSFORM+= rm:-O2
 SUBST_CLASSES+=                pyversfx
 SUBST_STAGE.pyversfx=  pre-configure
 SUBST_FILES.pyversfx=  sipgen/sipgen.sbf
-SUBST_SED.pyversfx=    -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g"
+SUBST_VARS.pyversfx=   PYVERSSUFFIX
 

Index: pkgsrc/x11/ruby-wxruby/Makefile
diff -u pkgsrc/x11/ruby-wxruby/Makefile:1.30 pkgsrc/x11/ruby-wxruby/Makefile:1.31
--- pkgsrc/x11/ruby-wxruby/Makefile:1.30        Wed Nov 14 22:22:50 2018
+++ pkgsrc/x11/ruby-wxruby/Makefile     Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2018/11/14 22:22:50 kleink Exp $
+# $NetBSD: Makefile,v 1.31 2019/05/23 19:23:23 rillig Exp $
 #
 
 DISTNAME=      wxruby-2.0.1
@@ -27,7 +27,7 @@ INSTALLATION_DIRS+=   ${RUBY_DOC}/wxruby $
 SUBST_CLASSES+=                path
 SUBST_STAGE.path=      pre-configure
 SUBST_FILES.path=      rake/rakenetbsd.rb
-SUBST_SED.path=                -e "s|@PREFIX@|${PREFIX}|g"
+SUBST_VARS.path=       PREFIX
 SUBST_MESSAGE.path=    Fixing include path.
 
 pre-configure:

Index: pkgsrc/x11/slim/Makefile
diff -u pkgsrc/x11/slim/Makefile:1.3 pkgsrc/x11/slim/Makefile:1.4
--- pkgsrc/x11/slim/Makefile:1.3        Mon Oct 15 00:48:47 2018
+++ pkgsrc/x11/slim/Makefile    Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/10/15 00:48:47 maya Exp $
+# $NetBSD: Makefile,v 1.4 2019/05/23 19:23:23 rillig Exp $
 
 DISTNAME=      slim-1.3.6
 PKGREVISION=   2
@@ -23,9 +23,9 @@ DEPENDS+=     bash-[0-9]*:../../shells/bash
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     CMakeLists.txt slim.conf
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},'
-SUBST_SED.paths+=      -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},'
-SUBST_SED.paths+=      -e 's,@X11BASE@,${X11BASE},'
+SUBST_VARS.paths=      PREFIX
+SUBST_VARS.paths+=     PKG_SYSCONFDIR
+SUBST_VARS.paths+=     X11BASE
 
 CONF_FILES+=   share/examples/slim/slim.conf \
                ${PKG_SYSCONFDIR}/slim.conf

Index: pkgsrc/x11/wxGTK28/Makefile.common
diff -u pkgsrc/x11/wxGTK28/Makefile.common:1.17 pkgsrc/x11/wxGTK28/Makefile.common:1.18
--- pkgsrc/x11/wxGTK28/Makefile.common:1.17     Tue Jan 19 03:48:06 2016
+++ pkgsrc/x11/wxGTK28/Makefile.common  Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.17 2016/01/19 03:48:06 dbj Exp $
+# $NetBSD: Makefile.common,v 1.18 2019/05/23 19:23:23 rillig Exp $
 #
 # used by x11/wxGTK28/Makefile
 # used by x11/wxGTK28-contrib/Makefile
@@ -50,7 +50,7 @@ SUBST_STAGE.fix-paths=                pre-configure
 SUBST_MESSAGE.fix-paths=       Fixing absolute paths.
 SUBST_FILES.fix-paths=         configure
 SUBST_SED.fix-paths=           -e 's,/usr/pkg/include,${PREFIX}/include,g'
-SUBST_SED.fix-paths+=          -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.fix-paths=  PREFIX
 SUBST_SED.fix-paths+=          -e 's,/usr/X11/,${X11BASE}/,g'
 
 pre-configure:

Index: pkgsrc/x11/wxGTK30/Makefile
diff -u pkgsrc/x11/wxGTK30/Makefile:1.32 pkgsrc/x11/wxGTK30/Makefile:1.33
--- pkgsrc/x11/wxGTK30/Makefile:1.32    Thu Dec 13 21:21:55 2018
+++ pkgsrc/x11/wxGTK30/Makefile Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2018/12/13 21:21:55 adam Exp $
+# $NetBSD: Makefile,v 1.33 2019/05/23 19:23:23 rillig Exp $
 
 DISTNAME=      wxWidgets-3.0.4
 PKGNAME=       ${DISTNAME:S/wxWidgets/wxGTK30/}
@@ -47,7 +47,7 @@ SUBST_STAGE.fix-paths=                pre-configure
 SUBST_MESSAGE.fix-paths=       Fixing absolute paths.
 SUBST_FILES.fix-paths=         configure
 SUBST_SED.fix-paths=           -e 's,/usr/pkg/include,${PREFIX}/include,g'
-SUBST_SED.fix-paths+=          -e 's,@PREFIX@,${PREFIX},g'
+SUBST_VARS.fix-paths=          PREFIX
 
 .include "../../mk/bsd.prefs.mk"
 

Index: pkgsrc/x11/xcolorsel/Makefile
diff -u pkgsrc/x11/xcolorsel/Makefile:1.25 pkgsrc/x11/xcolorsel/Makefile:1.26
--- pkgsrc/x11/xcolorsel/Makefile:1.25  Tue Dec 29 04:54:39 2015
+++ pkgsrc/x11/xcolorsel/Makefile       Thu May 23 19:23:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2015/12/29 04:54:39 dholland Exp $
+# $NetBSD: Makefile,v 1.26 2019/05/23 19:23:23 rillig Exp $
 
 DISTNAME=      xcolorsel-1.1a-src
 PKGNAME=       xcolorsel-1.1a
@@ -12,11 +12,11 @@ COMMENT=    Browse and select named X color
 WRKSRC=                ${WRKDIR}/xcolorsel
 USE_IMAKE=     yes
 
-SUBST_CLASSES+=                xcolorsel
+SUBST_CLASSES+=                        xcolorsel
 SUBST_STAGE.xcolorsel=         pre-configure
 SUBST_MESSAGE.xcolorsel=       Fixing hard-coded paths.
 SUBST_FILES.xcolorsel=         RgbText.c
-SUBST_SED.xcolorsel+=          -e "s,@X11BASE@,${X11BASE},g"
+SUBST_VARS.xcolorsel=          X11BASE
 
 #this requires Xaw3d
 XAW_TYPE=      3d

Index: pkgsrc/x11/xpns/Makefile
diff -u pkgsrc/x11/xpns/Makefile:1.28 pkgsrc/x11/xpns/Makefile:1.29
--- pkgsrc/x11/xpns/Makefile:1.28       Mon Oct 29 05:07:18 2012
+++ pkgsrc/x11/xpns/Makefile    Thu May 23 19:23:24 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2012/10/29 05:07:18 asau Exp $
+# $NetBSD: Makefile,v 1.29 2019/05/23 19:23:24 rillig Exp $
 
 DISTNAME=      pns_source
 PKGNAME=       xpns-1.0
@@ -18,7 +18,7 @@ BUILD_TARGET= pns
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     pre-configure
 SUBST_FILES.paths=     xpns
-SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},'
+SUBST_VARS.paths=      PREFIX
 
 INSTALLATION_DIRS=     bin lib/xpns share/doc/xpns
 

Index: pkgsrc/x11/xteddy2/Makefile
diff -u pkgsrc/x11/xteddy2/Makefile:1.44 pkgsrc/x11/xteddy2/Makefile:1.45
--- pkgsrc/x11/xteddy2/Makefile:1.44    Mon Sep  8 21:24:45 2014
+++ pkgsrc/x11/xteddy2/Makefile Thu May 23 19:23:24 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2014/09/08 21:24:45 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2019/05/23 19:23:24 rillig Exp $
 
 DISTNAME=      xteddy-2.0.1
 PKGREVISION=   23
@@ -20,7 +20,7 @@ REPLACE_KSH+= xtoys
 SUBST_CLASSES+=                prefix
 SUBST_STAGE.prefix=    pre-configure
 SUBST_FILES.prefix=    configure xteddy_test xtoys
-SUBST_SED.prefix=      -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_VARS.prefix=     PREFIX
 
 .include "../../graphics/imlib/buildlink3.mk"
 .include "../../x11/libSM/buildlink3.mk"

Index: pkgsrc/x11/xview-clients/Makefile
diff -u pkgsrc/x11/xview-clients/Makefile:1.38 pkgsrc/x11/xview-clients/Makefile:1.39
--- pkgsrc/x11/xview-clients/Makefile:1.38      Sun Nov 18 01:51:04 2012
+++ pkgsrc/x11/xview-clients/Makefile   Thu May 23 19:23:24 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2012/11/18 01:51:04 joerg Exp $
+# $NetBSD: Makefile,v 1.39 2019/05/23 19:23:24 rillig Exp $
 
 DISTNAME=              xview3.2p1-X11R6
 PKGNAME=               xview-clients-3.2.1
@@ -25,8 +25,8 @@ SUBST_CLASSES+=               xvc
 SUBST_STAGE.xvc=       pre-configure
 SUBST_MESSAGE.xvc=     Fixing hard-coded paths.
 SUBST_FILES.xvc=       olwm/openwin-menu-programs
-SUBST_SED.xvc=         -e "s,@PREFIX@,${PREFIX},g"
-SUBST_SED.xvc+=                -e "s,@X11BASE@,${X11BASE},g"
+SUBST_VARS.xvc=                PREFIX
+SUBST_VARS.xvc+=       X11BASE
 
 .include "../../mk/compiler.mk"
 .if !empty(PKGSRC_COMPILER:Mclang)

Index: pkgsrc/x11/xworld/Makefile
diff -u pkgsrc/x11/xworld/Makefile:1.22 pkgsrc/x11/xworld/Makefile:1.23
--- pkgsrc/x11/xworld/Makefile:1.22     Thu Oct 24 10:10:21 2013
+++ pkgsrc/x11/xworld/Makefile  Thu May 23 19:23:24 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2013/10/24 10:10:21 jperkin Exp $
+# $NetBSD: Makefile,v 1.23 2019/05/23 19:23:24 rillig Exp $
 #
 
 DISTNAME=              xworld-2.0
@@ -22,7 +22,7 @@ SUBST_MESSAGE.x11=    Fixing x11 options.
 SUBST_STAGE.x11=       pre-configure
 SUBST_FILES.x11=       defaults/NetBSD/set.csh
 SUBST_FILES.x11+=      defaults/Solaris/set.csh
-SUBST_SED.x11=         -e 's,@X11BASE@,${X11BASE},g'
+SUBST_VARS.x11=                X11BASE
 
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index