www-client/icecat: bump to 78.10.0, drop 78.8.0

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2021-04-20 08:35:06 +03:00
parent ce8d806fc5
commit b5f0dbbb06
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
2 changed files with 137 additions and 13 deletions

View File

@ -1,2 +1,3 @@
DIST firefox-78esr-patches-10.tar.xz 66396 BLAKE2B c29b723e47c58b10885b220080568aba751e1b73c58e28fce62a2da4c4c3ba8c71b63e60448d17599a3df4446dbd9f9387b4b2b75da5ed1e545591aafe8ec83c SHA512 6bb9caf1f6867b894ab315a73f8ae6f381b5c80c90539f38e786ee653c72c0df055aade854faa23f22cab2253f54abaf918a756945b76ed88f5a224ba8a8f12f
DIST icecat-78.10.0-gnu1.tar.bz2 513140961 BLAKE2B e008b4bebc6dbec78eecd18c14f37c155c5f883279120584c2a774e1e8fc4a6d1d24369ef1799224ec309fde6f4a8c276cf205eea5ecbfd061bea55a089e6e9b SHA512 682d194c1404b039d60c1916648d319bb428ce5fb3058a8e5989437de7a80d2184aefd69004e22e0a8e639f026df4f6d7445a2cce551d929323b6193cbedad94
DIST icecat-78.9.0-gnu1.tar.bz2 512766353 BLAKE2B e1a7b0ef7b57a525fff75c9558f951a176bb021f835176fbab2b9600b2d8a20d02086074c7f3bfbbb0f534565c4403670dc16145241d957ebe0306fea6c2f322 SHA512 a228570d44992c160318489e7b9745b34e6429da88dd9225372f6e90243d7e7794ef98a691024d1de0a14cf555a54a27b1897d78d39e5d14d100e9938bbb3d54

View File

