diff options
author | reed <reed@pkgsrc.org> | 2010-05-03 16:46:36 +0000 |
---|---|---|
committer | reed <reed@pkgsrc.org> | 2010-05-03 16:46:36 +0000 |
commit | e09a9924e88caab1d1644dc8d2f34c857823fde8 (patch) | |
tree | f031198b71958e30b320cffc269e222a45a8b0bf /mk | |
parent | 807276285f29362e23f1129203e8da6653ee37cd (diff) | |
download | pkgsrc-e09a9924e88caab1d1644dc8d2f34c857823fde8.tar.gz |
From Aleksey Cheusov
http://mail-index.netbsd.org/tech-pkg/2010/03/05/msg005088.html
http://mail-index.netbsd.org/tech-pkg/2010/03/05/msg005090.html
This fixes problem where some packages didn't list correct
REQUIRES or PROVIDES.
Symlinks are removed from PROVIDES.
Libraries provided by same package are removed from REQUIRES.
Also see pkg PR #42907
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavor/pkg/metadata.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk index 3849f875aec..7d83de8697c 100644 --- a/mk/flavor/pkg/metadata.mk +++ b/mk/flavor/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.33 2010/02/19 19:11:08 joerg Exp $ +# $NetBSD: metadata.mk,v 1.34 2010/05/03 16:46:36 reed Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -64,11 +64,11 @@ ${_BUILD_INFO_FILE}: plist bins=`${AWK} '/(^|\/)(bin|sbin|libexec)\// { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \ case ${OBJECT_FMT:Q}"" in \ ELF) \ - libs=`${AWK} '/(^|\/)lib\/lib.*\.so\.[0-9]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \ + libs=`${AWK} '/(^|\/)lib\/lib.*\.so(\.[0-9]+)?$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \ if ${TEST} -n "$$bins" -o -n "$$libs"; then \ requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '$$2 == "=>" && $$3 ~ "/" { print $$3 }' | ${SORT} -u`; \ fi; \ - linklibs=`${AWK} '/.*\.so\.[0-9\.]+$$/ { print "${DESTDIR}${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}`; \ + linklibs=`${AWK} '/.*\.so(\.[0-9]+)?$$/ { print "${DESTDIR}${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}`; \ for i in $$linklibs; do \ if ${TEST} -r $$i -a ! -x $$i -a ! -h $$i; then \ ${TEST} ${PKG_DEVELOPER:Uno:Q}"" = "no" || \ @@ -84,8 +84,12 @@ ${_BUILD_INFO_FILE}: plist fi; \ ;; \ esac; \ + requires=`{ for i in $$requires $$requires; do echo $$i; done; \ + ${AWK} '{ print "${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}; } | \ + ${SORT} | uniq -c | awk '$$1 == 2 {print $$2}'`; \ for i in "" $$libs; do \ ${TEST} "$$i" != "" || continue; \ + ${TEST} -h "$$i" && echo "$$i" | grep '[.]so$$' > /dev/null && continue; \ ${ECHO} "PROVIDES=$${i}"; \ done | ${SED} -e 's,^PROVIDES=${DESTDIR},PROVIDES=,' \ >> ${.TARGET}.tmp; \ |