summaryrefslogtreecommitdiff
blob: 6acf412173ecb04c7e865199fb3592d531d0745d (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
From 055fb62fc58ef7027b444dd235bc4781effa30d7 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Mon, 2 Oct 2017 15:22:51 -0400
Subject: [PATCH] Gentoo build fixes

---
 brightray.gyp  | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 brightray.gypi | 14 ++-------
 2 files changed, 88 insertions(+), 19 deletions(-)

diff --git a/brightray.gyp b/brightray.gyp
index e60d17a..79e0618 100644
--- a/brightray.gyp
+++ b/brightray.gyp
@@ -1,7 +1,7 @@
 {
   'variables': {
     # The libraries brightray will be compiled to.
-    'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss'
+    'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gmodule-2.0 nss'
   },
   'includes': [
     'filenames.gypi',
@@ -9,6 +9,11 @@
   'targets': [
     {
       'target_name': 'brightray',
+      'dependencies': [
+        'cups',
+        'gconf',
+        'icu',
+      ],
       'type': 'static_library',
       'include_dirs': [
         '.',
@@ -130,18 +135,33 @@
             }, {
               'link_settings': {
                 'libraries': [
-                  # Link with ffmpeg.
-                  '<(libchromiumcontent_dir)/libffmpeg.so',
                   # Following libraries are required by libchromiumcontent:
+                  '-lFLAC',
                   '-lasound',
+                  '-lavcodec',
+                  '-lavformat',
+                  '-lavutil',
                   '-lcap',
-                  '-lcups',
-                  '-lrt',
+                  '-lcrypto',
                   '-ldl',
-                  '-lresolv',
+                  '-lexpat',
                   '-lfontconfig',
                   '-lfreetype',
-                  '-lexpat',
+                  '-lharfbuzz',
+                  '-ljpeg',
+                  '-lminizip',
+                  '-lpng',
+                  '-lre2',
+                  '-lresolv',
+                  '-lrt',
+                  '-lsnappy',
+                  '-lssl',
+                  '-lvpx',
+                  '-lwebp',
+                  '-lwebpdemux',
+                  '-lxml2',
+                  '-lxslt',
+                  '-lz',
                 ],
               },
             }],
@@ -390,5 +410,64 @@
         }],  # OS=="win"
       ],
     },
+    {
+      'target_name': 'gconf',
+      'type': 'none',
+      'conditions': [
+        ['use_gconf==1 and _toolset=="target"', {
+          'direct_dependent_settings': {
+            'cflags': [
+              '<!@(<(pkg-config) --cflags gconf-2.0)',
+            ],
+            'defines': [
+              'USE_GCONF',
+            ],
+          },
+          'link_settings': {
+            'ldflags': [
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
+            ],
+            'libraries': [
+              '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
+            ],
+          },
+        }],
+      ],
+    },
+    {
+      'target_name': 'cups',
+      'type': 'none',
+      'conditions': [
+        ['use_cups==1', {
+          'direct_dependent_settings': {
+            'defines': [
+              'USE_CUPS',
+            ],
+            'link_settings': {
+              'libraries': [
+                '-lcups',
+              ],
+            },
+          },
+        }],
+      ],
+    },
+    {
+      'target_name': 'icu',
+      'type': 'none',
+      'conditions': [
+        ['use_system_icu==1', {
+          'direct_dependent_settings': {
+            'link_settings': {
+              'libraries': [
+                '-licui18n',
+                '-licuuc',
+                '-licudata',
+              ],
+            },
+          },
+        }],
+      ],
+    },
   ],
 }
diff --git a/brightray.gypi b/brightray.gypi
index 064ae1a..95d6f14 100644
--- a/brightray.gypi
+++ b/brightray.gypi
@@ -1,6 +1,6 @@
 {
   'includes': [
-    'vendor/download/libchromiumcontent/filenames.gypi',
+    'vendor/libchromiumcontent/dist/main/filenames.gypi',
   ],
   'variables': {
     'libchromiumcontent_component%': 1,
@@ -14,7 +14,7 @@
       }, {
         'libchromiumcontent_dir%': '<(libchromiumcontent_static_libraries_dir)',
         'libchromiumcontent_libraries%': '<(libchromiumcontent_static_libraries)',
-        'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_static_v8_libraries)',
+        'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_shared_v8_libraries)',
       }],
     ],
   },
@@ -235,22 +235,12 @@
         'conditions': [
           ['OS=="linux"', {
             'cflags': [
-              '-O2',
-              # Generate symbols, will be stripped later.
-              '-g',
-              # Don't emit the GCC version ident directives, they just end up
-              # in the .comment section taking up binary size.
-              '-fno-ident',
               # Put data and code in their own sections, so that unused symbols
               # can be removed at link time with --gc-sections.
               '-fdata-sections',
               '-ffunction-sections',
             ],
             'ldflags': [
-              # Specifically tell the linker to perform optimizations.
-              # See http://lwn.net/Articles/192624/ .
-              '-Wl,-O1',
-              '-Wl,--as-needed',
               '-Wl,--gc-sections',
             ],
           }],  # OS=="linux"
-- 
2.14.3