# HG changeset patch # User Christophe Lincoln # Date 1305021061 -7200 # Node ID 697b811323a14c146b8a6848c3ad6365bcc649db # Parent c41b34790f4493de425ec72465388c21dfca78a3 cook: handle implicit build dependencies diff -r c41b34790f44 -r 697b811323a1 cook --- a/cook Tue May 10 02:39:24 2011 +0200 +++ b/cook Tue May 10 11:51:01 2011 +0200 @@ -396,21 +396,27 @@ export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS BUILD_HOST CONFIG_SITE local LC_ALL=POSIX LANG=POSIX - # Check for build deps. + # Check for build deps and handle implicit depends of *-dev packages + # (ex: libusb-dev :: libusb). cd $INSTALLED && ls -1 > $CACHE/installed.list [ "$DEPENDS" ] && gettext -e "Checking build dependencies...\n" for dep in $BUILD_DEPENDS do - if [ ! -f "$INSTALLED/$dep/receipt" ]; then - # Try local package first - if [ -f "$PKGS/$dep-*.tazpkg" ]; then - gettext "Installing dep (local):"; echo " $dep" - cd $PKGS && tazpkg install $dep-*.tazpkg >/dev/null - else - gettext "Installing dep (web/cache):"; echo " $dep" - tazpkg get-install $dep >/dev/null + implicit=${dep%-dev} + for pkg in $dep $implicit + do + if [ ! -f "$INSTALLED/$pkg/receipt" ]; then + # Try local package first. + vers=$(grep ^VERSION $WOK/$pkg/receipt | cut -d '"' -f 2) + if [ -f "$PKGS/$pkg-$vers.tazpkg" ]; then + gettext "Installing dep (local) :"; echo " $pkg" + cd $PKGS && tazpkg install $pkg-$vers.tazpkg >/dev/null + else + gettext "Installing dep (web/cache):"; echo " $pkg" + tazpkg get-install $pkg >/dev/null + fi fi - fi + done done ls -1 > $CACHE/installed.cook && cd $CACHE