summaryrefslogtreecommitdiff
path: root/meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk-thirdparty.inc
blob: f82a6910b0f9a5db6226b684673b497f9577fae3 (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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
DESCRIPTION = "Chromium-based app runtime"
HOMEPAGE = "https://github.com/otcshare/crosswalk"
SECTION = "Web Framework/Web Run Time"
LICENSE = "(BSD-3-Clause and LGPL-2.1+)"
PV = "11.40.277.0"

SRC_URI = ""

S = "${WORKDIR}/git"

inherit manifest autotools-brokensep

BBCLASSEXTEND = ""
PROVIDES = ""

#PROVIDES by crosswalk-thirdparty
# the PROVIDES rules is ignore "crosswalk-thirdparty  "


RDEPENDS = ""
#RDEPENDS of crosswalk-thirdparty (${PN})
RDEPENDS_${PN} += "ca-certificates-tizen"
RDEPENDS_${PN} += "ss-server"


DEPENDS = ""
#DEPENDS of crosswalk-thirdparty
DEPENDS += "protobuf"
DEPENDS += "cairo"
DEPENDS += "expat"
DEPENDS += "udev"
DEPENDS += "libxslt"
DEPENDS += "glib-2.0"
DEPENDS += "bzip2"
DEPENDS += "nss"
DEPENDS += "alsa-lib"
DEPENDS += "elfutils"
inherit pkgconfig
DEPENDS += "yasm"
inherit perlnative
DEPENDS += "wayland"
DEPENDS += "which"
DEPENDS += "libxml2"
DEPENDS += "libcap"
DEPENDS += "flex"
DEPENDS += "gperf"
inherit pythonnative
DEPENDS += "python-xml"
DEPENDS_append_class-native = " ninja-native"
DEPENDS_append_class-target = " ninja-native"
DEPENDS += "pango"
DEPENDS += "vconf"
DEPENDS += "fontconfig"
DEPENDS += "libxkbcommon"
DEPENDS += "dbus"
DEPENDS += "pulseaudio"
DEPENDS_append_class-native = " bison-native"
DEPENDS_append_class-target = " bison-native"
DEPENDS += "pciutils"
DEPENDS += "binutils"

do_prep() {
 cd ${S}
 chmod -Rf a+rX,u+w,g-w,o-w ${S}
 #setup -q -n crosswalk
 
 cp ${S}/packaging/crosswalk-thirdparty.manifest .
 cp ${S}/packaging/xwalk-thirdparty.gyp src/xwalk/
 
 
 # The profiles using Wayland (and thus Ozone) do not need this patch.
 
 
}
do_patch_append() {
    bb.build.exec_func('do_prep', d)
}

do_configure() {
}

do_compile() {
 cd ${S}
 LANG=C
 export LANG
 unset DISPLAY
 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
 
 
 # Stop unconditionally passing -Wall to the compiler. Chromium has its own
 # mechanisms for deciding which parts of the code need -Wall and which need it
 # to be left out (since several pieces are built with -Werror). At least in
 # M39, this is preventing the "rtc_base" target from being built because it
 # does not expect -Wall to be passed to the compiler (see webrtc issue 3307).
 export CXXFLAGS="`echo $CXXFLAGS | sed s,-Wall,,g`"
 
 # Do not use -finline-functions: it breaks the build because it causes -Wall to
 # warn about some conditions that cannot really be reached (ie. variables that
 # may be used uninitialized while in fact thay cannot be uninitialized). See
 # TC-2299.
 export CXXFLAGS="`echo $CXXFLAGS | sed s,-finline-functions,,g`"
 
 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
 export CFLAGS="`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`"
 
 
 # Building the RPM in the GBS chroot fails with errors such as
 #   /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
 #       failed to set dynamic section sizes: Memory exhausted
 # For now, work around it by passing a GNU ld-specific flag that optimizes the
 # linker for memory usage.
 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
 
 # Support building in a non-standard directory, possibly outside ${WORKDIR}.
 # Since the build root is erased every time a new build is performed, one way
 # to avoid losing the build directory is to specify a location outside the
 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
 # (remember all paths are still inside the chroot):
 #    gbs build --define 'BUILDDIR_NAME /some/path'
 BUILDDIR_NAME=""
 if [ -n "${BUILDDIR_NAME}" ]; then
    mkdir -p "${BUILDDIR_NAME}"
    ln -s "${BUILDDIR_NAME}" src/out
 fi
 
 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
 
 # disable nacl if necessary
 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1"
 
 # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
 
 # For building for arm in OBS, we need :
 # -> to unset sysroot value.
 # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
 # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
 #
 # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
 # So force it.
 
 
 
 # --no-parallel is added because chroot does not mount a /dev/shm, this will
 # cause python multiprocessing.SemLock error.
 export GYP_GENERATORS='ninja'
 ./src/xwalk/gyp_xwalk src/xwalk/xwalk-thirdparty.gyp \
 --no-parallel \
 ${GYP_EXTRA_FLAGS} \
 -Dchromeos=0 \
 -Dclang=0 \
 -Dlinux_use_bundled_binutils=0 \
 -Dlinux_use_bundled_gold=0 \
 -Dtizen=1 \
 -Dpython_ver=2.7 \
 -Duse_aura=1 \
 -Duse_cups=0 \
 -Duse_gconf=0 \
 -Duse_gnome_keyring=0 \
 -Duse_kerberos=0 \
 -Duse_system_bzip2=1 \
 -Duse_system_libexif=1 \
 -Duse_system_libxml=1 \
 -Duse_system_yasm=1 \
 -Denable_hidpi=1 
 
 ninja ${PARALLEL_MAKE} -C src/out/Release xwalk-thirdparty
 
 
 
}

do_install() {
 export RPM_BUILD_ROOT=${D}
 cd ${S}
 LANG=C
 export LANG
 unset DISPLAY
 rm -rf ${D}
 mkdir -p ${D}
 
 
 
 mkdir  -p ${D}${prefix}/share/crosswalk-thirdparty/
 tar -zcvf out.tgz src/out
 cp -ar out.tgz ${D}${prefix}/share/crosswalk-thirdparty/
 
 
}

PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
PACKAGES += " crosswalk-thirdparty "

crosswalk-thirdparty_files = ""
crosswalk-thirdparty_files += "${prefix}/share/crosswalk-thirdparty/*"
MANIFESTFILES_${PN} = "crosswalk-thirdparty.manifest"

FILES_${PN} = "${crosswalk-thirdparty_files}"

PKG_crosswalk-thirdparty= "crosswalk-thirdparty"

require crosswalk-thirdparty-extraconf.inc