www-client/firefox: fix PGO build, bug 388585
authorAndrew Savchenko <bircoph@gentoo.org>
Thu, 11 Aug 2016 08:14:44 +0000 (11:14 +0300)
committerAndrew Savchenko <bircoph@gentoo.org>
Thu, 11 Aug 2016 08:28:28 +0000 (11:28 +0300)
Fix PGO build by providing proper pgo-run target.
Patches are based on Daniel Rammelt's patches, bug 499650.
Tested on ~amd64.

Package-Manager: portage-2.3.0
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
www-client/firefox/files/firefox-48.0-pgo.patch [new file with mode: 0644]
www-client/firefox/firefox-48.0.ebuild

diff --git a/www-client/firefox/files/firefox-48.0-pgo.patch b/www-client/firefox/files/firefox-48.0-pgo.patch
new file mode 100644 (file)
index 0000000..645c008
--- /dev/null
@@ -0,0 +1,12 @@
+--- firefox-47.0.1/Makefile.in.orig    2016-06-01 07:11:37.000000000 +0300
++++ firefox-47.0.1/Makefile.in 2016-08-06 16:45:14.442699244 +0300
+@@ -55,6 +55,9 @@
+ endif
+ endif
++pgo-profile-run:
++      $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS)
++
+ ifdef JS_STANDALONE
+ .PHONY: CLOBBER
+ CLOBBER:
index 33c3f4690517e52086211e8850f5ba6666fece56..c430b690c7125aa53cd794bc666ddcc196cbbf96 100644 (file)
@@ -115,7 +115,8 @@ src_unpack() {
 
 src_prepare() {
        # Apply our patches
-       eapply "${WORKDIR}/firefox"
+       eapply "${WORKDIR}/firefox" \
+               "${FILESDIR}"/${PN}-48.0-pgo.patch
 #              "${FILESDIR}"/${PN}-45-qt-widget-fix.patch
 
        if ! tc-ld-is-gold && has_version ">=sys-devel/binutils-2.26" ; then
@@ -203,7 +204,7 @@ src_configure() {
 
        # Allow for a proper pgo build
        if use pgo; then
-               echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
+               echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> "${S}"/.mozconfig
        fi
 
        echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig