Updated buffet and attestation to use platform2.gyp

When building platform2, platform2-9999.ebuild used to invoke
platform2.py from src/platform/common-mk/ which caused some issues
for native platform targets such as platform2/attestation and
platform2/buffet.
Now that all the necessary platform2 build files are moved into
src/platform2/common-mk/, platform2.gyp, plaform2.py and
platform2-9999.ebuild have been updated to treat platform2 as the
correct root dir for platform2 target, with additional component
source files pulled from src/platform (e.g. shill, chaps,...)
When platform2.py invokes 'gyp' it now passes 'chromeos/src' as the
root dir through --depth parameter, so that both src/platform and
src/platfotm2 targets can be referenced as equals.

BUG=chromium:358237
TEST=cros_workon_make chromeos-base/platform2 --test
     build_packages
     emerge-link platform2
     USE=buffet emerge-link platform2
CQ-DEPEND=CL:193681

Change-Id: I84a6cbc118582628bbb6a4ff157d37a66b804b40
Reviewed-on: https://chromium-review.googlesource.com/194116
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/buffet.gyp b/buffet/buffet.gyp
index 39bdc65..e4b2d2d 100644
--- a/buffet/buffet.gyp
+++ b/buffet/buffet.gyp
@@ -1,7 +1,7 @@
 {
   'target_defaults': {
     'dependencies': [
-      '../../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
+      '<(platform_root)/metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
     ],
     'variables': {
       'deps': [
@@ -10,9 +10,13 @@
         'libcurl',
       ],
     },
-    'include_dirs': [
-      '..'  # To access all src/platform2 directories
-    ],
+    # TODO(sosa): Remove gflags: crbug.com/356745.
+    'link_settings': {
+      'libraries': [
+        '-lgflags',
+      ],
+    },
+    # TODO(sosa): Remove no-strict-aliasing: crbug.com/356745.
     'cflags_cc': [
       '-std=gnu++11',
     ],
@@ -59,7 +63,7 @@
       'dependencies': [
         'buffet_common',
       ],
-      'includes': ['../../common-mk/common_test.gypi'],
+      'includes': ['../common-mk/common_test.gypi'],
       'sources': [
         'buffet_testrunner.cc',
         'data_encoding_unittest.cc',