(iMil reminded me of this.)
pkgsrc/mk/flavor/pkg/metadata.mk attempts to figure out libraries provides
and required by packages to define PROVIDES and REQUIRES.
libs=`${AWK} '/(^|\/)lib\/lib.*\.so\.[0-9]+$$/ { print
"${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
This assumes library naming ends with a digit.
Here are some examples of some that do not:
/usr/pkg/lib/libpulsedsp.so
/usr/pkg/lib/libEterm-0.9.4.so
/usr/pkg/lib/libboost_wserialization-mt.so
/usr/pkg/lib/libdb4_cxx-4.7.so
(I have over 500 examples on one of my systems.)
These aren't registered as PROVIDES.
So here is my WRONG patch (which has only a little testing):
Index: mk/flavor/pkg/metadata.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/flavor/pkg/metadata.mk,v
retrieving revision 1.30
diff -u -r1.30 metadata.mk
--- mk/flavor/pkg/metadata.mk 21 May 2008 20:39:52 -0000 1.30
+++ mk/flavor/pkg/metadata.mk 16 Apr 2009 00:08:47 -0000
@@ -58,7 +58,7 @@
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.*$$/ { print
"${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS} | while read
i ; do if ${TEST} ! -h $$i; then echo $$i ; fi ; done`; \
if ${TEST} -n "$$bins" -o -n "$$libs"; then \
requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '$$2 ==
"=>" && $$3 ~ "/" { print $$3 }' | ${SORT} -u`; \
fi; \
Note that this will change results for packages that worked before, for
example libXv before had:
-PROVIDES=/usr/pkg/lib/libXv.so.1
(which is a symlink)
But now has:
+PROVIDES=/usr/pkg/lib/libXv.so.1.0.0
(not a symlink)