1 # Copyright 2009 Heiko Przybyl <zuxez@cs.tu-berlin.de>
2 # Distributed under the terms of the GNU General Public License v2
4 # TODO: - exclude src/webkit/data/layout_tests/ ~480MB
5 # - split out sub projects into system libs, if possible
7 require chromium multilib scm toolchain-funcs
9 PLATFORMS="~x86 ~amd64"
11 # main repo -- note that dir "src" is needed by build chain, so don't drop it
12 SCM_REPOSITORY="git://git.chromium.org/chromium.git"
15 SCM_CHECKOUT_TO="${PN}/src"
16 SCM_UNPACK_TO="${WORKBASE}/${PNV}/src"
18 # all the other repos, required externals should go last
19 SCM_SECONDARY_REPOSITORIES="
38 # deps needed to build
39 SCM_support_REPOSITORY="http://src.chromium.org/svn/"
41 SCM_support_SUBPATH="deps/support/"
42 SCM_support_CHECKOUT_TO="${PN}/support"
43 SCM_support_UNPACK_TO="${WORKBASE}/${PNV}/src/build/util/support"
45 SCM_acid3_REPOSITORY="http://src.chromium.org/svn/"
47 SCM_acid3_SUBPATH="deps/page_cycler/acid3/"
48 SCM_acid3_CHECKOUT_TO="${PN}/acid3"
49 SCM_acid3_UNPACK_TO="${WORKBASE}/${PNV}/src/tools/page_cycler/acid3"
51 SCM_ffmpeg_REPOSITORY="http://src.chromium.org/svn/"
53 SCM_ffmpeg_SUBPATH="deps/third_party/ffmpeg/binaries/linux/"
54 SCM_ffmpeg_CHECKOUT_TO="${PN}/ffmpeg"
55 SCM_ffmpeg_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/ffmpeg/binaries/chromium"
57 SCM_gurl_REPOSITORY="http://google-url.googlecode.com/svn/"
59 SCM_gurl_CHECKOUT_TO="${PN}/gurl"
60 SCM_gurl_UNPACK_TO="${WORKBASE}/${PNV}/src/gurl"
62 SCM_gtest_REPOSITORY="http://googletest.googlecode.com/svn/"
64 SCM_gtest_CHECKOUT_TO="${PN}/gtest"
65 SCM_gtest_UNPACK_TO="${WORKBASE}/${PNV}/src/testing/gtest"
67 SCM_hunspell_REPOSITORY="http://src.chromium.org/svn/"
69 SCM_hunspell_SUBPATH="deps/third_party/hunspell128/"
70 SCM_hunspell_CHECKOUT_TO="${PN}/hunspell"
71 SCM_hunspell_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/hunspell"
73 SCM_icu42_REPOSITORY="http://src.chromium.org/svn/"
75 SCM_icu42_SUBPATH="deps/third_party/icu42/"
76 SCM_icu42_CHECKOUT_TO="${PN}/icu42"
77 SCM_icu42_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/icu"
79 SCM_openvcdiff_REPOSITORY="http://open-vcdiff.googlecode.com/svn/"
80 SCM_openvcdiff_TYPE=svn
81 SCM_openvcdiff_CHECKOUT_TO="${PN}/openvcdiff"
82 SCM_openvcdiff_UNPACK_TO="${WORKBASE}/${PNV}/src/sdch/open-vcdiff"
84 SCM_protobuf_REPOSITORY="http://protobuf.googlecode.com/svn/"
86 SCM_protobuf_CHECKOUT_TO="${PN}/protobuf"
87 SCM_protobuf_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/protobuf2/src"
88 SCM_protobuf_SVN_EXTERNALS+=" gtest:"
90 SCM_skia_REPOSITORY="http://skia.googlecode.com/svn/"
92 SCM_skia_CHECKOUT_TO="${PN}/skia"
93 SCM_skia_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/skia"
95 SCM_tcmalloc_REPOSITORY="http://google-perftools.googlecode.com/svn/"
97 SCM_tcmalloc_CHECKOUT_TO="${PN}/tcmalloc"
98 SCM_tcmalloc_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/tcmalloc/tcmalloc"
100 SCM_webkit_REPOSITORY="http://src.chromium.org/svn/"
102 SCM_webkit_SUBPATH="deps/third_party/WebKit/"
103 SCM_webkit_CHECKOUT_TO="${PN}/webkit"
104 SCM_webkit_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/WebKit"
106 SCM_webkitjavascriptcore_REPOSITORY="http://svn.webkit.org/repository/webkit/"
107 SCM_webkitjavascriptcore_TYPE=svn
108 SCM_webkitjavascriptcore_SUBPATH="JavaScriptCore/"
109 SCM_webkitjavascriptcore_CHECKOUT_TO="${PN}/webkitjavascriptcore"
110 SCM_webkitjavascriptcore_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/WebKit/JavaScriptCore"
112 SCM_webkitwebcore_REPOSITORY="http://svn.webkit.org/repository/webkit/"
113 SCM_webkitwebcore_TYPE=svn
114 SCM_webkitwebcore_SUBPATH="WebCore/"
115 SCM_webkitwebcore_CHECKOUT_TO="${PN}/webkitwebcore"
116 SCM_webkitwebcore_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/WebKit/WebCore"
118 SCM_v8_REPOSITORY="http://v8.googlecode.com/svn/"
120 SCM_v8_CHECKOUT_TO="${PN}/v8"
121 SCM_v8_UNPACK_TO="${WORKBASE}/${PNV}/src/v8"
123 SCM_xdgutils_REPOSITORY="http://src.chromium.org/svn/"
124 SCM_xdgutils_TYPE=svn
125 SCM_xdgutils_SUBPATH="deps/third_party/xdg-utils/"
126 SCM_xdgutils_CHECKOUT_TO="${PN}/xdgutils"
127 SCM_xdgutils_UNPACK_TO="${WORKBASE}/${PNV}/src/third_party/xdg-utils"
139 # see http://code.google.com/p/chromium/wiki/LinuxChromium64
143 local gccver=$(gcc-major-version)$(gcc-minor-version)
145 option debug && build=Debug
147 myconf="${myconf} -Dgcc_version=${gccver}"
149 if [[ ${gccver} -ge 44 ]] ; then
150 myconf="${myconf} -Dno_strict_aliasing=1"
153 option "platform:amd64" && myconf="${myconf} -Dtarget_arch=x64"
155 einfo "Using config: ${myconf}"
159 # The build chain preparator. Setting cflags on the Makefile doesn't really
160 # work and i dunno why, so just do it here. Won't harm if build=Debug.
165 -Drelease_extra_cflags="${CFLAGS}" \
166 || die "running gyp failed"
168 # the actual compilation... override builddir to use relative build paths
169 emake -r chrome BUILDTYPE=${build} LDFLAGS+="-L/usr/$(get_libdir)/nss"
174 local dest=/opt/chromium-${PV}
175 local ffmpeg="libavcodec.so.52 libavformat.so.52 libavutil.so.50"
177 # files were generated in here
180 # remove depend files and binary ffmpeg blob
181 # do not remove fake libxpcom.so and libxul.so!
184 # executable binaries
186 doexe chrome chrome-wrapper mksnapshot xdg-settings
190 doins -r *.* locales resources themes
192 # link ffmpeg shared libs (not directly loaded by ld and thus needed :/)
193 for l in ${ffmpeg}; do
194 dosym /usr/$(get_libdir)/${l%???} ${dest}/${l}
197 # add a wrapper to the binary
198 herebin chromium <<EOF
201 LD_LIBRARY_PATH=${dest} ${dest}/chrome "\$@"