From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9EAF51381F3 for ; Wed, 22 May 2013 13:32:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2299BE086E; Wed, 22 May 2013 13:32:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 92FA7E086E for ; Wed, 22 May 2013 13:32:52 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2474A33E4F8 for ; Wed, 22 May 2013 13:32:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AF9E5E4404 for ; Wed, 22 May 2013 13:32:48 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1369229510.367cd47dbfa80a8cdc08acc2e22c70ba35bff0fc.polynomial-c@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/ X-VCS-Repository: proj/mozilla X-VCS-Files: eclass/mozconfig-3.eclass eclass/mozcoreconf-2.eclass eclass/mozextension.eclass X-VCS-Directories: eclass/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 367cd47dbfa80a8cdc08acc2e22c70ba35bff0fc X-VCS-Branch: master Date: Wed, 22 May 2013 13:32:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1facd746-846f-43b4-a5ff-a62948ab6136 X-Archives-Hash: 662d072d1ef0809ed28d64a079514a01 commit: 367cd47dbfa80a8cdc08acc2e22c70ba35bff0fc Author: Lars Wendler gentoo org> AuthorDate: Wed May 22 13:31:50 2013 +0000 Commit: Lars Wendler gentoo org> CommitDate: Wed May 22 13:31:50 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=367cd47d Attempt to install extensions into correct location with ff>=21 --- eclass/mozconfig-3.eclass | 43 ++--------------------------- eclass/mozcoreconf-2.eclass | 17 +---------- eclass/mozextension.eclass | 62 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 55 deletions(-) diff --git a/eclass/mozconfig-3.eclass b/eclass/mozconfig-3.eclass index bab655c..25aa3e9 100644 --- a/eclass/mozconfig-3.eclass +++ b/eclass/mozconfig-3.eclass @@ -40,27 +40,6 @@ mozconfig_config() { fi fi - if ! $(mozversion_is_new_enough) ; then - mozconfig_use_enable alsa ogg - mozconfig_use_enable alsa wave - mozconfig_use_enable libnotify - mozconfig_use_enable debug debugger-info-modules - if has +ipc ${IUSE}; then - mozconfig_use_enable ipc - fi - if [[ ${PN} != thunderbird ]] ; then - mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks - mozconfig_annotate '' --enable-oji --enable-mathml - mozconfig_annotate 'broken' --disable-mochitest - fi - if use system-sqlite; then - mozconfig_annotate '' --with-sqlite-prefix="${EPREFIX}"/usr - fi - if use amd64 || use x86 || use arm || use sparc; then - mozconfig_annotate '' --enable-tracejit - fi - fi - mozconfig_use_enable dbus mozconfig_use_enable debug mozconfig_use_enable debug tests @@ -71,25 +50,9 @@ mozconfig_config() { mozconfig_use_enable system-sqlite mozconfig_use_enable wifi necko-wifi - if $(mozversion_is_new_enough) ; then - mozconfig_annotate 'required' --enable-ogg - mozconfig_annotate 'required' --enable-wave - mozconfig_annotate 'required' --with-system-libvpx - elif has +webm ${IUSE} && use webm; then - if ! use alsa; then - echo "Enabling alsa support due to webm request" - mozconfig_annotate '+webm -alsa' --enable-ogg - mozconfig_annotate '+webm -alsa' --enable-wave - mozconfig_annotate '+webm' --enable-webm - mozconfig_annotate '+webm' --with-system-libvpx - else - mozconfig_use_enable webm - mozconfig_annotate '+webm' --with-system-libvpx - fi - else - mozconfig_annotate '' --disable-webm - mozconfig_annotate '' --disable-system-libvpx - fi + mozconfig_annotate 'required' --enable-ogg + mozconfig_annotate 'required' --enable-wave + mozconfig_annotate 'required' --with-system-libvpx # These are enabled by default in all mozilla applications mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr diff --git a/eclass/mozcoreconf-2.eclass b/eclass/mozcoreconf-2.eclass index 8c663f0..986c252 100644 --- a/eclass/mozcoreconf-2.eclass +++ b/eclass/mozcoreconf-2.eclass @@ -66,12 +66,12 @@ mozconfig_use_extension() { mozversion_is_new_enough() { case ${PN} in firefox|thunderbird) - if [[ $(get_version_component_range 1) -ge 17 ]] ; then + if [[ $(get_version_component_range 1) -ge 21 ]] ; then return 0 fi ;; seamonkey) - if [[ $(get_version_component_range 1) -eq 2 ]] && [[ $(get_version_component_range 2) -ge 14 ]] ; then + if [[ $(get_version_component_range 1) -eq 2 ]] && [[ $(get_version_component_range 2) -ge 18 ]] ; then return 0 fi ;; @@ -208,29 +208,16 @@ mozconfig_init() { --with-system-zlib \ --enable-pango \ --enable-system-cairo - if ! $(mozversion_is_new_enough) ; then - mozconfig_annotate system-libs --enable-svg - fi mozconfig_annotate disable_update_strip \ --disable-pedantic \ --disable-updater \ --disable-strip \ --disable-install-strip - if ! $(mozversion_is_new_enough) ; then - mozconfig_annotate disable_update_strip \ - --disable-installer \ - --disable-strip-libs - fi if [[ ${PN} != seamonkey ]]; then mozconfig_annotate basic_profile \ --disable-profilelocking - if ! $(mozversion_is_new_enough) ; then - mozconfig_annotate basic_profile \ - --enable-single-profile \ - --disable-profilesharing - fi fi # Here is a strange one... diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass new file mode 100644 index 0000000..c8c5502 --- /dev/null +++ b/eclass/mozextension.eclass @@ -0,0 +1,62 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.8 2013/04/05 15:27:40 floppym Exp $ +# +# @ECLASS: mozextension.eclass +# @MAINTAINER: +# Mozilla team +# @BLURB: Install extensions for use in mozilla products. + + +inherit eutils + +DEPEND="app-arch/unzip" + +xpi_unpack() { + local xpi xpiname srcdir + + # Not gonna use ${A} as we are looking for a specific option being passed to function + # You must specify which xpi to use + [[ -z "$*" ]] && die "Nothing passed to the $FUNCNAME command. please pass which xpi to unpack" + + for xpi in "$@"; do + einfo "Unpacking ${xpi} to ${PWD}" + xpiname=$(basename ${xpi%.*}) + + if [[ "${xpi:0:2}" != "./" ]] && [[ "${xpi:0:1}" != "/" ]] ; then + srcdir="${DISTDIR}/" + fi + + [[ -s "${srcdir}${xpi}" ]] || die "${xpi} does not exist" + + case "${xpi##*.}" in + ZIP|zip|jar|xpi) + mkdir "${WORKDIR}/${xpiname}" && \ + unzip -qo "${srcdir}${xpi}" -d "${WORKDIR}/${xpiname}" || die "failed to unpack ${xpi}" + ;; + *) + einfo "unpack ${xpi}: file format not recognized. Ignoring." + ;; + esac + done +} + + +xpi_install() { + local emid + + # You must tell xpi_install which xpi to use + [[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one argument, please specify an xpi to unpack" + + x="${1}" + cd ${x} + # determine id for extension + emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \ + || die "failed to determine extension id" + fi $(mozversion_is_new_enough) ; then + insinto "${MOZILLA_FIVE_HOME}"/browser/extensions/${emid} + else + insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid} + fi + doins -r "${x}"/* || die "failed to copy extension" +}