diff options
author | jperkin <jperkin@pkgsrc.org> | 2015-11-16 17:53:29 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2015-11-16 17:53:29 +0000 |
commit | 9c7c0465ae5e64eb3fc05c1251995c9ff8c2b1f9 (patch) | |
tree | e4e39bddb2b7671d181f67a986e6b6f58df82c30 /mk/check | |
parent | fc8768b683f37e4e6b22bffaa391779098df4399 (diff) | |
download | pkgsrc-9c7c0465ae5e64eb3fc05c1251995c9ff8c2b1f9.tar.gz |
Add support for CHECK_WRKREF_EXTRA_DIRS to check-shlibs. If "extra" is
listed in CHECK_WRKREF then these directories will added to the checks
for rpath references.
Diffstat (limited to 'mk/check')
-rw-r--r-- | mk/check/check-shlibs-elf.awk | 10 | ||||
-rw-r--r-- | mk/check/check-shlibs.mk | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/mk/check/check-shlibs-elf.awk b/mk/check/check-shlibs-elf.awk index 9989ab9e508..ad6d2f96829 100644 --- a/mk/check/check-shlibs-elf.awk +++ b/mk/check/check-shlibs-elf.awk @@ -1,4 +1,4 @@ -# $NetBSD: check-shlibs-elf.awk,v 1.11 2015/08/10 15:11:47 jperkin Exp $ +# $NetBSD: check-shlibs-elf.awk,v 1.12 2015/11/16 17:53:29 jperkin Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -121,11 +121,18 @@ function checkshlib(DSO, needed, rpath, found, dso_rpath, got_rpath, nrpath) { if (!got_rpath) nrpath = split(system_rpath, rpath, ":") close(cmd) + nedirs = split(extradirs, edirs, " ") for (p in rpath) { if (rpath[p] == wrkdir || substr(rpath[p], 1, length(wrkdir) + 1) == wrkdir "/") { print DSO ": rpath relative to WRKDIR" } + for (e = 1; e <= nedirs; e++) { + if (rpath[p] == edirs[e] || + substr(rpath[p], 1, length(edirs[e]) + 1) == edirs[e] "/") { + print DSO ": rpath " rpath[p] " relative to CHECK_WRKREF_EXTRA_DIRS directory " edirs[e] + } + } } for (lib in needed) { for (p = 1; p <= nrpath; p++) { @@ -160,6 +167,7 @@ BEGIN { destdir = ENVIRON["DESTDIR"] readelf = ENVIRON["READELF"] wrkdir = ENVIRON["WRKDIR"] + extradirs = ENVIRON["CHECK_WRKREF_EXTRA_DIRS"] pkg_info_cmd = ENVIRON["PKG_INFO_CMD"] depends_file = ENVIRON["DEPENDS_FILE"] if (readelf == "") diff --git a/mk/check/check-shlibs.mk b/mk/check/check-shlibs.mk index b05143af83d..95b8996c0f0 100644 --- a/mk/check/check-shlibs.mk +++ b/mk/check/check-shlibs.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-shlibs.mk,v 1.26 2015/08/17 17:35:23 jperkin Exp $ +# $NetBSD: check-shlibs.mk,v 1.27 2015/11/16 17:53:29 jperkin Exp $ # # This file verifies that all libraries used by the package can be found # at run-time. @@ -67,6 +67,9 @@ CHECK_SHLIBS_NATIVE_ENV+= DEPENDS_FILE=${_RRDEPENDS_FILE:Q} CHECK_SHLIBS_NATIVE_ENV+= DESTDIR=${DESTDIR:Q} . endif CHECK_SHLIBS_NATIVE_ENV+= WRKDIR=${WRKDIR:Q} +. if !empty(CHECK_WRKREF:Mextra) +CHECK_SHLIBS_NATIVE_ENV+= CHECK_WRKREF_EXTRA_DIRS=${CHECK_WRKREF_EXTRA_DIRS:Q} +. endif _check-shlibs: error-check .PHONY @${STEP_MSG} "Checking for missing run-time search paths in ${PKGNAME}" |