cookutils rev 126
cook: handle implicit build dependencies
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 10 11:51:01 2011 +0200 (2011-05-10) |
parents | c41b34790f44 |
children | 8c7a63af20a6 |
files | cook |
line diff
1.1 --- a/cook Tue May 10 02:39:24 2011 +0200 1.2 +++ b/cook Tue May 10 11:51:01 2011 +0200 1.3 @@ -396,21 +396,27 @@ 1.4 export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS BUILD_HOST CONFIG_SITE 1.5 local LC_ALL=POSIX LANG=POSIX 1.6 1.7 - # Check for build deps. 1.8 + # Check for build deps and handle implicit depends of *-dev packages 1.9 + # (ex: libusb-dev :: libusb). 1.10 cd $INSTALLED && ls -1 > $CACHE/installed.list 1.11 [ "$DEPENDS" ] && gettext -e "Checking build dependencies...\n" 1.12 for dep in $BUILD_DEPENDS 1.13 do 1.14 - if [ ! -f "$INSTALLED/$dep/receipt" ]; then 1.15 - # Try local package first 1.16 - if [ -f "$PKGS/$dep-*.tazpkg" ]; then 1.17 - gettext "Installing dep (local):"; echo " $dep" 1.18 - cd $PKGS && tazpkg install $dep-*.tazpkg >/dev/null 1.19 - else 1.20 - gettext "Installing dep (web/cache):"; echo " $dep" 1.21 - tazpkg get-install $dep >/dev/null 1.22 + implicit=${dep%-dev} 1.23 + for pkg in $dep $implicit 1.24 + do 1.25 + if [ ! -f "$INSTALLED/$pkg/receipt" ]; then 1.26 + # Try local package first. 1.27 + vers=$(grep ^VERSION $WOK/$pkg/receipt | cut -d '"' -f 2) 1.28 + if [ -f "$PKGS/$pkg-$vers.tazpkg" ]; then 1.29 + gettext "Installing dep (local) :"; echo " $pkg" 1.30 + cd $PKGS && tazpkg install $pkg-$vers.tazpkg >/dev/null 1.31 + else 1.32 + gettext "Installing dep (web/cache):"; echo " $pkg" 1.33 + tazpkg get-install $pkg >/dev/null 1.34 + fi 1.35 fi 1.36 - fi 1.37 + done 1.38 done 1.39 ls -1 > $CACHE/installed.cook && cd $CACHE 1.40