@ -25,7 +25,10 @@ PATCH_URIS=(
https://dev.gentoo.org/~{axs,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
)
SRC_URI="${PATCH_URIS[@]}"
SRC_URI="
!buildtarball? ( icecat-"${PV}"-gnu1.tar.bz2 )
${PATCH_URIS[@]}
"
DESCRIPTION="GNU IceCat Web Browser"
HOMEPAGE="https://www.gnu.org/software/gnuzilla/"
@ -67,14 +70,6 @@ BDEPEND="${PYTHON_DEPS}
pgo? ( =sys-libs/compiler-rt-sanitizers-10*[profile] )
)
)
(
sys-devel/clang:9
sys-devel/llvm:9
clang? (
=sys-devel/lld-9*
pgo? ( =sys-libs/compiler-rt-sanitizers-9*[profile] )
)
)
)
lto? (
!clang? ( sys-devel/binutils[gold] )
@ -190,6 +185,42 @@ llvm_check_deps() {
einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
}
MOZ_LANGS=(
ach af an ar ast az be bg bn br bs ca-valencia ca cak cs cy
da de dsb el en-CA en-GB en-US eo es-AR es-CL es-ES es-MX et eu
fa ff fi fr fy-NL ga-IE gd gl gn gu-IN he hi-IN hr hsb hu hy-AM
ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my
nb-NO ne-NP nl nn-NO oc pa-IN pl pt-BR pt-PT rm ro ru
si sk sl son sq sr sv-SE ta te th tl tr trs uk ur uz vi
xh zh-CN zh-TW
)
mozilla_set_globals() {
# https://bugs.gentoo.org/587334
local MOZ_TOO_REGIONALIZED_FOR_L10N=(
fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
)
local lang xflag
for lang in "${MOZ_LANGS[@]}" ; do
# en and en_US are handled internally
if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
continue
fi
# strip region subtag if $lang is in the list
if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
xflag=${lang%%-*}
else
xflag=${lang}
fi
IUSE+=" l10n_${xflag/[_@]/-}"
done
}
mozilla_set_globals
moz_clear_vendor_checksums() {
debug-print-function ${FUNCNAME} "$@"
@ -204,6 +235,71 @@ moz_clear_vendor_checksums() {
"${S}"/third_party/rust/${1}/.cargo-checksum.json \
|| die
}
moz_build_xpi() {
debug-print-function ${FUNCNAME} "$@"
local MOZ_TOO_REGIONALIZED_FOR_L10N=(
fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
)
cd "${BUILD_DIR}"/browser/locales || die
local lang xflag
for lang in "${MOZ_LANGS[@]}"; do
# en and en_US are handled internally
if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
continue
fi
# strip region subtag if $lang is in the list
if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
xflag=${lang%%-*}
else
xflag=${lang}
fi
if use l10n_"${xflag}"; then
emake langpack-"${lang}" LOCALE_MERGEDIR=.
fi
done
}
moz_install_xpi() {
debug-print-function ${FUNCNAME} "$@"
if [[ ${#} -lt 2 ]] ; then
die "${FUNCNAME} requires at least two arguments"
fi
local DESTDIR=${1}
shift
insinto "${DESTDIR}"
local emid xpi_file xpi_tmp_dir
for xpi_file in "${@}" ; do
emid=
xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
# Unpack XPI
unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
# Determine extension ID
if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
[[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf"
elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' "${xpi_tmp_dir}/manifest.json")
[[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json"
else
die "failed to determine extension id"
fi
einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
newins "${xpi_file}" "${emid}.xpi"
done
}
mozconfig_add_options_ac() {
debug-print-function ${FUNCNAME} "$@"
@ -277,6 +373,17 @@ pkg_pretend() {
fi
}
pkg_nofetch() {
if ! use buildtarball; then
einfo "You have not enabled buildtarball use flag, therefore you will have to"
einfo "build the tarball manually and place it in your distfiles directory."
einfo "You may find the script for building the tarball here"
einfo "https://git.savannah.gnu.org/cgit/gnuzilla.git/, but make sure it is the"
einfo "right version."
einfo "The output of the script should be icecat-"${PV}"-gnu1.tar.bz2"
fi
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
if use pgo ; then
@ -353,7 +460,11 @@ pkg_setup() {
}
src_unpack() {
use buildtarball && unpack /usr/src/makeicecat-"${PV}"/output/icecat-"${PV}"-gnu1.tar.bz2 || eerror "Tarball missing, check www-client/makeicecat is correct"
if use buildtarball; then
unpack /usr/src/makeicecat-"${PV}"/output/icecat-"${PV}"-gnu1.tar.bz2 || eerror "Tarball is missing, check that www-client/makeicecat has use flag buildtarball enabled."
else
unpack icecat-"${PV}"-gnu1.tar.bz2
fi
unpack "${FIREFOX_PATCHSET}"
}
@ -457,9 +568,6 @@ src_configure() {
# Initialize MOZCONFIG
mozconfig_add_options_ac '' --enable-application=browser
# Set Gentoo defaults
#export MOZILLA_OFFICIAL=1
mozconfig_add_options_ac 'Gentoo default' \
--allow-addon-sideload \
--disable-cargo-incremental \
@ -477,6 +585,7 @@ src_configure() {
--target="${CHOST}" \
--without-ccache \
--with-intl-api \
--with-l10n-base="${S}"/l10n \
--with-libclang-path="$(llvm-config --libdir)" \
--with-system-nspr \
--with-system-nss \
@ -734,6 +843,9 @@ src_compile() {
${virtx_cmd} ./mach build --verbose \
|| die
# Build language packs
moz_build_xpi
}
src_install() {
@ -770,6 +882,11 @@ src_install() {
pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell");
EOF
# Set installDistroAddons to true so that language packs work
cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set extensions.installDistroAddons pref"
pref("extensions.installDistroAddons", true);
EOF
# Force hwaccel prefs if USE=hwaccel is enabled
if use hwaccel ; then
cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
@ -784,6 +901,12 @@ src_install() {
EOF
fi
# Install language packs
local langpacks=( $(find "${BUILD_DIR}"/dist/linux-x86_64/xpi -type f -name '*.xpi') )
if [[ -n "${langpacks}" ]] ; then
moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}"
fi
# Install geckodriver
if use geckodriver ; then
einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..."