Compare commits

...

2 Commits

Author SHA1 Message Date
Alfred Wingate
b5f0dbbb06
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>
2021-04-20 08:35:06 +03:00
Alfred Wingate
ce8d806fc5
www-client/makeicecat: 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>
2021-04-20 08:31:35 +03:00
4 changed files with 139 additions and 15 deletions

View File

@ -1,2 +1,3 @@
DIST firefox-78esr-patches-10.tar.xz 66396 BLAKE2B c29b723e47c58b10885b220080568aba751e1b73c58e28fce62a2da4c4c3ba8c71b63e60448d17599a3df4446dbd9f9387b4b2b75da5ed1e545591aafe8ec83c SHA512 6bb9caf1f6867b894ab315a73f8ae6f381b5c80c90539f38e786ee653c72c0df055aade854faa23f22cab2253f54abaf918a756945b76ed88f5a224ba8a8f12f 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 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} 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" DESCRIPTION="GNU IceCat Web Browser"
HOMEPAGE="https://www.gnu.org/software/gnuzilla/" HOMEPAGE="https://www.gnu.org/software/gnuzilla/"
@ -67,14 +70,6 @@ BDEPEND="${PYTHON_DEPS}
pgo? ( =sys-libs/compiler-rt-sanitizers-10*[profile] ) 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? ( lto? (
!clang? ( sys-devel/binutils[gold] ) !clang? ( sys-devel/binutils[gold] )
@ -190,6 +185,42 @@ llvm_check_deps() {
einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 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() { moz_clear_vendor_checksums() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
@ -204,6 +235,71 @@ moz_clear_vendor_checksums() {
"${S}"/third_party/rust/${1}/.cargo-checksum.json \ "${S}"/third_party/rust/${1}/.cargo-checksum.json \
|| die || 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() { mozconfig_add_options_ac() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
@ -277,6 +373,17 @@ pkg_pretend() {
fi 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() { pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then if [[ ${MERGE_TYPE} != binary ]] ; then
if use pgo ; then if use pgo ; then
@ -353,7 +460,11 @@ pkg_setup() {
} }
src_unpack() { 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}" unpack "${FIREFOX_PATCHSET}"
} }
@ -457,9 +568,6 @@ src_configure() {
# Initialize MOZCONFIG # Initialize MOZCONFIG
mozconfig_add_options_ac '' --enable-application=browser mozconfig_add_options_ac '' --enable-application=browser
# Set Gentoo defaults
#export MOZILLA_OFFICIAL=1
mozconfig_add_options_ac 'Gentoo default' \ mozconfig_add_options_ac 'Gentoo default' \
--allow-addon-sideload \ --allow-addon-sideload \
--disable-cargo-incremental \ --disable-cargo-incremental \
@ -477,6 +585,7 @@ src_configure() {
--target="${CHOST}" \ --target="${CHOST}" \
--without-ccache \ --without-ccache \
--with-intl-api \ --with-intl-api \
--with-l10n-base="${S}"/l10n \
--with-libclang-path="$(llvm-config --libdir)" \ --with-libclang-path="$(llvm-config --libdir)" \
--with-system-nspr \ --with-system-nspr \
--with-system-nss \ --with-system-nss \
@ -734,6 +843,9 @@ src_compile() {
${virtx_cmd} ./mach build --verbose \ ${virtx_cmd} ./mach build --verbose \
|| die || die
# Build language packs
moz_build_xpi
} }
src_install() { src_install() {
@ -770,6 +882,11 @@ src_install() {
pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell");
EOF 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 # Force hwaccel prefs if USE=hwaccel is enabled
if use hwaccel ; then if use hwaccel ; then
cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \ cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
@ -784,6 +901,12 @@ src_install() {
EOF EOF
fi 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 # Install geckodriver
if use geckodriver ; then if use geckodriver ; then
einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..."

View File

@ -1,2 +1,2 @@
DIST makeicecat-78.8.0.tar.gz 8005933 BLAKE2B 36f93274f6f23f83d22ffe1c3a6cf8bc018644d133d6e0ba94f2bc5d56f4113eef741340b30e15fc10fedef1d2ef2a968dea6ca1f47f4bec01034d8209254a04 SHA512 95c8c5b8b2f1c9d567dad167f8d209b6b8e997d0b59b1ede13d5738f73f768a9a3d2a517535fbbf5265e6d4403008917d18a85ed138da64fae116e6f8673f7f8 DIST makeicecat-78.10.0.tar.gz 8005956 BLAKE2B f84f172efac5c38cbbba980f73bbcb3218410950900dd45453eed30dbe3fd253220085f10bd7785fd4c001971a0d3346cdd6c229df69132f6147d2f75a63ccab SHA512 124dc4222d1dcf20e03d050b8fe657be436df5ce7c332c36dc1f5332b52e1221f05e9279866d7eac4872ef3825881b6e2d2067a8c88e96fa094baff6f4631495
DIST makeicecat-78.9.0.tar.gz 8005836 BLAKE2B 54cea711db234e5547994a84466561247e344fbfc1e0d552c549c0743e3d4ab8454190aafff90e7abd0180c3c7ee89636b7508723920f268ebf3f9f5f4d2e8e1 SHA512 b0f53383c32233251fae2350569c3ac55e7e5b7fc54a911b5ad4bc6deba47abb2a02ad4df94ac0d1fd9aa3682d70f9113cfb7efa18a0cf116bec540674dc1504 DIST makeicecat-78.9.0.tar.gz 8005836 BLAKE2B 54cea711db234e5547994a84466561247e344fbfc1e0d552c549c0743e3d4ab8454190aafff90e7abd0180c3c7ee89636b7508723920f268ebf3f9f5f4d2e8e1 SHA512 b0f53383c32233251fae2350569c3ac55e7e5b7fc54a911b5ad4bc6deba47abb2a02ad4df94ac0d1fd9aa3682d70f9113cfb7efa18a0cf116bec540674dc1504

View File

@ -6,7 +6,7 @@ EAPI=7
DESCRIPTION="Script for creating GNU Icecat tarball" DESCRIPTION="Script for creating GNU Icecat tarball"
HOMEPAGE="https://www.gnu.org/software/gnuzilla/" HOMEPAGE="https://www.gnu.org/software/gnuzilla/"
COMMIT="d5df5618fbf6f6ea0c49b6bfdcb098846d2cd777" COMMIT="b72c22186cf381d7b1f93be550c9da30865d03b4"
SRC_URI="https://git.savannah.gnu.org/cgit/gnuzilla.git/snapshot/gnuzilla-"${COMMIT}".tar.gz -> "${P}".tar.gz" SRC_URI="https://git.savannah.gnu.org/cgit/gnuzilla.git/snapshot/gnuzilla-"${COMMIT}".tar.gz -> "${P}".tar.gz"