Diff firefox-115.3.1 with a firefox-117.0.1

/usr/portage/www-client/firefox/firefox-117.0.1.ebuild 2023-10-09 14:52:35.888368511 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
FIREFOX_PATCHSET="firefox-115esr-patches-06.tar.xz"
6
FIREFOX_PATCHSET="firefox-117-patches-04.tar.xz"
7 7

  
8 8
LLVM_MAX_SLOT=16
9 9

  
......
14 14

  
15 15
VIRTUALX_REQUIRED="manual"
16 16

  
17
MOZ_ESR=yes
17
MOZ_ESR=
18 18

  
19 19
MOZ_PV=${PV}
20 20
MOZ_PV_SUFFIX=
......
37 37
MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
38 38
MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
39 39

  
40
inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info llvm multiprocessing \
41
	optfeature pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg
40
inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info \
41
	llvm multiprocessing optfeature pax-utils python-any-r1 toolchain-funcs \
42
	virtualx xdg
42 43

  
43 44
MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
44 45

  
......
56 57
DESCRIPTION="Firefox Web Browser"
57 58
HOMEPAGE="https://www.mozilla.com/firefox"
58 59

  
59
KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv x86"
60
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
60 61

  
61
SLOT="esr"
62
SLOT="rapid"
62 63
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
63 64

  
64 65
IUSE="+clang cpu_flags_arm_neon dbus debug eme-free hardened hwaccel"
65
IUSE+=" jack libproxy lto openh264 pgo pulseaudio sndio selinux"
66
IUSE+=" jack +jumbo-build libproxy lto openh264 pgo pulseaudio sndio selinux"
66 67
IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png system-python-libs +system-webp"
67
IUSE+=" wayland wifi +X"
68
IUSE+=" +telemetry valgrind wayland wifi +X"
68 69

  
69 70
# Firefox-only IUSE
70 71
IUSE+=" geckodriver +gmp-autoupdate screencast"
......
75 76
	wifi? ( dbus )"
76 77

  
77 78
FF_ONLY_DEPEND="!www-client/firefox:0
78
	!www-client/firefox:rapid
79
	!www-client/firefox:esr
79 80
	screencast? ( media-video/pipewire:= )
80 81
	selinux? ( sec-policy/selinux-mozilla )"
81 82
BDEPEND="${PYTHON_DEPS}
......
124 125
	dev-libs/expat
125 126
	dev-libs/glib:2
126 127
	dev-libs/libffi:=
127
	>=dev-libs/nss-3.90
128
	>=dev-libs/nss-3.92
128 129
	>=dev-libs/nspr-4.35
129 130
	media-libs/alsa-lib
130 131
	media-libs/fontconfig
......
166 167
	system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
167 168
	system-png? ( >=media-libs/libpng-1.6.35:0=[apng] )
168 169
	system-webp? ( >=media-libs/libwebp-1.1.0:0= )
170
	valgrind? ( dev-util/valgrind )
169 171
	wayland? (
170 172
		>=media-libs/libepoxy-1.5.10-r1
171 173
		x11-libs/gtk+:3[wayland]
......
684 686

  
685 687
	find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
686 688

  
689
	# Clear checksums from cargo crates we've manually patched.
690
	# moz_clear_vendor_checksums xyz
691
	moz_clear_vendor_checksums proc-macro2
692

  
693
	# Respect choice for "jumbo-build"
694
	# Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431
695
	if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then
696
		local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16}
697
		elog ""
698
		elog "jumbo-build defaults modified to ${my_files_per_unified_file}."
699
		elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE,"
700
		elog "if that fails try -jumbo-build before opening a bug report."
701
		elog ""
702

  
703
		sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" python/mozbuild/mozbuild/frontend/data.py ||
704
			die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py"
705
		sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" js/src/moz.build ||
706
			die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build"
707
	fi
708

  
687 709
	# Create build dir
688 710
	BUILD_DIR="${WORKDIR}/${PN}_build"
689 711
	mkdir -p "${BUILD_DIR}" || die
......
722 744
		CXX=${CHOST}-clang++-${version_clang}
723 745
		NM=llvm-nm
724 746
		RANLIB=llvm-ranlib
725

  
726 747
	elif ! use clang && ! tc-is-gcc ; then
727 748
		# Force gcc
728 749
		have_switched_compiler=yes
......
745 766
	export HOST_CC="$(tc-getBUILD_CC)"
746 767
	export HOST_CXX="$(tc-getBUILD_CXX)"
