From: "Jory Pratt" <anarchy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mozilla:master commit in: mail-client/thunderbird/, www-client/firefox/, eclass/
Date: Sun, 20 Nov 2011 15:57:10 +0000 (UTC) [thread overview]
Message-ID: <289a63b2141a09507f1710c95b3fab369c3e68de.anarchy@gentoo> (raw)
commit: 289a63b2141a09507f1710c95b3fab369c3e68de
Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 20 15:56:11 2011 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sun Nov 20 15:56:11 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=289a63b2
make shared_plugins_dir function, check diskspace for firefox compile.
---
eclass/mozconfig-3.eclass | 2 +-
eclass/mozcoreconf-2.eclass | 286 +++++++++++++++++++++
mail-client/thunderbird/Manifest | 2 +-
mail-client/thunderbird/thunderbird-8.0-r1.ebuild | 2 +
www-client/firefox/Manifest | 2 +-
www-client/firefox/firefox-8.0.ebuild | 14 +-
6 files changed, 302 insertions(+), 6 deletions(-)
diff --git a/eclass/mozconfig-3.eclass b/eclass/mozconfig-3.eclass
index baf358b..1ffbfc8 100644
--- a/eclass/mozconfig-3.eclass
+++ b/eclass/mozconfig-3.eclass
@@ -38,7 +38,7 @@ mozconfig_config() {
mozconfig_use_enable alsa ogg
mozconfig_use_enable alsa wave
- if has crashreporter ${IUSE} ; then
+ if has +crashreporter ${IUSE} ; then
mozconfig_use_enable crashreporter
fi
mozconfig_use_enable dbus
diff --git a/eclass/mozcoreconf-2.eclass b/eclass/mozcoreconf-2.eclass
new file mode 100644
index 0000000..27bd045
--- /dev/null
+++ b/eclass/mozcoreconf-2.eclass
@@ -0,0 +1,286 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf-2.eclass,v 1.22 2011/08/29 01:28:10 vapier Exp $
+#
+# mozcoreconf.eclass : core options for mozilla
+# inherit mozconfig-2 if you need USE flags
+
+inherit multilib flag-o-matic python
+
+IUSE="${IUSE} custom-cflags custom-optimization"
+
+RDEPEND="x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXmu
+ >=sys-libs/zlib-1.1.4"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ =dev-lang/python-2*[threads]"
+
+# mozconfig_annotate: add an annotated line to .mozconfig
+#
+# Example:
+# mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
+# => ac_add_options --enable-js-ultrasparc # building on ultrasparc
+mozconfig_annotate() {
+ declare reason=$1 x ; shift
+ [[ $# -gt 0 ]] || die "mozconfig_annotate missing flags for ${reason}\!"
+ for x in ${*}; do
+ echo "ac_add_options ${x} # ${reason}" >>.mozconfig
+ done
+}
+
+# mozconfig_use_enable: add a line to .mozconfig based on a USE-flag
+#
+# Example:
+# mozconfig_use_enable truetype freetype2
+# => ac_add_options --enable-freetype2 # +truetype
+mozconfig_use_enable() {
+ declare flag=$(use_enable "$@")
+ mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}"
+}
+
+# mozconfig_use_with: add a line to .mozconfig based on a USE-flag
+#
+# Example:
+# mozconfig_use_with kerberos gss-api /usr/$(get_libdir)
+# => ac_add_options --with-gss-api=/usr/lib # +kerberos
+mozconfig_use_with() {
+ declare flag=$(use_with "$@")
+ mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}"
+}
+
+# mozconfig_use_extension: enable or disable an extension based on a USE-flag
+#
+# Example:
+# mozconfig_use_extension gnome gnomevfs
+# => ac_add_options --enable-extensions=gnomevfs
+mozconfig_use_extension() {
+ declare minus=$(use $1 || echo -)
+ mozconfig_annotate "${minus:-+}$1" --enable-extensions=${minus}${2}
+}
+
+moz_pkgsetup() {
+ # Ensure we use C locale when building
+ export LANG="C"
+ export LC_ALL="C"
+ export LC_MESSAGES="C"
+ export LC_CTYPE="C"
+
+ # Ensure that we have a sane build enviroment
+ export MOZILLA_CLIENT=1
+ export BUILD_OPT=1
+ export NO_STATIC_LIB=1
+ export USE_PTHREADS=1
+ export ALDFLAGS=${LDFLAGS}
+
+ python_set_active_version 2
+}
+
+mozconfig_init() {
+ declare enable_optimize pango_version myext x
+ declare XUL=$([[ ${PN} == xulrunner ]] && echo true || echo false)
+ declare FF=$([[ ${PN} == firefox ]] && echo true || echo false)
+ declare IC=$([[ ${PN} == icecat ]] && echo true || echo false)
+ declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false)
+ declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false)
+ declare EM=$([[ ${PN} == enigmail ]] && echo true || echo false)
+
+
+ ####################################
+ #
+ # Setup the initial .mozconfig
+ # See http://www.mozilla.org/build/configure-build.html
+ #
+ ####################################
+
+ case ${PN} in
+ *xulrunner)
+ cp xulrunner/config/mozconfig .mozconfig \
+ || die "cp xulrunner/config/mozconfig failed" ;;
+ *firefox)
+ cp browser/config/mozconfig .mozconfig \
+ || die "cp browser/config/mozconfig failed" ;;
+ *icecat)
+ cp browser/config/mozconfig .mozconfig \
+ || die "cp browser/config/mozconfig failed" ;;
+ seamonkey)
+ # Must create the initial mozconfig to enable application
+ : >.mozconfig || die "initial mozconfig creation failed"
+ mozconfig_annotate "" --enable-application=suite ;;
+ *thunderbird)
+ # Must create the initial mozconfig to enable application
+ : >.mozconfig || die "initial mozconfig creation failed"
+ mozconfig_annotate "" --enable-application=mail ;;
+ enigmail)
+ cp mail/config/mozconfig .mozconfig \
+ || die "cp mail/config/mozconfig failed" ;;
+ esac
+
+ ####################################
+ #
+ # CFLAGS setup and ARCH support
+ #
+ ####################################
+
+ # Set optimization level
+ if [[ ${ARCH} == hppa ]]; then
+ mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0
+ elif [[ ${ARCH} == x86 ]]; then
+ mozconfig_annotate "less then -O2 causes a segfault on x86" --enable-optimize=-O2
+ elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then
+ # Set optimization level based on CFLAGS
+ if is-flag -O0; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
+ elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then
+ mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1
+ elif is-flag -O1; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-O1
+ elif is-flag -Os; then
+ mozconfig_annotate "from CFLAGS" --enable-optimize=-Os
+ else
+ mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2
+ fi
+ else
+ # Enable Mozilla's default
+ mozconfig_annotate "mozilla default" --enable-optimize
+ fi
+
+ # Strip optimization so it does not end up in compile string
+ filter-flags '-O*'
+
+ # Strip over-aggressive CFLAGS
+ use custom-cflags || strip-flags
+
+ # Additional ARCH support
+ case "${ARCH}" in
+ alpha)
+ # Historically we have needed to add -fPIC manually for 64-bit.
+ # Additionally, alpha should *always* build with -mieee for correct math
+ # operation
+ append-flags -fPIC -mieee
+ ;;
+
+ ia64)
+ # Historically we have needed to add this manually for 64-bit
+ append-flags -fPIC
+ ;;
+
+ ppc64)
+ append-flags -fPIC -mminimal-toc
+ ;;
+
+ ppc)
+ # Fix to avoid gcc-3.3.x micompilation issues.
+ if [[ $(gcc-major-version).$(gcc-minor-version) == 3.3 ]]; then
+ append-flags -fno-strict-aliasing
+ fi
+ ;;
+
+ x86)
+ if [[ $(gcc-major-version) -eq 3 ]]; then
+ # gcc-3 prior to 3.2.3 doesn't work well for pentium4
+ # see bug 25332
+ if [[ $(gcc-minor-version) -lt 2 ||
+ ( $(gcc-minor-version) -eq 2 && $(gcc-micro-version) -lt 3 ) ]]
+ then
+ replace-flags -march=pentium4 -march=pentium3
+ filter-flags -msse2
+ fi
+ fi
+ ;;
+ esac
+
+ if [[ $(gcc-major-version) -eq 3 ]]; then
+ # Enable us to use flash, etc plugins compiled with gcc-2.95.3
+ mozconfig_annotate "building with >=gcc-3" --enable-old-abi-compat-wrappers
+
+ # Needed to build without warnings on gcc-3
+ CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
+ fi
+
+ # Go a little faster; use less RAM
+ append-flags "$MAKEEDIT_FLAGS"
+
+ ####################################
+ #
+ # mozconfig setup
+ #
+ ####################################
+
+ mozconfig_annotate system_libs \
+ --with-system-jpeg \
+ --with-system-zlib \
+ --enable-pango \
+ --enable-svg \
+ --enable-system-cairo
+ # Requires libpng with apng support
+ #--with-system-png \
+
+ mozconfig_annotate disable_update_strip \
+ --disable-installer \
+ --disable-pedantic \
+ --disable-updater \
+ --disable-strip \
+ --disable-strip-libs \
+ --disable-install-strip
+
+
+
+ if [[ ${PN} != seamonkey ]]; then
+ mozconfig_annotate basic_profile \
+ --enable-single-profile \
+ --disable-profilesharing \
+ --disable-profilelocking
+ fi
+
+ # Here is a strange one...
+ if is-flag '-mcpu=ultrasparc*' || is-flag '-mtune=ultrasparc*'; then
+ mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
+ fi
+
+ # Currently --enable-elf-dynstr-gc only works for x86,
+ # thanks to Jason Wever <weeve@gentoo.org> for the fix.
+ if use x86 && [[ ${enable_optimize} != -O0 ]]; then
+ mozconfig_annotate "${ARCH} optimized build" --enable-elf-dynstr-gc
+ fi
+
+ # jemalloc won't build with older glibc
+ ! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc
+}
+
+makemake2() {
+ for m in $(find ../ -name Makefile.in); do
+ topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
+ sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
+ < ${m} > ${m%.in} || die "sed ${m} failed"
+ done
+}
+
+# mozconfig_final: display a table describing all configuration options paired
+# with reasons, then clean up extensions list
+mozconfig_final() {
+ declare ac opt hash reason
+ echo
+ echo "=========================================================="
+ echo "Building ${PF} with the following configuration"
+ grep ^ac_add_options .mozconfig | while read ac opt hash reason; do
+ [[ -z ${hash} || ${hash} == \# ]] \
+ || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}"
+ printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}"
+ done
+ echo "=========================================================="
+ echo
+
+ # Resolve multiple --enable-extensions down to one
+ declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \
+ .mozconfig | xargs)
+ sed -i '/^ac_add_options --enable-extensions/d' .mozconfig
+ echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig
+}
+
+# ${MOZILLA_FIVE_HOME} must be defined in src_install to support
+share_plugins_dir() {
+ dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
+}
diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index a1394c6..9d460d8 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -56,4 +56,4 @@ DIST thunderbird-8.0-vi.xpi 425968 RMD160 5412aefbf05179354fb4fa2f3865a58b535520
DIST thunderbird-8.0-zh-CN.xpi 422519 RMD160 ef881e92de682aa3d807a53a7f536f51e6740b94 SHA1 564f90305e0458f57cd27a876f90e8c12b5ade8f SHA256 bb46c2b4d395488104528ac225f2c129e9c4ddb500e6f44082df549560013132
DIST thunderbird-8.0-zh-TW.xpi 423019 RMD160 3326d286df45aee39ea4dc9303c6e4459b41dba2 SHA1 a81c24ab001eb521a1b4e49da16c8f6914676641 SHA256 a6c78df16a242b1731709fdacae8fcfde630fe10469abfd6a696b46076e9059a
DIST thunderbird-8.0.source.tar.bz2 89435206 RMD160 373420ec009a7f28f12a64a0d55e9d959573974e SHA1 18b77e44f1653eb3d59056870f535e3c373d99fd SHA256 f728bd2dbc04e6c3a096d79a9ee320740f53794a28be307da8655c8fd90f77f5
-EBUILD thunderbird-8.0-r1.ebuild 9695 RMD160 96e94129c8db76e36eb946025f0ac12ff039bcd0 SHA1 4537bf3946db2faae0d5706fa59be0552afb510c SHA256 68db5ffc810694cce9a94e53fcf4826978d009a90c16005d2df83de43f495345
+EBUILD thunderbird-8.0-r1.ebuild 9715 RMD160 f93fc72abf5b40dfd8c504841f42e7f004c172ad SHA1 5fa270359bbe312caed4eb9af1ff200fa9516bf9 SHA256 62afc1628d2de65902462e260588a3669b2e4cebaf5ee516ca64b262d73391b1
diff --git a/mail-client/thunderbird/thunderbird-8.0-r1.ebuild b/mail-client/thunderbird/thunderbird-8.0-r1.ebuild
index 16183bf..a4f8a48 100644
--- a/mail-client/thunderbird/thunderbird-8.0-r1.ebuild
+++ b/mail-client/thunderbird/thunderbird-8.0-r1.ebuild
@@ -305,6 +305,8 @@ src_install() {
cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js \
"${ED}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js" || \
die "failed to cp thunderbird-gentoo-default-prefs.js"
+
+ share_plugins_dir
}
pkg_postinst() {
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
index 44f9524..e6e7569 100644
--- a/www-client/firefox/Manifest
+++ b/www-client/firefox/Manifest
@@ -84,4 +84,4 @@ DIST firefox-8.0-zh-CN.xpi 243430 RMD160 50781f9c1e56671b71958962d8047f1c1e69e99
DIST firefox-8.0-zh-TW.xpi 244296 RMD160 b61ad8ada60b9841a23c72579b9f903773b70e77 SHA1 faa4fa00a67585fd9cfba9e6cea2d4e4dce0f938 SHA256 bf988457d2174eaeba9272a6d049e27431fc2413f3b43ee8bab2924675dc24fa
DIST firefox-8.0-zu.xpi 234633 RMD160 c8163fab204bf8b412345089cdc9a2a79aea4b27 SHA1 5120fdf77cbfd09d7cf211cfb1ec988eae1654b9 SHA256 856bfe9ea1251e1104046c1da1452298cd12280b8e281fa00a0618d7e91ab01f
DIST firefox-8.0.source.tar.bz2 70377448 RMD160 f87ec7668b2dcc1bb581b97e1dbe85e4b97cb31c SHA1 843cf4ad70d2fc4b16654c3ff9b080d3eb357452 SHA256 d950324ecd5362a648a891a66c3f2dde5e69b09f30ef8470b7759ec007691139
-EBUILD firefox-8.0.ebuild 11199 RMD160 efa2086c81477a0177344dd39b25767590c0a30d SHA1 05e0a6df6a0110fa4e9b531f03ded0854ed3531c SHA256 d3f8b0ccb9edd4d0e7b090726b18425db11bb62d60b4a4d7dfcd6dfcdeff1d4e
+EBUILD firefox-8.0.ebuild 11306 RMD160 343246c71aebe016b8b9b1341785386d54a587cf SHA1 7d7e945d319fe9ebc5971b05835aabd6977a84f0 SHA256 b76fd1d42e56ae87ed02b3bd7da7292f555719e98300fe0a0ecad70b342a4fc6
diff --git a/www-client/firefox/firefox-8.0.ebuild b/www-client/firefox/firefox-8.0.ebuild
index 469114f..69f73a4 100644
--- a/www-client/firefox/firefox-8.0.ebuild
+++ b/www-client/firefox/firefox-8.0.ebuild
@@ -147,6 +147,15 @@ pkg_setup() {
ewarn "You will do a double build for profile guided optimization."
ewarn "This will result in your build taking at least twice as long as before."
fi
+
+ # Ensure we have enough disk space to compile
+ if use pgo ; then
+ CHECKREQS_DISK_BUILD="8G"
+ check-reqs_pkg_setup
+ else
+ CHECKREQS_DISK_BUILD="4G"
+ check-reqs_pkg_setup
+ fi
}
src_unpack() {
@@ -328,11 +337,10 @@ src_install() {
fi
# Required in order to use plugins and even run firefox on hardened.
- pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
# Plugins dir
- dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
- || die "failed to symlink"
+ share_plugins_dir
# very ugly hack to make firefox not sigbus on sparc
# FIXME: is this still needed??
next reply other threads:[~2011-11-20 16:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 15:57 Jory Pratt [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-07-19 3:01 [gentoo-commits] proj/mozilla:master commit in: mail-client/thunderbird/, www-client/firefox/, eclass/ Jory Pratt
2014-08-25 19:25 Ian Stakenvicius
2014-07-31 21:56 ` Ian Stakenvicius
2013-03-23 12:30 Jory Pratt
2013-03-09 2:26 Jory Pratt
2012-12-30 23:36 Jory Pratt
2012-07-01 14:40 Jory Pratt
2012-06-15 3:14 Jory Pratt
2011-03-09 0:11 Jory Pratt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=289a63b2141a09507f1710c95b3fab369c3e68de.anarchy@gentoo \
--to=anarchy@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox