[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55811] trunk/blender/build_files/ build_environment/install_deps.sh: More fixes for install_deps. sh under ubuntu 10.04: git package is called "git-core", and ' apt-cache policy' returns a different result than newer versions when no package is found, changed the "available deb package" test to use "apt-cache show" instead.

Bastien Montagne montagne29 at wanadoo.fr
Fri Apr 5 15:34:33 CEST 2013


Revision: 55811
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55811
Author:   mont29
Date:     2013-04-05 13:34:32 +0000 (Fri, 05 Apr 2013)
Log Message:
-----------
More fixes for install_deps.sh under ubuntu 10.04: git package is called "git-core", and 'apt-cache policy' returns a different result than newer versions when no package is found, changed the "available deb package" test to use "apt-cache show" instead.

Modified Paths:
--------------
    trunk/blender/build_files/build_environment/install_deps.sh

Modified: trunk/blender/build_files/build_environment/install_deps.sh
===================================================================
--- trunk/blender/build_files/build_environment/install_deps.sh	2013-04-05 13:00:16 UTC (rev 55810)
+++ trunk/blender/build_files/build_environment/install_deps.sh	2013-04-05 13:34:32 UTC (rev 55811)
@@ -1207,7 +1207,7 @@
 }
 
 check_package_DEB() {
-  r=`apt-cache policy $1 | grep -c 'Candidate:'`
+  r=`apt-cache show $1 | grep -c 'Package:'`
 
   if [ $r -ge 1 ]; then
     return 0
@@ -1298,17 +1298,17 @@
   THEORA_USE=true
 
   # Install newest libtiff-dev in debian/ubuntu.
-  TIFF="libtiff5"
+  TIFF="libtiff"
   check_package_DEB $TIFF
   if [ $? -eq 0 ]; then
     _packages="$_packages $TIFF-dev"
   else
-    TIFF="libtiff4"  # Some old distro, like e.g. ubuntu 10.04 :/
+    TIFF="libtiff5"
     check_package_DEB $TIFF
     if [ $? -eq 0 ]; then
       _packages="$_packages $TIFF-dev"
     else
-      TIFF="libtiff"
+      TIFF="libtiff4"  # Some old distro, like e.g. ubuntu 10.04 :/
       check_package_DEB $TIFF
       if [ $? -eq 0 ]; then
         _packages="$_packages $TIFF-dev"
@@ -1316,6 +1316,20 @@
     fi
   fi
 
+  GIT="git"
+  check_package_DEB $GIT
+  if [ $? -eq 0 ]; then
+    INFO $GIT
+    _packages="$_packages $GIT"
+  else
+    GIT="git-core"  # Some old distro, like e.g. ubuntu 10.04 :/
+    check_package_DEB $GIT
+    if [ $? -eq 0 ]; then
+      INFO $GIT
+      _packages="$_packages $GIT"
+    fi
+  fi
+
   if $WITH_ALL; then
     _packages="$_packages libspnav-dev libjack-dev"
   fi
@@ -1477,7 +1491,7 @@
     else
       if $have_llvm; then
         INFO ""
-        install_packages_DEB flex bison libtbb-dev git
+        install_packages_DEB flex bison libtbb-dev
         # No package currently!
         INFO ""
         compile_OSL
@@ -1490,7 +1504,7 @@
       INFO "WARNING! Skipping OpenCOLLADA installation, as requested..."
     else
       INFO ""
-      install_packages_DEB git libpcre3-dev libxml2-dev
+      install_packages_DEB libpcre3-dev libxml2-dev
       # Find path to libxml shared lib...
       _XML2_LIB=`dpkg -L libxml2-dev | grep -e ".*/libxml2.so"`
       # No package




More information about the Bf-blender-cvs mailing list