summaryrefslogtreecommitdiff
path: root/mk/buildlink2
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-09-02 06:59:37 +0000
committerjlam <jlam@pkgsrc.org>2003-09-02 06:59:37 +0000
commit841b57441b803acb6edd290521d4343593e7e175 (patch)
tree84e91cd88c93c01f847527b25d244510cb5b95db /mk/buildlink2
parent97e17132ab11f03e7cfe511b3e6188812a6c47e4 (diff)
downloadpkgsrc-841b57441b803acb6edd290521d4343593e7e175.tar.gz
Merge pkgviews-mk branch into the HEAD by running:
cd pkgsrc/mk cvs update -Pd -A cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
Diffstat (limited to 'mk/buildlink2')
-rw-r--r--mk/buildlink2/NOTES2
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk27
-rw-r--r--mk/buildlink2/gen-transform.sh12
-rw-r--r--mk/buildlink2/libtool-fix-la2
-rw-r--r--mk/buildlink2/libtool.sh2
-rw-r--r--mk/buildlink2/wrapper.sh2
6 files changed, 33 insertions, 14 deletions
diff --git a/mk/buildlink2/NOTES b/mk/buildlink2/NOTES
index a09bd0e4f93..915220ea896 100644
--- a/mk/buildlink2/NOTES
+++ b/mk/buildlink2/NOTES
@@ -1,4 +1,4 @@
-$NetBSD: NOTES,v 1.13 2003/08/31 10:17:16 jlam Exp $
+$NetBSD: NOTES,v 1.14 2003/09/02 06:59:50 jlam Exp $
Caching
=======
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 2b581aae1bb..16d8f6d0515 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.95 2003/08/27 11:29:57 jlam Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.96 2003/09/02 06:59:50 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -88,9 +88,7 @@ MAKE_ENV+= BUILDLINK_CACHE_ALL=yes
.if defined(USE_X11)
USE_X11_LINKS?= YES
-. if !empty(USE_X11_LINKS:M[nN][oO])
-. include "../../mk/x11.buildlink2.mk"
-. else
+. if empty(USE_X11_LINKS:M[nN][oO])
BUILD_DEPENDS+= x11-links>=0.12:../../pkgtools/x11-links
_BLNK_X11_DIR= ${LOCALBASE}/share/x11-links
. endif
@@ -332,6 +330,12 @@ _BLNK_UNPROTECT+= s:${_BLNK_MANGLE_DIR.${_dir_}}:${${_dir_}}
_BLNK_TRANSFORM+= ${_BLNK_PROTECT}
#
+# Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that
+# "overwrite" packages think headers and libraries for "pkgviews" packages
+# are just found in the default view.
+#
+_BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE}
+#
# Convert direct paths to shared libraries into "-Ldir -llib" equivalents.
#
_BLNK_TRANSFORM+= p:${X11BASE}
@@ -399,15 +403,20 @@ _REPLACE_BUILDLINK= \
# When "unbuildlinkifying" a file, we must remove references to the
# buildlink directories and change any -llib to the proper replacement
# libraries (-lreadline -> -ledit, etc.). Redundant -Idir and -Ldir
-# options are removed to optimize the resulting file.
+# options are removed to optimize the resulting file. Also, prefer the
+# .la files in ${LOCALBASE}/lib over the ones in ${DEPOTBASE}/*/lib when
+# creating new .la files. This makes "overwrite" packages look and feel
+# more like they would without the pkgviews integration.
#
-REPLACE_BUILDLINK_SED?= # empty
-_REPLACE_BUILDLINK_SED= ${REPLACE_BUILDLINK_SED}
-_REPLACE_BUILDLINK_SED+= ${LIBTOOL_ARCHIVE_UNTRANSFORM_SED}
+LIBTOOL_ARCHIVE_UNTRANSFORM_SED?= # empty
+_LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= ${LIBTOOL_ARCHIVE_UNTRANSFORM_SED}
+REPLACE_BUILDLINK_SED?= # empty
+_REPLACE_BUILDLINK_SED= ${REPLACE_BUILDLINK_SED}
+_REPLACE_BUILDLINK_SED+= ${_LIBTOOL_ARCHIVE_UNTRANSFORM_SED}
SUBST_CLASSES+= unbuildlink
SUBST_STAGE.unbuildlink= post-build
-SUBST_MESSAGE.unbuildlink= \
+SUBST_MESSAGE.unbuildlink= \
"Fixing buildlink references in files-to-be-installed."
SUBST_FILES.unbuildlink= ${_REPLACE_BUILDLINK}
SUBST_SED.unbuildlink= ${_REPLACE_BUILDLINK_SED}
diff --git a/mk/buildlink2/gen-transform.sh b/mk/buildlink2/gen-transform.sh
index 1e6c01e0ed2..d4afb3b8175 100644
--- a/mk/buildlink2/gen-transform.sh
+++ b/mk/buildlink2/gen-transform.sh
@@ -1,6 +1,6 @@
#!@BUILDLINK_SHELL@
#
-# $NetBSD: gen-transform.sh,v 1.12 2003/07/09 16:07:22 salo Exp $
+# $NetBSD: gen-transform.sh,v 1.13 2003/09/02 06:59:51 jlam Exp $
transform="@_BLNK_TRANSFORM_SEDFILE@"
untransform="@_BLNK_UNTRANSFORM_SEDFILE@"
@@ -144,6 +144,16 @@ EOF
;;
esac
;;
+ depot)
+ case "$action" in
+ transform|untransform)
+ @CAT@ >> $sedfile << EOF
+s|$2/[^/ \`"':;]*\(/[^ \`"':;]\)|$3\1|g
+s|$2/[^/ \`"':;]*$|$3|g
+EOF
+ ;;
+ esac
+ ;;
esac
}
diff --git a/mk/buildlink2/libtool-fix-la b/mk/buildlink2/libtool-fix-la
index dcba4bd70d0..1fd4cb909a0 100644
--- a/mk/buildlink2/libtool-fix-la
+++ b/mk/buildlink2/libtool-fix-la
@@ -1,4 +1,4 @@
-# $NetBSD: libtool-fix-la,v 1.21 2003/08/31 08:56:39 jlam Exp $
+# $NetBSD: libtool-fix-la,v 1.22 2003/09/02 06:59:51 jlam Exp $
#
# For *.la files, in the "relink_command" line, we make the following
# replacements:
diff --git a/mk/buildlink2/libtool.sh b/mk/buildlink2/libtool.sh
index ff2f247c30d..d58f364e2b9 100644
--- a/mk/buildlink2/libtool.sh
+++ b/mk/buildlink2/libtool.sh
@@ -1,6 +1,6 @@
#!@BUILDLINK_SHELL@
#
-# $NetBSD: libtool.sh,v 1.9 2003/08/16 06:59:54 jlam Exp $
+# $NetBSD: libtool.sh,v 1.10 2003/09/02 06:59:51 jlam Exp $
Xsed='@SED@ -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
diff --git a/mk/buildlink2/wrapper.sh b/mk/buildlink2/wrapper.sh
index bb4d78ae4e7..8368ee7c705 100644
--- a/mk/buildlink2/wrapper.sh
+++ b/mk/buildlink2/wrapper.sh
@@ -1,6 +1,6 @@
#!@BUILDLINK_SHELL@
#
-# $NetBSD: wrapper.sh,v 1.8 2003/08/16 06:59:55 jlam Exp $
+# $NetBSD: wrapper.sh,v 1.9 2003/09/02 06:59:52 jlam Exp $
Xsed='@SED@ -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'