local others=$(find_python_requires ${dirs})
others="${others} $(find_weak_symbols_requires ${dirs})"
others="${others} $(find_perl_requires ${dirs})"
-
- # Get provides, because packages should not depend on features they provide
- # by themselves.
- local provides=$(find_provides ${dirs})
+ others="${others} $(find_pkgconfig_requires ${dirs})"
# Return a sorted and unique(!) list
local require
local requires
for require in $(listsort ${PKG_DEPS} ${interpreters} ${neededs} ${links} ${others}); do
[ "${require:0:3}" = "ld-" ] && continue
- listmatch ${require} ${provides} || requires="${requires} ${require}"
+
+ if [ -n "${PKG_REQUIRES_FILTER}" ]; then
+ grep -qE "${PKG_REQUIRES_FILTER}" <<< "${require}" && continue
+ fi
+
+ requires="${requires} ${require}"
done
echo ${requires}
local others=$(find_python_provides ${dirs})
others="${others} $(find_weak_symbols_provides ${dirs})"
others="${others} $(find_perl_provides ${dirs})"
+ others="${others} $(find_pkgconfig_provides ${dirs})"
+
+ local provide
+ local provides
+ for provide in $(listsort ${PKG_PROVIDES} ${sonames} ${others}); do
+ if [ -n "${PKG_PROVIDES_FILTER}" ]; then
+ grep -qE "${PKG_PROVIDES_FILTER}" <<< "${provide}" && continue
+ fi
- listsort ${PKG_PROVIDES} ${sonames} ${others}
+ provides="${provides} ${provide}"
+ done
+
+ echo ${provides}
}
function find_interpreters() {
function find_perl_provides() {
[ -x "/usr/bin/perl" ] || return 0
- ${BASEDIR}/perl.prov $(find_perl_files $@) | sort -u
+ perl ${BASEDIR}/perl.prov $(find_perl_files $@) | sort -u
}
function find_perl_requires() {
[ -x "/usr/bin/perl" ] || return 0
- ${BASEDIR}/perl.req $(find_perl_files $@) | sort -u
+ perl ${BASEDIR}/perl.req $(find_perl_files $@) | sort -u
+}
+
+function find_pkgconfig_provides() {
+ [ -x "/usr/bin/pkg-config" ] || return 0
+ find $@ | ${BASEDIR}/pkg-config.prov
+}
+
+function find_pkgconfig_requires() {
+ [ -x "/usr/bin/pkg-config" ] || return 0
+ find $@ | ${BASEDIR}/pkg-config.req
}
function find_weak_symbols_provides() {