Remove mesa packages from install-build-deps

The mesa packages were originally added because of an issue with installing
libgbm-dev on Saucy.  The CL description is inlined below:

------------------------------------------------------------------------
commit: 419a9a64b69f1d113c28d1e78c7117adf510aa95
Author: [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Thu Jun 19 18:26:18 2014 +0000

Fix installation of libgbm-dev package in install-build-deps.sh

crrev.com/106633002 has recently introduced a dependency on libgbm-dev.
Unfortunatelly, this package is a bit more trickier to install, for the
following reason: it depends on mesa-glx and, conversely to most of the
other packages, only one version of mesa (w.r.t backports) can exist in
the system. Google's workstations are configured to use the -lts-saucy
version of mesa. The right package in this case is libgbm-dev-lts-saucy
and attempting to install just libgbm-dev ends up in a failure.
This change fixes install-build-deps.sh, installing the matching version
of libgbm-dev (w.r.t libgl1-mesa-glx), falling back to libgbm-dev.
------------------------------------------------------------------------

Currently, this is causing issues on Googler's machines (see chrome-linux
mailing list).  Since the Saucy days are over, just depend on libgbm-dev
directly.  Tested on Ubuntu Trusty, Ubuntu Xenial, Debian Stretch, and Debian
Testing.

R=dpranke

Change-Id: I43568ab8b8c66c2aa6cd394c67f2cf90d6d1762c
Reviewed-on: https://chromium-review.googlesource.com/944047
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: Thomas Anderson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540271}
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index fb1a1cb..32b61b82 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -177,6 +177,7 @@
   libdrm-dev
   libelf-dev
   libffi-dev
+  libgbm-dev
   libglib2.0-dev
   libglu1-mesa-dev
   libgnome-keyring-dev
@@ -461,30 +462,6 @@
   nacl_list="${nacl_list} libssl1.0.0:i386"
 fi
 
-# Find the proper version of packages that depend on mesa. Only one -lts variant
-# of mesa can be installed and everything that depends on it must match.
-
-# Query for the name and status of all mesa LTS variants, filter for only
-# installed packages, extract just the name, and eliminate duplicates (there can
-# be more than one with the same name in the case of multiarch). Expand into an
-# array.
-mesa_packages=($(dpkg-query -Wf'${package} ${status}\n' \
-                            libgl1-mesa-glx-lts-\* 2>/dev/null | \
-                 grep " ok installed" | cut -d " " -f 1 | sort -u))
-if [ "${#mesa_packages[@]}" -eq 0 ]; then
-  mesa_variant=""
-elif [ "${#mesa_packages[@]}" -eq 1 ]; then
-  # Strip the base package name and leave just "-lts-whatever"
-  mesa_variant="${mesa_packages[0]#libgl1-mesa-glx}"
-else
-  echo "ERROR: unable to determine which libgl1-mesa-glx variant is installed."
-  exit 1
-fi
-dev_list="${dev_list} libgbm-dev${mesa_variant}
-          libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant}
-          mesa-common-dev${mesa_variant}"
-nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386"
-
 # Some package names have changed over time
 if package_exists libpng16-16; then
   lib_list="${lib_list} libpng16-16"