From 72e17e060f4c8b6baa062dca1c6104802939852c Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 18 Dec 2018 16:18:50 +0000 Subject: [PATCH] Updates required to build on 18.04 - Undef SIZE_WIDTH in actor.h as it's used in stdint.h - Add more packages that are required - Additionally, ensured gtest is only installed if required Change-Id: Ibc89c1456a7c4fb34262f1aed254636a1c2c504d --- build/scripts/dali_env | 20 ++++++++++++++------ dali/public-api/actors/actor.h | 2 ++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/build/scripts/dali_env b/build/scripts/dali_env index b55670c..c573c24 100755 --- a/build/scripts/dali_env +++ b/build/scripts/dali_env @@ -43,6 +43,7 @@ my @system_packages = ( "libdrm-dev", "libgif-dev", "libturbojpeg", + "libturbojpeg0-dev", "libfribidi-dev", "libharfbuzz-dev", "doxygen", @@ -211,11 +212,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"); + } } } } @@ -257,9 +262,12 @@ sub check_source_packages } elsif ($pkg eq "gtest") { - 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 -;"); + 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 -;"); + } } } } diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index adb5a77..4e46b70 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -30,6 +30,8 @@ #include #include +#undef SIZE_WIDTH // Defined in later versions of cstdint but is used in this header + namespace Dali { /** -- 2.7.4