747 768
	export AS="$(tc-getCC) -c"
748
	tc-export CC CXX LD AR AS NM OBJDUMP RANLIB PKG_CONFIG
769

  
770
	# Configuration tests expect llvm-readelf output, bug 913130
771
	READELF="llvm-readelf"
772

  
773
	tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG
749 774

  
750 775
	# Pass the correct toolchain paths through cbindgen
751 776
	if tc-is-cross-compiler ; then
......
769 794
	mozconfig_add_options_ac '' --enable-project=browser
770 795

  
771 796
	# Set Gentoo defaults
797
	if use telemetry; then
798
		export MOZILLA_OFFICIAL=1
799
	fi
800

  
772 801
	mozconfig_add_options_ac 'Gentoo default' \
773 802
		--allow-addon-sideload \
774 803
		--disable-cargo-incremental \
775 804
		--disable-crashreporter \
776 805
		--disable-gpsd \
777 806
		--disable-install-strip \
807
		--disable-legacy-profile-creation \
778 808
		--disable-parental-controls \
779 809
		--disable-strip \
780 810
		--disable-tests \
781 811
		--disable-updater \
812
		--disable-wasm-function-references \
813
		--disable-wasm-gc \
782 814
		--disable-wmf \
783
		--enable-legacy-profile-creation \
784 815
		--enable-negotiateauth \
785 816
		--enable-new-pass-manager \
786 817
		--enable-official-branding \
......
819 850
	# bug 833001, bug 903411#c8
820 851
	if use ppc64 || use riscv; then
821 852
		mozconfig_add_options_ac '' --disable-sandbox
853
	elif use valgrind; then
854
		mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox
822 855
	else
823 856
		mozconfig_add_options_ac '' --enable-sandbox
824 857
	fi
......
875 908

  
876 909
	mozconfig_use_enable dbus
877 910
	mozconfig_use_enable libproxy
911
	mozconfig_use_enable valgrind
878 912

  
879 913
	use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme
880 914

  
......
895 929

  
896 930
	mozconfig_use_enable wifi necko-wifi
897 931

  
932
	! use jumbo-build && mozconfig_add_options_ac '--disable-unified-build' --disable-unified-build
933

  
898 934
	if use X && use wayland ; then
899 935
		mozconfig_add_options_ac '+x11+wayland' --enable-default-toolkit=cairo-gtk3-x11-wayland
900 936
	elif ! use X && use wayland ; then
901 937
		mozconfig_add_options_ac '+wayland' --enable-default-toolkit=cairo-gtk3-wayland-only
902 938
	else
903
		mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3
939
		mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only
904 940
	fi
905 941

  
906 942
	if use lto ; then
......
1058 1094
		mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
1059 1095
	fi
1060 1096

  
1097
	if use valgrind; then
1098
		mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc
1099
	fi
1100

  
1061 1101
	# Allow elfhack to work in combination with unstripped binaries
1062 1102
	# when they would normally be larger than 2GiB.
1063 1103
	append-ldflags "-Wl,--compress-debug-sections=zlib"
......
1077 1117
		export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"
1078 1118
	fi
1079 1119

  
1120
	if ! use telemetry; then
1121
		mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0"
1122
		mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0"
1123
		mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0"
1124
		mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0"
1125
	fi
1126

  
1080 1127
	# Disable notification when build system has finished
1081 1128
	export MOZ_NOSPAM=1
1082 1129

  
......
1116 1163
	echo "=========================================================="
1117 1164
	echo
1118 1165

  
1166
	if use valgrind; then
1167
		sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die
1168
	fi
1169

  
1119 1170
	./mach configure || die
1120 1171
}
1121 1172

  
......
1204 1255
			pref("gfx.x11-egl.force-enabled",          true);
1205 1256
			EOF
1206 1257
		fi
1258

  
1259
		# Install the vaapitest binary on supported arches (+arm when keyworded)
1260
		if use amd64 || use arm64 || use x86 ; then
1261
			exeinto "${MOZILLA_FIVE_HOME}"
1262
			doexe "${BUILD_DIR}"/dist/bin/vaapitest
1263
		fi
1264

  
1265
		# Install the v4l2test on supported arches (+ arm, + riscv64 when keyworded)
1266
		if use arm64 ; then
1267
			exeinto "${MOZILLA_FIVE_HOME}"
1268
			doexe "${BUILD_DIR}"/dist/bin/v4l2test
1269
		fi
1207 1270
	fi
