summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third__party_snappy_snappy.gyp
blob: ed9733f76e7f91f0c7b4f392a1a75b568cf16088 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
--- third_party/snappy/snappy.gyp.orig	2016-05-20 17:19:03 UTC
+++ third_party/snappy/snappy.gyp
@@ -1,104 +1,29 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Copyright 2013 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 {
-'variables': {
-    'conditions': [
-      # Define an "os_include" variable that points at the OS-specific generated
-      # headers.  These were generated by running the configure script offline.
-      ['os_posix == 1 and OS != "mac"', {
-        'os_include': 'linux'
-      }],
-      ['OS=="mac"', {'os_include': 'mac'}],
-      ['OS=="win"', {'os_include': 'win32'}],
-    ],
-    'use_system_libxml%': 0,
-  },
   'targets': [
     {
       'target_name': 'snappy',
-      'type': 'static_library',
-      'include_dirs': [
-        '<(os_include)',
-        'src',
-        '../..',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(os_include)',
-          'src',
-        ],
-      },
+      'type': 'none',
       'variables': {
-        'clang_warning_flags': [
-           # ComputeTable is unused,
-           # https://code.google.com/p/snappy/issues/detail?id=96
-           '-Wno-unused-function',
-         ],
-        'clang_warning_flags_unset': [
-          # snappy-stubs-internal.h unapologetically has: using namespace std
-          # https://code.google.com/p/snappy/issues/detail?id=70
-          '-Wheader-hygiene',
+        'headers_root_path': 'src',
+        'header_filenames': [
+          'snappy-c.h',
+          'snappy-sinksource.h',
+          'snappy-stubs-public.h',
+          'snappy.h',
         ],
       },
-      'sources': [
-        'src/snappy-internal.h',
-        'src/snappy-sinksource.cc',
-        'src/snappy-sinksource.h',
-        'src/snappy-stubs-internal.cc',
-        'src/snappy-stubs-internal.h',
-        'src/snappy.cc',
-        'src/snappy.h',
-      ],
-      'conditions': [
-        ['OS=="linux" or OS=="mac"', {
-          'defines': [
-            # TODO(tfarina): Only Mac and Linux has the generated config.h for
-            # now. Generate the config.h for Windows too and enable this there
-            # as well.
-            'HAVE_CONFIG_H=1',
-          ],
-        }],
-        ['OS=="win"', {
-          # Signed/unsigned comparison
-          'msvs_disabled_warnings': [
-            # https://code.google.com/p/snappy/issues/detail?id=71
-            4018,
-            # https://code.google.com/p/snappy/issues/detail?id=75
-            4267,
-          ],
-        }],
-      ],
-    },
-    {
-      'target_name': 'snappy_unittest',
-      'type': 'executable',
-      'sources': [
-        'src/snappy-test.cc',
-        'src/snappy-test.h',
-        'src/snappy_unittest.cc',
-      ],
-      'dependencies': [
-        'snappy',
-        '../../base/base.gyp:base',
-        '../../testing/gtest.gyp:gtest',
-        '../../third_party/zlib/zlib.gyp:zlib',
+      'includes': [
+        '../../build/shim_headers.gypi',
       ],
-      'variables': {
-        'clang_warning_flags': [ '-Wno-return-type' ],
-        'clang_warning_flags_unset': [ '-Wheader-hygiene' ],
+      'link_settings': {
+        'libraries': [
+          '-lsnappy',
+        ],
       },
-      'conditions': [
-        ['OS=="linux" or OS=="mac"', {
-          'defines': [
-            # TODO(tfarina): Only Mac and Linux has the generated config.h for
-            # now. Generate the config.h for Windows too and enable this there
-            # as well.
-            'HAVE_CONFIG_H=1',
-          ],
-        }],
-      ],
     },
   ],
 }