cromo: Migrate libchromeos to its own ebuild

All platform2 packages should have their own ebuild that will be compiled
independently. Packages should DEPEND on libchromeos and should not have a gyp
dependency on libchromeos's gyp file anymore.

BUG=chromium:381372
TEST=emerge-daisy libchromeos && emerge-daisy platform2 work
TEST=trybot run on daisy, link, mario and duck.
TEST=trybot run on lumpy-incremental-paladin.

CQ-DEPEND=CL:202748

Change-Id: I2c76bf0d199e73766f93e573c7a6973971c3e7fb
Reviewed-on: https://chromium-review.googlesource.com/202749
Tested-by: Bertrand Simonnet <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>
Commit-Queue: Bertrand Simonnet <[email protected]>
diff --git a/cromo.gyp b/cromo.gyp
index 3019033..40ee709 100644
--- a/cromo.gyp
+++ b/cromo.gyp
@@ -1,7 +1,6 @@
 {
   'target_defaults': {
     'dependencies': [
-      '../../platform2/libchromeos/libchromeos-<(libbase_ver).gyp:libchromeos-<(libbase_ver)',
       '../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
     ],
     'variables': {
@@ -10,6 +9,7 @@
         'gthread-2.0',
         'gobject-2.0',
         'libchrome-<(libbase_ver)',
+        'libchromeos-<(libbase_ver)',
       ],
     },
     'link_settings': {
@@ -62,6 +62,7 @@
       # depending on 'libcromo'.
       'dependencies': [
         '../../platform2/common-mk/external_dependencies.gyp:modemmanager-dbus-adaptors',
+        '<(platform_root)/system_api/system_api.gyp:system_api-headers',
         'cromo-adaptors',
       ],
       'defines': [
@@ -73,6 +74,9 @@
       'ldflags': [
         '-Wl,--dynamic-list-cpp-typeinfo,--dynamic-list=<(platform_root)/cromo/cromo.ver',
       ],
+      'libraries': [
+        '-lpthread',
+      ],
       'sources': [
         'cromo_server.cc',
         'hooktable.cc',