1208 1271

  
1209 1272
	if ! use gmp-autoupdate ; then
......
1261 1324
	# Install menu
1262 1325
	local app_name="Mozilla ${MOZ_PN^}"
1263 1326
	local desktop_file="${FILESDIR}/icon/${PN}-r3.desktop"
1264
	local desktop_filename="${PN}-esr.desktop"
1327
	local desktop_filename="${PN}.desktop"
1265 1328
	local exec_command="${PN}"
1266 1329
	local icon="${PN}"
1267 1330
	local use_wayland="false"
......
1295 1358
		-e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
1296 1359
		"${ED}/usr/bin/${PN}" \
1297 1360
		|| die
1298

  
1299
	readme.gentoo_create_doc
1300 1361
}
1301 1362

  
1302 1363
pkg_preinst() {
......
1339 1400
		elog
1340 1401
	fi
1341 1402

  
1403
	local show_doh_information
1404
	local show_normandy_information
1405
	local show_shortcut_information
1406

  
1407
	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
1408
		# New install; Tell user that DoH is disabled by default
1409
		show_doh_information=yes
1410
		show_normandy_information=yes
1411
		show_shortcut_information=no
1412
	else
1413
		local replacing_version
1414
		for replacing_version in ${REPLACING_VERSIONS} ; do
1415
			if ver_test "${replacing_version}" -lt 91.0 ; then
1416
				# Tell user that we no longer install a shortcut
1417
				# per supported display protocol
1418
				show_shortcut_information=yes
1419
			fi
1420
		done
1421
	fi
1422

  
1423
	if [[ -n "${show_doh_information}" ]] ; then
1424
		elog
1425
		elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):"
1426
		elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all"
1427
		elog "DNS traffic to Cloudflare by default is not a good idea and applications"
1428
		elog "should respect OS configured settings), \"network.trr.mode\" was set to 5"
1429
		elog "(\"Off by choice\") by default."
1430
		elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences."
1431
	fi
1432

  
1433
	# bug 713782
1434
	if [[ -n "${show_normandy_information}" ]] ; then
1435
		elog
1436
		elog "Upstream operates a service named Normandy which allows Mozilla to"
1437
		elog "push changes for default settings or even install new add-ons remotely."
1438
		elog "While this can be useful to address problems like 'Armagadd-on 2.0' or"
1439
		elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security"
1440
		elog "concerns prevail, which is why we have switched off the use of this"
1441
		elog "service by default."
1442
		elog
1443
		elog "To re-enable this service set"
1444
		elog
1445
		elog "    app.normandy.enabled=true"
1446
		elog
1447
		elog "in about:config."
1448
	fi
1449

  
1450
	if [[ -n "${show_shortcut_information}" ]] ; then
1451
		elog
1452
		elog "Since ${PN}-91.0 we no longer install multiple shortcuts for"
1453
		elog "each supported display protocol.  Instead we will only install"
1454
		elog "one generic Mozilla ${PN^} shortcut."
1455
		elog "If you still want to be able to select between running Mozilla ${PN^}"
1456
		elog "on X11 or Wayland, you have to re-create these shortcuts on your own."
1457
	fi
1458

  
1342 1459
	# bug 835078
1343 1460
	if use hwaccel && has_version "x11-drivers/xf86-video-nouveau"; then
1344 1461
		ewarn "You have nouveau drivers installed in your system and 'hwaccel' "
......
1347 1464
		ewarn "explained in https://bugs.gentoo.org/835078#c5 if Firefox crashes."
1348 1465
	fi
1349 1466

  
1350
	readme.gentoo_print_elog
1467
	elog
1468
	elog "Unfortunately Firefox-100.0 breaks compatibility with some sites using "
1469
	elog "useragent checks. To temporarily fix this, enter about:config and modify "
1470
	elog "network.http.useragent.forceVersion preference to \"99\"."
1471
	elog "Or install an addon to change your useragent."
1472
	elog "See: https://support.mozilla.org/en-US/kb/difficulties-opening-or-using-website-firefox-100"
1473
	elog
1351 1474

  
1352 1475
	optfeature_header "Optional programs for extra features:"
1353 1476
	optfeature "desktop notifications" x11-libs/libnotify
1354 1477
	optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas
1355

  
1356 1478
	if use hwaccel && has_version "x11-drivers/nvidia-drivers"; then
1357 1479
		optfeature "hardware acceleration with NVIDIA cards" media-libs/nvidia-vaapi-driver
1358 1480
	fi
Thank you!