Process each RenderTask render-instruction separately
[platform/core/uifw/dali-core.git] / build / scripts / dali_env
index 2381f4a..86a1539 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (c) 2017 Samsung Electronics Co., Ltd.
+# Copyright (c) 2018 Samsung Electronics Co., Ltd.
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -43,12 +43,17 @@ my @system_packages = (
     "libdrm-dev",
     "libgif-dev",
     "libturbojpeg",
+    "libturbojpeg0-dev",
     "libfribidi-dev",
     "libharfbuzz-dev",
     "doxygen",
     "lcov",
     "libcurl4-gnutls-dev",
     "curl",
+    "libssl-dev",
+    "cifs-utils",
+    "libgtest-dev",
+    "libcairo2-dev",
 );
 
 # Some packages like require building from source
@@ -64,6 +69,7 @@ my @source_pkgs = (
      # original version used with DALi is 3.25.19. 3.32.7 is the latest we can use before
      # upgrading DALi to use  c++0x or c++11
      "version" => " 3.32.7", "make" => "make -j8 library=shared", "build-mode" =>"debug" },
+    {"name" => "gtest" },
 );
 
 ### Detect any http proxy, part of v8 installation requires this information
@@ -207,11 +213,15 @@ sub check_system_package
     my $package;
     foreach $package (@_)
     {
-        my @x=split(/\s+/, `dpkg -l $package|grep $package`);
+        my @x=split(/\s+/, `dpkg -l $package 2> /dev/null|grep $package`);
         if($x[0] ne "ii")
         {
-            print "Attempting to install $package\n";
-            system("sudo apt-get -y --force-yes install $package");
+            # Check if the package is available to install, exit-code is 0 if the package is found.
+            if(system("apt-cache show $package > /dev/null 2>&1") == 0)
+            {
+                print "Attempting to install $package\n";
+                system("sudo apt-get -y --force-yes install $package");
+            }
         }
     }
 }
@@ -251,6 +261,15 @@ sub check_source_packages
         {
             install_v8( $pkgref );
         }
+        elsif ($pkg eq "gtest")
+        {
+            if(! -e "/usr/lib/libgtest.a")
+            {
+                print "Attempting to build $pkg\n";
+                # from https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
+                run_command("cd /usr/src/gtest; sudo cmake CMakeLists.txt; sudo make; sudo cp *.a /usr/lib; cd -;");
+            }
+        }
     }
 }