From 29c01a0e0934a90b76262611f42331cf713b941a Mon Sep 17 00:00:00 2001 From: Sardem FF7 Date: Fri, 25 Feb 2011 12:22:13 +0100 Subject: Merge mozconfig eclasses to mozilla-scm Factorize some mozconfig stuff to a big mozconfig_configure function Clean some options --- eclass/mozilla-scm.eclass | 395 +++++++++++++++++++++++++++---- net-libs/xulrunner/Manifest | 3 +- net-libs/xulrunner/xulrunner-9999.ebuild | 112 +-------- www-client/firefox/Manifest | 2 +- www-client/firefox/firefox-9999.ebuild | 111 +-------- 5 files changed, 354 insertions(+), 269 deletions(-) diff --git a/eclass/mozilla-scm.eclass b/eclass/mozilla-scm.eclass index 7ad21dd..dae3e1d 100644 --- a/eclass/mozilla-scm.eclass +++ b/eclass/mozilla-scm.eclass @@ -8,41 +8,41 @@ # @BLURB: This eclass provides Mozilla specific SCM support WANT_AUTOCONF="2.1" +EAPI="3" -inherit eutils flag-o-matic toolchain-funcs eutils prefix mozconfig-3 makeedit multilib pax-utils autotools python -[[ "${PN}" != "xulrunner" ]] && inherit fdo-mime mozextension +inherit eutils multilib flag-o-matic toolchain-funcs autotools prefix makeedit pax-utils python -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst - -RDEPEND=" - >=sys-devel/binutils-2.16.1 - >=dev-libs/nss-3.12.9 - >=dev-libs/nspr-4.8.7 - >=app-text/hunspell-1.2 - >=x11-libs/cairo-1.10.2[X] - x11-libs/pango[X] - media-libs/libpng[apng] - alsa? ( media-libs/alsa-lib ) - webm? ( media-libs/libvpx ) - libnotify? ( >=x11-libs/libnotify-0.4 ) - system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify] ) - wifi? ( net-wireless/wireless-tools ) - " -[[ "${PN}" != "xulrunner" ]] && RDEPEND+="~net-libs/xulrunner-9999[wifi=,libnotify=,mozdom=,system-sqlite=,webm=]" - -DEPEND=" - dev-vcs/mercurial - dev-util/pkgconfig - " - -IUSE="+alsa +ipc libnotify mozdom system-sqlite +webm wifi" -[[ "${PN}" != "xulrunner" ]] && IUSE+=" startup-notification" +MAJ_XUL_PV="2.0" +LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" +SLOT="0" SRC_URI="" -MAJ_XUL_PV="2.0" +S="${WORKDIR}/mozilla-central" + +# +# Some per-application stuff +# +IS_LIBXUL=false +MOZLIBDIR="/usr/$(get_libdir)/xulrunner-${MAJ_XUL_PV}" +MOZDEVELDIR="/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}" +SDKDIR="${MOZDEVELDIR}/sdk" +MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" +case "${PN}" in + xulrunner) + IS_LIBXUL=true + MOZ_APPLICATION=xulrunner + MOZILLA_FIVE_HOME="${MOZLIBDIR}" + ;; + firefox) + MOZ_APPLICATION=browser + ;; + thunderbird) + MOZ_APPLICATION=mail + ;; +esac +${IS_LIXBUL} || inherit fdo-mime -MEXTENSIONS="default" -use mozdom && MEXTENSIONS+=",inspector" +EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst # @ECLASS-VARIABLE: EHG_REVISION # @DESCRIPTION: @@ -82,13 +82,78 @@ use mozdom && MEXTENSIONS+=",inspector" # @ECLASS-VARIABLE: MOZILLA_BONUS_REPOS_URIS : ${MOZILLA_BONUS_REPOS_URIS:=} -# @FUNCTION: mercurial_fetch -# @USAGE: repository_uri -# @DESCRIPTION: -# Clone or update repository. -# -# If repository URI is not passed it defaults to EHG_REPO_URI, if module is -# empty it defaults to basename of EHG_REPO_URI, sourcedir defaults to S. +## +## Base common stuff +## +RDEPEND=" + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXmu + virtual/jpeg + dev-libs/expat + app-arch/zip + app-arch/unzip + >=x11-libs/gtk+-2.8.6 + >=dev-libs/glib-2.8.2 + >=x11-libs/pango-1.10.1 + >=dev-libs/libIDL-0.8.0 + !=sys-libs/zlib-1.1.4 + + >=sys-devel/binutils-2.16.1 + >=dev-libs/nss-3.12.9 + >=dev-libs/nspr-4.8.7 + >=app-text/hunspell-1.2 + >=x11-libs/cairo-1.10.2[X] + x11-libs/pixman + x11-libs/pango[X] + media-libs/libpng[apng] + + alsa? ( media-libs/alsa-lib ) + dbus? ( >=dev-libs/dbus-glib-0.72 ) + gnome? ( >=dev-libs/glib-2.25 ) + libnotify? ( >=x11-libs/libnotify-0.4 ) + startup-notification? ( >=x11-libs/startup-notification-0.8 ) + system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify] ) + webm? ( media-libs/libvpx ) + wifi? ( net-wireless/wireless-tools ) + " +${IS_LIBXUL} || RDEPEND+="~net-libs/xulrunner-9999[libnotify=,mozdom=,ram=,system-sqlite=,webm=,wifi=]" + +DEPEND="${RDEPEND} + dev-vcs/mercurial + dev-util/pkgconfig + webm? ( dev-lang/yasm ) + " + +IUSE="+alsa custom-optimization dbus +ipc gnome libnotify mozdom raw startup-notification +system-sqlite +webm wifi" + +# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR +export MOZILLA_CLIENT=1 +export BUILD_OPT=1 +export NO_STATIC_LIB=1 +export USE_PTHREADS=1 + +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_flag() { + mozconfig_annotate "USE-flag: $(useq $1 && echo +$1 || echo -$1)" "$2" +} + +mozconfig_use_enable() { + mozconfig_flag "$1" "$(use_enable "$@")" +} + +mozconfig_use_with() { + mozconfig_flag "$1" "$(use_with "$@")" +} + function mercurial_fetch { debug-print-function ${FUNCNAME} ${*} @@ -139,6 +204,11 @@ function mercurial_fetch { einfo "Work directory: ${WORKDIR}/${module}" } + +## +## eclass exported function +## src_unpack +## function mozilla-scm_src_unpack { mercurial_fetch "http://hg.mozilla.org/mozilla-central/" for repo in ${MOZILLA_BONUS_REPOS_URIS}; do @@ -146,6 +216,10 @@ function mozilla-scm_src_unpack { done } +## +## eclass exported function +## pkg_setup +## function mozilla-scm_pkg_setup { # Ensure we always build with C locale. export LANG="C" @@ -153,7 +227,7 @@ function mozilla-scm_pkg_setup { export LC_MESSAGES="C" export LC_CTYPE="C" - if [[ "${PN}" != "xulrunner" ]]; then + if ! ${IS_LIBXUL}; then elog "You are enabling official branding. You may not redistribute this build" elog "to any users on your network or the internet. Doing so puts yourself into" elog "a legal problem with Mozilla Foundation" @@ -162,13 +236,224 @@ function mozilla-scm_pkg_setup { python_set_active_version 2 } -function mozilla-scm_src_install { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" - if [[ "${PN}" == "xulrunner" ]]; then - MOZILLA_FIVE_HOME+="-${MAJ_XUL_PV}" - MOZLIBDIR="${MOZILLA_FIVE_HOME}" - SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_XUL_PV}/sdk" +## +## ozconfig_configure +## +function mozconfig_configure { + #################################### + # + # Setup the initial .mozconfig + # See https://developer.mozilla.org/en/Configuring_Build_Options + # + #################################### + + cp ${MOZ_APPLICATION}/config/mozconfig .mozconfig \ + || die "cp mozconfig failed" + + #################################### + # + # CFLAGS setup and ARCH support + # + #################################### + + # Set optimization level + if [[ ${ARCH} == x86 ]]; then + mozconfig_annotate "less then -O2 causes a segfault on x86" --enable-optimize=-O2 + elif use custom-optimization; then + # Set optimization level based on CFLAGS + if is-flag -O0; then + mozconfig_annotate 'CFLAGS optimization' --enable-optimize=-O0 + elif is-flag -O1; then + mozconfig_annotate 'CFLAGS optimization' --enable-optimize=-O1 + elif is-flag -Os; then + mozconfig_annotate 'CFLAGS optimization' --enable-optimize=-Os + else + mozconfig_annotate 'Default optimization: Gentoo' --enable-optimize=-O2 + fi else + # Enable Mozilla's default + mozconfig_annotate 'Default optimization: Mozilla' --enable-optimize + fi + + # Now strip optimization from CFLAGS so it doesn't end up in the + # compile string + filter-flags '-O*' + + # Strip over-aggressive CFLAGS - Mozilla supplies its own + # fine-tuned CFLAGS and shouldn't be interfered with.. Do this + # AFTER setting optimization above since strip-flags only allows + # -O -O1 and -O2 + strip-flags + + 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" + + if [[ "${ARCH}" == x86 && + ( $(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 + elif [[ $(gcc-major-version) -lt 4 ]]; then + append-flags -fno-stack-protector + fi + + # Go a little faster; use less RAM + append-flags "$MAKEEDIT_FLAGS" + + #################################### + # + # mozconfig setup + # + #################################### + + mozconfig_annotate 'Gentoo system' \ + --disable-installer \ + --disable-pedantic \ + --with-system-png \ + --with-system-jpeg \ + --with-system-bz2 \ + --with-system-zlib \ + --disable-updater \ + --enable-system-cairo \ + --enable-system-hunspell \ + --disable-strip \ + --enable-default-toolkit=cairo-gtk2 \ + --disable-strip-libs \ + --disable-install-strip \ + --with-system-nspr \ + --with-nspr-prefix="${EPREFIX}"/usr \ + --with-system-nss \ + --with-nss-prefix="${EPREFIX}"/usr \ + --x-includes="${EPREFIX}"/usr/include \ + --x-libraries="${EPREFIX}"/usr/$(get_libdir) \ + --with-distribution-id=org.gentoo + + mozconfig_annotate 'Gentoo defaults' \ + --enable-single-profile \ + --disable-profilesharing \ + --disable-profilelocking + + sed -i \ + -e '/--enable-application=/d' \ + -e '/--enable-extensions=/d'\ + .mozconfig + local extensions="default" + use mozdom && extensions+=",inspector" + mozconfig_annotate 'Application defaults' \ + --enable-application=${MOZ_APPLICATION} \ + --with-default-mozilla-five-home="${MOZILLA_FIVE_HOME}" \ + --enable-extensions="${extensions}" + + mozconfig_annotate 'Basic features' \ + --enable-crypto \ + --enable-tracejit \ + --enable-pango \ + --enable-mathml \ + --enable-safe-browsing \ + --enable-storage + + # jemalloc won't build with older glibc + ! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate 'old glibc' --disable-jemalloc + + if ${IS_LIBXUL}; then + mozconfig_annotate 'Provide libmozjs' --enable-shared-js + mozconfig_annotate 'Gentoo system' --with-system-libevent="${EPREFIX}"/usr + else + mozconfig_annotate 'libxul application' \ + --enable-official-branding \ + --with-system-libxul \ + --with-libxul-sdk="${EPREFIX}"${MOZDEVELDIR} + fi + + [[ $# -gt 0 ]] && \ + mozconfig_annotate 'Ebuild specific option: '"${P}" \ + ${*} + + # Use system libraries + mozconfig_use_enable alsa ogg + mozconfig_use_enable alsa wave + mozconfig_use_enable dbus + mozconfig_use_enable ipc # +ipc, upstream default + mozconfig_use_enable libnotify + mozconfig_use_enable raw + mozconfig_use_enable startup-notification + mozconfig_use_enable system-sqlite + mozconfig_use_enable webm + mozconfig_use_with webm system-libvpx + mozconfig_use_enable wifi necko-wifi + + mozconfig_use_enable gnome gio + + # NOTE: Uses internal copy of libvpx + if use webm && ! use alsa; then + ewarn "USE=webm needs USE=alsa, disabling WebM support." + mozconfig_annotate '+webm -alsa' --disable-webm + fi + + + # Debug + if use debug ; then + mozconfig_annotate 'Debug activated' \ + --disable-optimize \ + --enable-valgrind \ + --enable-debug=-ggdb \ + --enable-debug-modules=all \ + --enable-debugger-info-modules + else + mozconfig_annotate 'Debug deactivated' \ + --disable-debug \ + --disable-tests + fi + + # omni.jar breaks ff on xr + # Bug 60668: Galeon doesn't build without oji enabled, so enable it + # regardless of java setting.--enable-oji + mozconfig_annotate 'Broken' \ + --disable-crashreporter \ + --enable-chrome-format=jar \ + --enable-oji + + mozconfig_annotate 'Deprecated' \ + --disable-gnomeui \ + --disable-gnomevfs + + + # Currently --enable-elf-dynstr-gc only works for x86 and ppc, + # thanks to Jason Wever for the fix. + # -- This breaks now on ppc, no idea why +# if use x86 || use ppc && [[ ${enable_optimize} != -O0 ]]; then + if use x86 && [[ ${enable_optimize} != -O0 ]]; then + mozconfig_annotate "${ARCH} optimized build" --enable-elf-dynstr-gc + fi +# fi + + 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 ' %-60s %s\n' "${opt}" "${reason:-mozilla.org default}" + done + echo '==========================================================' + echo + + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf +} + +## +## eclass exported function +## src_install +## +function mozilla-scm_src_install { + if ! ${IS_LIBXUL}; then # Install icon and .desktop for menu entry newicon "${S}"/other-licenses/branding/${PN}/content/icon48.png ${PN}-icon.png newmenu "${FILESDIR}"/${PN}.desktop \ @@ -179,9 +464,9 @@ function mozilla-scm_src_install { echo "StartupNotify=true" >> "${ED}"/usr/share/applications/${PN}.desktop fi fi - - emake DESTDIR="${D}" install || die "emake install failed" - + + emake DESTDIR="${ED}" install || die "emake install failed" + local prefdir="${ED}/${MOZILLA_FIVE_HOME}/defaults/pref" [[ -d "${prefdir}erences" ]] && prefdir+="erences" cp "${FILESDIR}"/default-prefs.js \ @@ -189,18 +474,26 @@ function mozilla-scm_src_install { die "failed to cp -default-prefs.js" } -function mozilla-scm_src_compile() { +## +## eclass exported function +## src_compile +## +function mozilla-scm_src_compile { # Should the build use multiprocessing? Not enabled by default, as it tends to break [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1" emake ${jobs} || die } -function mozilla-scm_pkg_postinst() { +## +## eclass exported function +## pkg_postinst +## +function mozilla-scm_pkg_postinst { ewarn "This is experimental DO NOT file a bug report unless you can" ewarn "are willing to provide a patch. All bugs that are filled without a patch" ewarn "will be closed INVALID!!" - - if [[ "${PN}" == "xulrunner" ]]; then + + if ${IS_LIBXUL}; then einfo "Don't forget to rebuild firefox/thunderbird to update it to the same changeset" else ewarn "All the packages built against ${PN} won't compile," diff --git a/net-libs/xulrunner/Manifest b/net-libs/xulrunner/Manifest index cdf9d27..6a8e0e5 100644 --- a/net-libs/xulrunner/Manifest +++ b/net-libs/xulrunner/Manifest @@ -1,4 +1,3 @@ AUX default-prefs.js 709 RMD160 a4d062f75c17552545267ec3fe2f6b54073dafbd SHA1 580128e9edf8021fdbbca2c91abf63cb83bab2c7 SHA256 e6850b0a22f7d3889b49ec4a79a3c4d3d077edd98c8f0ffdc26e30bc70bb4b09 AUX gentoo-specific.patch 2957 RMD160 684dc2176769a56c2b1c206b59f999cd44d99c45 SHA1 35ff8e325e45b5384a404a4f99b12fdba9d5e0f3 SHA256 23d981e48a5308dd11ce2fc831071d138d54717bff9cb546dfc5467b0f4204c7 -AUX libnotify-0.7-fix.patch 1209 RMD160 07615cde8fb0dbd9876635d0b437943df3f4879c SHA1 16caf17a571b4ede370fc20ffffc87179afd3cd3 SHA256 80dbd0906b45cd42b0fda0ec6fa48daf04cb5f85a14e164287565ffa4e486642 -EBUILD xulrunner-9999.ebuild 5639 RMD160 4a24b4fa53551cf44ffa4931837923dd49dda2e5 SHA1 bf7a5e6f4947a0b6c7e00b83fd2121541767f1b4 SHA256 19c98a060fd3aefce7514369c7c64bd0c3fc28f65c56f8824fde4a351943fdfe +EBUILD xulrunner-9999.ebuild 2318 RMD160 476d255d83a50c609bd1dca2b771498b23e27831 SHA1 f7b14deec3b934877c58a5f9b93ec04ee52b75e3 SHA256 5e984262843dc414ebbd3d7490b316b72d0a908a181787f245960602bf67ccb0 diff --git a/net-libs/xulrunner/xulrunner-9999.ebuild b/net-libs/xulrunner/xulrunner-9999.ebuild index 96e27a2..9066804 100644 --- a/net-libs/xulrunner/xulrunner-9999.ebuild +++ b/net-libs/xulrunner/xulrunner-9999.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="3" + inherit mozilla-scm @@ -11,23 +11,15 @@ HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" SLOT="1.9" -LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" IUSE="debug" RDEPEND=" - x11-libs/libXt - x11-libs/pixman >=dev-libs/libevent-1.4.7 !www-plugins/weave " DEPEND="${RDEPEND} - =dev-lang/python-2*[threads] - dev-lang/yasm" - -SRC_URI="" -S="${WORKDIR}/mozilla-central" - + =dev-lang/python-2*[threads]" src_prepare() { # Gentoo specific stuff @@ -43,10 +35,6 @@ src_prepare() { sed -i -e '/^LIBS += $(JEMALLOC_LIBS)/s/^/#/' \ xulrunner/stub/Makefile.in || die - # Same as in config/autoconf.mk.in - MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_XUL_PV}" - SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_XUL_PV}/sdk" - # Gentoo install dirs sed -i -e 's:$(MOZ_APP_VERSION):'"${MAJ_XUL_PV}:" "${S}"/config/autoconf.mk.in \ || die "${MAJ_XUL_PV} sed failed!" @@ -64,97 +52,6 @@ src_prepare() { } src_configure() { - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_XUL_PV}" - - # It doesn't compile on alpha without this LDFLAGS - use alpha && append-ldflags "-Wl,--no-relax" - - mozconfig_annotate '' --with-default-mozilla-five-home="${MOZLIBDIR}" - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --enable-application=xulrunner - mozconfig_annotate '' --disable-mailnews - mozconfig_annotate 'broken' --disable-crashreporter - mozconfig_annotate '' --enable-canvas - mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2 - - # Bug 60668: Galeon doesn't build without oji enabled, so enable it - # regardless of java setting. - mozconfig_annotate '' --enable-oji --enable-mathml - mozconfig_annotate 'places' --enable-storage --enable-places - mozconfig_annotate '' --enable-safe-browsing - # This will be removed when packages moving to webkit complete their move - mozconfig_annotate '' --enable-shared-js - - # System-wide install specs - mozconfig_annotate '' --disable-installer - mozconfig_annotate '' --disable-updater - mozconfig_annotate '' --disable-strip - mozconfig_annotate '' --disable-install-strip - - # Use system libraries - mozconfig_annotate '' --enable-system-cairo - mozconfig_annotate '' --enable-system-hunspell - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir) - mozconfig_annotate '' --with-system-bz2 - mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr - mozconfig_annotate '' --with-system-png - if use webm ; then - mozconfig_annotate '' --with-system-libvpx - fi - - mozconfig_use_enable ipc # +ipc, upstream default - mozconfig_use_enable libnotify - mozconfig_use_enable wifi necko-wifi - mozconfig_use_enable alsa ogg - mozconfig_use_enable alsa wave - mozconfig_use_enable system-sqlite - mozconfig_use_enable webm - - # NOTE: Uses internal copy of libvpx - if use webm && ! use alsa; then - ewarn "USE=webm needs USE=alsa, disabling WebM support." - mozconfig_annotate '+webm -alsa' --disable-webm - fi - - if use amd64 || use x86 || use arm || use sparc; then - mozconfig_annotate 'tracejit' --enable-tracejit - fi - - # Debug - if use debug ; then - mozconfig_annotate 'debug' --disable-optimize - mozconfig_annotate 'debug' --enable-debug=-ggdb - mozconfig_annotate 'debug' --enable-debug-modules=all - mozconfig_annotate 'debug' --enable-debugger-info-modules - fi - - # omni.jar breaks ff on xr - mozconfig_annotate '' --enable-chrome-format=jar - - # Finalize and report settings - mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-flags -fno-stack-protector - fi - - #################################### - # - # Configure and build - # - #################################### - # Disable no-print-directory MAKEOPTS=${MAKEOPTS/--no-print-directory/} @@ -166,7 +63,7 @@ src_configure() { # support tls, (probably will only hit this condition with Gentoo Prefix) tc-has-tls -l || export ac_cv_thread_keyword=no - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf + mozconfig_configure } src_install() { @@ -174,7 +71,6 @@ src_install() { rm "${ED}"/usr/bin/xulrunner - if has_multilib_profile; then local config for config in "${ED}"/etc/gre.d/*.system.conf ; do diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest index 4ecde9a..c2a89c0 100644 --- a/www-client/firefox/Manifest +++ b/www-client/firefox/Manifest @@ -1,4 +1,4 @@ AUX default-prefs.js 95 RMD160 805cdfec6fb31c224322cb71125547ad7a515f49 SHA1 7fab69d85b12a9f1b0c87fbb1821bdafd7485ac9 SHA256 8bc4cb870bc402db1f20b135a689f8c5dbfa5de8f1755b1926198d627c12c5f1 AUX firefox.desktop 255 RMD160 4ef1cf548f11057274620b82f0728958a3424bea SHA1 6a440f817072fb60516c1a1d999dffb6d3fa1583 SHA256 9bf6e1264d986c68d64831d166ed6b506bff6df8b56d21bfc166aee09cbc753f AUX gentoo-specific.patch 3937 RMD160 d167b98c03ff88d955e865aee78203d396620cf7 SHA1 92a372a945734b737ed2d4b534fc8a6ef9e39bbf SHA256 dd6115dcca2972d637f966c6c7faef6d19d8e2622e3c44a0950e98c8f18ec747 -EBUILD firefox-9999.ebuild 4390 RMD160 b64ce84e762da164aa6d28344436a2015420a6d0 SHA1 184bdcda3eadb5665cb1fcc02e4d9d0bb3f4bc4b SHA256 cca350d2e9dfe8495a4295d884ee9e31e6e7728652f17573611d4ba75f93eae8 +EBUILD firefox-9999.ebuild 1134 RMD160 4320d6ba2b97ab51277e8acb09211b7daea25b2a SHA1 5e7e145dfd6d5dc8292b6bc373aba4b4c91b7bb0 SHA256 4ce80cf5d9f15169e78000c8990bd1d5ce6978afde84e6b53041ea78e5061510 diff --git a/www-client/firefox/firefox-9999.ebuild b/www-client/firefox/firefox-9999.ebuild index e098ee4..bac7ea3 100644 --- a/www-client/firefox/firefox-9999.ebuild +++ b/www-client/firefox/firefox-9999.ebuild @@ -1,27 +1,15 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="3" + inherit mozilla-scm DESCRIPTION="Firefox Web Browser" -HOMEPAGE="http://www.mozilla.com/firefox" +HOMEPAGE="http://www.mozilla.com/en-US/firefox" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -SLOT="0" -LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" -IUSE="" - -DEPEND=" - webm? ( dev-lang/yasm ) - " - -SRC_URI="" -S="${WORKDIR}/mozilla-central" - -QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" src_prepare() { # Gentoo specific stuff @@ -48,93 +36,7 @@ src_prepare() { } src_configure() { - MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - # It doesn't compile on alpha without this LDFLAGS - use alpha && append-ldflags "-Wl,--no-relax" - - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --enable-application=browser - mozconfig_annotate '' --enable-official-branding - mozconfig_annotate '' --disable-mailnews - mozconfig_annotate '' --disable-crashreporter - mozconfig_annotate '' --enable-image-encoder=all - mozconfig_annotate '' --enable-canvas - mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2 - - # Bug 60668: Galeon doesn't build without oji enabled, so enable it - # regardless of java setting. - mozconfig_annotate '' --enable-oji --enable-mathml - mozconfig_annotate 'places' --enable-storage --enable-places - mozconfig_annotate '' --enable-safe-browsing - - # System-wide install specs - mozconfig_annotate '' --disable-installer - mozconfig_annotate '' --disable-updater - mozconfig_annotate '' --disable-strip - mozconfig_annotate '' --disable-install-strip - - # Use system libraries - mozconfig_annotate '' --enable-system-cairo - mozconfig_annotate '' --enable-system-hunspell - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr - mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir) - mozconfig_annotate '' --with-system-bz2 - mozconfig_annotate '' --with-system-png - if use webm ; then - mozconfig_annotate '' --with-system-libvpx - fi - mozconfig_annotate '' --with-system-libxul - mozconfig_annotate '' --with-libxul-sdk="${EPREFIX}"/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV} - - mozconfig_use_enable ipc # +ipc, upstream default - mozconfig_use_enable libnotify - mozconfig_use_enable wifi necko-wifi - mozconfig_use_enable alsa ogg - mozconfig_use_enable alsa wave - mozconfig_use_enable system-sqlite - mozconfig_use_enable webm - - # NOTE: Uses internal copy of libvpx - if use webm && ! use alsa; then - ewarn "USE=webm needs USE=alsa, disabling WebM support." - mozconfig_annotate '+webm -alsa' --disable-webm - fi - - if use amd64 || use x86 || use arm || use sparc; then - mozconfig_annotate '' --enable-tracejit - fi - - # Other ff-specific settings - mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} - - # omni.jar breaks ff on xr - mozconfig_annotate '' --enable-chrome-format=jar - - # Finalize and report settings - mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - fi - - #################################### - # - # Configure and build - # - #################################### - - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf + mozconfig_configure } src_install() { @@ -146,9 +48,4 @@ src_install() { # Plugins dir dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \ || die "failed to symlink" - - # very ugly hack to make firefox not sigbus on sparc - use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ - -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \ - die "sparc sed failed"; } } -- cgit v1.2.3-18-g5258