diff options
author | jlam <jlam@pkgsrc.org> | 2003-10-07 10:59:41 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-10-07 10:59:41 +0000 |
commit | eb469bd90b37b4191b7d21ac514f1ff0bf52539c (patch) | |
tree | 56b90e7eb6d5d1d5fe50560f5cbe93e2432d9240 /mk | |
parent | 653a32a9bc7e751194441b4b01ae2137de9f684b (diff) | |
download | pkgsrc-eb469bd90b37b4191b7d21ac514f1ff0bf52539c.tar.gz |
Revert previous change as gsub() doesn't quite work like gensub() with
respect to \1, \2, etc. subexpression replacement.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 6269b9f174d..c4387ddf262 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.24 2003/10/06 10:51:04 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.25 2003/10/07 10:59:41 jlam Exp $ # # An example package buildlink3.mk file: # @@ -472,14 +472,15 @@ _BLNK_LT_ARCHIVE_FILTER_AWK_SCRIPT.${_pkg_}= # empty # _BLNK_LT_ARCHIVE_FILTER_AWK_SCRIPT.${_pkg_}+= \ /^dependency_libs=/ { \ - gsub("/usr(/lib/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1"); \ - gsub("${DEPOTBASE}/[^/ ]*(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1"); \ - gsub("${X11BASE}(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_X11_DIR}\\1"); \ - gsub("${LOCALBASE}(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1"); \ - gsub("-L/usr/lib[^/ ]*[ ]*", ""); \ - gsub("-L${X11BASE}/[^ ]*[ ]*", ""); \ - gsub("-L${LOCALBASE}/[^ ]*[ ]*", ""); \ - print; \ + line = $$0; \ + line = gensub("/usr(/lib/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1", "g", line); \ + line = gensub("${DEPOTBASE}/[^/ ]*(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1", "g", line); \ + line = gensub("${X11BASE}(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_X11_DIR}\\1", "g", line); \ + line = gensub("${LOCALBASE}(/[^ ]*/lib[^/ ]*\.la)", "${BUILDLINK_DIR}\\1", "g", line); \ + line = gensub("-L/usr/lib[^/ ]*[ ]*", "", "g", line); \ + line = gensub("-L${X11BASE}/[^ ]*[ ]*", "", "g", line); \ + line = gensub("-L${LOCALBASE}/[^ ]*[ ]*", "", "g", line); \ + print line; \ next; \ } . if (${PKG_INSTALLATION_TYPE} == "overwrite") || \ @@ -491,11 +492,12 @@ _BLNK_LT_ARCHIVE_FILTER_AWK_SCRIPT.${_pkg_}+= \ # _BLNK_LT_ARCHIVE_FILTER_AWK_SCRIPT.${_pkg_}+= \ /^libdir=/ { \ - gsub("/usr(/lib/[^ ]*)", "${BUILDLINK_DIR}\\1"); \ - gsub("${DEPOTBASE}/[^/ ]*(/[^ ]*)", "${BUILDLINK_DIR}\\1"); \ - gsub("${X11BASE}(/[^ ]*)", "${BUILDLINK_X11_DIR}\\1"); \ - gsub("${LOCALBASE}(/[^ ]*)", "${BUILDLINK_DIR}\\1"); \ - print; \ + line = $$0; \ + line = gensub("/usr(/lib/[^ ]*)", "${BUILDLINK_DIR}\\1", "g", line); \ + line = gensub("${DEPOTBASE}/[^/ ]*(/[^ ]*)", "${BUILDLINK_DIR}\\1", "g", line); \ + line = gensub("${X11BASE}(/[^ ]*)", "${BUILDLINK_X11_DIR}\\1", "g", line); \ + line = gensub("${LOCALBASE}(/[^ ]*)", "${BUILDLINK_DIR}\\1", "g", line); \ + print line; \ next; \ } . endif |