diff options
author | 2010-12-21 18:52:37 +0100 | |
---|---|---|
committer | 2010-12-21 18:52:37 +0100 | |
commit | 8f3c7d726297518bf855100100e0eb1edc30fd76 (patch) | |
tree | 0eeb11fceaac1bf198b6ee3916ac02b3b1365af0 /www-client | |
parent | Bump Cairo-Dock (diff) | |
download | sardemff7-8f3c7d726297518bf855100100e0eb1edc30fd76.tar.gz sardemff7-8f3c7d726297518bf855100100e0eb1edc30fd76.tar.bz2 sardemff7-8f3c7d726297518bf855100100e0eb1edc30fd76.zip |
Add Firefox SCM for geeks!
Diffstat (limited to 'www-client')
-rw-r--r-- | www-client/firefox/Manifest | 3 | ||||
-rw-r--r-- | www-client/firefox/files/firefox-default-prefs.js | 2 | ||||
-rw-r--r-- | www-client/firefox/files/firefox.desktop | 9 | ||||
-rw-r--r-- | www-client/firefox/firefox-9999.ebuild | 213 |
4 files changed, 227 insertions, 0 deletions
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest new file mode 100644 index 0000000..87033f8 --- /dev/null +++ b/www-client/firefox/Manifest @@ -0,0 +1,3 @@ +AUX firefox-default-prefs.js 95 RMD160 805cdfec6fb31c224322cb71125547ad7a515f49 SHA1 7fab69d85b12a9f1b0c87fbb1821bdafd7485ac9 SHA256 8bc4cb870bc402db1f20b135a689f8c5dbfa5de8f1755b1926198d627c12c5f1 +AUX firefox.desktop 255 RMD160 4ef1cf548f11057274620b82f0728958a3424bea SHA1 6a440f817072fb60516c1a1d999dffb6d3fa1583 SHA256 9bf6e1264d986c68d64831d166ed6b506bff6df8b56d21bfc166aee09cbc753f +EBUILD firefox-9999.ebuild 6410 RMD160 9a3d5558db470df38a6beedd46723ba9ea4652e9 SHA1 62124e4536ffde98e5de2fc252632f730cbd7829 SHA256 2a381224da4ad61c52d3658e3c8315654bf46e49e1a20314331f5d265a218ae9 diff --git a/www-client/firefox/files/firefox-default-prefs.js b/www-client/firefox/files/firefox-default-prefs.js new file mode 100644 index 0000000..f7c031e --- /dev/null +++ b/www-client/firefox/files/firefox-default-prefs.js @@ -0,0 +1,2 @@ +pref("browser.tabs.tabMinWidth", 15); +pref("browser.backspace_action", 0); diff --git a/www-client/firefox/files/firefox.desktop b/www-client/firefox/files/firefox.desktop new file mode 100644 index 0000000..98d5fdf --- /dev/null +++ b/www-client/firefox/files/firefox.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Mozilla Firefox +Comment=Web Browser +Exec=/usr/bin/firefox %U +Icon=firefox-icon +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml; +Categories=Network;WebBrowser; diff --git a/www-client/firefox/firefox-9999.ebuild b/www-client/firefox/firefox-9999.ebuild new file mode 100644 index 0000000..6cf3a1e --- /dev/null +++ b/www-client/firefox/firefox-9999.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" +WANT_AUTOCONF="2.1" + +inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils autotools python mercurial fdo-mime mozextension + +EHG_REPO_URI="http://hg.mozilla.org/mozilla-central/" +EHG_PROJECT="xulrunner" + +MAJ_XUL_PV="2.0" +MAJ_FF_PV="4.0" + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="http://www.mozilla.com/firefox" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +SLOT="0" +LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" +IUSE="+alsa +ipc libnotify system-sqlite +webm wifi" + +RDEPEND=" + >=sys-devel/binutils-2.16.1 + >=dev-libs/nss-3.12.8_beta1 + >=dev-libs/nspr-4.8.5 + >=app-text/hunspell-1.2 + >=x11-libs/cairo-1.8.8[X] + x11-libs/pango[X] + media-libs/libpng[apng] + webm? ( media-libs/libvpx ) + alsa? ( media-libs/alsa-lib ) + libnotify? ( >=x11-libs/libnotify-0.4 ) + system-sqlite? ( >=dev-db/sqlite-3.7.0.1[fts3,secure-delete,unlock-notify] ) + wifi? ( net-wireless/wireless-tools ) + ~net-libs/xulrunner-9999[wifi=,libnotify=,system-sqlite=,webm=]" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + webm? ( dev-lang/yasm )" + +SRC_URI="" +S="${WORKDIR}/mozilla-central" + +QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" + +pkg_setup() { + # Ensure we always build with C locale. + export LANG="C" + export LC_ALL="C" + export LC_MESSAGES="C" + export LC_CTYPE="C" + + 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" + + python_set_active_version 2 +} + +src_prepare() { + # Gentoo install dirs + sed -i \ + -e 's:$(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION):$(includedir)/idl:' \ + -e 's:$(MOZ_APP_NAME)-$(MOZ_APP_VERSION):firefox:' \ + -e 's:$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION):firefox:' \ + "${S}"/config/autoconf.mk.in \ + || die "${MAJ_XUL_PV} sed failed!" + + eautoreconf + + cd js/src + eautoreconf +} + +src_configure() { + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" + MEXTENSIONS="default" + + #################################### + # + # 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 +} + +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 +} + +src_install() { + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" + + emake DESTDIR="${D}" install || die "emake install failed" + + # Install icon and .desktop for menu entry + newicon "${S}"/other-licenses/branding/firefox/content/icon48.png ${PN}-icon.png + newmenu "${FILESDIR}"/${PN}.desktop \ + ${PN}-${MAJ_FF_PV}.desktop + + # Add StartupNotify=true bug 237317 + if use startup-notification ; then + echo "StartupNotify=true" >> "${ED}"/usr/share/applications/${PN}-${MAJ_FF_PV}.desktop + fi + + pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox + + # Enable very specific settings not inherited from xulrunner + cp "${FILESDIR}"/firefox-default-prefs.js \ + "${ED}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \ + die "failed to cp firefox-default-prefs.js" + + # 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"; } +} + +pkg_postinst() { + ewarn "All the packages built against ${PN} won't compile," + ewarn "any package that fails to build warrants a bug report." + elog + + # Update mimedb for the new .desktop file + fdo-mime_desktop_database_update +} |