summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2017-10-01 17:57:18 +0000
committerjlam <jlam@pkgsrc.org>2017-10-01 17:57:18 +0000
commit547ce479787a3f34cc242dd27100df5f2e54d9a3 (patch)
tree2c99405cc19472d83cbd6f5971834285c9bdfe9b
parentee9f08697bde8649376036e1486421efb989c1be (diff)
downloadpkgsrc-547ce479787a3f34cc242dd27100df5f2e54d9a3.tar.gz
reduce-depends.awk: Avoid gensub() for portability.
-rwxr-xr-xmk/pkgformat/pkg/reduce-depends.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/pkgformat/pkg/reduce-depends.awk b/mk/pkgformat/pkg/reduce-depends.awk
index 405f5db74fc..3e17b184ae0 100755
--- a/mk/pkgformat/pkg/reduce-depends.awk
+++ b/mk/pkgformat/pkg/reduce-depends.awk
@@ -1,6 +1,6 @@
#!/usr/bin/awk -f
#
-# $NetBSD: reduce-depends.awk,v 1.5 2017/10/01 04:00:40 jlam Exp $
+# $NetBSD: reduce-depends.awk,v 1.6 2017/10/01 17:57:18 jlam Exp $
#
# Copyright (c) 2006-2017 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -111,7 +111,7 @@ function get_endpoint(cmp, patterns, endpoint, key, match_all, pattern, pkg)
endpoint = "" # return value if patterns array is empty
for (key in patterns) {
endpoint = patterns[key]
- pkg = shquote(gensub(cmp, "-", 1, key))
+ pkg = key; sub(cmp, "-", pkg); pkg = shquote(pkg)
match_all = 1
for (pattern in patterns) {
if (key == pattern) continue