abuild: allow circular makedepends

Some packages like gcc-gnat needs bootstrapping. We need to allow
circular makedepends so we can specify gcc-gnat as makedepends for gcc.
This commit is contained in:
Natanael Copa 2013-09-10 13:02:01 +00:00
parent a2bab13656
commit dd3643574f

View File

@ -1536,16 +1536,19 @@ builddeps() {
# add depends unless it is a subpackage or package itself
if cross_compiling && [ -n "$makedepends_build" -o -n "$makedepends_host" ]; then
for i in $BUILD_BASE $makedepends_build; do
builddeps="$makedepends_build"
for i in $BUILD_BASE; do
[ "$pkgname" = "${i%%[<>=]*}" ] && continue
subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i"
done
for i in $depends $makedepends_host; do
hostdeps="$makedepends_host"
for i in $depends; do
[ "$pkgname" = "${i%%[<>=]*}" ] && continue
subpackages_has ${i%%[<>=]*} || hostdeps="$hostdeps $i"
done
else
for i in $BUILD_BASE $depends $makedepends; do
builddeps="$makedepends"
for i in $BUILD_BASE $depends; do
[ "$pkgname" = "${i%%[<>=]*}" ] && continue
subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i"
done