net-www/chromium: Sanatize repository names.
[pippings-exhereses.git] / packages / net-www / chromium / chromium-scm.exheres-0
blob85310e5a76060d650c1e8441799664d85dfd89c7
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"
13 SCM_TYPE=git
14 SCM_BRANCH=trunk
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="
20     acid3
21     ffmpeg
22     gtest
23     gurl
24     hunspell
25     icu42
26     openvcdiff
27     protobuf
28     skia
29     support
30     tcmalloc
31     webkit
32     webkitjavascriptcore
33     webkitwebcore
34     v8
35     xdgutils
38 # deps needed to build
39 SCM_support_REPOSITORY="http://src.chromium.org/svn/"
40 SCM_support_TYPE=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/"
46 SCM_acid3_TYPE=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/"
52 SCM_ffmpeg_TYPE=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/"
58 SCM_gurl_TYPE=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/"
63 SCM_gtest_TYPE=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/"
68 SCM_hunspell_TYPE=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/"
74 SCM_icu42_TYPE=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/"
85 SCM_protobuf_TYPE=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/"
91 SCM_skia_TYPE=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/"
96 SCM_tcmalloc_TYPE=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/"
101 SCM_webkit_TYPE=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/"
119 SCM_v8_TYPE=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"
129 scm_finalise
131 DEPENDENCIES+="
132     build:
133         sys-devel/gyp[~scm]
134         media/ffmpeg[>=0.5]
135         sys-devel/gcc
136         sys-devel/make
139 # see http://code.google.com/p/chromium/wiki/LinuxChromium64
140 src_compile() {
141     local myconf=""
142     local build=Release
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"
151     fi
153     option "platform:amd64" && myconf="${myconf} -Dtarget_arch=x64"
155     einfo "Using config: ${myconf}"
157     cd src
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.
161     gyp \
162         -f make \
163         build/all.gyp \
164         ${myconf} \
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"
172 src_install() {
173     # install into /opt
174     local dest=/opt/chromium-${PV}
175     local ffmpeg="libavcodec.so.52 libavformat.so.52 libavutil.so.50"
177     # files were generated in here
178     cd src/out
180     # remove depend files and binary ffmpeg blob
181     # do not remove fake libxpcom.so and libxul.so!
182     rm -f *.d ${ffmpeg}
184     # executable binaries
185     exeinto ${dest}
186     doexe chrome chrome-wrapper mksnapshot xdg-settings
188     # data
189     insinto ${dest}
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}
195     done
197     # add a wrapper to the binary
198     herebin chromium <<EOF
199 #!/usr/bin/env bash
201 LD_LIBRARY_PATH=${dest} ${dest}/chrome "\$@"