Create a standalone ebuild for system_api

system_api is required by a lot of platform2 packages. We need it to be in a
standalone ebuild in order for other packages to depend on it.

This package installs the common headers and compiles the protobufs into static
libraries.

BUG=chromium:386223
TEST=FEATURES=test emerge-amd64-generic platform2.
TEST=trybot run on daisy, link, duck, x86-mario.
TEST=trybot run on lumpy-incremental-release.

CQ-DEPEND=CL:204594

Change-Id: Ifbc639555fcf40d0bf2f8d3eeb0c6eb5cce732bc
Reviewed-on: https://chromium-review.googlesource.com/204605
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
diff --git a/wimax_manager.gyp b/wimax_manager.gyp
index f78bc49..bbbe546 100644
--- a/wimax_manager.gyp
+++ b/wimax_manager.gyp
@@ -1,8 +1,5 @@
 {
   'target_defaults': {
-    'dependencies': [
-      '../system_api/system_api.gyp:system_api-power_manager-protos',
-    ],
     'variables': {
       'deps': [
         'dbus-c++-1',
@@ -11,6 +8,10 @@
         'gobject-2.0',
         'libchrome-<(libbase_ver)',
         'libchromeos-<(libbase_ver)',
+        # system_api depends on protobuf (or protobuf-lite). It must appear
+        # before protobuf here or the linker flags won't be in the right
+        # order.
+        'system_api',
         'protobuf',
       ],
     },
@@ -69,7 +70,6 @@
       'target_name': 'libwimax_manager',
       'type': 'static_library',
       'dependencies': [
-        '<(platform_root)/system_api/system_api.gyp:system_api-headers',
         'wimax_manager-adaptors',
         'wimax_manager-proxies',
         'wimax_manager-protos',