pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Revert previous change as gsub() doesn't...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fce9bb71376f
branches: trunk
changeset: 462645:fce9bb71376f
user: jlam <jlam%pkgsrc.org@localhost>
date: Tue Oct 07 10:59:41 2003 +0000
description:
Revert previous change as gsub() doesn't quite work like gensub() with
respect to \1, \2, etc. subexpression replacement.
diffstat:
mk/buildlink3/bsd.buildlink3.mk | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diffs (51 lines):
diff -r e27f87f538ba -r fce9bb71376f mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk Tue Oct 07 10:19:09 2003 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk Tue Oct 07 10:59:41 2003 +0000
@@ -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_}+= \
/^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_}+= \
/^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
Home |
Main Index |
Thread Index |
Old Index