From 7f39132ab3dd3cb51fa99aabd48800725855dfbb Mon Sep 17 00:00:00 2001 From: Crucible Date: Wed, 21 Oct 2026 03:06:05 -0500 Subject: Publish srcux candidate 0000000769-20261021-030226 --- app-editors/gvim/gvim-9.2.1119.ebuild | 2 +- app-editors/vim-core/vim-core-9.2.1119.ebuild | 2 +- app-editors/vim/vim-9.2.1119.ebuild | 2 +- .../nxml-gentoo-schemas-20260922.ebuild | 2 +- dev-lang/go/go-1.25.14.ebuild | 2 +- dev-lang/go/go-1.26.10.ebuild | 2 +- .../rccl/files/rccl-10.1.0-llvm-23-gfx942.patch | 19 + dev-libs/rccl/rccl-10.1.0.ebuild | 1 + .../rocm-opencl-runtime-10.1.0-r1.ebuild | 127 ++ .../rocm-opencl-runtime-10.1.0.ebuild | 121 -- .../roct-thunk-interface-10.1.0.ebuild | 6 +- dev-python/blessed/Manifest | 2 +- dev-python/blessed/blessed-1.49.0.ebuild | 57 - dev-python/blessed/blessed-1.52.0.ebuild | 57 + dev-python/blurb/Manifest | 4 +- dev-python/blurb/blurb-2.1.0.ebuild | 23 - dev-python/blurb/blurb-2.3.0.ebuild | 23 + dev-python/django-auth-ldap/Manifest | 2 + .../django-auth-ldap/django-auth-ldap-5.4.0.ebuild | 44 + dev-python/ensurepip-pip/Manifest | 1 + .../ensurepip-pip/ensurepip-pip-26.2.2.ebuild | 181 +++ dev-python/ensurepip-setuptools/Manifest | 1 + .../ensurepip-setuptools-84.2.1.ebuild | 130 ++ dev-python/fastapi/Manifest | 1 + dev-python/fastapi/fastapi-0.156.4.ebuild | 130 ++ dev-python/jsonpath-ng/Manifest | 2 + dev-python/jsonpath-ng/jsonpath-ng-1.12.0.ebuild | 42 + dev-python/nox/Manifest | 2 +- dev-python/nox/nox-2026.08.10.ebuild | 55 - dev-python/nox/nox-2026.10.20.ebuild | 55 + dev-python/parse/Manifest | 1 + dev-python/parse/parse-1.22.4.ebuild | 28 + dev-python/patiencediff/Manifest | 16 +- dev-python/patiencediff/patiencediff-1.0.0.ebuild | 72 -- dev-python/patiencediff/patiencediff-1.0.2.ebuild | 72 ++ dev-python/pip/Manifest | 1 + dev-python/pip/pip-26.2.2.ebuild | 196 +++ dev-python/pycares/Manifest | 1 + dev-python/pycares/pycares-5.2.1.ebuild | 48 + dev-python/pydantic-settings/Manifest | 2 + .../pydantic-settings-2.16.1.ebuild | 40 + dev-python/pyrate-limiter/Manifest | 4 +- .../pyrate-limiter/pyrate-limiter-4.4.0.ebuild | 79 -- .../pyrate-limiter/pyrate-limiter-4.5.1.ebuild | 79 ++ dev-python/python-gammu/Manifest | 1 + dev-python/python-gammu/python-gammu-3.5.1.ebuild | 59 + dev-python/python-pkcs11/Manifest | 4 +- .../python-pkcs11/python-pkcs11-0.10.1.ebuild | 61 + .../python-pkcs11/python-pkcs11-0.9.5.ebuild | 61 - dev-python/python-utils/Manifest | 2 + dev-python/python-utils/python-utils-4.1.4.ebuild | 43 + dev-python/securesystemslib/Manifest | 6 +- .../securesystemslib/securesystemslib-1.4.0.ebuild | 42 - .../securesystemslib/securesystemslib-1.5.0.ebuild | 44 - .../securesystemslib/securesystemslib-1.6.0.ebuild | 44 + dev-python/setuptools/Manifest | 1 + dev-python/setuptools/setuptools-84.2.1.ebuild | 124 ++ dev-python/sigstore/Manifest | 2 +- dev-python/sigstore/sigstore-4.4.0-r1.ebuild | 62 - dev-python/sigstore/sigstore-4.5.1.ebuild | 60 + dev-python/sphinxcontrib-jsmath/Manifest | 1 + .../sphinxcontrib-jsmath-2.0.0.ebuild | 35 + dev-python/sqlglot/Manifest | 2 +- dev-python/sqlglot/sqlglot-30.22.0.ebuild | 53 - dev-python/sqlglot/sqlglot-30.24.0.ebuild | 53 + dev-python/uv-build/Manifest | 1 + dev-python/uv-build/uv-build-0.13.4.ebuild | 100 ++ dev-python/uv/Manifest | 2 + dev-python/uv/uv-0.13.4.ebuild | 156 +++ dev-python/wcwidth/Manifest | 2 +- dev-python/wcwidth/wcwidth-0.8.3.ebuild | 32 - dev-python/wcwidth/wcwidth-0.9.3.ebuild | 46 + dev-util/amdsmi/amdsmi-10.1.0.ebuild | 22 +- dev-util/rocminfo/rocminfo-10.1.0.ebuild | 2 +- media-radio/qlog/qlog-0.53.0.ebuild | 2 +- media-radio/svxlink/Manifest | 1 + media-radio/svxlink/svxlink-26.05.2.ebuild | 110 ++ sci-libs/hipCUB/hipCUB-10.1.0-r1.ebuild | 84 ++ sci-libs/hipCUB/hipCUB-10.1.0.ebuild | 79 -- sci-libs/rocPRIM/rocPRIM-10.1.0-r1.ebuild | 92 ++ sci-libs/rocPRIM/rocPRIM-10.1.0.ebuild | 89 -- sci-libs/rocRAND/rocRAND-10.1.0-r1.ebuild | 73 ++ sci-libs/rocRAND/rocRAND-10.1.0.ebuild | 70 -- sci-libs/rocThrust/rocThrust-10.1.0.ebuild | 9 +- .../openpgp-keys-pauleggert-20260913.ebuild | 2 +- sys-libs/timezone-data/timezone-data-2026e.ebuild | 2 +- www-client/librewolf-bin/Manifest | 6 +- .../librewolf-bin/librewolf-bin-157.0.1_p1.ebuild | 321 ----- .../librewolf-bin/librewolf-bin-157.0_p1.ebuild | 321 ----- .../librewolf-bin/librewolf-bin-158.0.1_p1.ebuild | 321 +++++ www-client/librewolf/Manifest | 5 +- www-client/librewolf/librewolf-157.0.1_p1.ebuild | 1320 -------------------- www-client/librewolf/librewolf-157.0_p1.ebuild | 1320 -------------------- www-client/librewolf/librewolf-158.0.1_p1.ebuild | 1308 +++++++++++++++++++ 94 files changed, 4133 insertions(+), 4262 deletions(-) create mode 100644 dev-libs/rccl/files/rccl-10.1.0-llvm-23-gfx942.patch create mode 100644 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0-r1.ebuild delete mode 100644 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0.ebuild delete mode 100644 dev-python/blessed/blessed-1.49.0.ebuild create mode 100644 dev-python/blessed/blessed-1.52.0.ebuild delete mode 100644 dev-python/blurb/blurb-2.1.0.ebuild create mode 100644 dev-python/blurb/blurb-2.3.0.ebuild create mode 100644 dev-python/django-auth-ldap/django-auth-ldap-5.4.0.ebuild create mode 100644 dev-python/ensurepip-pip/ensurepip-pip-26.2.2.ebuild create mode 100644 dev-python/ensurepip-setuptools/ensurepip-setuptools-84.2.1.ebuild create mode 100644 dev-python/fastapi/fastapi-0.156.4.ebuild create mode 100644 dev-python/jsonpath-ng/jsonpath-ng-1.12.0.ebuild delete mode 100644 dev-python/nox/nox-2026.08.10.ebuild create mode 100644 dev-python/nox/nox-2026.10.20.ebuild create mode 100644 dev-python/parse/parse-1.22.4.ebuild delete mode 100644 dev-python/patiencediff/patiencediff-1.0.0.ebuild create mode 100644 dev-python/patiencediff/patiencediff-1.0.2.ebuild create mode 100644 dev-python/pip/pip-26.2.2.ebuild create mode 100644 dev-python/pycares/pycares-5.2.1.ebuild create mode 100644 dev-python/pydantic-settings/pydantic-settings-2.16.1.ebuild delete mode 100644 dev-python/pyrate-limiter/pyrate-limiter-4.4.0.ebuild create mode 100644 dev-python/pyrate-limiter/pyrate-limiter-4.5.1.ebuild create mode 100644 dev-python/python-gammu/python-gammu-3.5.1.ebuild create mode 100644 dev-python/python-pkcs11/python-pkcs11-0.10.1.ebuild delete mode 100644 dev-python/python-pkcs11/python-pkcs11-0.9.5.ebuild create mode 100644 dev-python/python-utils/python-utils-4.1.4.ebuild delete mode 100644 dev-python/securesystemslib/securesystemslib-1.4.0.ebuild delete mode 100644 dev-python/securesystemslib/securesystemslib-1.5.0.ebuild create mode 100644 dev-python/securesystemslib/securesystemslib-1.6.0.ebuild create mode 100644 dev-python/setuptools/setuptools-84.2.1.ebuild delete mode 100644 dev-python/sigstore/sigstore-4.4.0-r1.ebuild create mode 100644 dev-python/sigstore/sigstore-4.5.1.ebuild create mode 100644 dev-python/sphinxcontrib-jsmath/sphinxcontrib-jsmath-2.0.0.ebuild delete mode 100644 dev-python/sqlglot/sqlglot-30.22.0.ebuild create mode 100644 dev-python/sqlglot/sqlglot-30.24.0.ebuild create mode 100644 dev-python/uv-build/uv-build-0.13.4.ebuild create mode 100644 dev-python/uv/uv-0.13.4.ebuild delete mode 100644 dev-python/wcwidth/wcwidth-0.8.3.ebuild create mode 100644 dev-python/wcwidth/wcwidth-0.9.3.ebuild create mode 100644 media-radio/svxlink/svxlink-26.05.2.ebuild create mode 100644 sci-libs/hipCUB/hipCUB-10.1.0-r1.ebuild delete mode 100644 sci-libs/hipCUB/hipCUB-10.1.0.ebuild create mode 100644 sci-libs/rocPRIM/rocPRIM-10.1.0-r1.ebuild delete mode 100644 sci-libs/rocPRIM/rocPRIM-10.1.0.ebuild create mode 100644 sci-libs/rocRAND/rocRAND-10.1.0-r1.ebuild delete mode 100644 sci-libs/rocRAND/rocRAND-10.1.0.ebuild delete mode 100644 www-client/librewolf-bin/librewolf-bin-157.0.1_p1.ebuild delete mode 100644 www-client/librewolf-bin/librewolf-bin-157.0_p1.ebuild create mode 100644 www-client/librewolf-bin/librewolf-bin-158.0.1_p1.ebuild delete mode 100644 www-client/librewolf/librewolf-157.0.1_p1.ebuild delete mode 100644 www-client/librewolf/librewolf-157.0_p1.ebuild create mode 100644 www-client/librewolf/librewolf-158.0.1_p1.ebuild diff --git a/app-editors/gvim/gvim-9.2.1119.ebuild b/app-editors/gvim/gvim-9.2.1119.ebuild index ae4ddf5d6d4f..e458cbc29f91 100644 --- a/app-editors/gvim/gvim-9.2.1119.ebuild +++ b/app-editors/gvim/gvim-9.2.1119.ebuild @@ -25,7 +25,7 @@ else https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2 " - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="GUI version of the Vim text editor" diff --git a/app-editors/vim-core/vim-core-9.2.1119.ebuild b/app-editors/vim-core/vim-core-9.2.1119.ebuild index e70ffcbef59e..87b21246092c 100644 --- a/app-editors/vim-core/vim-core-9.2.1119.ebuild +++ b/app-editors/vim-core/vim-core-9.2.1119.ebuild @@ -16,7 +16,7 @@ if [[ ${PV} == 9999* ]] ; then else SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="vim and gvim shared files" diff --git a/app-editors/vim/vim-9.2.1119.ebuild b/app-editors/vim/vim-9.2.1119.ebuild index 17180f6e75d0..e86b83f84815 100644 --- a/app-editors/vim/vim-9.2.1119.ebuild +++ b/app-editors/vim/vim-9.2.1119.ebuild @@ -22,7 +22,7 @@ if [[ ${PV} == 9999* ]] ; then else SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="Vim, an improved vi-style text editor" diff --git a/app-emacs/nxml-gentoo-schemas/nxml-gentoo-schemas-20260922.ebuild b/app-emacs/nxml-gentoo-schemas/nxml-gentoo-schemas-20260922.ebuild index 8bc4452b66e5..955d9fbb1a66 100644 --- a/app-emacs/nxml-gentoo-schemas/nxml-gentoo-schemas-20260922.ebuild +++ b/app-emacs/nxml-gentoo-schemas/nxml-gentoo-schemas-20260922.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://distfiles.gentoo.org/pub/proj/emacs/${P}.tar.xz" LICENSE="MIT GPL-2+" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ppc ppc64 ~riscv ~sparc x86 ~x64-macos" SITEFILE="60${PN}-gentoo.el" diff --git a/dev-lang/go/go-1.25.14.ebuild b/dev-lang/go/go-1.25.14.ebuild index 7a2e854451e0..11b1353dddb2 100644 --- a/dev-lang/go/go-1.25.14.ebuild +++ b/dev-lang/go/go-1.25.14.ebuild @@ -20,7 +20,7 @@ case ${PV} in *) SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz " S="${WORKDIR}"/go - KEYWORDS="-* amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris" + KEYWORDS="-* amd64 ~arm arm64 ~loong ~mips ~ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris" ;; esac diff --git a/dev-lang/go/go-1.26.10.ebuild b/dev-lang/go/go-1.26.10.ebuild index 61c8d2a91fc6..aaf028a4c972 100644 --- a/dev-lang/go/go-1.26.10.ebuild +++ b/dev-lang/go/go-1.26.10.ebuild @@ -20,7 +20,7 @@ case ${PV} in *) SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz " S="${WORKDIR}"/go - KEYWORDS="-* amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris" + KEYWORDS="-* amd64 ~arm arm64 ~loong ~mips ~ppc64 ~riscv ~s390 x86 ~x64-macos ~x64-solaris" ;; esac diff --git a/dev-libs/rccl/files/rccl-10.1.0-llvm-23-gfx942.patch b/dev-libs/rccl/files/rccl-10.1.0-llvm-23-gfx942.patch new file mode 100644 index 000000000000..8c391212936c --- /dev/null +++ b/dev-libs/rccl/files/rccl-10.1.0-llvm-23-gfx942.patch @@ -0,0 +1,19 @@ +Fix build with LLVM 23 for gfx942 and gfx950 + +LLVM 23 fails with "Cannot scavenge register in FI elimination" on some +kernels (fixed by llvm/llvm-project@c003bfba6158); together, disabling the +machine scheduler and the basic SGPR allocator avoid it. + +Bug: https://bugs.gentoo.org/984543 +--- a/cmake/DeviceLinker.cmake ++++ b/cmake/DeviceLinker.cmake +@@ -288,6 +288,9 @@ foreach(DL_GPU_TARGET ${DL_GPU_TARGETS}) + -fPIC + ${DL_INHERITED_FLAGS} + ) ++ if(DL_GPU_TARGET MATCHES "^gfx9(42|50)$") ++ target_compile_options(${_dev_target} PRIVATE -mllvm=-enable-misched=false -mllvm=-sgpr-regalloc=basic) ++ endif() + target_compile_definitions(${_dev_target} PRIVATE RCCL_DEVICE_LINKER) + target_link_libraries(${_dev_target} PRIVATE rccl_device_defs) + diff --git a/dev-libs/rccl/rccl-10.1.0.ebuild b/dev-libs/rccl/rccl-10.1.0.ebuild index 8cae2c180efc..7cb807abb404 100644 --- a/dev-libs/rccl/rccl-10.1.0.ebuild +++ b/dev-libs/rccl/rccl-10.1.0.ebuild @@ -48,6 +48,7 @@ RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${P}-no-roctx.patch + "${FILESDIR}"/${P}-llvm-23-gfx942.patch ) src_prepare() { diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0-r1.ebuild new file mode 100644 index 000000000000..2d253cbb8659 --- /dev/null +++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0-r1.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_SKIP_GLOBALS=1 +inherit cmake edob flag-o-matic rocm + +DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" +HOMEPAGE="https://github.com/ROCm/rocm-systems/tree/develop/projects/clr" + +SRC_URI="https://github.com/ROCm/rocm-systems/releases/download/therock-${PV%.0}/clr.tar.gz -> rocm-clr-${PV}.tar.gz" +S="${WORKDIR}/clr" + +LICENSE="Apache-2.0 MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="debug test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/rocr-runtime:${SLOT} + dev-libs/rocm-comgr:${SLOT} + dev-libs/rocm-device-libs:${SLOT} + >=virtual/opencl-3 + media-libs/mesa[-opencl] +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-build/rocm-cmake-6.0 + media-libs/glew + test? ( >=x11-apps/mesa-progs-8.5.0[X] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-6.2.4-fix-lib-version.patch" + "${FILESDIR}/${PN}-10.1.0-aligned-new.patch" +) + +src_prepare() { + # Compatibility with CMake < 3.10 will be removed + sed -e "/cmake_minimum_required/ s/3\.5/3.10/" \ + -i opencl/khronos/icd/CMakeLists.txt opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt || die + + # Allocate all free memory or a buffer of the maximum allocation size. + # On APUs this starves other GPU clients (crashing the desktop session) or OOMs. + cat >> opencl/tests/ocltst/module/runtime/oclruntime.exclude <<-EOF || die + OCLMemoryInfo + OCLCreateBuffer + OCLCreateImage + EOF + + # rocclr finds glXGetProcAddress via dlsym(RTLD_DEFAULT); expose GL libs of the oclgl module + sed -e "s/dlopen(m_paths\[i\].c_str(), RTLD_NOW)/dlopen(m_paths[i].c_str(), RTLD_NOW | RTLD_GLOBAL)/" \ + -i opencl/tests/ocltst/env/ocltst.cpp || die + + cmake_src_prepare +} + +src_configure() { + # -Werror=strict-aliasing + # https://bugs.gentoo.org/856088 + # https://github.com/ROCm/clr/issues/64 + # + # Do not trust it for LTO either + append-flags -fno-strict-aliasing + filter-lto + + use debug && CMAKE_BUILD_TYPE="Debug" + # upstream release builds have assertions disabled; some are reachable + # (e.g. Isa::isCompatible on gfx90c), aborting otherwise working programs + # Bug: https://bugs.gentoo.org/984577 + use debug || append-cppflags -DNDEBUG + + # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120 + append-cflags -fcommon + + local mycmakeargs=( + -Wno-dev + -DROCM_PATH="${EPREFIX}/usr" + -DBUILD_TESTS=$(usex test ON OFF) + -DEMU_ENV=ON + -DBUILD_ICD=ON + -DCLR_BUILD_OCL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + ) + cmake_src_configure +} + +src_install() { + insinto /etc/OpenCL/vendors + doins opencl/config/amdocl64.icd + + cd "${BUILD_DIR}"/opencl || die + insinto /usr/lib64 + doins amdocl/libamdocl64.so* + doins tools/cltrace/libcltrace.so +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/tests/ocltst || die + export OCL_ICD_FILENAMES="${BUILD_DIR}"/opencl/amdocl/libamdocl64.so + local instruction1="Please start an X server using amdgpu driver (not Xvfb!)," + local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test." + if [[ -n ${OCLGL_DISPLAY+x} ]]; then + export DISPLAY=${OCLGL_DISPLAY} + export XAUTHORITY=${OCLGL_XAUTHORITY} + ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}" + if ! glxinfo | grep "OpenGL vendor string: AMD"; then + ewarn "${instruction1}" + ewarn "${instruction2}" + die "This display does not have AMD OpenGL vendor!" + fi + ./ocltst -m $(realpath liboclgl.so) -A ogl.exclude + eend $? || die "oclgl test failed" + else + ewarn "${instruction1}" + ewarn "${instruction2}" + die "\${OCLGL_DISPLAY} not set." + fi + edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude + edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude +} diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0.ebuild deleted file mode 100644 index 797a3cde48e4..000000000000 --- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-10.1.0.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -ROCM_SKIP_GLOBALS=1 -inherit cmake edob flag-o-matic rocm - -DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime" -HOMEPAGE="https://github.com/ROCm/rocm-systems/tree/develop/projects/clr" - -SRC_URI="https://github.com/ROCm/rocm-systems/releases/download/therock-${PV%.0}/clr.tar.gz -> rocm-clr-${PV}.tar.gz" -S="${WORKDIR}/clr" - -LICENSE="Apache-2.0 MIT" -SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~amd64" -IUSE="debug test" -RESTRICT="!test? ( test )" - -RDEPEND=" - dev-libs/rocr-runtime:${SLOT} - dev-libs/rocm-comgr:${SLOT} - dev-libs/rocm-device-libs:${SLOT} - >=virtual/opencl-3 - media-libs/mesa[-opencl] -" -DEPEND="${RDEPEND}" -BDEPEND=" - >=dev-build/rocm-cmake-6.0 - media-libs/glew - test? ( >=x11-apps/mesa-progs-8.5.0[X] ) -" - -PATCHES=( - "${FILESDIR}/${PN}-6.2.4-fix-lib-version.patch" - "${FILESDIR}/${PN}-10.1.0-aligned-new.patch" -) - -src_prepare() { - # Compatibility with CMake < 3.10 will be removed - sed -e "/cmake_minimum_required/ s/3\.5/3.10/" \ - -i opencl/khronos/icd/CMakeLists.txt opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt || die - - # Allocate all free memory or a buffer of the maximum allocation size. - # On APUs this starves other GPU clients (crashing the desktop session) or OOMs. - cat >> opencl/tests/ocltst/module/runtime/oclruntime.exclude <<-EOF || die - OCLMemoryInfo - OCLCreateBuffer - OCLCreateImage - EOF - - # rocclr finds glXGetProcAddress via dlsym(RTLD_DEFAULT); expose GL libs of the oclgl module - sed -e "s/dlopen(m_paths\[i\].c_str(), RTLD_NOW)/dlopen(m_paths[i].c_str(), RTLD_NOW | RTLD_GLOBAL)/" \ - -i opencl/tests/ocltst/env/ocltst.cpp || die - - cmake_src_prepare -} - -src_configure() { - # -Werror=strict-aliasing - # https://bugs.gentoo.org/856088 - # https://github.com/ROCm/clr/issues/64 - # - # Do not trust it for LTO either - append-flags -fno-strict-aliasing - filter-lto - - # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155 - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120 - append-cflags -fcommon - - local mycmakeargs=( - -Wno-dev - -DROCM_PATH="${EPREFIX}/usr" - -DBUILD_TESTS=$(usex test ON OFF) - -DEMU_ENV=ON - -DBUILD_ICD=ON - -DCLR_BUILD_OCL=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON - ) - cmake_src_configure -} - -src_install() { - insinto /etc/OpenCL/vendors - doins opencl/config/amdocl64.icd - - cd "${BUILD_DIR}"/opencl || die - insinto /usr/lib64 - doins amdocl/libamdocl64.so* - doins tools/cltrace/libcltrace.so -} - -src_test() { - check_amdgpu - cd "${BUILD_DIR}"/tests/ocltst || die - export OCL_ICD_FILENAMES="${BUILD_DIR}"/opencl/amdocl/libamdocl64.so - local instruction1="Please start an X server using amdgpu driver (not Xvfb!)," - local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test." - if [[ -n ${OCLGL_DISPLAY+x} ]]; then - export DISPLAY=${OCLGL_DISPLAY} - export XAUTHORITY=${OCLGL_XAUTHORITY} - ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}" - if ! glxinfo | grep "OpenGL vendor string: AMD"; then - ewarn "${instruction1}" - ewarn "${instruction2}" - die "This display does not have AMD OpenGL vendor!" - fi - ./ocltst -m $(realpath liboclgl.so) -A ogl.exclude - eend $? || die "oclgl test failed" - else - ewarn "${instruction1}" - ewarn "${instruction2}" - die "\${OCLGL_DISPLAY} not set." - fi - edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude - edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude -} diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-10.1.0.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-10.1.0.ebuild index 8f05341deba2..21abeea777e9 100644 --- a/dev-libs/roct-thunk-interface/roct-thunk-interface-10.1.0.ebuild +++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-10.1.0.ebuild @@ -88,6 +88,10 @@ src_configure() { filter-lto export LIBHSAKMT_PATH="${BUILD_DIR}" + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_hsakmt=ON + -DHSAKMT_LIBRARY="${BUILD_DIR}/libhsakmt.so" + ) test_wrapper "${S}/tests/kfdtest" cmake_src_configure fi } @@ -125,5 +129,5 @@ src_test() { KFDQMTest.QueueLatency ) local IFS=: - ./run_kfdtest.sh -e "${skipped_tests[*]}" || die + LD_LIBRARY_PATH="${BUILD_DIR}" ./run_kfdtest.sh -e "${skipped_tests[*]}" || die } diff --git a/dev-python/blessed/Manifest b/dev-python/blessed/Manifest index 332a73d19518..0d195ccbe483 100644 --- a/dev-python/blessed/Manifest +++ b/dev-python/blessed/Manifest @@ -1,3 +1,3 @@ -DIST blessed-1.49.0.tar.gz 14055928 BLAKE2B ddc5793230d896f6851999c1f519178a026b38002e1149eae03d4ccabdcb56612e536f312d557896725cb88e8cd94bf16a743248d54351b5e324aa2e16a0915e SHA512 6a74f7b5ac374eb34f0d6558aec506e197dc9df809f4460f1d10ac5febf84e7f07afef62dc7423901a9cf3463a2872c87669c8e939d8bcc69213c64d093f00ce DIST blessed-1.50.0.tar.gz 14062021 BLAKE2B a16609378d7b73de78ae07970119fa64a77c5dbe775d7edf62894b7cbbfbc9989fc0630b38398c8139a50ffcb40e579c3b9039dd7249b60ad526b9cb9e0065f2 SHA512 dc8d6805d04d8681b190c30481899e261aafa973129ce825c392142ea8b1e3dec476c7a9fe442d14cf9a712fe872dc0e14099047b787b5dc2349c586d6ca0e3c DIST blessed-1.51.0.tar.gz 14069432 BLAKE2B d7ade8e3e040f1e218139659d4dc843f8e1f67f9d79a342ca4c7dff9e6a653521ebc7851a32364f3db9f93164f817aaebf99f9ee471719b28ccaa4f6c8c995a6 SHA512 f4e1cfd9d88c5fc6aadb86b56c03b302832770c01a2d456cf016f3115e0d09377e21cae95b02cadc132635318cfd9ec340cb8ace74c57ea4be40d937a987d56c +DIST blessed-1.52.0.tar.gz 14069744 BLAKE2B 0467e1ecdc7dd626e793cd346ee5a7cf4be5ac08a4cdb9f01760697ce8165c3281f10ccc002fbdb844da005805407f08b47f00f6e41a4883f8c66375b7d7e70f SHA512 8da8bdc0b111d7cec8d065045e586cd0828cdf72ea796a46ed228b9c24b9a8c8ca86f78adc0885ba100ffa968556e599fb96d874f9f2055d232ffd73ceb0136e diff --git a/dev-python/blessed/blessed-1.49.0.ebuild b/dev-python/blessed/blessed-1.49.0.ebuild deleted file mode 100644 index 9fd01d486884..000000000000 --- a/dev-python/blessed/blessed-1.49.0.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit-core -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Library for making terminal apps using colors, keyboard input and positioning" -HOMEPAGE=" - https://github.com/jquast/blessed/ - https://pypi.org/project/blessed/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 arm64 ~riscv x86" - -RDEPEND=" - >=dev-python/jinxed-2.1[${PYTHON_USEDEP}] - >=dev-python/wcwidth-0.8.3[${PYTHON_USEDEP}] -" - -distutils_enable_sphinx docs dev-python/sphinx-rtd-theme - -EPYTEST_PLUGINS=() -# tests are flaky with xdist -distutils_enable_tests pytest - -# README.rst is a symlink to docs/ -DOCS=() - -python_prepare_all() { - # Skip those extensions as they don't have a Gentoo package - # Remove calls to scripts that generate rst files because they - # are not present in the tarball - sed -e '/sphinxcontrib.manpage/d' -e '/sphinx_paramlinks/d' \ - -e '/^for script in/,/runpy.run_path/d' \ - -i docs/conf.py || die - distutils-r1_python_prepare_all -} - -python_test() { - local EPYTEST_DESELECT=( - # fragile to timing - tests/test_sixel.py::test_sixel_height_and_width_fallback_to_xtwinops - tests/test_sixel.py::test_fast_path_with_caches_populated - ) - - # COLORTERM must not be truecolor - # See https://github.com/jquast/blessed/issues/162 - local -x COLORTERM= - # Ignore coverage options - epytest --override-ini="addopts=" -} diff --git a/dev-python/blessed/blessed-1.52.0.ebuild b/dev-python/blessed/blessed-1.52.0.ebuild new file mode 100644 index 000000000000..2d966eb57b93 --- /dev/null +++ b/dev-python/blessed/blessed-1.52.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit-core +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Library for making terminal apps using colors, keyboard input and positioning" +HOMEPAGE=" + https://github.com/jquast/blessed/ + https://pypi.org/project/blessed/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" + +RDEPEND=" + >=dev-python/jinxed-2.1[${PYTHON_USEDEP}] + >=dev-python/wcwidth-0.8.3[${PYTHON_USEDEP}] +" + +distutils_enable_sphinx docs dev-python/sphinx-rtd-theme + +EPYTEST_PLUGINS=() +# tests are flaky with xdist +distutils_enable_tests pytest + +# README.rst is a symlink to docs/ +DOCS=() + +python_prepare_all() { + # Skip those extensions as they don't have a Gentoo package + # Remove calls to scripts that generate rst files because they + # are not present in the tarball + sed -e '/sphinxcontrib.manpage/d' -e '/sphinx_paramlinks/d' \ + -e '/^for script in/,/runpy.run_path/d' \ + -i docs/conf.py || die + distutils-r1_python_prepare_all +} + +python_test() { + local EPYTEST_DESELECT=( + # fragile to timing + tests/test_sixel.py::test_sixel_height_and_width_fallback_to_xtwinops + tests/test_sixel.py::test_fast_path_with_caches_populated + ) + + # COLORTERM must not be truecolor + # See https://github.com/jquast/blessed/issues/162 + local -x COLORTERM= + # Ignore coverage options + epytest --override-ini="addopts=" +} diff --git a/dev-python/blurb/Manifest b/dev-python/blurb/Manifest index c68f725a6251..a8eeb5bcb0b8 100644 --- a/dev-python/blurb/Manifest +++ b/dev-python/blurb/Manifest @@ -1,4 +1,4 @@ -DIST blurb-2.1.0.tar.gz 28097 BLAKE2B 9ca21b64f994395de70f386e219600e714d3ef43e68db6153154ea126669c021097c3f81a19fd06bd3d52ec27d1f99730aa8c39a302573086e1accca74c365f8 SHA512 af7cdbb75f1c710f0a88cd3a410b6e80924239b6985c7650d5580ac27c54eca6cfcecc63d88c8c6362e2045758acfc962b97a76e5b4508f7974bd14b0ba0f39a -DIST blurb-2.1.0.tar.gz.provenance 9408 BLAKE2B 472859864202f4150a59bf701b29d55b34c965a8540acde6271bc8d1bfeb0a94b04eea7a4f623bbe76669babc0987c4ba66ff9564576b66aa3b0acade99242c4 SHA512 6ef52687c06feddd40e0d6f57212fc1553c25068bf407d647445d9ec4790e264786f6a80cd5c9f3b22a42a6bb3e16e16f80379cf2a3994618b2da2c300dedafe DIST blurb-2.2.0.tar.gz 28063 BLAKE2B 57cb6344b8dd4eb169eabc526d8ed074eddfa173867cd9a75a5b3f9dab153215a32d905ec8dcdbf08e6f1ff09cfd2c163813e9a87a23385370521acc7dd1729b SHA512 c3f6c0db26d380d5eb5246230e27c9f3702c72c945136d0f03111af6080cdda07c27f67e847e71c59d422f918d003065acea7bfeba122e32b86dd04e1eaf47bf DIST blurb-2.2.0.tar.gz.provenance 9374 BLAKE2B e1eab67d74340f7663c7ef68eb5b3f1d40ac322aa50e05f57650c7702dde1439a77bd8b15f4643d8b2a6d6873a8b2f19c9edda5076053bed7b5f48b18a087102 SHA512 0d8da6ebee66c836998f27d424789f65f5caa83e923e645b410773f08d6e37b1544472a0fa90b81e05e5399fef9eeb996ff0e1b353408d2ce2057dbaf5bb77c1 +DIST blurb-2.3.0.tar.gz 31075 BLAKE2B 3b4e3a667641780d84bc7602d1cf17ce09c029a6324a679b3fe66cacc68eb8ebe8388ebe55761bb6d7098d91eb75bd55579425d57de3e012aeeca8f6467a2948 SHA512 9a620b4d4c4e0729ba1a9f5cce4316e29ae4989bd5f4deb545f71c1f45c810fe196617650d366d22f1af3bbba5a59d651701ed14cc4141dd6a3093130534db94 +DIST blurb-2.3.0.tar.gz.provenance 9719 BLAKE2B 99f9136ac92c3d962d466dd6efaf174658a502c7662082b2c5211a16646b7b2a94d4a184ff43fd99150504b0042e12c700e538ca4246d92de3081218addcbc93 SHA512 ec69ff3ebf8875be89a0787c1f9c6eee4c331a99fa835b37d58f4e5d0ecea1a8f048b00de7965d252fc7351e626d92a5f222a1c701645c1da223b4996e0e4c61 diff --git a/dev-python/blurb/blurb-2.1.0.ebuild b/dev-python/blurb/blurb-2.1.0.ebuild deleted file mode 100644 index d633fc7040dd..000000000000 --- a/dev-python/blurb/blurb-2.1.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2018-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_VERIFY_REPO=https://github.com/python/blurb -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Tool to create and manage NEWS blurbs for CPython" -HOMEPAGE=" - https://github.com/python/blurb/ - https://pypi.org/project/blurb/ -" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" - -EPYTEST_PLUGINS=( pyfakefs time-machine ) -distutils_enable_tests pytest diff --git a/dev-python/blurb/blurb-2.3.0.ebuild b/dev-python/blurb/blurb-2.3.0.ebuild new file mode 100644 index 000000000000..d633fc7040dd --- /dev/null +++ b/dev-python/blurb/blurb-2.3.0.ebuild @@ -0,0 +1,23 @@ +# Copyright 2018-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYPI_VERIFY_REPO=https://github.com/python/blurb +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Tool to create and manage NEWS blurbs for CPython" +HOMEPAGE=" + https://github.com/python/blurb/ + https://pypi.org/project/blurb/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +EPYTEST_PLUGINS=( pyfakefs time-machine ) +distutils_enable_tests pytest diff --git a/dev-python/django-auth-ldap/Manifest b/dev-python/django-auth-ldap/Manifest index 43d8c9e65bbd..73c937ec0489 100644 --- a/dev-python/django-auth-ldap/Manifest +++ b/dev-python/django-auth-ldap/Manifest @@ -1,2 +1,4 @@ DIST django_auth_ldap-5.3.0.tar.gz 55272 BLAKE2B b7de6d7e94898168809561b5302712ff72e406c9b22f76bca7071cce6db311fafd63c4dc54ed0c4b61c175754342296a0e11803da1ff6d50cda45b2dab18d6f4 SHA512 00e122040c5ff4dc200256bb5b9186bd4e52edbe962129c2750144137beba1f77298c1aa1caa06318a65432a1ef8cb1340ea7d55082a8659bddef303d7a97e2b DIST django_auth_ldap-5.3.0.tar.gz.provenance 9810 BLAKE2B 5432005a44133d45ec52e40aa78f8e7d56954fed5e385e43cb27c2be51b68892d90488fbdbe68ad8925851bc6e4a122d0f41782fc78d5a3bb3dfc6ed09ca9e62 SHA512 da82cc226af0de3e78917bb8f69ccb139355f40696937c49578f214717b28b377d7f0098805e7f07a1f2659510ec8251ba54b02dabe01dd4742d044a03f5f41f +DIST django_auth_ldap-5.4.0.tar.gz 56416 BLAKE2B 670756f3e470bf78831860a6605987f9fc9e4d797aa27997836e5e57be511797602046a2a89b899386a561c31e0650a25ba8dec783b17e15ecf3596b72292ae0 SHA512 952228cb4cae34bea7a3edc0d187a17030568a2361e383692c17bc344170942194545840a2a8db420475968bd892dcffb3bc22f035c665f702a8c061a46f4b2c +DIST django_auth_ldap-5.4.0.tar.gz.provenance 10008 BLAKE2B a2edbc475bebc1ef255626253da02f9d1e075cd78c6bb6d65c7678cd15d7c8c4dae8104ae206fc69ae014f1aa5300327c381e098070d81a6aefc337a805ea30a SHA512 30428850499af84b39bb61f30069c22832e9fbad51a8eda2d771c2f23701b58ec393381f5b05b229cee9e50bfbcf00e5d7cf433a83610bb9fe43e4208ccbb92a diff --git a/dev-python/django-auth-ldap/django-auth-ldap-5.4.0.ebuild b/dev-python/django-auth-ldap/django-auth-ldap-5.4.0.ebuild new file mode 100644 index 000000000000..6e8f7fd9f6b2 --- /dev/null +++ b/dev-python/django-auth-ldap/django-auth-ldap-5.4.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_VERIFY_REPO=https://github.com/django-auth-ldap/django-auth-ldap +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Django LDAP authentication backend" +HOMEPAGE=" + https://github.com/django-auth-ldap/django-auth-ldap/ + https://pypi.org/project/django-auth-ldap/ +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/django-5.2[${PYTHON_USEDEP}] + >=dev-python/python-ldap-3.1[${PYTHON_USEDEP}] +" +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + $(python_gen_impl_dep sqlite) + net-nds/openldap[-minimal] + ) +" + +distutils_enable_sphinx docs \ + dev-python/sphinx-rtd-theme + +python_test() { + # for slapd and slapdtest + local -x SBIN=/usr/sbin:/usr/$(get_libdir)/openldap + "${EPYTHON}" -m django test -v 2 --settings tests.settings || + die "Tests failed with ${EPYTHON}" +} diff --git a/dev-python/ensurepip-pip/Manifest b/dev-python/ensurepip-pip/Manifest index 6a96866423bb..d0b8b25e59da 100644 --- a/dev-python/ensurepip-pip/Manifest +++ b/dev-python/ensurepip-pip/Manifest @@ -1,3 +1,4 @@ DIST flit_core-3.12.0-py3-none-any.whl 45594 BLAKE2B 7c6cb6eb03d45bbba27f27b3728881b57fe82dd38e03f884d3b7c46116eb2b9dd76f92bdaf7f594ef8ccbe12ec8f9a56424ff9e9fc7a839c4818a113fdf0c3d3 SHA512 790c12b1f43201e365fb3f8f2f0a54e1a578876799dfdf8bfeea679a25ea096bf62946d006618c1458ae6e37ce6d00998f37e9aba426d5ab80d32ef2d75da4e0 DIST pip-26.1.2.gh.tar.gz 9268753 BLAKE2B 8cbf0ecf25a2bdd148506ca0e2e778b9053759cf5fed3914b915454bd8810b1d7a27e3b2efb5fd29c4e6b189c7e8050f0da15ae6c259712446b5a35f44018ee0 SHA512 e29c98a7da5e329183b7eef86a66f9d6c3473051f64aa6e762714306148547eb0de4220824484071822a9a62bd01a62a09ab16bba4c26e4b847bfc2609728608 DIST pip-26.2.1.gh.tar.gz 9301563 BLAKE2B eb7b929de0e99c84c9b1257f1bf737f524eb6de01075d40b36519b082d8a49e107dbd0eded9a8bf737ce8f7d452c5e5cffb853b000d6ac2936b5b84dd607c770 SHA512 03a00bdc4387a4e7e4e54672e9198893500d279912ece4cd144f015c568c974ecc2c3c7bd6abf108df852302ddd49468ef0bc514ca4323ee037d754e2fbfaee0 +DIST pip-26.2.2.gh.tar.gz 9302280 BLAKE2B 862f37064e2a68be6ea672916fd02644928258547b1421fc5eecde442ac15242cf03d3b79f9a71fe6a8e9abc012ff7a9df74de27ce20197bf6876436a44fbb72 SHA512 b24050ef68595b4b1566614bb37908102b3ebaea5fefb33cbb30fde273c210750895a053ff58294f32450a6d09e4c92e555895362ced742a63cfea5720f2ea08 diff --git a/dev-python/ensurepip-pip/ensurepip-pip-26.2.2.ebuild b/dev-python/ensurepip-pip/ensurepip-pip-26.2.2.ebuild new file mode 100644 index 000000000000..5987ad429465 --- /dev/null +++ b/dev-python/ensurepip-pip/ensurepip-pip-26.2.2.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit-core +# PYTHON_COMPAT is used only for testing +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_REQ_USE="ssl(+),threads(+)" + +inherit distutils-r1 pypi + +FLIT_CORE_PV=3.12.0 + +MY_P=${P#ensurepip-} +DESCRIPTION="Shared pip wheel for ensurepip Python module" +HOMEPAGE=" + https://pip.pypa.io/en/stable/ + https://pypi.org/project/pip/ + https://github.com/pypa/pip/ +" +SRC_URI=" + https://github.com/pypa/pip/archive/${PV}.tar.gz -> ${MY_P}.gh.tar.gz + test? ( + $(pypi_wheel_url flit-core "${FLIT_CORE_PV}") + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="test test-rust" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + completion.bash || die + "${EPYTHON}" -c "${pipcmd}" completion --zsh > completion.zsh || die +} + +python_test() { + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then + einfo "Skipping tests on ${EPYTHON}" + return 0 + fi + + local EPYTEST_DESELECT=( + tests/functional/test_inspect.py::test_inspect_basic + # Internet + tests/functional/test_config_settings.py::test_backend_sees_config_via_sdist + tests/functional/test_install.py::test_double_install_fail + tests/functional/test_install.py::test_install_sdist_links + tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed + tests/functional/test_lock.py::test_lock_archive + tests/functional/test_lock.py::test_lock_vcs + # broken by system site-packages use + tests/functional/test_freeze.py::test_freeze_with_setuptools + tests/functional/test_install.py::test_install_subprocess_output_handling + tests/functional/test_pip_runner_script.py::test_runner_work_in_environments_with_no_pip + tests/functional/test_uninstall.py::test_basic_uninstall_distutils + tests/unit/test_base_command.py::test_base_command_global_tempdir_cleanup + tests/unit/test_base_command.py::test_base_command_local_tempdir_cleanup + tests/unit/test_base_command.py::test_base_command_provides_tempdir_helpers + # broken by unbundling + "tests/functional/test_debug.py::test_debug[vendored library versions:]" + tests/functional/test_debug.py::test_debug__library_versions + tests/functional/test_freeze.py::test_freeze_multiple_exclude_with_all + tests/functional/test_install.py::test_install_package_with_same_name_in_curdir + tests/functional/test_pep517.py::test_nested_builds + tests/functional/test_python_option.py::test_python_interpreter + tests/functional/test_uninstall.py::test_basic_uninstall + tests/functional/test_uninstall.py::test_uninstall_non_local_distutils + tests/functional/test_install.py::test_install_warns_on_unexpected_post_install_import + # TODO + tests/functional/test_build_env.py::test_build_env_can_still_access_python_tools_on_system_path + tests/functional/test_build_env.py::test_build_env_console_scripts_use_venv_python[subprocess] + tests/functional/test_build_env.py::test_build_env_isolation[venv-inprocess] + tests/functional/test_build_env.py::test_build_env_isolation[venv-subprocess] + tests/functional/test_build_env.py::test_build_env_requirements_check[venv] + tests/functional/test_self_update.py::test_self_update_editable + ) + local EPYTEST_IGNORE=( + # from upstream options + tests/tests_cache + # requires proxy.py + tests/functional/test_proxy.py + ) + + if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then + EPYTEST_DESELECT+=( + tests/functional/test_install.py::test_install_sends_client_cert + tests/functional/test_install_config.py::test_do_not_prompt_for_authentication + tests/functional/test_install_config.py::test_prompt_for_authentication + tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed + ) + fi + + local -x PIP_DISABLE_PIP_VERSION_CHECK=1 + local EPYTEST_PLUGINS=() + # rerunfailures because test suite breaks if packages are installed + # to system site-packages while it's running + local EPYTEST_RERUNS=5 + local EPYTEST_XDIST=1 + epytest -m "not network" -o addopts= -o tmp_path_retention_policy=all \ + --use-venv +} + +python_install_all() { + local DOCS=( AUTHORS.txt docs/html/**/*.rst ) + distutils-r1_python_install_all + + newbashcomp completion.bash pip + newzshcomp completion.zsh _pip +} diff --git a/dev-python/pycares/Manifest b/dev-python/pycares/Manifest index f3c51e8ae3ca..aeac2c31fb42 100644 --- a/dev-python/pycares/Manifest +++ b/dev-python/pycares/Manifest @@ -1,3 +1,4 @@ DIST pycares-5.0.1.tar.gz 652222 BLAKE2B 29680da5ce1bfef6bd3fa6ad0d03cbbd4948cccf7d7d4deaa44960ccb33085b2ac3f8de7411239062e829cd8920fee84e7a5ce41e1e2d1da974aba10e1e60b33 SHA512 3cb23e36e9526b44398b1ffdf9223f0eec5f6e085b6276188329239d1e9a9ee173239691e39cbc9d7a4854a54e181bd200e2011bb3bf6741f79be81b46665348 DIST pycares-5.1.0.tar.gz 674882 BLAKE2B 670de260fe4d6a34d8fa20ffdf6ef21f6753adb0d2e37aacb04dfe1984a0f4112af4dd7f3eee1341c7b82d907ce123db5a892e4d095cc11e3f8aee9993ef2ad0 SHA512 858d50f4620d12fb9ad4a7c8dc6d150da8a7ac39c4618672c995e8a4fe685a30ad1723f419a99b8c2a71d915b3f7af54b0726819907c4a343239c2f5d754a642 DIST pycares-5.2.0.tar.gz 675045 BLAKE2B f03794a3dd6aad9e903d686529c8c846174a0f61056cd25df36fd15d6d9ebd2e289e966c1f99baab33d201f0c1f71bd15e4071366d07642dfecad50154ee3ac3 SHA512 4e7a7981c3c7c5c86fde5c8d8547a361beca1615626b5ad97f707b6b1a94f63e0bb07745232d13f4f4de9961b6ab06007c5bbc789ded8910fcf3bd333ac47728 +DIST pycares-5.2.1.tar.gz 723791 BLAKE2B 51322eda454c9b1a956edbbe57a55621addabd66c9f8a160844539ed8542879f29e0bf3e66c6c7dcde79bb1dd0b90eaf22163f9982e50c6a211b04a9fb088ef7 SHA512 4e7d6969525cea436798cd0e003eb0fe7cc649e827feffab1b51035ef4a65e78e094117d991c31c2a0716f239d14ce3a00a426d2394fa22d75864a564235698c diff --git a/dev-python/pycares/pycares-5.2.1.ebuild b/dev-python/pycares/pycares-5.2.1.ebuild new file mode 100644 index 000000000000..372158830647 --- /dev/null +++ b/dev-python/pycares/pycares-5.2.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python interface for c-ares" +HOMEPAGE=" + https://github.com/saghul/pycares/ + https://pypi.org/project/pycares/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test" +# Tests fail with network-sandbox, since they try to resolve google.com +PROPERTIES="test_network" +RESTRICT="test" + +DEPEND=" + net-dns/c-ares:= +" +BDEPEND=" + dev-python/cffi[${PYTHON_USEDEP}] +" +RDEPEND=" + dev-python/idna[${PYTHON_USEDEP}] + ${DEPEND} + ${BDEPEND} +" + +EPYTEST_PLUGINS=() +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +export PYCARES_USE_SYSTEM_LIB=1 + +EPYTEST_DESELECT=( + # https://github.com/saghul/pycares/issues/287 + # looks like forgotten to update the expected class + tests/test_all.py::DNSTest::test_idna2008_encoding +) diff --git a/dev-python/pydantic-settings/Manifest b/dev-python/pydantic-settings/Manifest index dede56afe0f8..1c45e0d073f1 100644 --- a/dev-python/pydantic-settings/Manifest +++ b/dev-python/pydantic-settings/Manifest @@ -2,3 +2,5 @@ DIST pydantic_settings-2.15.0.tar.gz 261253 BLAKE2B aa1157d8ec21ecde15039d47f42b DIST pydantic_settings-2.15.0.tar.gz.provenance 10063 BLAKE2B c3641f3e2a7c3228432642986199e848da9fdea371e32de40c8ebd9dd0b3ba8ae27694c116fa04dedf8a37fb5a780d8a84777d848a4838d724a180ac66e94473 SHA512 a403278deca993c39e789b02ecc9e2493e1220f5e75c4324abddbcd4a0c9e9f2f7f8ed1aed36c3f5687a031789fe17fd2f5a6b0fbc8ec6f3641db3fe64f98255 DIST pydantic_settings-2.16.0.tar.gz 301031 BLAKE2B d29990234fb6dbdd314cad75eb27df29fbbf01efeb068bd1b31c58daefbb2e2a7789304b1decf2e6a3ec48fc068189663fef633775b6efbf1f0d19d60c4f68a4 SHA512 ab66b0d217d8b4a95ba1471da8d4732632394fb23e128f774b46bf53155af824a16a7bbbaff047a992aa4db36cce9a4026cde467b5bb25c610fd316837c77100 DIST pydantic_settings-2.16.0.tar.gz.provenance 9906 BLAKE2B 186a7fd34d1f5c2e1aedb0fe84abed1148742318f09c5e1ce3f0b6fa9d3d371766f9ceb5e1c9c34c80fb7212c483c4beafd17f3884a2c248e0d875a19e098d60 SHA512 36fe224d730e77b3dbf521b94149bfdb6fe74a94566f230b45bac3303da26163b2eef4dd21a90316df142067650df31df04bc9f85fc7a39033953fcec4a553e3 +DIST pydantic_settings-2.16.1.tar.gz 303436 BLAKE2B 254866be4654cbaf5fdb55b160d6794e13ccadd62d13298481c6c027ad090c083ce1f970591f4573acdf10a575ac03fbb79e3b8c0f19fb862d4c5861788eae05 SHA512 f6b164a995d5eff3746541f1721e9f47eb940e302f008a69b88dc3b4ab5475c24e4c0d3a40eb5e057ba0ca36907dddf6eee113a76e3e70b8df27005b739d30c8 +DIST pydantic_settings-2.16.1.tar.gz.provenance 10047 BLAKE2B 9b200587324c5503fb00bfcbce15b0d5668b66d36c18def94bf28a5d36f8fb3d330d9f9486fca8a2caf99b4a4f685d8f153f7fe89211f74bf96ddb4226558101 SHA512 b5c649a2b99a9f89200a29c5e4b9c9d9c51923925e0c80cb02de8eb83b6abb517107bbe82511bd3954559539f2c9c9cfb2e9cc6786aaa8dcaa72445fe3c0e763 diff --git a/dev-python/pydantic-settings/pydantic-settings-2.16.1.ebuild b/dev-python/pydantic-settings/pydantic-settings-2.16.1.ebuild new file mode 100644 index 000000000000..1971884da040 --- /dev/null +++ b/dev-python/pydantic-settings/pydantic-settings-2.16.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYPI_VERIFY_REPO=https://github.com/pydantic/pydantic-settings +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Settings management using Pydantic" +HOMEPAGE=" + https://github.com/pydantic/pydantic-settings/ + https://pypi.org/project/pydantic-settings/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" + +RDEPEND=" + >=dev-python/pydantic-2.7.0[${PYTHON_USEDEP}] + >=dev-python/python-dotenv-1.2.2[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.0.0[${PYTHON_USEDEP}] + >=dev-python/typing-inspection-0.4.0[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGINS=( pytest-mock ) +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # TODO; can't repro in venv + tests/test_precedence_and_merging.py::test_merging_preserves_earlier_values +) + +EPYTEST_IGNORE=( + # require pytest-examples + tests/test_docs.py +) diff --git a/dev-python/pyrate-limiter/Manifest b/dev-python/pyrate-limiter/Manifest index 726b8c8ea7b9..ee4a78a05943 100644 --- a/dev-python/pyrate-limiter/Manifest +++ b/dev-python/pyrate-limiter/Manifest @@ -1,4 +1,4 @@ -DIST pyrate_limiter-4.4.0.tar.gz 90955 BLAKE2B 1ba672f860f6cd7f537a6e0c67bdaa619c1ef4e3b0d074b0e6c6c2c6aa64471af9eb4f035a17393bd580fd2003060c65a5b51b0aab370cc059d63243d325f588 SHA512 e4b6d63ebaec949c154f117ab30d04e3b94cb4b771299a08ba8bad1bd92ed004ceb89c352c66914c9fb8ae29dbe33b8ef5103a74d174dc83398a45f733ac5f84 -DIST pyrate_limiter-4.4.0.tar.gz.provenance 9907 BLAKE2B 44623ed73e9c1d358712fc5df80a87952572a3a9c86dc7beb34d6a873aef69c802891ba5d541bb14ffc6a75346f387df34292103f34329b42f09b4d4fb8e06f0 SHA512 4904cb915dfc2120b53554620a7e033ee35e84ff61cd84433e01d28bb0edcd9c854d49dc19a765f5a20fb69555f70bfed8e8b0b2da874f07d38c8a6eae1084e4 DIST pyrate_limiter-4.5.0.tar.gz 123240 BLAKE2B 34df6cd1cd3418eab417a8004387e86d4a8a69040ca4b86b5792e5b142b3112a41398848bc6f8c593486d832663f29f36ed5d198470950cd27f9d4ec62ed3e7e SHA512 35ee3bef555260df68ad1881d64b72f7a51535e164abf640c133ac96c5caa4073b56a43edc30cdb982d1e322f9b01f6eccc8edbb6d94be84046be11a305074b7 DIST pyrate_limiter-4.5.0.tar.gz.provenance 9909 BLAKE2B 87f0804069814fb29851a7dd7e9ae2d79f72d820aae7e87487f807192213d871e01c7a9a83ecc4ea4cf702b3bf3bc9a76926f52b7109aceaf49c0e112d69b5b5 SHA512 af120195db71c1a7407238188319d9ce6acae15c9b59998f5aa6cfdf244d837ee10e79635ef9388b28e8811eb781018151ac3cc577fe587b78618e777f57ea55 +DIST pyrate_limiter-4.5.1.tar.gz 129966 BLAKE2B 713aaf1314a28d9fc44a3f693c72d1c0944cced559b12334c674b5c167fc0be32484e0e0d0cf8321f85cb0285bb8dc6f0d1f0a5e5dc78c897ef8c4b223a715b6 SHA512 3f0663ef99c347750ee1cc4e7a629d64b898b4dcf92760672e3cab3d7399430caf6ada1c4e5fb9f2af0fff4e60c9e1546878bd7ed8a34f9f297653fef9cd6140 +DIST pyrate_limiter-4.5.1.tar.gz.provenance 10028 BLAKE2B 4ddc49ab21420835d502926714ba006ff16e1154ba577112ac6d83b9356b582a325791d7594bd8869fee4145ff2b37535c3dacdcb4d2a8bbe4f829436df7e96e SHA512 b1ced56f02aa6202aa6353773a53cf6e5e378aba3293c2e31b069947f41e13dce8cf03418305634f26fab69f1a180d2b31904a6da5ed7d6b7c4d2abc7f8946c6 diff --git a/dev-python/pyrate-limiter/pyrate-limiter-4.4.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-4.4.0.ebuild deleted file mode 100644 index f9afcbb57539..000000000000 --- a/dev-python/pyrate-limiter/pyrate-limiter-4.4.0.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_VERIFY_REPO=https://github.com/vutran1710/PyrateLimiter -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family" -HOMEPAGE=" - https://github.com/vutran1710/PyrateLimiter/ - https://pypi.org/project/pyrate-limiter/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm64 ~x86" - -RDEPEND=" - dev-python/filelock[${PYTHON_USEDEP}] - dev-python/redis[${PYTHON_USEDEP}] -" - -BDEPEND=" - test? ( - dev-db/redis - dev-python/aiohttp[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - ) -" - -EPYTEST_DESELECT=( - # Optional dependency redis-py-cluster not packaged - "tests/test_02.py::test_redis_cluster" -) - -EPYTEST_PLUGINS=( pytest-{asyncio,rerunfailures} ) -EPYTEST_RERUNS=5 -: "${EPYTEST_TIMEOUT:=60}" -EPYTEST_XDIST=1 - -distutils_enable_sphinx docs \ - dev-python/sphinx-autodoc-typehints \ - dev-python/sphinx-copybutton \ - dev-python/furo \ - dev-python/myst-parser \ - dev-python/sphinxcontrib-apidoc \ - dev-python/sphinxcontrib-mermaid -distutils_enable_tests pytest - -src_test() { - local redis_pid="${T}"/redis.pid - local redis_port=6379 - - # Spawn Redis itself for testing purposes - einfo "Spawning Redis" - einfo "NOTE: Port ${redis_port} must be free" - "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server" - daemonize yes - pidfile ${redis_pid} - port ${redis_port} - bind 127.0.0.1 ::1 - ${extra_conf} - EOF - - # Run the tests - distutils-r1_src_test - - # Clean up afterwards - kill "$(<"${redis_pid}")" || die -} - -python_test() { - # postgres tests require psycopg-pool - epytest -k "not postgres" -} diff --git a/dev-python/pyrate-limiter/pyrate-limiter-4.5.1.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-4.5.1.ebuild new file mode 100644 index 000000000000..bc734d16c191 --- /dev/null +++ b/dev-python/pyrate-limiter/pyrate-limiter-4.5.1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYPI_VERIFY_REPO=https://github.com/vutran1710/PyrateLimiter +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family" +HOMEPAGE=" + https://github.com/vutran1710/PyrateLimiter/ + https://pypi.org/project/pyrate-limiter/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND=" + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/redis[${PYTHON_USEDEP}] +" + +BDEPEND=" + test? ( + dev-db/redis + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" + +EPYTEST_DESELECT=( + # Optional dependency redis-py-cluster not packaged + "tests/test_02.py::test_redis_cluster" +) + +EPYTEST_PLUGINS=( pytest-{asyncio,rerunfailures} ) +EPYTEST_RERUNS=5 +: "${EPYTEST_TIMEOUT:=60}" +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +distutils_enable_sphinx docs \ + dev-python/sphinx-autodoc-typehints \ + dev-python/sphinx-copybutton \ + dev-python/furo \ + dev-python/myst-parser \ + dev-python/sphinxcontrib-apidoc \ + dev-python/sphinxcontrib-mermaid + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + # Spawn Redis itself for testing purposes + einfo "Spawning Redis" + einfo "NOTE: Port ${redis_port} must be free" + "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server" + daemonize yes + pidfile ${redis_pid} + port ${redis_port} + bind 127.0.0.1 ::1 + ${extra_conf} + EOF + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${redis_pid}")" || die +} + +python_test() { + # postgres tests require psycopg-pool + epytest -k "not postgres" +} diff --git a/dev-python/python-gammu/Manifest b/dev-python/python-gammu/Manifest index efb841727de0..7c639773dc7b 100644 --- a/dev-python/python-gammu/Manifest +++ b/dev-python/python-gammu/Manifest @@ -1,2 +1,3 @@ DIST python-gammu-3.4.1.gh.tar.gz 153695 BLAKE2B 7159b635266524c5b3c4f734e28ca81d676f3009c6244cfea4b7c2cd9a00de35c3144d7d21e3f3d5b8495abe14219d76b7f77afb1cf1738f3aa5202f7add86a6 SHA512 a74056bdf9b9ab84079a08dae62563fcee8045dabcb80505116feaaacaa98ddbd1101decee33ae90af8eb71b84df6c6470ff725efe321f19377fa46258e63ded DIST python-gammu-3.5.0.gh.tar.gz 163017 BLAKE2B 0acc8ba0e3e3d1f7b59703f332f4a0b67b7c8a044c9fe8fb9db63c3fb4fa0bcf92263bbd5df58b28e2a89ce52c4064c33488ebfe4201f8736be185d9d0367ba1 SHA512 88b5171750a94057a42651f0f7b2df5417980104da558b1205c52e85a7886d900fd58c87f3ef44286d6f5234df38939c7709e15406332007d566dfd7343b11c0 +DIST python-gammu-3.5.1.gh.tar.gz 163243 BLAKE2B 1d246bb71ac9e6f0d1afebfd4288aea5651b069e15c95ef55e197bc9b72720e059cecfc969232a9e78bf241ba80e754c085d45e06759ce42200e186bd22ef81c SHA512 8df5eb962e40826992940a61a9e56a92ecdec125ecdf65bdbf786e68394d8e36955c92d82068ee0b3734ed0c7202bd2f36cf4226b18db86f394bb8d17534d145 diff --git a/dev-python/python-gammu/python-gammu-3.5.1.ebuild b/dev-python/python-gammu/python-gammu-3.5.1.ebuild new file mode 100644 index 000000000000..c174431c91a2 --- /dev/null +++ b/dev-python/python-gammu/python-gammu-3.5.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 + +DESCRIPTION="Python bindings for Gammu" +HOMEPAGE=" + https://wammu.eu/python-gammu/ + https://github.com/gammu/python-gammu/ + https://pypi.org/project/python-gammu/ +" +SRC_URI=" + https://github.com/gammu/python-gammu/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples test" +RESTRICT="!test? ( test )" + +DEPEND=" + >=app-mobilephone/gammu-1.44.1 +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + virtual/pkgconfig + test? ( + $(python_gen_impl_dep sqlite) + app-mobilephone/gammu[dbi] + ) +" + +DOCS=( AUTHORS NEWS.rst README.rst ) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + rm -rf gammu || die + epytest +} + +python_install_all() { + distutils-r1_python_install_all + if use examples; then + docompress -x /usr/share/doc/${P}/examples + dodoc -r examples + fi +} diff --git a/dev-python/python-pkcs11/Manifest b/dev-python/python-pkcs11/Manifest index 1dad23e73363..feb72ee9575f 100644 --- a/dev-python/python-pkcs11/Manifest +++ b/dev-python/python-pkcs11/Manifest @@ -1,4 +1,4 @@ DIST python_pkcs11-0.10.0.tar.gz 207600 BLAKE2B e2011a9acb95b0db9e13e3e4493a4fa0591f04784763316ed54502305b5834122fb28ccac893781b2485ca474dade56ca2045b239746114fb24c2204f9ae10fd SHA512 3e60a087696ba6f2c09c4ffaf647421d0fc32cb5de2fce926a1788c9f91fa89867fad352ac00c4975c9fe06e3be557777b0224ebecd631eeea8c778a9bc7db6e DIST python_pkcs11-0.10.0.tar.gz.provenance 9613 BLAKE2B d3a329b6a51a1fb502086830e34763c76a65a37fd6f2ffccb9ec6dbdfef1e03e445880d1fec504487e1ae0cddab353acad03c1602a64abb9b8b4aadc3214fe9c SHA512 7992d02968333a52cfb92a7c2a3ef7d21ddd4def15235287068d52d9f55d615cfd631d48c4af08a8383cb98aa47ebecfee77e8d0c8f96ffa72968af685dc1beb -DIST python_pkcs11-0.9.5.tar.gz 194453 BLAKE2B 6f66073c81530e04254a70625a03070c483f222824fdea3dbfb5e8fc9799b3d475e67be5dde83f596d7ca0e658313b148bf3768111dbd8eee87e0549605b2ae1 SHA512 be9dc6b274cff71c2e2290768181c2cb91de7089ed27619144914ea44067f6746c1094b755b7a719f260a1e4c5f799c1844ebb3f5912c1fbcba77efa73f6eb73 -DIST python_pkcs11-0.9.5.tar.gz.provenance 9689 BLAKE2B 9945987fa757769bd75036420a4add670be7b0b9ac5f826338de5726a425e385b493a898ba58890310a34dbc052d1ba595da89d6416cc8dcb2161c595ba1733f SHA512 f37d60b1e6f2f51a3c5e34598ed3738aa6cea5da380719ddcc314422fb5a7ef7ce33c670e5edee19f987684767a02b61ac05e9d0b33871aad023be868f90640a +DIST python_pkcs11-0.10.1.tar.gz 207635 BLAKE2B d71676a964e011ddf7a1dfc2db4e417844765f19e12534e03c6c5974095ef18fc4d8728b43c7cb6b7321ddb9d49679ad051c908f39e30998921267beb842e7f8 SHA512 23f99aa8d463c0998c6dbc9cae43953f7b5d0d8fd554099a475385d478e50f78adbae64c5f5bb49411ca0be1913d7df849da05e5ed42e0c42da09a77dd633076 +DIST python_pkcs11-0.10.1.tar.gz.provenance 9689 BLAKE2B 9f1c39f89f8741f50e509861e8c9346e32fc09430c1ef1a06e2cdcdb2bed18af0e282b0bbb4f327c25e036f487cf258a89aef146b44413518e509d1c13bf54df SHA512 339a9281a3fe9ba9c6eb88b13ec40b9041abdd2fac10bfe41e389b8cab83ba61983251ac3ce1971e5ed6bdb5cf2b5500c5b991da674a3b4fdae696b50e17dc96 diff --git a/dev-python/python-pkcs11/python-pkcs11-0.10.1.ebuild b/dev-python/python-pkcs11/python-pkcs11-0.10.1.ebuild new file mode 100644 index 000000000000..8dc002629cc9 --- /dev/null +++ b/dev-python/python-pkcs11/python-pkcs11-0.10.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_EXT=1 +PYPI_VERIFY_REPO=https://github.com/pyauth/python-pkcs11 +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 edo pypi + +DESCRIPTION="PKCS#11/Cryptoki support for Python" +HOMEPAGE=" + https://github.com/pyauth/python-pkcs11/ + https://pypi.org/project/python-pkcs11/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-python/asn1crypto[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + dev-libs/openssl + dev-libs/softhsm + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/parameterized[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest +distutils_enable_sphinx docs dev-python/sphinx-rtd-theme + +src_test() { + local -x PKCS11_MODULE="${BROOT}/usr/$(get_libdir)/softhsm/libsofthsm2.so" + local -x PKCS11_TOKEN_LABEL="TEST" + local -x PKCS11_TOKEN_PIN="1234" + local -x PKCS11_TOKEN_SO_PIN="5678" + + mkdir -p "${HOME}/.config/softhsm2" || die + cat > "${HOME}/.config/softhsm2/softhsm2.conf" <<- EOF || die "Failed to create config" + directories.tokendir = ${T} + objectstore.backend = file + EOF + + edo softhsm2-util --init-token --free \ + --label ${PKCS11_TOKEN_LABEL} \ + --pin ${PKCS11_TOKEN_PIN} \ + --so-pin ${PKCS11_TOKEN_SO_PIN} + + rm -r pkcs11 || die + distutils-r1_src_test +} diff --git a/dev-python/python-pkcs11/python-pkcs11-0.9.5.ebuild b/dev-python/python-pkcs11/python-pkcs11-0.9.5.ebuild deleted file mode 100644 index 8dc002629cc9..000000000000 --- a/dev-python/python-pkcs11/python-pkcs11-0.9.5.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -DISTUTILS_EXT=1 -PYPI_VERIFY_REPO=https://github.com/pyauth/python-pkcs11 -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 edo pypi - -DESCRIPTION="PKCS#11/Cryptoki support for Python" -HOMEPAGE=" - https://github.com/pyauth/python-pkcs11/ - https://pypi.org/project/python-pkcs11/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -RDEPEND=" - dev-python/asn1crypto[${PYTHON_USEDEP}] -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-python/cython[${PYTHON_USEDEP}] - dev-python/setuptools-scm[${PYTHON_USEDEP}] - test? ( - dev-libs/openssl - dev-libs/softhsm - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/parameterized[${PYTHON_USEDEP}] - ) -" - -EPYTEST_PLUGINS=() -distutils_enable_tests pytest -distutils_enable_sphinx docs dev-python/sphinx-rtd-theme - -src_test() { - local -x PKCS11_MODULE="${BROOT}/usr/$(get_libdir)/softhsm/libsofthsm2.so" - local -x PKCS11_TOKEN_LABEL="TEST" - local -x PKCS11_TOKEN_PIN="1234" - local -x PKCS11_TOKEN_SO_PIN="5678" - - mkdir -p "${HOME}/.config/softhsm2" || die - cat > "${HOME}/.config/softhsm2/softhsm2.conf" <<- EOF || die "Failed to create config" - directories.tokendir = ${T} - objectstore.backend = file - EOF - - edo softhsm2-util --init-token --free \ - --label ${PKCS11_TOKEN_LABEL} \ - --pin ${PKCS11_TOKEN_PIN} \ - --so-pin ${PKCS11_TOKEN_SO_PIN} - - rm -r pkcs11 || die - distutils-r1_src_test -} diff --git a/dev-python/python-utils/Manifest b/dev-python/python-utils/Manifest index 558da6db40ba..e717cdea2aba 100644 --- a/dev-python/python-utils/Manifest +++ b/dev-python/python-utils/Manifest @@ -8,3 +8,5 @@ DIST python_utils-4.1.2.tar.gz 79647 BLAKE2B ef5df83d75ee7991832cb8b9a6273e94281 DIST python_utils-4.1.2.tar.gz.provenance 9629 BLAKE2B f73f96ad9f6b88446a83798e554afe1171d68308dab6df060ba69d43a01b9ada1c7d8a32acdf0713b2ae651a5b053d15ab1850695b2f4f8a98685cb9b9d099a7 SHA512 7e146619a3f0d83f39cb37b34a87145023ce29becbb4263855b8a83160393eac1f0789bd56632d3a3ce69be37ff610125dab07097d39949d416c7257ca058223 DIST python_utils-4.1.3.tar.gz 80215 BLAKE2B a1599bc07579805e3ba7a2e7b001cce0379564448a3422401dfcff4ecc83064cc0792659ef861f7c429c7ef2d5aa715dc4197907070e3650facffdb9cf43ac17 SHA512 8f2b8f04c30557425aff53963b273f20ff1fe93727b31936fa77c232a0686684ea94abdaff0614cf14c79d1719b59af1c3fa7f04a5c8127f036140a20decc242 DIST python_utils-4.1.3.tar.gz.provenance 9398 BLAKE2B 9196ab28b097c4a0b2352d03803667661509871201f4ceff3f1c216e7f9efd050da1ebbce7c83116a5903a6598ac07fcf8e7ca7d611e3d7a515ca5d428659a3c SHA512 7427a84db0337b48f9d497012620f227c0bab23b92a91c00b437bc68e1923ac171f60b6faec39c374fbb74111ba5f5e68d045e3196271549ecc0681e87560eb4 +DIST python_utils-4.1.4.tar.gz 80130 BLAKE2B 9ab469a656ede0fa8423db42e7699fbbd3d93a530ef030c225affe4c90a883882b19cd4f2a63214f687ae2828b39283c705afb17d0f9d7840dd543c1ecf34d05 SHA512 42867b6fcdde78da6f0e073a6095dff33cbcd8d6acc86c3fb7a4336297c866e5c9672dd9573d8d2f636e3f637757810a0d316689ed5b4dac60a2b8aca9700d5e +DIST python_utils-4.1.4.tar.gz.provenance 9586 BLAKE2B 8309c282fe4835e82391aca7eedf5feef8e131bdbcff9e3def042961b56df68c3ca2d0141f87ad93239290d0b860569081a3a84af58f3350ac7eb778ce152e45 SHA512 54cbc11606f638a29177d8441e3700c1dcf18f5538d5a729b13b08330929e4157264f51faeb4712bfc82aeb59b36f5d4d4ccc9d3739d2f4e8e187d46b6d9d0b9 diff --git a/dev-python/python-utils/python-utils-4.1.4.ebuild b/dev-python/python-utils/python-utils-4.1.4.ebuild new file mode 100644 index 000000000000..05d102d2521e --- /dev/null +++ b/dev-python/python-utils/python-utils-4.1.4.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=uv-build +PYPI_VERIFY_REPO=https://github.com/wolph/python-utils +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Collection of small Python functions & classes" +HOMEPAGE=" + https://github.com/WoLpH/python-utils/ + https://pypi.org/project/python-utils/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND=" + dev-python/typing-extensions[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGINS=( pytest-asyncio ) +distutils_enable_tests pytest + +EPYTEST_IGNORE=( + docs + _python_utils_tests/test_logger.py + python_utils/loguru.py +) + +EPYTEST_DESELECT=( + # fragile + _python_utils_tests/test_time.py::test_timeout_generator +) + +python_prepare_all() { + sed -i -e '/--cov/d' pyproject.toml || die + distutils-r1_python_prepare_all +} diff --git a/dev-python/securesystemslib/Manifest b/dev-python/securesystemslib/Manifest index fbb4fe2810c6..61230c69f69a 100644 --- a/dev-python/securesystemslib/Manifest +++ b/dev-python/securesystemslib/Manifest @@ -1,6 +1,4 @@ -DIST securesystemslib-1.4.0.tar.gz 934332 BLAKE2B 3e1ca3556da70e4c70041e902655e74a207ed43519a141d51d8b64cd1d57338bb63cfd659b50ac8e303fdb2abe7ccdab7e73613b170b6d03bf5adce8db630254 SHA512 b2d45e24f131f07392476beaad21587f506352c98c8ddb3f60cc52bffb6cd0f299be3edb28276f55703548392b8f23ed5155965b21df5500bdf100bfcd7406ad -DIST securesystemslib-1.4.0.tar.gz.provenance 10069 BLAKE2B e63f55a768b84875fc28920e9db7a5b98096bca53d8bb4e83344e93ed1dc92fa9d89402952f433c8101f970f6362524326a6bec68339ac68deaeed8cc0f49c75 SHA512 a79fdfebc7e7c8732b4bab22ba58a26ad16d07b2412b942daca73e6ecfa92685e855073ea73ef1a1aa51b5136ced69a62ca2dadbc497a9298336680d3b2e90e9 -DIST securesystemslib-1.5.0.tar.gz 945978 BLAKE2B 0b60f6dba91c93c8dbe94fcbbf58ec07cd2f821c980366ecbcb073bf36c998ecad50b2e26b4d03cbca18e187b39b5f2b179521c3adb83065a98d6ed412513a87 SHA512 437303996bd36f3880061b0c5b5b33a994c5bd94b77117de78e25933586c46133cbff7aec260de8f387b142ca6557e679c6a18d59180ffacfc1938a0679a3eda -DIST securesystemslib-1.5.0.tar.gz.provenance 9938 BLAKE2B c0d0240993dba23ae2de6481c87cbee39407c129e2c9fc9fdb0eba13db9ce3f526a3fc58d16e7263f2ba551da6fb8682f3f0fb0eda4583a6e26519329351ae6a SHA512 8242c8fc280f520494521495d9ed753aaa62faa64c5e36e0d11b7ff1784ac67bb667fcf9350d80c1ff7ccf3ef231db15572d45c3dc843f84408c40f96580b397 DIST securesystemslib-1.5.1.tar.gz 947087 BLAKE2B c99016cfcdf264b24160b7a5455207028ad3539b246969ed65ebfc868df583396e089d67e71bc6fbbb8b09195bde4f96681dcb6ed81cfc3a7d61a1d1b6c427e2 SHA512 90aa2a51fefac4fe05d7609459dac3c82a29589a627ca5e8055d85fd6145b92abb14796934b47fb3ecff96e1a495c06e6375b448cf13ef1f04ddfb3a3385d504 DIST securesystemslib-1.5.1.tar.gz.provenance 10169 BLAKE2B e132f65da0b33b91011ce1f0688b31aa81e1be35f4198653b64037c4cba8d8851eba9b40670d3d6611e5023df72d52326a3d17b4d43ca53cf5b2836e54609a14 SHA512 4a9a2a6ba4145424f08cb8e016b7328d2dcc281ff00a983da6007ab9648d523ece604ef1f10b27350accbd75c50f32c4507905731b7acaae98c70e92ac53776e +DIST securesystemslib-1.6.0.tar.gz 950902 BLAKE2B 40d30628ee7a51f42381b95da9129429d3096812562501359814fa55931ca4c1b69076ed84ee9310942d7c8af532e5e73db44b5e4e97275f004051d457753f34 SHA512 0eb228431ed771480065659e8f75c36681adc1fded58c05e5a0409f7be4f7c58b2ad950d55a65a13e961c61d96f4085723355dcba0f057ebf5a22104050d6e7c +DIST securesystemslib-1.6.0.tar.gz.provenance 10190 BLAKE2B 583da29aa49aa9e57255563b055bfeaad33e40bd5cfa1ef9274154c86c9b43ae84aa5bfb6d2ccac347a2660fe3a0e0812a6f6a3dc8ba6842ac34750fc770d0b3 SHA512 96398d1c2309f200b2c8f7a9564a407f7232071c29845483eac5e8f6706c7f784f2245e4ea4d3ab9a37e542f743a6561f9dbae3cf27a1048097d9588bde3fc5e diff --git a/dev-python/securesystemslib/securesystemslib-1.4.0.ebuild b/dev-python/securesystemslib/securesystemslib-1.4.0.ebuild deleted file mode 100644 index d992b4f0fe31..000000000000 --- a/dev-python/securesystemslib/securesystemslib-1.4.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2024-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_VERIFY_REPO=https://github.com/secure-systems-lab/securesystemslib -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Cryptographic routines for Secure Systems Lab projects at NYU" -HOMEPAGE=" - https://github.com/secure-systems-lab/securesystemslib/ - https://pypi.org/project/securesystemslib/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -RDEPEND=" - >=dev-python/cryptography-40.0.0[${PYTHON_USEDEP}] -" - -EPYTEST_PLUGINS=() -distutils_enable_tests pytest - -# TODO: unbundle https://github.com/pyca/ed25519 (wtf? not on PyPI?) - -python_test() { - local EPYTEST_DESELECT=( - # requires pyspx - tests/test_signer.py::TestSphincs::test_sphincs - ) - local EPYTEST_IGNORE=( - # requires PyKCS11 - tests/test_hsm_signer.py - ) - - epytest tests -} diff --git a/dev-python/securesystemslib/securesystemslib-1.5.0.ebuild b/dev-python/securesystemslib/securesystemslib-1.5.0.ebuild deleted file mode 100644 index cd15fa53a520..000000000000 --- a/dev-python/securesystemslib/securesystemslib-1.5.0.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2024-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_VERIFY_REPO=https://github.com/secure-systems-lab/securesystemslib -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Cryptographic routines for Secure Systems Lab projects at NYU" -HOMEPAGE=" - https://github.com/secure-systems-lab/securesystemslib/ - https://pypi.org/project/securesystemslib/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -RDEPEND=" - >=dev-python/cryptography-48.0.0[${PYTHON_USEDEP}] -" - -EPYTEST_PLUGINS=() -distutils_enable_tests pytest - -# TODO: unbundle https://github.com/pyca/ed25519 (wtf? not on PyPI?) - -python_test() { - local EPYTEST_DESELECT=( - # requires pyspx - tests/test_signer.py::TestSphincs::test_sphincs - ) - local EPYTEST_IGNORE=( - # requires PyKCS11 - tests/test_hsm_signer.py - # requires keylet - tests/test_tkey_signer.py - ) - - epytest tests -} diff --git a/dev-python/securesystemslib/securesystemslib-1.6.0.ebuild b/dev-python/securesystemslib/securesystemslib-1.6.0.ebuild new file mode 100644 index 000000000000..85f990a37fe9 --- /dev/null +++ b/dev-python/securesystemslib/securesystemslib-1.6.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYPI_VERIFY_REPO=https://github.com/secure-systems-lab/securesystemslib +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Cryptographic routines for Secure Systems Lab projects at NYU" +HOMEPAGE=" + https://github.com/secure-systems-lab/securesystemslib/ + https://pypi.org/project/securesystemslib/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + >=dev-python/cryptography-48.0.0[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +# TODO: unbundle https://github.com/pyca/ed25519 (wtf? not on PyPI?) + +python_test() { + local EPYTEST_DESELECT=( + # requires pyspx + tests/test_signer.py::TestSphincs::test_sphincs + ) + local EPYTEST_IGNORE=( + # requires PyKCS11 + tests/test_hsm_signer.py + # requires keylet + tests/test_tkey_signer.py + ) + + epytest tests +} diff --git a/dev-python/setuptools/Manifest b/dev-python/setuptools/Manifest index d34dc560b078..905607716c8b 100644 --- a/dev-python/setuptools/Manifest +++ b/dev-python/setuptools/Manifest @@ -1,3 +1,4 @@ DIST setuptools-79.0.1.tar.gz 1367909 BLAKE2B d495a22753400b3b0ef71423e2c9b5adaad1a065d1f9638b5da8161b29c453495701c3efaa3abd2482777e186ba992bd7b57090dfc711d9cdfdaa8254616a8ff SHA512 5b68d7cc775f4318e178f7d7f69c60a01b1abc607411e88c88e3507a08bd85eed241b915d4be5f3ada90df4b68718056c2ba032943c1f53fe68d171c7d728179 DIST setuptools-84.0.0.tar.gz 1168449 BLAKE2B b4dc28c42ea271dc2cac7f7218bec0819d043d52100df8c1ac7672092c2f45b62e731d18d76bc00a6392b60f8afb8c1f7e961050ee23b0e1c77bbd94e42481db SHA512 67721834362dd88c256cbd523413dbdcb99ca871bcc873ffa29c7667687973e1d5e15b0ea8ef4529711418b14d3d660771846877543001d4ab0fe8b4585ac9ad DIST setuptools-84.2.0.tar.gz 1227656 BLAKE2B c6f89587af28b64029dfcc0a3a511e30abec3b60d00a272f699ff2df2032e0cdc04c546b9bac6a8928cf7a6cbcd3a3a856815ee18bcc178f05a53fcc59bee6eb SHA512 ac5c9daf5cf445a2bb220072efed426e0af38caa601d544389181a3f53bc39575cf0cf7aa69addca239eb8c8f51e3410cad0b9ff9c9787d0c4c6a54fbc3a256e +DIST setuptools-84.2.1.tar.gz 1230289 BLAKE2B fcac5229c8764d97159934030e996a6791e508b363a13f8358471256f2a73168ff177a52fcda57be308ef1062b0e2b9e78fcc68616e12613c939e818b5208647 SHA512 9e4c9a9ec45c69abe6f8953b6c6490eb1ffe2aea9a666beab45bdd7d5e2acbb2dbfddf6d7797c01c3e5a47b10bee519c029587fb45000ebb5c5b72468498ef0b diff --git a/dev-python/setuptools/setuptools-84.2.1.ebuild b/dev-python/setuptools/setuptools-84.2.1.ebuild new file mode 100644 index 000000000000..6c0512ec12b4 --- /dev/null +++ b/dev-python/setuptools/setuptools-84.2.1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 8 -- sys-apps/portage dep +EAPI=8 + +# please bump dev-python/ensurepip-setuptools along with this package! + +DISTUTILS_USE_PEP517=standalone +PYTHON_TESTED=( python3_{13..14} ) +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 pypi + +DESCRIPTION="Collection of extensions to Distutils" +HOMEPAGE=" + https://github.com/pypa/setuptools/ + https://pypi.org/project/setuptools/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/jaraco-functools-4.4.0[${PYTHON_USEDEP}] + >=dev-python/jaraco-text-4.0.0[${PYTHON_USEDEP}] + >=dev-python/more-itertools-10.8.0[${PYTHON_USEDEP}] + >=dev-python/packaging-26.3[${PYTHON_USEDEP}] + >=dev-python/platformdirs-4.4.0[${PYTHON_USEDEP}] + >=dev-python/wheel-0.45.1[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + >=dev-python/build-1.0.3[${PYTHON_USEDEP}] + >=dev-python/ini2toml-0.14[${PYTHON_USEDEP}] + >=dev-python/filelock-3.4.0[${PYTHON_USEDEP}] + >=dev-python/jaraco-envs-2.2[${PYTHON_USEDEP}] + >=dev-python/jaraco-path-3.7.2[${PYTHON_USEDEP}] + >=dev-python/jaraco-test-5.5[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/pyproject-hooks[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + >=dev-python/pytest-home-0.5[${PYTHON_USEDEP}] + dev-python/pytest-subprocess[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + >=dev-python/tomli-w-1.0.0[${PYTHON_USEDEP}] + >=dev-python/virtualenv-20[${PYTHON_USEDEP}] + ' "${PYTHON_TESTED[@]}") + ) +" +# setuptools-scm is here because installing plugins apparently breaks stuff at +# runtime, so let's pull it early. See bug #663324. +# +# trove-classifiers are optionally used in validation, if they are +# installed. Since we really oughtn't block them, let's always enforce +# the newest version for the time being to avoid errors. +# https://github.com/pypa/setuptools/issues/4459 +PDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + >=dev-python/trove-classifiers-2024.10.16[${PYTHON_USEDEP}] +" + +src_prepare() { + local PATCHES=( + # https://github.com/abravalheri/validate-pyproject/pull/221 + "${FILESDIR}/setuptools-75.6.0-disable-trove-classifiers.patch" + ) + + distutils-r1_src_prepare + + # remove bundled dependencies + rm -r */_vendor || die +} + +python_test() { + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then + return + fi + + local EPYTEST_DESELECT=( + # broken by unbundling (e.g. installs self-wheel into venv) + setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta + setuptools/tests/test_distutils_adoption.py + setuptools/tests/test_editable_install.py + setuptools/tests/test_sdist.py::test_sanity_check_setuptools_own_sdist + setuptools/tests/test_setuptools.py::test_wheel_includes_vendored_metadata + setuptools/tests/test_virtualenv.py::test_no_missing_dependencies + setuptools/tests/config/test_setupcfg.py::TestOptions::test_entry_points + # TODO + setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_basic + setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_ignore_errors + # TODO, probably some random package + setuptools/tests/config/test_setupcfg.py::TestOptions::test_cmdclass + # relies on -Werror + setuptools/_static.py::setuptools._static.Dict + setuptools/_static.py::setuptools._static.List + # Internet + setuptools/tests/test_build_py.py::TestTypeInfoFiles::test_type_files_included_by_default + setuptools/tests/test_dist.py::test_dist_fetch_build_egg + setuptools/tests/test_namespaces.py::TestNamespaces::test_mixed_site_and_non_site + setuptools/tests/test_namespaces.py::TestNamespaces::test_namespace_package_installed_and_cwd + setuptools/tests/test_namespaces.py::TestNamespaces::test_packages_in_the_same_namespace_installed_and_cwd + setuptools/tests/test_namespaces.py::TestNamespaces::test_pkg_resources_import + # broken by warnings from setuptools-scm + setuptools/tests/config/test_apply_pyprojecttoml.py::TestPresetField::test_scripts_dont_require_dynamic_entry_points + # TODO + 'setuptools/tests/test_egg_info.py::TestEggInfo::test_requires[setup_requires_with_markers]' + # broken by scikit-build-core somehow + 'setuptools/tests/test_extern.py::test_distribution_picklable' + ) + + local EPYTEST_XDIST=1 + local -x PRE_BUILT_SETUPTOOLS_WHEEL=${DISTUTILS_WHEEL_PATH} + local EPYTEST_PLUGINS=( pytest-{home,subprocess,timeout} ) + epytest -o tmp_path_retention_policy=all \ + -m "not uses_network" setuptools +} diff --git a/dev-python/sigstore/Manifest b/dev-python/sigstore/Manifest index 201cadca3ccd..9fcad5a86074 100644 --- a/dev-python/sigstore/Manifest +++ b/dev-python/sigstore/Manifest @@ -1,2 +1,2 @@ -DIST sigstore-python-4.4.0.gh.tar.gz 416489 BLAKE2B 918bfb9fd7361eef97db6249c4984edc5c4e832d1103bef5f19a49e379178be7c36204436ce5df4232a6f36cc96a6931433a7d9604adadf071544e549bb42d96 SHA512 c79f484f997e3d1cbfee2891696a4bc5ec3c665a1887dc01269403a1de56fb1a09a2379325a4bbcb0250451dc6d52728d47c43ef6796fd2eeb7775f78511bbe0 DIST sigstore-python-4.5.0.gh.tar.gz 417593 BLAKE2B bbe75700ebb4e3a1336a15fde91c95fd18316c45c403ef2ec66c3cab2ca4473097e39629a70d4fd20b3f7ddba3d5a85714b187310bd7d0ba54429675d411ad1d SHA512 38fc8ace17cb753f80b81e7fbc3aa84a9d5f9765148fefeac5de177ea45e21b8e0afb9afd361ee7e3641deaed42b88d591b8eb63570f0324d619d15a777b45c9 +DIST sigstore-python-4.5.1.gh.tar.gz 422956 BLAKE2B 4a807cd56d451de80a12f28e9336326618a9ff1d22d45ac41575c592eaae7137c1099ef65804271f729fd9574c47d0e526e0823df78521a90d94ffe216ba893e SHA512 cbd690da7d95b217a830f7394869cd340db5088477ef0bf8b6fa64e0504843246146e66870ce097c676f0e0910596bf2c9130998679c91bd2b92e93ec42305eb diff --git a/dev-python/sigstore/sigstore-4.4.0-r1.ebuild b/dev-python/sigstore/sigstore-4.4.0-r1.ebuild deleted file mode 100644 index cf9dff2f1302..000000000000 --- a/dev-python/sigstore/sigstore-4.4.0-r1.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2024-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit-core -PYTHON_COMPAT=( python3_{13..14} ) - -inherit distutils-r1 - -MY_P=sigstore-python-${PV} -DESCRIPTION="A tool for signing Python package distributions" -HOMEPAGE=" - https://github.com/sigstore/sigstore-python/ - https://pypi.org/project/sigstore/ -" -# no tests in sdist, as of 3.3.0 -SRC_URI=" - https://github.com/sigstore/sigstore-python/archive/v${PV}.tar.gz - -> ${MY_P}.gh.tar.gz -" -S=${WORKDIR}/${MY_P} - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~ppc ~ppc64 ~x86" - -RDEPEND=" - >=dev-python/cryptography-42[${PYTHON_USEDEP}] - >=dev-python/id-1.1.0[${PYTHON_USEDEP}] - >=dev-python/platformdirs-4.2[${PYTHON_USEDEP}] - >=dev-python/pyopenssl-23.0.0[${PYTHON_USEDEP}] - >=dev-python/pyasn1-0.6[${PYTHON_USEDEP}] - >=dev-python/pydantic-2[${PYTHON_USEDEP}] - >=dev-python/pyjwt-2.1[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - >=dev-python/rfc3161-client-1.0.3[${PYTHON_USEDEP}] - >=dev-python/rfc8785-0.1.2[${PYTHON_USEDEP}] - >=dev-python/rich-13[${PYTHON_USEDEP}] - ~dev-python/sigstore-models-0.0.6[${PYTHON_USEDEP}] - ~dev-python/sigstore-rekor-types-0.0.18[${PYTHON_USEDEP}] - >=dev-python/tuf-6.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/pretend[${PYTHON_USEDEP}] - ) -" - -EPYTEST_PLUGINS=() -distutils_enable_tests pytest - -src_prepare() { - distutils-r1_src_prepare - - # unpin deps - sed -r -i -e 's:~=:>=:' -e 's:, ?< ?[0-9.]*::' pyproject.toml || die -} - -python_test() { - epytest test/unit --skip-online -} diff --git a/dev-python/sigstore/sigstore-4.5.1.ebuild b/dev-python/sigstore/sigstore-4.5.1.ebuild new file mode 100644 index 000000000000..d57f189b1063 --- /dev/null +++ b/dev-python/sigstore/sigstore-4.5.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=uv-build +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 + +MY_P=sigstore-python-${PV} +DESCRIPTION="A tool for signing Python package distributions" +HOMEPAGE=" + https://github.com/sigstore/sigstore-python/ + https://pypi.org/project/sigstore/ +" +# no tests in sdist, as of 3.3.0 +SRC_URI=" + https://github.com/sigstore/sigstore-python/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + >=dev-python/cryptography-47[${PYTHON_USEDEP}] + >=dev-python/id-1.1.0[${PYTHON_USEDEP}] + >=dev-python/platformdirs-4.2[${PYTHON_USEDEP}] + >=dev-python/pydantic-2[${PYTHON_USEDEP}] + >=dev-python/pyjwt-2.1[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + >=dev-python/rfc3161-client-1.0.3[${PYTHON_USEDEP}] + >=dev-python/rfc8785-0.1.2[${PYTHON_USEDEP}] + >=dev-python/rich-13[${PYTHON_USEDEP}] + ~dev-python/sigstore-models-0.0.6[${PYTHON_USEDEP}] + ~dev-python/sigstore-rekor-types-0.0.18[${PYTHON_USEDEP}] + >=dev-python/tuf-6.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/pretend[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # unpin deps + sed -r -i -e 's:~=:>=:' -e 's:, ?< ?[0-9.]*::' pyproject.toml || die +} + +python_test() { + epytest test/unit --skip-online +} diff --git a/dev-python/sphinxcontrib-jsmath/Manifest b/dev-python/sphinxcontrib-jsmath/Manifest index de5ba9031a36..0a132d59c4b7 100644 --- a/dev-python/sphinxcontrib-jsmath/Manifest +++ b/dev-python/sphinxcontrib-jsmath/Manifest @@ -1 +1,2 @@ DIST sphinxcontrib-jsmath-1.0.1.tar.gz 5787 BLAKE2B 055ff298e11678d7d30975e4bef509ece0128be30ca0c5fd2be1323c2eb4fe92f861826ea5ddfcbd2d3e3a80535b374d2b1a13446c2604f3e448d5a8982b9881 SHA512 c1e6488f5c0ca4567c27ec7c597c9db321ac32ce354c4ad62fea534b2ae1c0acb183a921f46216bbc3891f14acfaac05ddf324b8fdaf99828df07bc91aa7e5c7 +DIST sphinxcontrib_jsmath-2.0.0.tar.gz 14511 BLAKE2B f96717d28571670d2f42e4d50bc2081955eeecc22c4f3b2d432fdade88f14703d4aa77fbbb74cbfb477ded27917c2bbd4adf8c0b008d7e304fc642ebe7ca15b0 SHA512 927410420c93171ae6b1bd6a8d40d6823cdab3e5caf788e3918bf185ee0da1df2ac6668212c8b6dad2778d920df9c03fc6966420b23968a6ab4aacbb05e3b4cb diff --git a/dev-python/sphinxcontrib-jsmath/sphinxcontrib-jsmath-2.0.0.ebuild b/dev-python/sphinxcontrib-jsmath/sphinxcontrib-jsmath-2.0.0.ebuild new file mode 100644 index 000000000000..2cb260318bc8 --- /dev/null +++ b/dev-python/sphinxcontrib-jsmath/sphinxcontrib-jsmath-2.0.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit-core +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Sphinx extension which renders display math in HTML via JavaScript" +HOMEPAGE=" + https://www.sphinx-doc.org/ + https://github.com/sphinx-doc/sphinxcontrib-jsmath/ + https://pypi.org/project/sphinxcontrib-jsmath/ +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x64-solaris" + +PDEPEND=" + >=dev-python/sphinx-5.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( ${PDEPEND} ) +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + cd "${T}" || die + epytest "${S}"/tests +} diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 955208ef979c..93f8ed5b8554 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -1,2 +1,2 @@ -DIST sqlglot-30.22.0.tar.gz 6088770 BLAKE2B bca7d80d5fde475419a4bae31dca2f1be4a4e5b90d2312d9c9b283bbb2927c013a0f849be17142860124b3f830e3adb4b7854c4a4a2ecb2ea1d961ed80145bd8 SHA512 40186858888fe174ec9371b78bd8f72fb04c371341f5ce746b10026feb59530c0477f7f9022edff37ef447e5cb9ef60cc9d20804aa69ddd8a88de9a68b8d0a0f DIST sqlglot-30.23.0.tar.gz 6108071 BLAKE2B aa470c23542deb3793b208746e480cf642bc1aaea00c5f2a0049f0ad1401e6b50b492826a406a8d7f21607618db57edd9923ab11ad66ee457cc812903292e678 SHA512 dc4c43c751a1cfa2fd703e5d047d8b1ba5eb143996de6c235c165ad8c77180572946bb1ff59c4c4bdf8f441a3e3a08f81a07f147788e2134476214437867a6a2 +DIST sqlglot-30.24.0.tar.gz 6131857 BLAKE2B 0e63234e61a2970f42ec8764458a2b2d865fdfc735f15f6708daa9059b8114148c679f9e616ef86d2bc4b39065d52ce716a9a62aa898fa6609375733b2e1859a SHA512 0709c541cda6d610f5d68ca9638178b80bcff6e8727dfeadfabd5569e569762b9a24b8110a6bcff57a622f645bccd746811b1bf2235279f8b0e0dab42ef1cfed diff --git a/dev-python/sqlglot/sqlglot-30.22.0.ebuild b/dev-python/sqlglot/sqlglot-30.22.0.ebuild deleted file mode 100644 index 063fa5096326..000000000000 --- a/dev-python/sqlglot/sqlglot-30.22.0.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2023-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{13..14} ) - -inherit cargo distutils-r1 pypi optfeature - -DESCRIPTION="An easily customizable SQL parser and transpiler" -HOMEPAGE=" - https://sqlglot.com/ - https://github.com/tobymao/sqlglot/ - https://pypi.org/project/sqlglot/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -# Native extensions removed: it uses mypyc which is incredibly slow -# and then the extension crashes anyway. Upstream uses their own mypy -# fork which might help but that's just insane. - -BDEPEND=" - dev-python/setuptools-scm[${PYTHON_USEDEP}] - test? ( - dev-python/pytz[${PYTHON_USEDEP}] - ) -" - -EPYTEST_PLUGINS=() -distutils_enable_tests pytest - -python_test() { - local EPYTEST_IGNORE=( - # Tests require pyspark or duckdb which aren't in the tree. - # Pandas would be a requirement normally, but it gets ignored by proxy. - "tests/dataframe/integration/test_dataframe.py" - "tests/dataframe/integration/test_grouped_data.py" - "tests/dataframe/integration/test_session.py" - "tests/test_executor.py" - "tests/test_optimizer.py" - ) - - rm -rf sqlglot || die - epytest -} - -pkg_postinst() { - optfeature "simplifying timedelta expressions" dev-python/python-dateutil -} diff --git a/dev-python/sqlglot/sqlglot-30.24.0.ebuild b/dev-python/sqlglot/sqlglot-30.24.0.ebuild new file mode 100644 index 000000000000..063fa5096326 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-30.24.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit cargo distutils-r1 pypi optfeature + +DESCRIPTION="An easily customizable SQL parser and transpiler" +HOMEPAGE=" + https://sqlglot.com/ + https://github.com/tobymao/sqlglot/ + https://pypi.org/project/sqlglot/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +# Native extensions removed: it uses mypyc which is incredibly slow +# and then the extension crashes anyway. Upstream uses their own mypy +# fork which might help but that's just insane. + +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + dev-python/pytz[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + local EPYTEST_IGNORE=( + # Tests require pyspark or duckdb which aren't in the tree. + # Pandas would be a requirement normally, but it gets ignored by proxy. + "tests/dataframe/integration/test_dataframe.py" + "tests/dataframe/integration/test_grouped_data.py" + "tests/dataframe/integration/test_session.py" + "tests/test_executor.py" + "tests/test_optimizer.py" + ) + + rm -rf sqlglot || die + epytest +} + +pkg_postinst() { + optfeature "simplifying timedelta expressions" dev-python/python-dateutil +} diff --git a/dev-python/uv-build/Manifest b/dev-python/uv-build/Manifest index 4966413124b7..69bbc2faff51 100644 --- a/dev-python/uv-build/Manifest +++ b/dev-python/uv-build/Manifest @@ -7,3 +7,4 @@ DIST uv_build-0.12.7.tar.gz 418759 BLAKE2B 94aa33b2644f849a686d80d7f7d365ca84336 DIST uv_build-0.12.9.tar.gz 423446 BLAKE2B 8f32f7527633f5853a11a0f798a2aa075f9e96c2b34144f986a639dbd042bac7c5e33853287ef43273352a3ee84da852062c42daead1f188281295b635694177 SHA512 3aa6ea5b4e60218e7cbc3c5ed8ff7fbeeace36eb0d2c75627fb7a0ce7c060e8d6405378e9713f7164319cce55dc96b1a335ccb3032cfc7e9e60e99862295e79e DIST uv_build-0.13.1.tar.gz 446632 BLAKE2B 543350d4a3d6ba53ea5d52f0f840245a6865f029a48f4f095d4d191b0ca502960526660f9255d60bb8e15b00c6daba9afbe7a8c19e61ca841fa5524a9b63c10b SHA512 42f4739a21e068af66b884a22f7fd57f278ebfe37a5561d5fdf95dc0c443456e5436a3ce49b26b96c70b7431c0422af37a33b529a0f6ab09e3ad108a9982350d DIST uv_build-0.13.3.tar.gz 464136 BLAKE2B 4bcffe9228283c2c6388627d9ded292855c506aebb97efae931a6aecafdd1c5a680dc65a47651496409dde59c896e846b76f5abf4d67e2483d024f5cd93e9ffa SHA512 2fc5b9fe0e23172636b2fb927634619f5b93f1e1173ae2a8ea3ce14b4194bd2dba7bf6da6e46723c90a945a47273b8e67114398bc958e94f68bc4895af7a6574 +DIST uv_build-0.13.4.tar.gz 464427 BLAKE2B 899bd8d7628bc5a291a6f974e569484a61d1aff51745e004cb663167128470147f2dae454457e010fa495e9d9de19527e9185e90c88018e51b4352359ceca349 SHA512 2e74b38cd01468281f481fa3b1ea289e1d262986e97bf3bfd27812c08676825567c547144bc9ed090bede4eb8db3114e6e8330eeaf96a91602bdd5212ae76433 diff --git a/dev-python/uv-build/uv-build-0.13.4.ebuild b/dev-python/uv-build/uv-build-0.13.4.ebuild new file mode 100644 index 000000000000..65d94f2051ae --- /dev/null +++ b/dev-python/uv-build/uv-build-0.13.4.ebuild @@ -0,0 +1,100 @@ +# Copyright 2025-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Maturin compiles uv-build executable for every impl, we do not want +# that, so we use another backend. And since we use another backend, +# why not dogfood it in the first place? +DISTUTILS_USE_PEP517=standalone +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="PEP517 uv build backend" +HOMEPAGE=" + https://github.com/astral-sh/uv/ + https://pypi.org/project/uv-build/ +" + +LICENSE="|| ( Apache-2.0 MIT )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/uv-${PV} +" +BDEPEND=" + test? ( + app-arch/unzip + dev-python/build[${PYTHON_USEDEP}] + ) +" + +src_prepare() { + distutils-r1_src_prepare + + # use the executable from dev-python/uv instead of building + # a largely overlapping uv-build executable (at least for now) + sed -i -e '/USE_UV_EXECUTABLE/s:False:True:' python/uv_build/__init__.py || die + + # replace the build-system section + sed -i -e '/\[build-system\]/,$d' pyproject.toml || die + cat >> pyproject.toml <<-EOF || die + [build-system] + requires = ["uv_build<9999"] + build-backend = "uv_build" + backend-path = ["src"] + EOF + + # rename to make uv-build find it + mv python src || die +} + +python_test() { + "${EPYTHON}" -m build -n || die "Self-build failed with ${EPYTHON}" + + local zip_result=$( + unzip -t "dist/uv_build-${PV}-py3-none-any.whl" || die + ) + local zip_expected="\ +Archive: dist/uv_build-${PV}-py3-none-any.whl + testing: uv_build/ OK + testing: uv_build/__init__.py OK + testing: uv_build/__main__.py OK + testing: uv_build/py.typed OK + testing: uv_build-${PV}.dist-info/ OK + testing: uv_build-${PV}.dist-info/WHEEL OK + testing: uv_build-${PV}.dist-info/METADATA OK + testing: uv_build-${PV}.dist-info/RECORD OK +No errors detected in compressed data of dist/uv_build-${PV}-py3-none-any.whl.\ +" + if [[ ${zip_result} != ${zip_expected} ]]; then + eerror ".zip result:\n${zip_result}" + eerror ".zip expected:\n${zip_expected}" + die ".whl result mismatch" + fi + + local tar_result=$( + tar -tf "dist/uv_build-${PV}.tar.gz" || die + ) + local tar_expected="\ +uv_build-${PV}/PKG-INFO +uv_build-${PV}/pyproject.toml +uv_build-${PV}/pyproject.toml.orig +uv_build-${PV}/ +uv_build-${PV}/README.md +uv_build-${PV}/src +uv_build-${PV}/src/uv_build +uv_build-${PV}/src/uv_build/__init__.py +uv_build-${PV}/src/uv_build/__main__.py +uv_build-${PV}/src/uv_build/py.typed\ +" + if [[ ${tar_result} != ${tar_expected} ]]; then + eerror ".tar.gz result:\n${tar_result}" + eerror ".tar.gz expected:\n${tar_expected}" + die ".tar.gz result mismatch" + fi +} diff --git a/dev-python/uv/Manifest b/dev-python/uv/Manifest index 944f72f4b4f6..c4a745b045b1 100644 --- a/dev-python/uv/Manifest +++ b/dev-python/uv/Manifest @@ -16,3 +16,5 @@ DIST uv-0.13.1-crates.tar.xz 44234800 BLAKE2B 78e734286467404e4289cff568565e1ef1 DIST uv-0.13.1.gh.tar.gz 8877918 BLAKE2B 43c1726bf6b277b57d154a0bba917cd6762c5dd3e4fbc5293c49372725e12b6980ef34fc44013c68a0956fa9bde368d3a6f45c4e658f27fe98506f22c987a7f2 SHA512 de0bf17d6ddc081e2b3904ed04aeb6ab7e9745880dd2cf78fd9f70e01241d28701246bb2db2b524c76549a0a53af899ad291dec7e957c6a96a344c285c1c4e29 DIST uv-0.13.3-crates.tar.xz 44006060 BLAKE2B f93beea37edc6642d352b1c497cdfbce32e2fc5d7606ebf648c9ad72b1c2a6bd000e9fe3f682794f54fa6c6968559351ddebe29ab4e1dbfc1555f401e0aa994f SHA512 d695cdc1090382cb559665e1c84f5d4f9cc7486437d0de2ac6c71669edc0bdbfa6181b617ca550b0f421ca33db7f308313b2527766f7435e4cf4f8481e769a77 DIST uv-0.13.3.gh.tar.gz 8927836 BLAKE2B f6795d91b43ae3ea8c43b07027f8436c730476355c3e354ed72e9cb92c90e5a9d7480e4c3de008fd9ee317e5c03b257c1e9d6938af48706b530caf5c637a85c7 SHA512 7c91b766ef394fcdf562457516cb6556d29b3a25f84a52f00afd23a4c9399b74a65dec701b13fee06996b77bcec895278683ce1dc967961abd2d46228b8d34cd +DIST uv-0.13.4-crates.tar.xz 44003088 BLAKE2B 671f829d9f64a3f5aa2d1ec7e3f705eadb63529c43f65796a25ef0307f763ce4611f2ee41ee38ffeb19a2eac91d918129be4deb128c6a879c5bcd204862854ea SHA512 94d07b0fa8edbf6364366268be678055125e7baa854c8bc30aaf6721210fc63a1ef0dd5f07e0a511b2cd132f2fcf25690b6c2fa828b97b3893785ed18d40a51e +DIST uv-0.13.4.gh.tar.gz 8930524 BLAKE2B 6db88a4d14037a65f0c2f1a5e98a1a3a6c0697300906af3f753d7ce87320b4086067abe13a60fd335d713f427fc1e2bda7a4917eb1d985daf03aa795672eb188 SHA512 06bc16f6e10b31cbdf1265623990cfe52bc0e040a53edd63b952807b340aec274d412ff7f17111e235596c7f054186fb7024abb0e563f43abb03309df7070f8a diff --git a/dev-python/uv/uv-0.13.4.ebuild b/dev-python/uv/uv-0.13.4.ebuild new file mode 100644 index 000000000000..f2ffd74bfde2 --- /dev/null +++ b/dev-python/uv/uv-0.13.4.ebuild @@ -0,0 +1,156 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER="1.97.0" + +inherit cargo check-reqs + +CRATE_PV=${PV} +DESCRIPTION="A Python package installer and resolver, written in Rust" +HOMEPAGE=" + https://github.com/astral-sh/uv/ + https://pypi.org/project/uv/ +" +# pypi sdist misses scripts/, needed for tests +SRC_URI=" + https://github.com/astral-sh/uv/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz + ${CARGO_CRATE_URIS} +" +if [[ ${PKGBUMPING} != ${PVR} ]]; then + SRC_URI+=" + https://github.com/gentoo-crate-dist/uv/releases/download/${CRATE_PV}/uv-${CRATE_PV}-crates.tar.xz + " +fi + +# most of the code +LICENSE="|| ( Apache-2.0 MIT )" +# crates/pep508-rs is || ( Apache-2.0 BSD-2 ) which is covered below +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD CC0-1.0 + CDLA-Permissive-2.0 ISC MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 + ZLIB +" +# ring crate +LICENSE+=" openssl" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="test" +RESTRICT="test" +PROPERTIES="test_network" + +DEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + app-arch/zstd:= +" +RDEPEND=" + ${DEPEND} +" +# git/curl: https://bugs.gentoo.org/984287 +BDEPEND=" + virtual/pkgconfig + test? ( + dev-lang/python:3.9 + dev-lang/python:3.10 + dev-lang/python:3.11 + dev-lang/python:3.12 + dev-lang/python:3.13 + !!~dev-python/uv-0.5.0 + || ( + >=dev-vcs/git-2.57 + ]\([^\"<>]*\)[\"<].*/\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 -} - -pkg_setup() { - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - - linux-info_pkg_setup -} - -src_unpack() { - local _lp_dir="${WORKDIR}/language_packs" - local _src_file - - mkdir "${S}" || die - - if [[ ! -d "${_lp_dir}" ]] ; then - mkdir "${_lp_dir}" || die - fi - - for _src_file in ${A} ; do - if [[ ${_src_file} == *.xpi ]]; then - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" - else - MY_SRC_FILE=${_src_file} - fi - done -} - -src_install() { - # Set MOZILLA_FIVE_HOME - local MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" - - dodir /opt - pushd "${ED}"/opt &>/dev/null || die - unpack "${MY_SRC_FILE}" - popd &>/dev/null || die - - pax-mark m \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN} \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN}-bin \ - "${ED}${MOZILLA_FIVE_HOME}"/plugin-container - - # Prevent auto-updater from popping up. - echo "This installation is managed by Gentoo's package manager." > "${ED}${MOZILLA_FIVE_HOME}"/is-packaged-app - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - # insinto "${PREFS_DIR}" - # newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js - - # local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js" - - # Install language packs - local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') ) - if [[ -n "${langpacks}" ]] ; then - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" - fi - - # Install icons - local icon_srcdir="${ED}/${MOZILLA_FIVE_HOME}/browser/chrome/icons/default" - - insinto /usr/share/icons/hicolor/symbolic/apps - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="LibreWolf (bin)" - local desktop_file="${FILESDIR}/firefox-bin-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - # Add apulse support through our wrapper shell launcher, patchelf-method broken since 119.0. - # See bgo#916230, bgo#941873 - local apulselib= - if has_version -r media-sound/apulse[-sdk] ; then - apulselib="${EPREFIX}/usr/$(get_libdir)/apulse" - ewarn "media-sound/apulse with -sdk use flag detected!" - ewarn "Firefox-bin will be installed with a wrapper, that attempts to load" - ewarn "apulse instead of pipewire/pulseadio. This may lead to sound issues." - ewarn "Please either enable sdk use flag for apulse, or remove apulse" - ewarn "completely and re-install firefox-bin to utilize pipewire/pulseaudio instead." - fi - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" \ - || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/firefox-bin-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@MOZ_FIVE_HOME@:${EPREFIX}${MOZILLA_FIVE_HOME}:" \ - -e "s:@APULSELIB_DIR@:${apulselib}:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" \ - || die -} - -pkg_postinst() { - xdg_pkg_postinst - - local show_doh_information show_normandy_information - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - # New install; Tell user that DoH is disabled by default - show_doh_information=yes - show_normandy_information=yes - fi - - if [[ -n "${show_doh_information}" ]] ; then - elog - elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):" - elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all" - elog "DNS traffic to Cloudflare by default is not a good idea and applications" - elog "should respect OS configured settings), \"network.trr.mode\" was set to 5" - elog "(\"Off by choice\") by default." - elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences." - fi - - # bug 713782 - if [[ -n "${show_normandy_information}" ]] ; then - elog - elog "Upstream operates a service named Normandy which allows Mozilla to" - elog "push changes for default settings or even install new add-ons remotely." - elog "While this can be useful to address problems like 'Armagadd-on 2.0' or" - elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security" - elog "concerns prevail, which is why we have switched off the use of this" - elog "service by default." - elog - elog "To re-enable this service set" - elog - elog " app.normandy.enabled=true" - elog - elog "in about:config." - fi - - optfeature_header "Optional programs for extra features:" - optfeature "speech syntesis (text-to-speech) support" app-accessibility/speech-dispatcher - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - # optfeature "ffmpeg-based audio/video codec support, required for HTML5 video rendering" media-video/ffmpeg - optfeature "desktop notifications" x11-libs/libnotify -} diff --git a/www-client/librewolf-bin/librewolf-bin-157.0_p1.ebuild b/www-client/librewolf-bin/librewolf-bin-157.0_p1.ebuild deleted file mode 100644 index caefc458634a..000000000000 --- a/www-client/librewolf-bin/librewolf-bin-157.0_p1.ebuild +++ /dev/null @@ -1,321 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LIBREWOLF_PV="${PV/_p/-}" - -MOZ_ESR= - -MOZ_PV=${PV/_p[0-9]/} -MOZ_PV_SUFFIX= -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then - MOZ_PV_SUFFIX=${BASH_REMATCH[1]} - - # Convert the ebuild version to the upstream Mozilla version - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI -fi - -if [[ -n ${MOZ_ESR} ]] ; then - # ESR releases have slightly different version numbers - MOZ_PV="${MOZ_PV}esr" -fi - -MOZ_PN="${PN%-bin}" -MOZ_P="${MOZ_PN}-${MOZ_PV}" -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" - -inherit desktop linux-info optfeature pax-utils xdg - -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" - -SRC_URI="${SRC_URI} - amd64? ( https://dl.librewolf.net/librewolf/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}-linux-x86_64-package.tar.xz ) - arm64? ( https://dl.librewolf.net/librewolf/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}-linux-arm64-package.tar.xz )" - -DESCRIPTION="LibreWolf Web Browser" -HOMEPAGE="https://librewolf.net/" - -KEYWORDS="-* amd64 ~arm64" -SLOT="0" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -IUSE="selinux wayland" - -RESTRICT="strip" - -BDEPEND="app-arch/unzip" -RDEPEND="${DEPEND} - || ( - media-libs/libpulse - media-sound/apulse - ) - >=app-accessibility/at-spi2-core-2.46.0:2 - >=dev-libs/glib-2.26:2 - media-libs/alsa-lib - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - media-video/ffmpeg - sys-apps/dbus - virtual/freedesktop-icon-theme - >=x11-libs/cairo-1.10[X] - x11-libs/gdk-pixbuf:2 - >=x11-libs/gtk+-3.11:3[X,wayland?] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXcursor - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXi - x11-libs/libXrandr - x11-libs/libXrender - x11-libs/libxcb - >=x11-libs/pango-1.22.0 - selinux? ( sec-policy/selinux-mozilla ) -" - -QA_PREBUILT="opt/${MOZ_PN}/*" - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -MOZ_LANGS=() - -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 - - SRC_URI+=" l10n_${xflag/[_@]/-}? (" - SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${MOZ_P_DISTFILES}-${lang}.xpi" - SRC_URI+=" )" - IUSE+=" l10n_${xflag/[_@]/-}" - done -} -mozilla_set_globals - -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 -} - -pkg_setup() { - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - - linux-info_pkg_setup -} - -src_unpack() { - local _lp_dir="${WORKDIR}/language_packs" - local _src_file - - mkdir "${S}" || die - - if [[ ! -d "${_lp_dir}" ]] ; then - mkdir "${_lp_dir}" || die - fi - - for _src_file in ${A} ; do - if [[ ${_src_file} == *.xpi ]]; then - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" - else - MY_SRC_FILE=${_src_file} - fi - done -} - -src_install() { - # Set MOZILLA_FIVE_HOME - local MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" - - dodir /opt - pushd "${ED}"/opt &>/dev/null || die - unpack "${MY_SRC_FILE}" - popd &>/dev/null || die - - pax-mark m \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN} \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN}-bin \ - "${ED}${MOZILLA_FIVE_HOME}"/plugin-container - - # Prevent auto-updater from popping up. - echo "This installation is managed by Gentoo's package manager." > "${ED}${MOZILLA_FIVE_HOME}"/is-packaged-app - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - # insinto "${PREFS_DIR}" - # newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js - - # local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js" - - # Install language packs - local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') ) - if [[ -n "${langpacks}" ]] ; then - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" - fi - - # Install icons - local icon_srcdir="${ED}/${MOZILLA_FIVE_HOME}/browser/chrome/icons/default" - - insinto /usr/share/icons/hicolor/symbolic/apps - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="LibreWolf (bin)" - local desktop_file="${FILESDIR}/firefox-bin-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - # Add apulse support through our wrapper shell launcher, patchelf-method broken since 119.0. - # See bgo#916230, bgo#941873 - local apulselib= - if has_version -r media-sound/apulse[-sdk] ; then - apulselib="${EPREFIX}/usr/$(get_libdir)/apulse" - ewarn "media-sound/apulse with -sdk use flag detected!" - ewarn "Firefox-bin will be installed with a wrapper, that attempts to load" - ewarn "apulse instead of pipewire/pulseadio. This may lead to sound issues." - ewarn "Please either enable sdk use flag for apulse, or remove apulse" - ewarn "completely and re-install firefox-bin to utilize pipewire/pulseaudio instead." - fi - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" \ - || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/firefox-bin-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@MOZ_FIVE_HOME@:${EPREFIX}${MOZILLA_FIVE_HOME}:" \ - -e "s:@APULSELIB_DIR@:${apulselib}:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" \ - || die -} - -pkg_postinst() { - xdg_pkg_postinst - - local show_doh_information show_normandy_information - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - # New install; Tell user that DoH is disabled by default - show_doh_information=yes - show_normandy_information=yes - fi - - if [[ -n "${show_doh_information}" ]] ; then - elog - elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):" - elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all" - elog "DNS traffic to Cloudflare by default is not a good idea and applications" - elog "should respect OS configured settings), \"network.trr.mode\" was set to 5" - elog "(\"Off by choice\") by default." - elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences." - fi - - # bug 713782 - if [[ -n "${show_normandy_information}" ]] ; then - elog - elog "Upstream operates a service named Normandy which allows Mozilla to" - elog "push changes for default settings or even install new add-ons remotely." - elog "While this can be useful to address problems like 'Armagadd-on 2.0' or" - elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security" - elog "concerns prevail, which is why we have switched off the use of this" - elog "service by default." - elog - elog "To re-enable this service set" - elog - elog " app.normandy.enabled=true" - elog - elog "in about:config." - fi - - optfeature_header "Optional programs for extra features:" - optfeature "speech syntesis (text-to-speech) support" app-accessibility/speech-dispatcher - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - # optfeature "ffmpeg-based audio/video codec support, required for HTML5 video rendering" media-video/ffmpeg - optfeature "desktop notifications" x11-libs/libnotify -} diff --git a/www-client/librewolf-bin/librewolf-bin-158.0.1_p1.ebuild b/www-client/librewolf-bin/librewolf-bin-158.0.1_p1.ebuild new file mode 100644 index 000000000000..caefc458634a --- /dev/null +++ b/www-client/librewolf-bin/librewolf-bin-158.0.1_p1.ebuild @@ -0,0 +1,321 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LIBREWOLF_PV="${PV/_p/-}" + +MOZ_ESR= + +MOZ_PV=${PV/_p[0-9]/} +MOZ_PV_SUFFIX= +if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then + MOZ_PV_SUFFIX=${BASH_REMATCH[1]} + + # Convert the ebuild version to the upstream Mozilla version + MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI + MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI + MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI +fi + +if [[ -n ${MOZ_ESR} ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +MOZ_PN="${PN%-bin}" +MOZ_P="${MOZ_PN}-${MOZ_PV}" +MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" +MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" + +inherit desktop linux-info optfeature pax-utils xdg + +MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" + +SRC_URI="${SRC_URI} + amd64? ( https://dl.librewolf.net/librewolf/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}-linux-x86_64-package.tar.xz ) + arm64? ( https://dl.librewolf.net/librewolf/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}-linux-arm64-package.tar.xz )" + +DESCRIPTION="LibreWolf Web Browser" +HOMEPAGE="https://librewolf.net/" + +KEYWORDS="-* amd64 ~arm64" +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="selinux wayland" + +RESTRICT="strip" + +BDEPEND="app-arch/unzip" +RDEPEND="${DEPEND} + || ( + media-libs/libpulse + media-sound/apulse + ) + >=app-accessibility/at-spi2-core-2.46.0:2 + >=dev-libs/glib-2.26:2 + media-libs/alsa-lib + media-libs/fontconfig + >=media-libs/freetype-2.4.10 + media-video/ffmpeg + sys-apps/dbus + virtual/freedesktop-icon-theme + >=x11-libs/cairo-1.10[X] + x11-libs/gdk-pixbuf:2 + >=x11-libs/gtk+-3.11:3[X,wayland?] + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libxcb + >=x11-libs/pango-1.22.0 + selinux? ( sec-policy/selinux-mozilla ) +" + +QA_PREBUILT="opt/${MOZ_PN}/*" + +# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or +# overridden in the enviromnent (advanced hackers only) +if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then + MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) +fi + +MOZ_LANGS=() + +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 + + SRC_URI+=" l10n_${xflag/[_@]/-}? (" + SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${MOZ_P_DISTFILES}-${lang}.xpi" + SRC_URI+=" )" + IUSE+=" l10n_${xflag/[_@]/-}" + done +} +mozilla_set_globals + +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 +} + +pkg_setup() { + CONFIG_CHECK="~SECCOMP" + WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." + + linux-info_pkg_setup +} + +src_unpack() { + local _lp_dir="${WORKDIR}/language_packs" + local _src_file + + mkdir "${S}" || die + + if [[ ! -d "${_lp_dir}" ]] ; then + mkdir "${_lp_dir}" || die + fi + + for _src_file in ${A} ; do + if [[ ${_src_file} == *.xpi ]]; then + cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" + else + MY_SRC_FILE=${_src_file} + fi + done +} + +src_install() { + # Set MOZILLA_FIVE_HOME + local MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" + + dodir /opt + pushd "${ED}"/opt &>/dev/null || die + unpack "${MY_SRC_FILE}" + popd &>/dev/null || die + + pax-mark m \ + "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN} \ + "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN}-bin \ + "${ED}${MOZILLA_FIVE_HOME}"/plugin-container + + # Prevent auto-updater from popping up. + echo "This installation is managed by Gentoo's package manager." > "${ED}${MOZILLA_FIVE_HOME}"/is-packaged-app + + # Install system-wide preferences + local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" + # insinto "${PREFS_DIR}" + # newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js + + # local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js" + + # Install language packs + local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') ) + if [[ -n "${langpacks}" ]] ; then + moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" + fi + + # Install icons + local icon_srcdir="${ED}/${MOZILLA_FIVE_HOME}/browser/chrome/icons/default" + + insinto /usr/share/icons/hicolor/symbolic/apps + + local icon size + for icon in "${icon_srcdir}"/default*.png ; do + size=${icon%.png} + size=${size##*/default} + + if [[ ${size} -eq 48 ]] ; then + newicon "${icon}" ${PN}.png + fi + + newicon -s ${size} "${icon}" ${PN}.png + done + + # Install menu + local app_name="LibreWolf (bin)" + local desktop_file="${FILESDIR}/firefox-bin-r3.desktop" + local desktop_filename="${PN}.desktop" + local exec_command="${PN}" + local icon="${PN}" + local use_wayland="false" + + if use wayland ; then + use_wayland="true" + fi + + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die + + # Add apulse support through our wrapper shell launcher, patchelf-method broken since 119.0. + # See bgo#916230, bgo#941873 + local apulselib= + if has_version -r media-sound/apulse[-sdk] ; then + apulselib="${EPREFIX}/usr/$(get_libdir)/apulse" + ewarn "media-sound/apulse with -sdk use flag detected!" + ewarn "Firefox-bin will be installed with a wrapper, that attempts to load" + ewarn "apulse instead of pipewire/pulseadio. This may lead to sound issues." + ewarn "Please either enable sdk use flag for apulse, or remove apulse" + ewarn "completely and re-install firefox-bin to utilize pipewire/pulseaudio instead." + fi + + sed -i \ + -e "s:@NAME@:${app_name}:" \ + -e "s:@EXEC@:${exec_command}:" \ + -e "s:@ICON@:${icon}:" \ + "${WORKDIR}/${PN}.desktop-template" \ + || die + + newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" + + rm "${WORKDIR}/${PN}.desktop-template" || die + + # Install wrapper script + [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" + newbin "${FILESDIR}/firefox-bin-r1.sh" ${PN} + + # Update wrapper + sed -i \ + -e "s:@PREFIX@:${EPREFIX}/usr:" \ + -e "s:@MOZ_FIVE_HOME@:${EPREFIX}${MOZILLA_FIVE_HOME}:" \ + -e "s:@APULSELIB_DIR@:${apulselib}:" \ + -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ + "${ED}/usr/bin/${PN}" \ + || die +} + +pkg_postinst() { + xdg_pkg_postinst + + local show_doh_information show_normandy_information + + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + # New install; Tell user that DoH is disabled by default + show_doh_information=yes + show_normandy_information=yes + fi + + if [[ -n "${show_doh_information}" ]] ; then + elog + elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):" + elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all" + elog "DNS traffic to Cloudflare by default is not a good idea and applications" + elog "should respect OS configured settings), \"network.trr.mode\" was set to 5" + elog "(\"Off by choice\") by default." + elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences." + fi + + # bug 713782 + if [[ -n "${show_normandy_information}" ]] ; then + elog + elog "Upstream operates a service named Normandy which allows Mozilla to" + elog "push changes for default settings or even install new add-ons remotely." + elog "While this can be useful to address problems like 'Armagadd-on 2.0' or" + elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security" + elog "concerns prevail, which is why we have switched off the use of this" + elog "service by default." + elog + elog "To re-enable this service set" + elog + elog " app.normandy.enabled=true" + elog + elog "in about:config." + fi + + optfeature_header "Optional programs for extra features:" + optfeature "speech syntesis (text-to-speech) support" app-accessibility/speech-dispatcher + optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas + # optfeature "ffmpeg-based audio/video codec support, required for HTML5 video rendering" media-video/ffmpeg + optfeature "desktop notifications" x11-libs/libnotify +} diff --git a/www-client/librewolf/Manifest b/www-client/librewolf/Manifest index 05ab5abc26d6..ef21081ed449 100644 --- a/www-client/librewolf/Manifest +++ b/www-client/librewolf/Manifest @@ -1,7 +1,6 @@ -DIST firefox-157-patches-01.tar.xz 22380 BLAKE2B 41e0e59cfbcf9f62a0568f126c5259b0152095eba2680b929a23ff1bebbc00b0004444a407c2dd8d8b5e90c92e4077a1c16d578f462ee115a4ee30818a884bc5 SHA512 ea0aba95e5708ba0d902219c850d8b5fe5e04fa95847268b64061eadf178037a6e6fdce186aa9de26e069ce7fcfe0f0c7759883713a14dc65efb771284435a41 DIST firefox-158-patches-01.tar.xz 22644 BLAKE2B 08a481bc9f85027da33876e6476a0b13f14c1850b08d59ca39edf76df31eab0af0ec74b792de7136cd9437c46ad12a0c88032a06fa222a5989f62c8f545aab7f SHA512 d60025ac76717238c13208af656c8e2220b71153e91137ad527b35e9eb7b7138c96f87b760ccc36cacf6a6f009ed805f49609593bcd553e1b9050928d2d7ba69 -DIST librewolf-157.0-1.source.tar.gz 1178691250 BLAKE2B 697ae778a176112a4540de2ae62bd566683adbe05f224e2af08dc8cf48650319eb5592cdc7cea09e12cf4a4ecea0bccc67dedd56579bc37a49ede33c0d052e25 SHA512 dde97b25f8454027c508a54cdc7f40560a4976e9dcc8ee185065b9fd38e4adfb126b3249c19f20ba66381826075b8ca4c1e6f3ddac6d0fa82c591e824b7ff9a0 -DIST librewolf-157.0.1-1.source.tar.gz 1179168753 BLAKE2B c21e4be3991acfec978c8bdfe3265ed601250a836929a7a07dee92868b6785ce4e7d150208df6204d8d2703a18c6a0af89522179ad0d1a0aeee126618f1a79dc SHA512 3651d0014a906b110da696154311cbf084153f51fb7dec32a6eb6eaf32c4c94a383e25545ee215ef29342717fd447575c776f0213224628e351e0ff59dddd10c +DIST firefox-158-patches-02.tar.xz 22332 BLAKE2B 6f7e7ee0b6098ac9af33b9f6eb1b3cf517cdf368a80d8e9efc7be0c5c6e4717ffe61ad875f355b80fc39fd11f7bd6c4a2a43a4a70487c584a1f4b5f2d0c2059d SHA512 771ae731a7b2a549e63eaa0f375b9b768f34e4d6ed08a11ea84739e5c79029cb536f21348e9d31a57a9d75a834af846aa1654af291ee14f9e8e3884b2ed3fff3 DIST librewolf-158.0-1.source.tar.gz 1181473241 BLAKE2B cbc4061fe2a8cef737af75c1007293dbff78acd5fd85ef1cbdb57cda82ff5444d3e4bfd4c6d3600998443dcaec60d6318d08ddd7cb8a5330c6176e232b5c6a06 SHA512 7ed1d815623cdc5a34d4a49711033edda1a97538efbb6a4a48e9105fa059d380cfbab54d290deebdc8d88f52866bd011f8ca3af2e4923d21fee893232469e41b +DIST librewolf-158.0.1-1.source.tar.gz 1182285828 BLAKE2B 6db36bce1ecb73c7084ba75cdcbe1377c9589a2ab83a3759dbd8eccebeb25b0388f7b6f0076e6f3492adbb085c136beca642269680ff6f55fcdf3358a48c4109 SHA512 13da068dd672002b13355750b18204b51072655a2ba2507d8ef5d15a5bead7ca2ff621196069a2c8e6c9028b53eebd892f5263e086086520f44fa7e6de72be6b DIST wasi-sdk-34.0-arm64-linux.tar.gz 192255247 BLAKE2B 3d185e7e98a1e5091aba98f76f221b7e641acadb8dae5aa453ec24a07f1b3e1643ab2a4d4da2d86cd08fbe3e93a7617864716fb7ca64e716d203bdece6087aa5 SHA512 b27453c20b949e8c783980e69937cfa24a306ed3fe0ce2716a72b5ba4cbf231bdd0f114af6a519c41dd6cd81da7bfb06bb86d7b86a45ffd4a723fe4341d8b653 DIST wasi-sdk-34.0-x86_64-linux.tar.gz 192383077 BLAKE2B 065494c3f81555844293f33974a7230a47f50133aa2b8ed0c81de771c9342799e36a4814d6b3084daf07f19b4d7ce2dc576e134015625b2fad94c14e199ba319 SHA512 12d773d5c3d4b333c82f3280ac753c93877966df84a11b70e70d07aa1dbf20607eb64ceae836e21f9c6aed44054dc3e50f910657bedc590415e3b02789ab4685 diff --git a/www-client/librewolf/librewolf-157.0.1_p1.ebuild b/www-client/librewolf/librewolf-157.0.1_p1.ebuild deleted file mode 100644 index e96c9f9464a0..000000000000 --- a/www-client/librewolf/librewolf-157.0.1_p1.ebuild +++ /dev/null @@ -1,1320 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-157-patches-01.tar.xz" - -LLVM_COMPAT=( 22 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 -RUST_MIN_VER=1.90.0 - -PYTHON_COMPAT=( python3_{13..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Librewolf version (please rev-bump if changed) -# Used when cloning patches repository. -LIBREWOLF_PV="${PV/_p/-}" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=34.0 -WASI_SDK_LLVM_VER=23 - -HOMEPAGE="https://librewolf.net/" - -MOZ_PN="firefox" - -inherit check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg - -LIBREWOLF_SRC_URI="https://dl.librewolf.net/librewolf-source/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}.source.tar.gz" - -PATCH_URIS=( - https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="LibreWolf Web Browser" -SRC_URI="${LIBREWOLF_SRC_URI} -> librewolf-${LIBREWOLF_PV}.source.tar.gz - ${PATCH_URIS[@]} - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/librewolf-${LIBREWOLF_PV}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -SLOT="0/$(ver_cut 1)" -KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" - -RESTRICT=" - mirror - !test? ( test ) -" - -IUSE="+clang dbus debug eme-free +hardened hwaccel jack libproxy pgo pulseaudio selinux sndio" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx" -IUSE+=" system-pipewire system-png +system-webp test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate jpegxl +jumbo-build openh264 telemetry valgrind wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -FF_ONLY_DEPEND="selinux? ( sec-policy/selinux-mozilla )" -BDEPEND="${PYTHON_DEPS} - $(llvm_gen_dep ' - llvm-core/clang:${LLVM_SLOT} - llvm-core/llvm:${LLVM_SLOT} - clang? ( - llvm-core/lld:${LLVM_SLOT} - pgo? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - app-alternatives/awk - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.29.4 - net-libs/nodejs - virtual/pkgconfig - amd64? ( >=dev-lang/nasm-2.14 ) - x86? ( >=dev-lang/nasm-2.14 ) - pgo? ( - X? ( - sys-devel/gettext - x11-base/xorg-server[xvfb] - x11-apps/xhost - ) - !X? ( - gui-wm/tinywl - x11-misc/xkeyboard-config - ) - )" -COMMON_DEPEND="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.129 - >=dev-libs/nspr-4.39 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.5.4:= - >=media-libs/libaom-3.12.1:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - system-icu? ( >=dev-libs/icu-78.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) - system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-pipewire? ( >=media-video/pipewire-1.6.8:= ) - system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - valgrind? ( dev-debug/valgrind ) - wayland? ( - >=media-libs/libepoxy-1.5.10-r1 - x11-libs/gtk+:3[wayland] - ) - wifi? ( - kernel_linux? ( - || ( - net-misc/networkmanager - net-misc/connman[networkmanager] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the environment (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -llvm_check_deps() { - if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then - einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use clang && ! tc-ld-is-mold ; then - if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then - einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - - if use pgo ; then - if ! has_version -b "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then - einfo "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 - einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - ace ach af ak an ar as ast az be bg bn bn-BD bn-IN bo bqi br brx bs ca cak ca-valencia - ckb crh cs csb cy da de dsb el en-CA en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu fa - ff fi fr frp fur fy-NL ga-IE gd gl gn gu-IN gv he hi hi-IN hr hsb hto hu hy-AM - hye ia id ilo is it ixl ja ja-JP-mac ka kab kk km kn ko kok ks ku kw lb lg lij lo lt ltg - lv mai meh mix mk ml mn mr ms my nb-NO ne-NP nl nn-NO nr nso ny oc or pai pa-IN pbb pl - ppl pt-BR pt-PT quy qvi rm ro ru rw sah sat sc scn sco si sk skr sl son sq sr ss st sv-SE - sw szl ta ta-LK te tg th tl tn tr trs ts tsz uk ur uz ve vi wo xcl xh zam zh-CN zh-TW zu -) -MOZ_LANG_MAP=() - -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 - - MOZ_LANG_MAP+=("l10n_${xflag/[_@]/-} ${lang}") - - IUSE+=" l10n_${xflag/[_@]/-}" - done -} -mozilla_set_globals - -moz_clear_vendor_checksums() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -ne 1 ]] ; then - die "${FUNCNAME} requires exact one argument" - fi - - einfo "Clearing cargo checksums for ${1} ..." - - sed -i \ - -e 's/\("files":{\)[^}]*/\1/' \ - "${S}"/third_party/rust/${1}/.cargo-checksum.json || die -} - -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} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_add_options_mk() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_use_enable() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_enable "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -mozconfig_use_with() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_with "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -virtwl() { - debug-print-function ${FUNCNAME} "$@" - - [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument" - [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to be set; try xdg_environment_reset" - tinywl -h >/dev/null || die 'tinywl -h failed' - - local VIRTWL VIRTWL_PID - coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo $WAYLAND_DISPLAY; read _; kill $PPID'; } - local -x WAYLAND_DISPLAY - read WAYLAND_DISPLAY <&${VIRTWL[0]} - - debug-print "${FUNCNAME}: $@" - "$@" - local r=$? - - [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly" - exec {VIRTWL[0]}<&- {VIRTWL[1]}>&- - return $r -} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]] ; then - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_setup() { - - # Get LTO from environment; export after this phase for use in src_configure (etc) - use_lto=no - - if [[ ${MERGE_TYPE} != binary ]] ; then - - if tc-is-lto; then - use_lto=yes - # LTO is handled via configure - filter-lto - fi - - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - if [[ ${use_lto} = yes ]]; then - # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, - # bmo#1516758, bgo#942288 - filter-flags -Werror=lto-type-mismatch -Werror=odr - fi - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - fi - - check-reqs_pkg_setup - llvm-r1_pkg_setup - rust_pkg_setup - python-any-r1_pkg_setup - - # Avoid PGO profiling problems due to environment leakage - # These should *always* be cleaned up anyway - unset \ - DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XAUTHORITY \ - XDG_CACHE_HOME \ - XDG_SESSION_COOKIE - - # Build system is using /proc/self/oom_score_adj, bug #604394 - addpredict /proc/self/oom_score_adj - - if use pgo ; then - # Update 105.0: "/proc/self/oom_score_adj" isn't enough anymore with pgo, but not sure - # whether that's due to better OOM handling by Firefox (bmo#1771712), or portage - # (PORTAGE_SCHEDULING_POLICY) update... - addpredict /proc - - # Clear tons of conditions, since PGO is hardware-dependant. - addpredict /dev - fi - - if ! mountpoint -q /dev/shm ; then - # If /dev/shm is not available, configure is known to fail with - # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py - ewarn "/dev/shm is not mounted -- expect build failures!" - fi - - # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) - # Note: These are for Gentoo Linux use ONLY. For your own distribution, please - # get your own set of keys. - if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then - MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc" - fi - - if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then - MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ" - fi - - # Mozilla API keys (see https://location.services.mozilla.com/api) - # Note: These are for Gentoo Linux use ONLY. For your own distribution, please - # get your own set of keys. - if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then - MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005" - fi - - # Ensure we use C locale when building, bug #746215 - export LC_ALL=C - fi - - export use_lto - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -src_unpack() { - local _lp_dir="${WORKDIR}/language_packs" - local _src_file - - if [[ ! -d "${_lp_dir}" ]] ; then - mkdir "${_lp_dir}" || die - fi - - for _src_file in ${A} ; do - if [[ ${_src_file} == *.xpi ]]; then - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" - else - unpack ${_src_file} - fi - done -} - -src_prepare() { - if [[ ${use_lto} == "yes" ]]; then - rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die - fi - - # Workaround for bgo#915651 and bmo#1988166 on musl - if use elibc_glibc ; then - rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die - rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die - fi - - eapply "${WORKDIR}/firefox-patches" - - # Allow user to apply any additional patches without modifying ebuild - eapply_user - - # Make cargo respect MAKEOPTS - export CARGO_BUILD_JOBS="$(makeopts_jobs)" - - # Workaround for bgo#915651 - if ! use elibc_glibc ; then - if use amd64 ; then - export RUST_TARGET="x86_64-unknown-linux-musl" - elif use x86 ; then - export RUST_TARGET="i686-unknown-linux-musl" - elif use arm64 ; then - export RUST_TARGET="aarch64-unknown-linux-musl" - elif use loong; then - # Only the LP64D ABI of LoongArch64 is actively supported among - # the wider Linux ecosystem, so the assumption is safe. - export RUST_TARGET="loongarch64-unknown-linux-musl" - elif use ppc64 ; then - export RUST_TARGET="powerpc64le-unknown-linux-musl" - elif use riscv ; then - # We can pretty safely rule out any 32-bit riscvs, but 64-bit riscvs also have tons of - # different ABIs available. riscv64gc-unknown-linux-musl seems to be the best working - # guess right now though. - elog "riscv detected, forcing a riscv64 target for now." - export RUST_TARGET="riscv64gc-unknown-linux-musl" - else - die "Unknown musl chost, please post a new bug with your rustc -vV along with emerge --info" - fi - fi - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - fi - - # Make LTO respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed sedding multiprocessing.cpu_count" - - # sed-in toolchain prefix - sed -i \ - -e "s/objdump/${CHOST}-objdump/" \ - "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py || die "sed failed to set toolchain prefix" - - sed -i \ - -e 's/ccache_stats = None/return None/' \ - "${S}"/python/mozbuild/mozbuild/controller/building.py || die "sed failed to disable ccache stats call" - - einfo "Removing pre-built binaries ..." - - find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die - - # Clear checksums from cargo crates we've manually patched. - # moz_clear_vendor_checksums xyz - moz_clear_vendor_checksums bindgen - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # Create build dir - BUILD_DIR="${WORKDIR}/${PN}_build" - mkdir -p "${BUILD_DIR}" || die - - # Write API keys to disk - echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die - echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || die - echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die - - xdg_environment_reset -} - -src_configure() { - # Show flags set at the beginning - einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" - einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}" - einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}" - einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}" - einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" - - local have_switched_compiler= - if use clang; then - # Force clang - einfo "Enforcing the use of clang due to USE=clang ..." - - local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }') - [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}") - [[ -z ${version_clang} ]] && die "Failed to read clang version!" - - if tc-is-gcc; then - have_switched_compiler=yes - fi - - AR=llvm-ar - CC=${CHOST}-clang-${version_clang} - CXX=${CHOST}-clang++-${version_clang} - NM=llvm-nm - RANLIB=llvm-ranlib - elif ! use clang && ! tc-is-gcc ; then - # Force gcc - have_switched_compiler=yes - einfo "Enforcing the use of gcc due to USE=-clang ..." - AR=gcc-ar - CC=${CHOST}-gcc - CXX=${CHOST}-g++ - NM=gcc-nm - RANLIB=gcc-ranlib - fi - - if [[ -n "${have_switched_compiler}" ]] ; then - # Because we switched active compiler we have to ensure - # that no unsupported flags are set - strip-unsupported-flags - fi - - # Ensure we use correct toolchain, - # AS is used in a non-standard way by upstream, #bmo1654031 - export HOST_CC="$(tc-getBUILD_CC)" - export HOST_CXX="$(tc-getBUILD_CXX)" - export AS="$(tc-getCC) -c" - - # Configuration tests expect llvm-readelf output, bug 913130 - READELF="llvm-readelf" - - tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG - - # Pass the correct toolchain paths through cbindgen - if tc-is-cross-compiler ; then - export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} --target=${CHOST} ${BINDGEN_CFLAGS-}" - fi - - # Set MOZILLA_FIVE_HOME - export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" - - # python/mach/mach/mixin/process.py fails to detect SHELL - export SHELL="${EPREFIX}/bin/bash" - - # Set state path - export MOZBUILD_STATE_PATH="${BUILD_DIR}" - - # Set MOZCONFIG - export MOZCONFIG="${S}/.mozconfig" - - # Initialize MOZCONFIG - mozconfig_add_options_ac '' --enable-application=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - export MOZILLA_OFFICIAL=1 - - mozconfig_add_options_ac 'Gentoo default' \ - --allow-addon-sideload \ - --disable-cargo-incremental \ - --disable-crashreporter \ - --disable-disk-remnant-avoidance \ - --disable-geckodriver \ - --disable-install-strip \ - --disable-legacy-profile-creation \ - --disable-parental-controls \ - --disable-strip \ - --disable-updater \ - --enable-negotiateauth \ - --enable-new-pass-manager \ - --enable-packed-relative-relocs \ - --enable-release \ - --enable-system-policies \ - --host="${CBUILD:-${CHOST}}" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --prefix="${EPREFIX}/usr" \ - --target="${CHOST}" \ - --without-ccache \ - --with-intl-api \ - --with-libclang-path="$(llvm-config --libdir)" \ - --with-system-ffi \ - --with-system-gbm \ - --with-system-libdrm \ - --with-system-nspr \ - --with-system-nss \ - --with-system-pixman \ - --with-system-zlib \ - --with-toolchain-prefix="${CHOST}-" \ - --with-unsigned-addon-scopes=app,system - - # Librewolf - mozconfig_add_options_ac 'LibreWolf Branding' \ - --with-app-name="librewolf" \ - --with-app-basename="librewolf" \ - --with-branding=browser/branding/librewolf - export MOZ_APP_REMOTINGNAME=LibreWolf - - # I really have know idea if this is actually doing anything. - mozconfig_add_options_ac 'LibreWolf Localization' \ - --with-l10n-base=$PWD/lw/l10n - - ## Controlled via 'telemetry' IUSE - # mozconfig_add_options_mk 'LibreWolf Disable Telemetry' \ - # MOZ_CRASHREPORTER=0 \ - # MOZ_DATA_REPORTING=0 \ - # MOZ_SERVICES_HEALTHREPORT=0 \ - # MOZ_TELEMETRY_REPORTING=0 - - export MOZ_REQUIRE_SIGNING= - - # Set update channel - mozconfig_add_options_ac '' --enable-update-channel=release - - # Whitelist to allow unkeyworded arches to build with "--disable-rust-simd" by default. - if use amd64 || use arm64 || use ppc64 || use loong || use riscv ; then - mozconfig_add_options_ac '' --enable-rust-simd - fi - - # For future keywording: This is currently (97.0) only supported on: - # amd64, arm, arm64 & x86. - # Might want to flip the logic around if Firefox is to support more arches. - # bug 833001, bug 903411#c8 - if use loong || use ppc64 || use riscv; then - mozconfig_add_options_ac '' --disable-sandbox - else - mozconfig_add_options_ac '' --enable-sandbox - fi - - # riscv-related options, bgo#947337, bgo#947338, bgo#977845 - if use riscv ; then - mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc - fi - - mozconfig_use_enable valgrind - - if use valgrind ; then - mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - fi - - if [[ -s "${S}/api-google.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-safebrowsing-api-keyfile="${S}/api-google.key" - else - einfo "Building without Google API key ..." - fi - - if [[ -s "${S}/api-location.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-location-service-api-keyfile="${S}/api-location.key" - else - einfo "Building without Location API key ..." - fi - - if [[ -s "${S}/api-mozilla.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-mozilla-api-keyfile="${S}/api-mozilla.key" - else - einfo "Building without Mozilla API key ..." - fi - - mozconfig_use_with system-av1 - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-icu - mozconfig_use_with system-jpeg - mozconfig_use_with system-libevent - mozconfig_use_with system-libvpx - mozconfig_use_with system-pipewire - mozconfig_use_with system-png - mozconfig_use_with system-webp - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - mozconfig_use_enable jumbo-build unified-build - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - mozconfig_add_options_ac "+hardened stl" --enable-stl-hardening - append-ldflags "-Wl,-z,relro -Wl,-z,now" - - # Increase the FORTIFY_SOURCE value, #910071. - sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' "${S}"/build/moz.configure/toolchain.configure || die - fi - - local myaudiobackends="" - use jack && myaudiobackends+="jack," - use sndio && myaudiobackends+="sndio," - use pulseaudio && myaudiobackends+="pulseaudio," - ! use pulseaudio && myaudiobackends+="alsa," - - mozconfig_add_options_ac '--enable-audio-backends' --enable-audio-backends="${myaudiobackends::-1}" - - mozconfig_use_enable wifi necko-wifi - - if use X && use wayland ; then - mozconfig_add_options_ac '+x11+wayland' --enable-default-toolkit=cairo-gtk3-x11-wayland - elif ! use X && use wayland ; then - mozconfig_add_options_ac '+wayland' --enable-default-toolkit=cairo-gtk3-wayland-only - else - mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only - fi - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - fi - - ! use jpegxl && mozconfig_add_options_ac '-jpegxl' --disable-jxl - - if [[ ${use_lto} == "yes" ]] ; then - if use clang ; then - # Upstream only supports lld or mold when using clang. - if tc-ld-is-mold ; then - # mold expects the -flto line from *FLAGS configuration, bgo#923119 - append-ldflags "-flto=thin" - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld - fi - - mozconfig_add_options_ac '+lto' --enable-lto=cross - - else - # ThinLTO is currently broken, see bmo#1644409. - # mold does not support gcc+lto combination. - mozconfig_add_options_ac '+lto' --enable-lto=full - mozconfig_add_options_ac "linker is set to bfd" --enable-linker=bfd - fi - - else - # Avoid auto-magic on linker - if use clang ; then - # lld is upstream's default - if tc-ld-is-mold ; then - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "forcing ld=lld due to USE=clang" --enable-linker=lld - fi - - else - if tc-ld-is-mold ; then - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "linker is set to bfd due to USE=-clang" --enable-linker=bfd - fi - fi - fi - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=TAR - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - else - # Attempt to fix pgo hanging with gcc, bgo#966309. - export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 - fi - fi - - mozconfig_use_enable debug - if use debug ; then - mozconfig_add_options_ac '+debug' --disable-optimize - mozconfig_add_options_ac '+debug' --enable-jemalloc - mozconfig_add_options_ac '+debug' --enable-real-time-tracing - else - mozconfig_add_options_ac 'Gentoo defaults' --disable-real-time-tracing - - if is-flag '-g*' ; then - if use clang ; then - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols=$(get-flag '-g*') - else - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols - fi - else - mozconfig_add_options_ac 'Gentoo default' --disable-debug-symbols - fi - - if is-flag '-O0' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O0 - elif is-flag '-O4' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O4 - elif is-flag '-O3' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O3 - elif is-flag '-O1' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O1 - elif is-flag '-Os' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-Os - else - mozconfig_add_options_ac "Gentoo default" --enable-optimize=-O2 - fi - fi - - # Debug flag was handled via configure - filter-flags '-g*' - - # Optimization flag was handled via configure - filter-flags '-O*' - - # elf-hack - # Filter "-z,pack-relative-relocs" and let the build system handle it instead. - if use amd64 || use x86 ; then - filter-flags "-z,pack-relative-relocs" - - if tc-ld-is-mold ; then - # relr-elf-hack is currently broken with mold, bgo#916259 - mozconfig_add_options_ac 'disable elf-hack with mold linker' --disable-elf-hack - else - mozconfig_add_options_ac 'relr elf-hack' --enable-elf-hack=relr - fi - elif use loong || use ppc64 || use riscv ; then - # '--disable-elf-hack' is not recognized on loong/ppc64/riscv, - # see bgo #917049, #930046 - :; - else - mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack - fi - - if ! use elibc_glibc; then - mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc - fi - - # System-av1 fix - use system-av1 && append-ldflags "-Wl,--undefined-version" - - # Make revdep-rebuild.sh happy; Also required for musl - append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags - - # Pass $MAKEOPTS to build system - export MOZ_MAKE_FLAGS="${MAKEOPTS}" - - # Use system's Python environment - export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach - - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # Disable notification when build system has finished - export MOZ_NOSPAM=1 - - # Portage sets XARGS environment variable to "xargs -r" by default which - # breaks build system's check_prog() function which doesn't support arguments - mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs" - - # Set build dir - mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}" - - # Show flags we will use - einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" - einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}" - einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}" - einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}" - einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" - - # Handle EXTRA_CONF and show summary - local ac opt hash reason - - # Apply EXTRA_ECONF entries to $MOZCONFIG - if [[ -n ${EXTRA_ECONF} ]] ; then - IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!} - for opt in "${ac[@]}"; do - mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--} - done - fi - - echo - echo "==========================================================" - echo "Building ${PF} with the following configuration" - grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do - [[ -z ${hash} || ${hash} == \# ]] \ - || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}" - printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}" - done - echo "==========================================================" - echo - - ./mach configure || die -} - -src_compile() { - local virtx_cmd= - - if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then - # increase ulimit with mold+lto, bugs #892641, #907485 - if ! ulimit -n 16384 1>/dev/null 2>&1 ; then - ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." - ewarn "Please see bugs #892641 & #907485." - else - ulimit -n 16384 - fi - fi - - if use pgo; then - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - addpredict /root - - if ! use X; then - virtx_cmd=virtwl - else - virtx_cmd=virtx - fi - fi - - if ! use X; then - local -x GDK_BACKEND=wayland - else - local -x GDK_BACKEND=x11 - fi - - ${virtx_cmd} ./mach build --verbose || die -} - -src_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -src_install() { - # xpcshell is getting called during install - pax-mark m \ - "${BUILD_DIR}"/dist/bin/xpcshell \ - "${BUILD_DIR}"/dist/bin/${PN} \ - "${BUILD_DIR}"/dist/bin/plugin-container - - #DESTDIR="${D}" ./mach install || die - ## LibreWolf - # ./mach install doesn't install the locale information for some reason. - # Use packge-multi-locale instead - local mymozlangs=() - for lang_tuple in "${MOZ_LANG_MAP[@]}"; do - IFS=' ' read -r l10n lang <<< "${lang_tuple}" - - if use "${l10n}"; then - mymozlangs+=("${lang}") - fi - done - - if (( ${#mymozlangs[@]} == 0 )); then - einfo "Running ./mach package" - ./mach package || die - else - einfo "Running ./mach package-multi-locale" - ./mach package-multi-locale --locale "${mymozlangs[@]}" || die - fi - - dodir "${MOZILLA_FIVE_HOME}" || die - cp -r "${BUILD_DIR}"/dist/librewolf/* "${ED}"/"${MOZILLA_FIVE_HOME}" || die - - ## LibreWolf - # For some reason 'local-settings.js' doesn't get properly packaged. - # Install it manually - insinto "${MOZILLA_FIVE_HOME}/defaults/pref" - doins "${S}/lw/local-settings.js" - - # Upstream cannot ship symlink but we can (bmo#658850) - rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die - dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin - - # Don't install llvm-symbolizer from llvm-core/llvm package - if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then - rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die - fi - - ## Disabled for LibreWolf - # Install policy (currently only used to disable application updates) - # insinto "${MOZILLA_FIVE_HOME}/distribution" - # newins "${FILESDIR}"/distribution.ini distribution.ini - # newins "${FILESDIR}"/disable-auto-update.policy.json policies.json - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - insinto "${PREFS_DIR}" - newins "${FILESDIR}"/gentoo-default-prefs.js gentoo-prefs.js - - local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js" - - # Set dictionary path to use system hunspell - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref" - pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); - EOF - - # Force hwaccel prefs if USE=hwaccel is enabled - if use hwaccel ; then - cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-r4 \ - >>"${GENTOO_PREFS}" \ - || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js" - - if use wayland; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel wayland prefs" - pref("gfx.x11-egl.force-enabled", false); - EOF - else - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel x11 prefs" - pref("gfx.x11-egl.force-enabled", true); - EOF - fi - - # Install the gfxtest binary on supported arches - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/gfxtest - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - fi - - # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it - if use system-harfbuzz ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref" - sticky_pref("gfx.font_rendering.graphite.enabled", true); - EOF - fi - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/${PN}" - - insinto /usr/share/icons/hicolor/symbolic/apps - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="LibreWolf" - local desktop_file="${FILESDIR}/icon/${MOZ_PN}-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - if use jpegxl ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable jpegxl via pref" - pref("image.jxl.enabled", true); - EOF - fi - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/${MOZ_PN}-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" || die - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -} diff --git a/www-client/librewolf/librewolf-157.0_p1.ebuild b/www-client/librewolf/librewolf-157.0_p1.ebuild deleted file mode 100644 index 726fed3a16fc..000000000000 --- a/www-client/librewolf/librewolf-157.0_p1.ebuild +++ /dev/null @@ -1,1320 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -FIREFOX_PATCHSET="firefox-157-patches-01.tar.xz" - -LLVM_COMPAT=( 22 ) - -# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. -RUST_NEEDS_LLVM=1 -RUST_MIN_VER=1.90.0 - -PYTHON_COMPAT=( python3_{13..14} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -VIRTUALX_REQUIRED="manual" - -# Librewolf version (please rev-bump if changed) -# Used when cloning patches repository. -LIBREWOLF_PV="${PV/_p/-}" - -# Information about the bundled wasi toolchain from -# https://github.com/WebAssembly/wasi-sdk/ -WASI_SDK_VER=34.0 -WASI_SDK_LLVM_VER=23 - -HOMEPAGE="https://librewolf.net/" - -MOZ_PN="firefox" - -inherit check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ - optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg - -LIBREWOLF_SRC_URI="https://dl.librewolf.net/librewolf-source/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}.source.tar.gz" - -PATCH_URIS=( - https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -DESCRIPTION="LibreWolf Web Browser" -SRC_URI="${LIBREWOLF_SRC_URI} -> librewolf-${LIBREWOLF_PV}.source.tar.gz - ${PATCH_URIS[@]} - wasm-sandbox? ( - amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) - arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) - )" - -S="${WORKDIR}/librewolf-${LIBREWOLF_PV}" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -SLOT="0/$(ver_cut 1)" -KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" - -RESTRICT=" - mirror - !test? ( test ) -" - -IUSE="+clang dbus debug eme-free +hardened hwaccel jack libproxy pgo pulseaudio selinux sndio" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx" -IUSE+=" system-pipewire system-png +system-webp test wayland wifi +X" - -# Firefox-only IUSE -IUSE+=" +gmp-autoupdate jpegxl +jumbo-build openh264 telemetry valgrind wasm-sandbox" - -REQUIRED_USE="|| ( X wayland ) - debug? ( !system-av1 ) - pgo? ( jumbo-build ) - wayland? ( dbus ) - wifi? ( dbus ) -" - -FF_ONLY_DEPEND="selinux? ( sec-policy/selinux-mozilla )" -BDEPEND="${PYTHON_DEPS} - $(llvm_gen_dep ' - llvm-core/clang:${LLVM_SLOT} - llvm-core/llvm:${LLVM_SLOT} - clang? ( - llvm-core/lld:${LLVM_SLOT} - pgo? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) - ) - wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) - ') - app-alternatives/awk - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.29.4 - net-libs/nodejs - virtual/pkgconfig - amd64? ( >=dev-lang/nasm-2.14 ) - x86? ( >=dev-lang/nasm-2.14 ) - pgo? ( - X? ( - sys-devel/gettext - x11-base/xorg-server[xvfb] - x11-apps/xhost - ) - !X? ( - gui-wm/tinywl - x11-misc/xkeyboard-config - ) - )" -COMMON_DEPEND="${FF_ONLY_DEPEND} - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/glib:2 - dev-libs/libffi:= - >=dev-libs/nss-3.129 - >=dev-libs/nspr-4.39 - media-libs/alsa-lib - media-libs/fontconfig - media-libs/freetype - media-libs/mesa - media-video/ffmpeg - virtual/zlib:= - virtual/freedesktop-icon-theme - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/libdrm - x11-libs/pango - x11-libs/pixman - dbus? ( - sys-apps/dbus - ) - jack? ( virtual/jack ) - pulseaudio? ( - || ( - media-libs/libpulse - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - libproxy? ( net-libs/libproxy ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( >=media-sound/sndio-1.8.0-r1 ) - system-av1? ( - >=media-libs/dav1d-1.5.4:= - >=media-libs/libaom-3.12.1:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) - ) - system-icu? ( >=dev-libs/icu-78.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) - system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-pipewire? ( >=media-video/pipewire-1.6.8:= ) - system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - valgrind? ( dev-debug/valgrind ) - wayland? ( - >=media-libs/libepoxy-1.5.10-r1 - x11-libs/gtk+:3[wayland] - ) - wifi? ( - kernel_linux? ( - || ( - net-misc/networkmanager - net-misc/connman[networkmanager] - ) - sys-apps/dbus - ) - ) - X? ( - virtual/opengl - x11-libs/cairo[X] - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb:= - )" -RDEPEND="${COMMON_DEPEND} - hwaccel? ( - media-video/libva-utils - sys-apps/pciutils - ) - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] )" -DEPEND="${COMMON_DEPEND} - X? ( - x11-base/xorg-proto - x11-libs/libICE - x11-libs/libSM - )" - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -llvm_check_deps() { - if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then - einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use clang && ! tc-ld-is-mold ; then - if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then - einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - - if use pgo ; then - if ! has_version -b "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then - einfo "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 - einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - ace ach af ak an ar as ast az be bg bn bn-BD bn-IN bo bqi br brx bs ca cak ca-valencia - ckb crh cs csb cy da de dsb el en-CA en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu fa - ff fi fr frp fur fy-NL ga-IE gd gl gn gu-IN gv he hi hi-IN hr hsb hto hu hy-AM - hye ia id ilo is it ixl ja ja-JP-mac ka kab kk km kn ko kok ks ku kw lb lg lij lo lt ltg - lv mai meh mix mk ml mn mr ms my nb-NO ne-NP nl nn-NO nr nso ny oc or pai pa-IN pbb pl - ppl pt-BR pt-PT quy qvi rm ro ru rw sah sat sc scn sco si sk skr sl son sq sr ss st sv-SE - sw szl ta ta-LK te tg th tl tn tr trs ts tsz uk ur uz ve vi wo xcl xh zam zh-CN zh-TW zu -) -MOZ_LANG_MAP=() - -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 - - MOZ_LANG_MAP+=("l10n_${xflag/[_@]/-} ${lang}") - - IUSE+=" l10n_${xflag/[_@]/-}" - done -} -mozilla_set_globals - -moz_clear_vendor_checksums() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -ne 1 ]] ; then - die "${FUNCNAME} requires exact one argument" - fi - - einfo "Clearing cargo checksums for ${1} ..." - - sed -i \ - -e 's/\("files":{\)[^}]*/\1/' \ - "${S}"/third_party/rust/${1}/.cargo-checksum.json || die -} - -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} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_add_options_mk() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_use_enable() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_enable "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -mozconfig_use_with() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_with "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -virtwl() { - debug-print-function ${FUNCNAME} "$@" - - [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument" - [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to be set; try xdg_environment_reset" - tinywl -h >/dev/null || die 'tinywl -h failed' - - local VIRTWL VIRTWL_PID - coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo $WAYLAND_DISPLAY; read _; kill $PPID'; } - local -x WAYLAND_DISPLAY - read WAYLAND_DISPLAY <&${VIRTWL[0]} - - debug-print "${FUNCNAME}: $@" - "$@" - local r=$? - - [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly" - exec {VIRTWL[0]}<&- {VIRTWL[1]}>&- - return $r -} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]] ; then - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif tc-is-lto ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_setup() { - - # Get LTO from environment; export after this phase for use in src_configure (etc) - use_lto=no - - if [[ ${MERGE_TYPE} != binary ]] ; then - - if tc-is-lto; then - use_lto=yes - # LTO is handled via configure - filter-lto - fi - - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - if [[ ${use_lto} = yes ]]; then - # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, - # bmo#1516758, bgo#942288 - filter-flags -Werror=lto-type-mismatch -Werror=odr - fi - - # Ensure we have enough disk space to compile - if use pgo || use debug ; then - CHECKREQS_DISK_BUILD="18700M" - elif [[ ${use_lto} == "yes" ]] ; then - CHECKREQS_DISK_BUILD="10900M" - else - CHECKREQS_DISK_BUILD="9700M" - fi - - check-reqs_pkg_setup - llvm-r1_pkg_setup - rust_pkg_setup - python-any-r1_pkg_setup - - # Avoid PGO profiling problems due to enviroment leakage - # These should *always* be cleaned up anyway - unset \ - DBUS_SESSION_BUS_ADDRESS \ - DISPLAY \ - ORBIT_SOCKETDIR \ - SESSION_MANAGER \ - XAUTHORITY \ - XDG_CACHE_HOME \ - XDG_SESSION_COOKIE - - # Build system is using /proc/self/oom_score_adj, bug #604394 - addpredict /proc/self/oom_score_adj - - if use pgo ; then - # Update 105.0: "/proc/self/oom_score_adj" isn't enough anymore with pgo, but not sure - # whether that's due to better OOM handling by Firefox (bmo#1771712), or portage - # (PORTAGE_SCHEDULING_POLICY) update... - addpredict /proc - - # Clear tons of conditions, since PGO is hardware-dependant. - addpredict /dev - fi - - if ! mountpoint -q /dev/shm ; then - # If /dev/shm is not available, configure is known to fail with - # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py - ewarn "/dev/shm is not mounted -- expect build failures!" - fi - - # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) - # Note: These are for Gentoo Linux use ONLY. For your own distribution, please - # get your own set of keys. - if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then - MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc" - fi - - if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then - MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ" - fi - - # Mozilla API keys (see https://location.services.mozilla.com/api) - # Note: These are for Gentoo Linux use ONLY. For your own distribution, please - # get your own set of keys. - if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then - MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005" - fi - - # Ensure we use C locale when building, bug #746215 - export LC_ALL=C - fi - - export use_lto - - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - linux-info_pkg_setup -} - -src_unpack() { - local _lp_dir="${WORKDIR}/language_packs" - local _src_file - - if [[ ! -d "${_lp_dir}" ]] ; then - mkdir "${_lp_dir}" || die - fi - - for _src_file in ${A} ; do - if [[ ${_src_file} == *.xpi ]]; then - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" - else - unpack ${_src_file} - fi - done -} - -src_prepare() { - if [[ ${use_lto} == "yes" ]]; then - rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch || die - fi - - # Workaround for bgo#915651 and bmo#1988166 on musl - if use elibc_glibc ; then - rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die - rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die - fi - - eapply "${WORKDIR}/firefox-patches" - - # Allow user to apply any additional patches without modifing ebuild - eapply_user - - # Make cargo respect MAKEOPTS - export CARGO_BUILD_JOBS="$(makeopts_jobs)" - - # Workaround for bgo#915651 - if ! use elibc_glibc ; then - if use amd64 ; then - export RUST_TARGET="x86_64-unknown-linux-musl" - elif use x86 ; then - export RUST_TARGET="i686-unknown-linux-musl" - elif use arm64 ; then - export RUST_TARGET="aarch64-unknown-linux-musl" - elif use loong; then - # Only the LP64D ABI of LoongArch64 is actively supported among - # the wider Linux ecosystem, so the assumption is safe. - export RUST_TARGET="loongarch64-unknown-linux-musl" - elif use ppc64 ; then - export RUST_TARGET="powerpc64le-unknown-linux-musl" - elif use riscv ; then - # We can pretty safely rule out any 32-bit riscvs, but 64-bit riscvs also have tons of - # different ABIs available. riscv64gc-unknown-linux-musl seems to be the best working - # guess right now though. - elog "riscv detected, forcing a riscv64 target for now." - export RUST_TARGET="riscv64gc-unknown-linux-musl" - else - die "Unknown musl chost, please post a new bug with your rustc -vV along with emerge --info" - fi - fi - - # Pre-built wasm-sandbox path manipulation. - if use wasm-sandbox ; then - if use amd64 ; then - export wasi_arch="x86_64" - elif use arm64 ; then - export wasi_arch="arm64" - else - die "wasm-sandbox enabled on unknown/unsupported arch!" - fi - - sed -i \ - -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ - -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ - -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ - -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ - toolkit/moz.configure || die "Failed to update wasi-related paths." - fi - - # Make LTO respect MAKEOPTS - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" - - sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ - "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed sedding multiprocessing.cpu_count" - - # sed-in toolchain prefix - sed -i \ - -e "s/objdump/${CHOST}-objdump/" \ - "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py || die "sed failed to set toolchain prefix" - - sed -i \ - -e 's/ccache_stats = None/return None/' \ - "${S}"/python/mozbuild/mozbuild/controller/building.py || die "sed failed to disable ccache stats call" - - einfo "Removing pre-built binaries ..." - - find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die - - # Clear checksums from cargo crates we've manually patched. - # moz_clear_vendor_checksums xyz - moz_clear_vendor_checksums bindgen - - # Respect choice for "jumbo-build" - # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 - if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then - local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} - elog "" - elog "jumbo-build defaults modified to ${my_files_per_unified_file}." - elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," - elog "if that fails try -jumbo-build before opening a bug report." - elog "" - - sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ - python/mozbuild/mozbuild/frontend/data.py || - die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" - sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ - js/src/moz.build || - die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" - fi - - # Create build dir - BUILD_DIR="${WORKDIR}/${PN}_build" - mkdir -p "${BUILD_DIR}" || die - - # Write API keys to disk - echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die - echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || die - echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die - - xdg_environment_reset -} - -src_configure() { - # Show flags set at the beginning - einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" - einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}" - einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}" - einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}" - einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" - - local have_switched_compiler= - if use clang; then - # Force clang - einfo "Enforcing the use of clang due to USE=clang ..." - - local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }') - [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}") - [[ -z ${version_clang} ]] && die "Failed to read clang version!" - - if tc-is-gcc; then - have_switched_compiler=yes - fi - - AR=llvm-ar - CC=${CHOST}-clang-${version_clang} - CXX=${CHOST}-clang++-${version_clang} - NM=llvm-nm - RANLIB=llvm-ranlib - elif ! use clang && ! tc-is-gcc ; then - # Force gcc - have_switched_compiler=yes - einfo "Enforcing the use of gcc due to USE=-clang ..." - AR=gcc-ar - CC=${CHOST}-gcc - CXX=${CHOST}-g++ - NM=gcc-nm - RANLIB=gcc-ranlib - fi - - if [[ -n "${have_switched_compiler}" ]] ; then - # Because we switched active compiler we have to ensure - # that no unsupported flags are set - strip-unsupported-flags - fi - - # Ensure we use correct toolchain, - # AS is used in a non-standard way by upstream, #bmo1654031 - export HOST_CC="$(tc-getBUILD_CC)" - export HOST_CXX="$(tc-getBUILD_CXX)" - export AS="$(tc-getCC) -c" - - # Configuration tests expect llvm-readelf output, bug 913130 - READELF="llvm-readelf" - - tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG - - # Pass the correct toolchain paths through cbindgen - if tc-is-cross-compiler ; then - export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} --target=${CHOST} ${BINDGEN_CFLAGS-}" - fi - - # Set MOZILLA_FIVE_HOME - export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" - - # python/mach/mach/mixin/process.py fails to detect SHELL - export SHELL="${EPREFIX}/bin/bash" - - # Set state path - export MOZBUILD_STATE_PATH="${BUILD_DIR}" - - # Set MOZCONFIG - export MOZCONFIG="${S}/.mozconfig" - - # Initialize MOZCONFIG - mozconfig_add_options_ac '' --enable-application=browser - mozconfig_add_options_ac '' --enable-project=browser - - # Set Gentoo defaults - export MOZILLA_OFFICIAL=1 - - mozconfig_add_options_ac 'Gentoo default' \ - --allow-addon-sideload \ - --disable-cargo-incremental \ - --disable-crashreporter \ - --disable-disk-remnant-avoidance \ - --disable-geckodriver \ - --disable-install-strip \ - --disable-legacy-profile-creation \ - --disable-parental-controls \ - --disable-strip \ - --disable-updater \ - --enable-negotiateauth \ - --enable-new-pass-manager \ - --enable-packed-relative-relocs \ - --enable-release \ - --enable-system-policies \ - --host="${CBUILD:-${CHOST}}" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - --prefix="${EPREFIX}/usr" \ - --target="${CHOST}" \ - --without-ccache \ - --with-intl-api \ - --with-libclang-path="$(llvm-config --libdir)" \ - --with-system-ffi \ - --with-system-gbm \ - --with-system-libdrm \ - --with-system-nspr \ - --with-system-nss \ - --with-system-pixman \ - --with-system-zlib \ - --with-toolchain-prefix="${CHOST}-" \ - --with-unsigned-addon-scopes=app,system - - # Librewolf - mozconfig_add_options_ac 'LibreWolf Branding' \ - --with-app-name="librewolf" \ - --with-app-basename="librewolf" \ - --with-branding=browser/branding/librewolf - export MOZ_APP_REMOTINGNAME=LibreWolf - - # I really have know idea if this is actually doing anything. - mozconfig_add_options_ac 'LibreWolf Localization' \ - --with-l10n-base=$PWD/lw/l10n - - ## Controlled via 'telemetry' IUSE - # mozconfig_add_options_mk 'LibreWolf Disable Telemetry' \ - # MOZ_CRASHREPORTER=0 \ - # MOZ_DATA_REPORTING=0 \ - # MOZ_SERVICES_HEALTHREPORT=0 \ - # MOZ_TELEMETRY_REPORTING=0 - - export MOZ_REQUIRE_SIGNING= - - # Set update channel - mozconfig_add_options_ac '' --enable-update-channel=release - - # Whitelist to allow unkeyworded arches to build with "--disable-rust-simd" by default. - if use amd64 || use arm64 || use ppc64 || use loong || use riscv ; then - mozconfig_add_options_ac '' --enable-rust-simd - fi - - # For future keywording: This is currently (97.0) only supported on: - # amd64, arm, arm64 & x86. - # Might want to flip the logic around if Firefox is to support more arches. - # bug 833001, bug 903411#c8 - if use loong || use ppc64 || use riscv; then - mozconfig_add_options_ac '' --disable-sandbox - else - mozconfig_add_options_ac '' --enable-sandbox - fi - - # riscv-related options, bgo#947337, bgo#947338, bgo#977845 - if use riscv ; then - mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc - fi - - mozconfig_use_enable valgrind - - if use valgrind ; then - mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox - mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc - - sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die - fi - - if [[ -s "${S}/api-google.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-safebrowsing-api-keyfile="${S}/api-google.key" - else - einfo "Building without Google API key ..." - fi - - if [[ -s "${S}/api-location.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-google-location-service-api-keyfile="${S}/api-location.key" - else - einfo "Building without Location API key ..." - fi - - if [[ -s "${S}/api-mozilla.key" ]] ; then - local key_origin="Gentoo default" - if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then - key_origin="User value" - fi - - mozconfig_add_options_ac "${key_origin}" \ - --with-mozilla-api-keyfile="${S}/api-mozilla.key" - else - einfo "Building without Mozilla API key ..." - fi - - mozconfig_use_with system-av1 - mozconfig_use_with system-harfbuzz - mozconfig_use_with system-icu - mozconfig_use_with system-jpeg - mozconfig_use_with system-libevent - mozconfig_use_with system-libvpx - mozconfig_use_with system-pipewire - mozconfig_use_with system-png - mozconfig_use_with system-webp - - mozconfig_use_enable dbus - mozconfig_use_enable libproxy - mozconfig_use_enable jumbo-build unified-build - - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme - - if use hardened ; then - mozconfig_add_options_ac "+hardened" --enable-hardening - mozconfig_add_options_ac "+hardened stl" --enable-stl-hardening - append-ldflags "-Wl,-z,relro -Wl,-z,now" - - # Increase the FORTIFY_SOURCE value, #910071. - sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' "${S}"/build/moz.configure/toolchain.configure || die - fi - - local myaudiobackends="" - use jack && myaudiobackends+="jack," - use sndio && myaudiobackends+="sndio," - use pulseaudio && myaudiobackends+="pulseaudio," - ! use pulseaudio && myaudiobackends+="alsa," - - mozconfig_add_options_ac '--enable-audio-backends' --enable-audio-backends="${myaudiobackends::-1}" - - mozconfig_use_enable wifi necko-wifi - - if use X && use wayland ; then - mozconfig_add_options_ac '+x11+wayland' --enable-default-toolkit=cairo-gtk3-x11-wayland - elif ! use X && use wayland ; then - mozconfig_add_options_ac '+wayland' --enable-default-toolkit=cairo-gtk3-wayland-only - else - mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only - fi - - # wasm-sandbox - # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. - if use wasm-sandbox ; then - mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" - else - mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries - mozconfig_use_with system-harfbuzz system-graphite2 - fi - - ! use jpegxl && mozconfig_add_options_ac '-jpegxl' --disable-jxl - - if [[ ${use_lto} == "yes" ]] ; then - if use clang ; then - # Upstream only supports lld or mold when using clang. - if tc-ld-is-mold ; then - # mold expects the -flto line from *FLAGS configuration, bgo#923119 - append-ldflags "-flto=thin" - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld - fi - - mozconfig_add_options_ac '+lto' --enable-lto=cross - - else - # ThinLTO is currently broken, see bmo#1644409. - # mold does not support gcc+lto combination. - mozconfig_add_options_ac '+lto' --enable-lto=full - mozconfig_add_options_ac "linker is set to bfd" --enable-linker=bfd - fi - - else - # Avoid auto-magic on linker - if use clang ; then - # lld is upstream's default - if tc-ld-is-mold ; then - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "forcing ld=lld due to USE=clang" --enable-linker=lld - fi - - else - if tc-ld-is-mold ; then - mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold - else - mozconfig_add_options_ac "linker is set to bfd due to USE=-clang" --enable-linker=bfd - fi - fi - fi - - # PGO was moved outside lto block to allow building pgo without lto. - if use pgo ; then - mozconfig_add_options_ac '+pgo' MOZ_PGO=1 - - # Avoid compressing just-built instrumented Firefox with - # high levels of compression. Just use tar as a container - # to save >=10 minutes. - export MOZ_PKG_FORMAT=TAR - - if use clang ; then - # Used in build/pgo/profileserver.py - export LLVM_PROFDATA="llvm-profdata" - else - # Attempt to fix pgo hanging with gcc, bgo#966309. - export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 - fi - fi - - mozconfig_use_enable debug - if use debug ; then - mozconfig_add_options_ac '+debug' --disable-optimize - mozconfig_add_options_ac '+debug' --enable-jemalloc - mozconfig_add_options_ac '+debug' --enable-real-time-tracing - else - mozconfig_add_options_ac 'Gentoo defaults' --disable-real-time-tracing - - if is-flag '-g*' ; then - if use clang ; then - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols=$(get-flag '-g*') - else - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols - fi - else - mozconfig_add_options_ac 'Gentoo default' --disable-debug-symbols - fi - - if is-flag '-O0' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O0 - elif is-flag '-O4' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O4 - elif is-flag '-O3' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O3 - elif is-flag '-O1' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O1 - elif is-flag '-Os' ; then - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-Os - else - mozconfig_add_options_ac "Gentoo default" --enable-optimize=-O2 - fi - fi - - # Debug flag was handled via configure - filter-flags '-g*' - - # Optimization flag was handled via configure - filter-flags '-O*' - - # elf-hack - # Filter "-z,pack-relative-relocs" and let the build system handle it instead. - if use amd64 || use x86 ; then - filter-flags "-z,pack-relative-relocs" - - if tc-ld-is-mold ; then - # relr-elf-hack is currently broken with mold, bgo#916259 - mozconfig_add_options_ac 'disable elf-hack with mold linker' --disable-elf-hack - else - mozconfig_add_options_ac 'relr elf-hack' --enable-elf-hack=relr - fi - elif use loong || use ppc64 || use riscv ; then - # '--disable-elf-hack' is not recognized on loong/ppc64/riscv, - # see bgo #917049, #930046 - :; - else - mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack - fi - - if ! use elibc_glibc; then - mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc - fi - - # System-av1 fix - use system-av1 && append-ldflags "-Wl,--undefined-version" - - # Make revdep-rebuild.sh happy; Also required for musl - append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags - - # Pass $MAKEOPTS to build system - export MOZ_MAKE_FLAGS="${MAKEOPTS}" - - # Use system's Python environment - export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach - - export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" - - if ! use telemetry; then - mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" - mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" - fi - - mozconfig_use_enable test tests - - # Disable notification when build system has finished - export MOZ_NOSPAM=1 - - # Portage sets XARGS environment variable to "xargs -r" by default which - # breaks build system's check_prog() function which doesn't support arguments - mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs" - - # Set build dir - mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}" - - # Show flags we will use - einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" - einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}" - einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}" - einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}" - einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" - - # Handle EXTRA_CONF and show summary - local ac opt hash reason - - # Apply EXTRA_ECONF entries to $MOZCONFIG - if [[ -n ${EXTRA_ECONF} ]] ; then - IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!} - for opt in "${ac[@]}"; do - mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--} - done - fi - - echo - echo "==========================================================" - echo "Building ${PF} with the following configuration" - grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do - [[ -z ${hash} || ${hash} == \# ]] \ - || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}" - printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}" - done - echo "==========================================================" - echo - - ./mach configure || die -} - -src_compile() { - local virtx_cmd= - - if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then - # increase ulimit with mold+lto, bugs #892641, #907485 - if ! ulimit -n 16384 1>/dev/null 2>&1 ; then - ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." - ewarn "Please see bugs #892641 & #907485." - else - ulimit -n 16384 - fi - fi - - if use pgo; then - # Reset and cleanup environment variables used by GNOME/XDG - gnome2_environment_reset - - addpredict /root - - if ! use X; then - virtx_cmd=virtwl - else - virtx_cmd=virtx - fi - fi - - if ! use X; then - local -x GDK_BACKEND=wayland - else - local -x GDK_BACKEND=x11 - fi - - ${virtx_cmd} ./mach build --verbose || die -} - -src_test() { - # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html - local -a failures=() - - # Some tests respect this - local -x MOZ_HEADLESS=1 - - # Check testing/mach_commands.py - einfo "Testing with cppunittest ..." - ./mach cppunittest - local ret=$? - if [[ ${ret} -ne 0 ]]; then - eerror "Test suite cppunittest failed with error code ${ret}" - failures+=( cppunittest ) - fi - - if [[ ${#failures} -eq 0 ]]; then - einfo "Test suites succeeded" - else - die "Test suites failed: ${failures[@]}" - fi -} - -src_install() { - # xpcshell is getting called during install - pax-mark m \ - "${BUILD_DIR}"/dist/bin/xpcshell \ - "${BUILD_DIR}"/dist/bin/${PN} \ - "${BUILD_DIR}"/dist/bin/plugin-container - - #DESTDIR="${D}" ./mach install || die - ## LibreWolf - # ./mach install doesn't install the locale information for some reason. - # Use packge-multi-locale instead - local mymozlangs=() - for lang_tuple in "${MOZ_LANG_MAP[@]}"; do - IFS=' ' read -r l10n lang <<< "${lang_tuple}" - - if use "${l10n}"; then - mymozlangs+=("${lang}") - fi - done - - if (( ${#mymozlangs[@]} == 0 )); then - einfo "Running ./mach package" - ./mach package || die - else - einfo "Running ./mach package-multi-locale" - ./mach package-multi-locale --locale "${mymozlangs[@]}" || die - fi - - dodir "${MOZILLA_FIVE_HOME}" || die - cp -r "${BUILD_DIR}"/dist/librewolf/* "${ED}"/"${MOZILLA_FIVE_HOME}" || die - - ## LibreWolf - # For some reason 'local-settings.js' doesn't get properly packaged. - # Install it manually - insinto "${MOZILLA_FIVE_HOME}/defaults/pref" - doins "${S}/lw/local-settings.js" - - # Upstream cannot ship symlink but we can (bmo#658850) - rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die - dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin - - # Don't install llvm-symbolizer from llvm-core/llvm package - if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then - rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die - fi - - ## Disabled for LibreWolf - # Install policy (currently only used to disable application updates) - # insinto "${MOZILLA_FIVE_HOME}/distribution" - # newins "${FILESDIR}"/distribution.ini distribution.ini - # newins "${FILESDIR}"/disable-auto-update.policy.json policies.json - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - insinto "${PREFS_DIR}" - newins "${FILESDIR}"/gentoo-default-prefs.js gentoo-prefs.js - - local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js" - - # Set dictionary path to use system hunspell - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref" - pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); - EOF - - # Force hwaccel prefs if USE=hwaccel is enabled - if use hwaccel ; then - cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-r4 \ - >>"${GENTOO_PREFS}" \ - || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js" - - if use wayland; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel wayland prefs" - pref("gfx.x11-egl.force-enabled", false); - EOF - else - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel x11 prefs" - pref("gfx.x11-egl.force-enabled", true); - EOF - fi - - # Install the gfxtest binary on supported arches - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/gfxtest - fi - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - fi - - # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it - if use system-harfbuzz ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref" - sticky_pref("gfx.font_rendering.graphite.enabled", true); - EOF - fi - - # Add telemetry config prefs, just in case something happens in future and telemetry build - # options stop working. - if ! use telemetry ; then - cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/${PN}" - - insinto /usr/share/icons/hicolor/symbolic/apps - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="LibreWolf" - local desktop_file="${FILESDIR}/icon/${MOZ_PN}-r3.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - if use jpegxl ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to enable jpegxl via pref" - pref("image.jxl.enabled", true); - EOF - fi - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/${MOZ_PN}-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" || die - - readme.gentoo_create_doc -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - readme.gentoo_print_elog - - optfeature_header "Optional programs for extra features:" - optfeature "desktop notifications" x11-libs/libnotify - optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas - optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal - - if ! has_version "sys-libs/glibc"; then - elog - elog "glibc not found! You won't be able to play DRM content." - elog "See Gentoo bug #910309 or upstream bug #1843683." - elog - fi -} diff --git a/www-client/librewolf/librewolf-158.0.1_p1.ebuild b/www-client/librewolf/librewolf-158.0.1_p1.ebuild new file mode 100644 index 000000000000..fcb2a8287673 --- /dev/null +++ b/www-client/librewolf/librewolf-158.0.1_p1.ebuild @@ -0,0 +1,1308 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FIREFOX_PATCHSET="firefox-158-patches-02.tar.xz" + +LLVM_COMPAT=( 22 23 ) + +# This will also filter rust versions that don't match LLVM_COMPAT in the non-clang path; this is fine. +RUST_NEEDS_LLVM=1 +RUST_MIN_VER=1.90.0 + +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_REQ_USE="ncurses,sqlite,ssl" + +VIRTUALX_REQUIRED="manual" + +# Librewolf version (please rev-bump if changed) +# Used when cloning patches repository. +LIBREWOLF_PV="${PV/_p/-}" + +# Information about the bundled wasi toolchain from +# https://github.com/WebAssembly/wasi-sdk/ +WASI_SDK_VER=34.0 +WASI_SDK_LLVM_VER=23 + +HOMEPAGE="https://librewolf.net/" + +MOZ_PN="firefox" + +inherit check-reqs desktop flag-o-matic gnome2-utils linux-info llvm-r1 multiprocessing \ + optfeature pax-utils python-any-r1 readme.gentoo-r1 rust toolchain-funcs virtualx xdg + +LIBREWOLF_SRC_URI="https://dl.librewolf.net/librewolf-source/${LIBREWOLF_PV}/librewolf-${LIBREWOLF_PV}.source.tar.gz" + +PATCH_URIS=( + https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET} +) + +DESCRIPTION="LibreWolf Web Browser" +SRC_URI="${LIBREWOLF_SRC_URI} -> librewolf-${LIBREWOLF_PV}.source.tar.gz + ${PATCH_URIS[@]} + wasm-sandbox? ( + amd64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-x86_64-linux.tar.gz ) + arm64? ( https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER/.*/}/wasi-sdk-${WASI_SDK_VER}-arm64-linux.tar.gz ) + )" + +S="${WORKDIR}/librewolf-${LIBREWOLF_PV}" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +SLOT="0/$(ver_cut 1)" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" + +RESTRICT=" + mirror + !test? ( test ) +" + +IUSE="+clang dbus debug eme-free +hardened hwaccel jack libproxy pgo pulseaudio selinux sndio" +IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx" +IUSE+=" system-pipewire system-png +system-webp test wayland wifi +X" + +# Firefox-only IUSE +IUSE+=" +gmp-autoupdate +jumbo-build openh264 telemetry valgrind wasm-sandbox" + +REQUIRED_USE="|| ( X wayland ) + debug? ( !system-av1 ) + pgo? ( jumbo-build ) + wayland? ( dbus ) + wifi? ( dbus ) +" + +FF_ONLY_DEPEND="selinux? ( sec-policy/selinux-mozilla )" +BDEPEND="${PYTHON_DEPS} + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + clang? ( + llvm-core/lld:${LLVM_SLOT} + pgo? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[profile] ) + ) + wasm-sandbox? ( llvm-core/lld:${LLVM_SLOT} ) + ') + app-alternatives/awk + app-arch/unzip + app-arch/zip + >=dev-util/cbindgen-0.29.4 + net-libs/nodejs[ssl] + virtual/pkgconfig + amd64? ( >=dev-lang/nasm-2.14 ) + x86? ( >=dev-lang/nasm-2.14 ) + pgo? ( + X? ( + sys-devel/gettext + x11-base/xorg-server[xvfb] + x11-apps/xhost + ) + !X? ( + gui-wm/tinywl + x11-misc/xkeyboard-config + ) + )" +COMMON_DEPEND="${FF_ONLY_DEPEND} + >=app-accessibility/at-spi2-core-2.46.0:2 + dev-libs/glib:2 + dev-libs/libffi:= + >=dev-libs/nss-3.130 + >=dev-libs/nspr-4.39 + media-libs/alsa-lib + media-libs/fontconfig + media-libs/freetype + media-libs/mesa + media-video/ffmpeg + virtual/zlib:= + virtual/freedesktop-icon-theme + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/libdrm + x11-libs/pango + x11-libs/pixman + dbus? ( + sys-apps/dbus + ) + jack? ( virtual/jack ) + pulseaudio? ( + || ( + media-libs/libpulse + >=media-sound/apulse-0.1.12-r4[sdk] + ) + ) + libproxy? ( net-libs/libproxy ) + selinux? ( sec-policy/selinux-mozilla ) + sndio? ( >=media-sound/sndio-1.8.0-r1 ) + system-av1? ( + >=media-libs/dav1d-1.5.4:= + >=media-libs/libaom-3.12.1:= + ) + system-harfbuzz? ( + >=media-libs/harfbuzz-2.8.1:0= + !wasm-sandbox? ( >=media-gfx/graphite2-1.3.13 ) + ) + system-icu? ( >=dev-libs/icu-78.1:= ) + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= ) + system-libevent? ( >=dev-libs/libevent-2.1.12:0=[threads(+)] ) + system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) + system-pipewire? ( >=media-video/pipewire-1.6.8:= ) + system-png? ( >=media-libs/libpng-1.6.45:0=[apng] ) + system-webp? ( >=media-libs/libwebp-1.1.0:0= ) + valgrind? ( dev-debug/valgrind ) + wayland? ( + >=media-libs/libepoxy-1.5.10-r1 + x11-libs/gtk+:3[wayland] + ) + wifi? ( + kernel_linux? ( + || ( + net-misc/networkmanager + net-misc/connman[networkmanager] + ) + sys-apps/dbus + ) + ) + X? ( + virtual/opengl + x11-libs/cairo[X] + x11-libs/gtk+:3[X] + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libxcb:= + )" +RDEPEND="${COMMON_DEPEND} + hwaccel? ( + media-video/libva-utils + sys-apps/pciutils + ) + jack? ( virtual/jack ) + openh264? ( media-libs/openh264:*[plugin] )" +DEPEND="${COMMON_DEPEND} + X? ( + x11-base/xorg-proto + x11-libs/libICE + x11-libs/libSM + )" + +# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or +# overridden in the environment (advanced hackers only) +if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then + MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) +fi + +llvm_check_deps() { + if ! has_version -b "llvm-core/clang:${LLVM_SLOT}" ; then + einfo "llvm-core/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + + if use clang && ! tc-ld-is-mold ; then + if ! has_version -b "llvm-core/lld:${LLVM_SLOT}" ; then + einfo "llvm-core/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + fi + + if use pgo ; then + if ! has_version -b "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then + einfo "=llvm-runtimes/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing!" >&2 + einfo "Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 + return 1 + fi + fi + + einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 +} + +MOZ_LANGS=( + ace ach af ak an ar as ast az be bg bn bn-BD bn-IN bo bqi br brx bs ca cak ca-valencia + ckb crh cs csb cy da de dsb el en-CA en-GB en-ZA eo es-AR es-CL es-ES es-MX et eu fa + ff fi fr frp fur fy-NL ga-IE gd gl gn gu-IN gv he hi hi-IN hr hsb hto hu hy-AM + hye ia id ilo is it ixl ja ja-JP-mac ka kab kk km kn ko kok ks ku kw lb lg lij lo lt ltg + lv mai meh mix mk ml mn mr ms my nb-NO ne-NP nl nn-NO nr nso ny oc or pai pa-IN pbb pl + ppl pt-BR pt-PT quy qvi rm ro ru rw sah sat sc scn sco si sk skr sl son sq sr ss st sv-SE + sw szl ta ta-LK te tg th tl tn tr trs ts tsz uk ur uz ve vi wo xcl xh zam zh-CN zh-TW zu +) +MOZ_LANG_MAP=() + +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 + + MOZ_LANG_MAP+=("l10n_${xflag/[_@]/-} ${lang}") + + IUSE+=" l10n_${xflag/[_@]/-}" + done +} +mozilla_set_globals + +moz_clear_vendor_checksums() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -ne 1 ]] ; then + die "${FUNCNAME} requires exact one argument" + fi + + einfo "Clearing cargo checksums for ${1} ..." + + sed -i \ + -e 's/\("files":{\)[^}]*/\1/' \ + "${S}"/third_party/rust/${1}/.cargo-checksum.json || die +} + +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} "$@" + + if [[ ${#} -lt 2 ]] ; then + die "${FUNCNAME} requires at least two arguments" + fi + + local reason=${1} + shift + + local option + for option in ${@} ; do + echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} + done +} + +mozconfig_add_options_mk() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 2 ]] ; then + die "${FUNCNAME} requires at least two arguments" + fi + + local reason=${1} + shift + + local option + for option in ${@} ; do + echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} + done +} + +mozconfig_use_enable() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 1 ]] ; then + die "${FUNCNAME} requires at least one arguments" + fi + + local flag=$(use_enable "${@}") + mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" +} + +mozconfig_use_with() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 1 ]] ; then + die "${FUNCNAME} requires at least one arguments" + fi + + local flag=$(use_with "${@}") + mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" +} + +virtwl() { + debug-print-function ${FUNCNAME} "$@" + + [[ $# -lt 1 ]] && die "${FUNCNAME} needs at least one argument" + [[ -n $XDG_RUNTIME_DIR ]] || die "${FUNCNAME} needs XDG_RUNTIME_DIR to be set; try xdg_environment_reset" + tinywl -h >/dev/null || die 'tinywl -h failed' + + local VIRTWL VIRTWL_PID + coproc VIRTWL { WLR_BACKENDS=headless exec tinywl -s 'echo $WAYLAND_DISPLAY; read _; kill $PPID'; } + local -x WAYLAND_DISPLAY + read WAYLAND_DISPLAY <&${VIRTWL[0]} + + debug-print "${FUNCNAME}: $@" + "$@" + local r=$? + + [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly" + exec {VIRTWL[0]}<&- {VIRTWL[1]}>&- + return $r +} + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]] ; then + # Ensure we have enough disk space to compile + if use pgo || use debug ; then + CHECKREQS_DISK_BUILD="18700M" + elif tc-is-lto ; then + CHECKREQS_DISK_BUILD="10900M" + else + CHECKREQS_DISK_BUILD="9700M" + fi + + check-reqs_pkg_pretend + fi +} + +pkg_setup() { + + # Get LTO from environment; export after this phase for use in src_configure (etc) + use_lto=no + + if [[ ${MERGE_TYPE} != binary ]] ; then + + if tc-is-lto; then + use_lto=yes + # LTO is handled via configure + filter-lto + fi + + if use pgo ; then + if ! has userpriv ${FEATURES} ; then + eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" + fi + fi + + if [[ ${use_lto} = yes ]]; then + # -Werror=lto-type-mismatch -Werror=odr are going to fail with GCC, + # bmo#1516758, bgo#942288 + filter-flags -Werror=lto-type-mismatch -Werror=odr + fi + + # Ensure we have enough disk space to compile + if use pgo || use debug ; then + CHECKREQS_DISK_BUILD="18700M" + elif [[ ${use_lto} == "yes" ]] ; then + CHECKREQS_DISK_BUILD="10900M" + else + CHECKREQS_DISK_BUILD="9700M" + fi + + check-reqs_pkg_setup + llvm-r1_pkg_setup + rust_pkg_setup + python-any-r1_pkg_setup + + # Avoid PGO profiling problems due to environment leakage + # These should *always* be cleaned up anyway + unset \ + DBUS_SESSION_BUS_ADDRESS \ + DISPLAY \ + ORBIT_SOCKETDIR \ + SESSION_MANAGER \ + XAUTHORITY \ + XDG_CACHE_HOME \ + XDG_SESSION_COOKIE + + # Build system is using /proc/self/oom_score_adj, bug #604394 + addpredict /proc/self/oom_score_adj + + if use pgo ; then + # Update 105.0: "/proc/self/oom_score_adj" isn't enough anymore with pgo, but not sure + # whether that's due to better OOM handling by Firefox (bmo#1771712), or portage + # (PORTAGE_SCHEDULING_POLICY) update... + addpredict /proc + + # Clear tons of conditions, since PGO is hardware-dependant. + addpredict /dev + fi + + if ! mountpoint -q /dev/shm ; then + # If /dev/shm is not available, configure is known to fail with + # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py + ewarn "/dev/shm is not mounted -- expect build failures!" + fi + + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please + # get your own set of keys. + if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then + MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc" + fi + + if [[ -z "${MOZ_API_KEY_LOCATION+set}" ]] ; then + MOZ_API_KEY_LOCATION="AIzaSyB2h2OuRgGaPicUgy5N-5hsZqiPW6sH3n_rptiQ" + fi + + # Mozilla API keys (see https://location.services.mozilla.com/api) + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please + # get your own set of keys. + if [[ -z "${MOZ_API_KEY_MOZILLA+set}" ]] ; then + MOZ_API_KEY_MOZILLA="edb3d487-3a84-46m0ap1e3-9dfd-92b5efaaa005" + fi + + # Ensure we use C locale when building, bug #746215 + export LC_ALL=C + fi + + export use_lto + + CONFIG_CHECK="~SECCOMP" + WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." + linux-info_pkg_setup +} + +src_unpack() { + local _lp_dir="${WORKDIR}/language_packs" + local _src_file + + if [[ ! -d "${_lp_dir}" ]] ; then + mkdir "${_lp_dir}" || die + fi + + for _src_file in ${A} ; do + if [[ ${_src_file} == *.xpi ]]; then + cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" + else + unpack ${_src_file} + fi + done +} + +src_prepare() { + # Workaround for bgo#915651 and bmo#1988166 on musl + if use elibc_glibc ; then + rm -v "${WORKDIR}"/firefox-patches/*bgo-748849-RUST_TARGET_override.patch || die + rm -v "${WORKDIR}"/firefox-patches/*bgo-967694-musl-prctrl-exception-on-musl.patch || die + fi + + eapply "${WORKDIR}/firefox-patches" + + # Allow user to apply any additional patches without modifying ebuild + eapply_user + + # Make cargo respect MAKEOPTS + export CARGO_BUILD_JOBS="$(makeopts_jobs)" + + # Workaround for bgo#915651 + if ! use elibc_glibc ; then + if use amd64 ; then + export RUST_TARGET="x86_64-unknown-linux-musl" + elif use x86 ; then + export RUST_TARGET="i686-unknown-linux-musl" + elif use arm64 ; then + export RUST_TARGET="aarch64-unknown-linux-musl" + elif use loong; then + # Only the LP64D ABI of LoongArch64 is actively supported among + # the wider Linux ecosystem, so the assumption is safe. + export RUST_TARGET="loongarch64-unknown-linux-musl" + elif use ppc64 ; then + export RUST_TARGET="powerpc64le-unknown-linux-musl" + elif use riscv ; then + # We can pretty safely rule out any 32-bit riscvs, but 64-bit riscvs also have tons of + # different ABIs available. riscv64gc-unknown-linux-musl seems to be the best working + # guess right now though. + elog "riscv detected, forcing a riscv64 target for now." + export RUST_TARGET="riscv64gc-unknown-linux-musl" + else + die "Unknown musl chost, please post a new bug with your rustc -vV along with emerge --info" + fi + fi + + # Pre-built wasm-sandbox path manipulation. + if use wasm-sandbox ; then + if use amd64 ; then + export wasi_arch="x86_64" + elif use arm64 ; then + export wasi_arch="arm64" + else + die "wasm-sandbox enabled on unknown/unsupported arch!" + fi + + sed -i \ + -e "s:%%PORTAGE_WORKDIR%%:${WORKDIR}:" \ + -e "s:%%WASI_ARCH%%:${wasi_arch}:" \ + -e "s:%%WASI_SDK_VER%%:${WASI_SDK_VER}:" \ + -e "s:%%WASI_SDK_LLVM_VER%%:${WASI_SDK_LLVM_VER}:" \ + toolkit/moz.configure || die "Failed to update wasi-related paths." + fi + + # Make LTO respect MAKEOPTS + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/build/moz.configure/lto-pgo.configure || die "Failed sedding multiprocessing.cpu_count" + + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/third_party/chromium/build/toolchain/get_cpu_count.py || die "Failed sedding multiprocessing.cpu_count" + + sed -i -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \ + "${S}"/third_party/python/gyp/pylib/gyp/input.py || die "Failed sedding multiprocessing.cpu_count" + + # sed-in toolchain prefix + sed -i \ + -e "s/objdump/${CHOST}-objdump/" \ + "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py || die "sed failed to set toolchain prefix" + + sed -i \ + -e 's/ccache_stats = None/return None/' \ + "${S}"/python/mozbuild/mozbuild/controller/building.py || die "sed failed to disable ccache stats call" + + einfo "Removing pre-built binaries ..." + + find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die + + # Clear checksums from cargo crates we've manually patched. + # moz_clear_vendor_checksums xyz + moz_clear_vendor_checksums bindgen + + # Respect choice for "jumbo-build" + # Changing the value for FILES_PER_UNIFIED_FILE may not work, see #905431 + if [[ -n ${FILES_PER_UNIFIED_FILE} ]] && use jumbo-build; then + local my_files_per_unified_file=${FILES_PER_UNIFIED_FILE:=16} + elog "" + elog "jumbo-build defaults modified to ${my_files_per_unified_file}." + elog "if you get a build failure, try undefining FILES_PER_UNIFIED_FILE," + elog "if that fails try -jumbo-build before opening a bug report." + elog "" + + sed -i -e "s/\"FILES_PER_UNIFIED_FILE\", 16/\"FILES_PER_UNIFIED_FILE\", "${my_files_per_unified_file}"/" \ + python/mozbuild/mozbuild/frontend/data.py || + die "Failed to adjust FILES_PER_UNIFIED_FILE in python/mozbuild/mozbuild/frontend/data.py" + sed -i -e "s/FILES_PER_UNIFIED_FILE = 6/FILES_PER_UNIFIED_FILE = "${my_files_per_unified_file}"/" \ + js/src/moz.build || + die "Failed to adjust FILES_PER_UNIFIED_FILE in js/src/moz.build" + fi + + # Create build dir + BUILD_DIR="${WORKDIR}/${PN}_build" + mkdir -p "${BUILD_DIR}" || die + + # Write API keys to disk + echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die + echo -n "${MOZ_API_KEY_LOCATION//gGaPi/}" > "${S}"/api-location.key || die + echo -n "${MOZ_API_KEY_MOZILLA//m0ap1/}" > "${S}"/api-mozilla.key || die + + xdg_environment_reset +} + +src_configure() { + # Show flags set at the beginning + einfo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" + einfo "Current CFLAGS:\t\t${CFLAGS:-no value set}" + einfo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}" + einfo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}" + einfo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" + + local have_switched_compiler= + if use clang; then + # Force clang + einfo "Enforcing the use of clang due to USE=clang ..." + + local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }') + [[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}") + [[ -z ${version_clang} ]] && die "Failed to read clang version!" + + if tc-is-gcc; then + have_switched_compiler=yes + fi + + AR=llvm-ar + CC=${CHOST}-clang-${version_clang} + CXX=${CHOST}-clang++-${version_clang} + NM=llvm-nm + RANLIB=llvm-ranlib + elif ! use clang && ! tc-is-gcc ; then + # Force gcc + have_switched_compiler=yes + einfo "Enforcing the use of gcc due to USE=-clang ..." + AR=gcc-ar + CC=${CHOST}-gcc + CXX=${CHOST}-g++ + NM=gcc-nm + RANLIB=gcc-ranlib + fi + + if [[ -n "${have_switched_compiler}" ]] ; then + # Because we switched active compiler we have to ensure + # that no unsupported flags are set + strip-unsupported-flags + fi + + # Ensure we use correct toolchain, + # AS is used in a non-standard way by upstream, #bmo1654031 + export HOST_CC="$(tc-getBUILD_CC)" + export HOST_CXX="$(tc-getBUILD_CXX)" + export AS="$(tc-getCC) -c" + + # Configuration tests expect llvm-readelf output, bug 913130 + READELF="llvm-readelf" + + tc-export CC CXX LD AR AS NM OBJDUMP RANLIB READELF PKG_CONFIG + + # Pass the correct toolchain paths through cbindgen + if tc-is-cross-compiler ; then + export BINDGEN_CFLAGS="${SYSROOT:+--sysroot=${ESYSROOT}} --target=${CHOST} ${BINDGEN_CFLAGS-}" + fi + + # Set MOZILLA_FIVE_HOME + export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" + + # python/mach/mach/mixin/process.py fails to detect SHELL + export SHELL="${EPREFIX}/bin/bash" + + # Set state path + export MOZBUILD_STATE_PATH="${BUILD_DIR}" + + # Set MOZCONFIG + export MOZCONFIG="${S}/.mozconfig" + + # Initialize MOZCONFIG + mozconfig_add_options_ac '' --enable-application=browser + mozconfig_add_options_ac '' --enable-project=browser + + # Set Gentoo defaults + export MOZILLA_OFFICIAL=1 + + mozconfig_add_options_ac 'Gentoo default' \ + --allow-addon-sideload \ + --disable-cargo-incremental \ + --disable-crashreporter \ + --disable-disk-remnant-avoidance \ + --disable-geckodriver \ + --disable-install-strip \ + --disable-legacy-profile-creation \ + --disable-parental-controls \ + --disable-strip \ + --disable-updater \ + --enable-negotiateauth \ + --enable-new-pass-manager \ + --enable-packed-relative-relocs \ + --enable-release \ + --enable-system-policies \ + --host="${CBUILD:-${CHOST}}" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --prefix="${EPREFIX}/usr" \ + --target="${CHOST}" \ + --without-ccache \ + --with-intl-api \ + --with-libclang-path="$(llvm-config --libdir)" \ + --with-system-ffi \ + --with-system-gbm \ + --with-system-libdrm \ + --with-system-nspr \ + --with-system-nss \ + --with-system-pixman \ + --with-system-zlib \ + --with-toolchain-prefix="${CHOST}-" \ + --with-unsigned-addon-scopes=app,system + + # Librewolf + mozconfig_add_options_ac 'LibreWolf Branding' \ + --with-app-name="librewolf" \ + --with-app-basename="librewolf" \ + --with-branding=browser/branding/librewolf + export MOZ_APP_REMOTINGNAME=LibreWolf + + # I really have know idea if this is actually doing anything. + mozconfig_add_options_ac 'LibreWolf Localization' \ + --with-l10n-base=$PWD/lw/l10n + + ## Controlled via 'telemetry' IUSE + # mozconfig_add_options_mk 'LibreWolf Disable Telemetry' \ + # MOZ_CRASHREPORTER=0 \ + # MOZ_DATA_REPORTING=0 \ + # MOZ_SERVICES_HEALTHREPORT=0 \ + # MOZ_TELEMETRY_REPORTING=0 + + export MOZ_REQUIRE_SIGNING= + + # Set update channel + mozconfig_add_options_ac '' --enable-update-channel=release + + # Whitelist to allow unkeyworded arches to build with "--disable-rust-simd" by default. + if use amd64 || use arm64 || use ppc64 || use loong || use riscv ; then + mozconfig_add_options_ac '' --enable-rust-simd + fi + + # For future keywording: This is currently (97.0) only supported on: + # amd64, arm, arm64 & x86. + # Might want to flip the logic around if Firefox is to support more arches. + # bug 833001, bug 903411#c8 + if use loong || use ppc64 || use riscv; then + mozconfig_add_options_ac '' --disable-sandbox + else + mozconfig_add_options_ac '' --enable-sandbox + fi + + # riscv-related options, bgo#947337, bgo#947338, bgo#977845 + if use riscv ; then + mozconfig_add_options_ac 'Disable webrtc for RISC-V' --disable-webrtc + fi + + mozconfig_use_enable valgrind + + if use valgrind ; then + mozconfig_add_options_ac 'valgrind requirement' --disable-sandbox + mozconfig_add_options_ac 'valgrind requirement' --disable-jemalloc + + sed -i -e 's/--enable-optimize=-O[0-9s]/--enable-optimize="-g -O2"/' .mozconfig || die + fi + + if [[ -s "${S}/api-google.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-google-safebrowsing-api-keyfile="${S}/api-google.key" + else + einfo "Building without Google API key ..." + fi + + if [[ -s "${S}/api-location.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-location.key" | md5sum | awk '{ print $1 }') != ffb7895e35dedf832eb1c5d420ac7420 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-google-location-service-api-keyfile="${S}/api-location.key" + else + einfo "Building without Location API key ..." + fi + + if [[ -s "${S}/api-mozilla.key" ]] ; then + local key_origin="Gentoo default" + if [[ $(cat "${S}/api-mozilla.key" | md5sum | awk '{ print $1 }') != 3927726e9442a8e8fa0e46ccc39caa27 ]] ; then + key_origin="User value" + fi + + mozconfig_add_options_ac "${key_origin}" \ + --with-mozilla-api-keyfile="${S}/api-mozilla.key" + else + einfo "Building without Mozilla API key ..." + fi + + mozconfig_use_with system-av1 + mozconfig_use_with system-harfbuzz + mozconfig_use_with system-icu + mozconfig_use_with system-jpeg + mozconfig_use_with system-libevent + mozconfig_use_with system-libvpx + mozconfig_use_with system-pipewire + mozconfig_use_with system-png + mozconfig_use_with system-webp + + mozconfig_use_enable dbus + mozconfig_use_enable libproxy + mozconfig_use_enable jumbo-build unified-build + + use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme + + if use hardened ; then + mozconfig_add_options_ac "+hardened" --enable-hardening + mozconfig_add_options_ac "+hardened stl" --enable-stl-hardening + append-ldflags "-Wl,-z,relro -Wl,-z,now" + + # Increase the FORTIFY_SOURCE value, #910071. + sed -i -e '/-D_FORTIFY_SOURCE=/s:2:3:' "${S}"/build/moz.configure/toolchain.configure || die + fi + + local myaudiobackends="" + use jack && myaudiobackends+="jack," + use sndio && myaudiobackends+="sndio," + use pulseaudio && myaudiobackends+="pulseaudio," + ! use pulseaudio && myaudiobackends+="alsa," + + mozconfig_add_options_ac '--enable-audio-backends' --enable-audio-backends="${myaudiobackends::-1}" + + mozconfig_use_enable wifi necko-wifi + + if use X && use wayland ; then + mozconfig_add_options_ac '+x11+wayland' --enable-default-toolkit=cairo-gtk3-x11-wayland + elif ! use X && use wayland ; then + mozconfig_add_options_ac '+wayland' --enable-default-toolkit=cairo-gtk3-wayland-only + else + mozconfig_add_options_ac '+x11' --enable-default-toolkit=cairo-gtk3-x11-only + fi + + # wasm-sandbox + # Since graphite2 is one of the sandboxed libraries, system-graphite2 obviously can't work with +wasm-sandbox. + if use wasm-sandbox ; then + mozconfig_add_options_ac '+wasm-sandbox' --with-wasi-sysroot="${WORKDIR}/wasi-sdk-${WASI_SDK_VER}-${wasi_arch}-linux/share/wasi-sysroot/" + else + mozconfig_add_options_ac 'no wasm-sandbox' --without-wasm-sandboxed-libraries + mozconfig_use_with system-harfbuzz system-graphite2 + fi + + if [[ ${use_lto} == "yes" ]] ; then + if use clang ; then + # Upstream only supports lld or mold when using clang. + if tc-ld-is-mold ; then + # mold expects the -flto line from *FLAGS configuration, bgo#923119 + append-ldflags "-flto=thin" + mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold + else + mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld + fi + + mozconfig_add_options_ac '+lto' --enable-lto=cross + + else + # ThinLTO is currently broken, see bmo#1644409. + # mold does not support gcc+lto combination. + mozconfig_add_options_ac '+lto' --enable-lto=full + mozconfig_add_options_ac "linker is set to bfd" --enable-linker=bfd + fi + + else + # Avoid auto-magic on linker + if use clang ; then + # lld is upstream's default + if tc-ld-is-mold ; then + mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold + else + mozconfig_add_options_ac "forcing ld=lld due to USE=clang" --enable-linker=lld + fi + + else + if tc-ld-is-mold ; then + mozconfig_add_options_ac "using ld=mold due to system selection" --enable-linker=mold + else + mozconfig_add_options_ac "linker is set to bfd due to USE=-clang" --enable-linker=bfd + fi + fi + fi + + # PGO was moved outside lto block to allow building pgo without lto. + if use pgo ; then + mozconfig_add_options_ac '+pgo' MOZ_PGO=1 + + # Avoid compressing just-built instrumented Firefox with + # high levels of compression. Just use tar as a container + # to save >=10 minutes. + export MOZ_PKG_FORMAT=TAR + + if use clang ; then + # Used in build/pgo/profileserver.py + export LLVM_PROFDATA="llvm-profdata" + else + # Attempt to fix pgo hanging with gcc, bgo#966309. + export MOZ_REMOTE_SETTINGS_DEVTOOLS=1 + fi + fi + + mozconfig_use_enable debug + if use debug ; then + mozconfig_add_options_ac '+debug' --disable-optimize + mozconfig_add_options_ac '+debug' --enable-jemalloc + mozconfig_add_options_ac '+debug' --enable-real-time-tracing + else + mozconfig_add_options_ac 'Gentoo defaults' --disable-real-time-tracing + + if is-flag '-g*' ; then + if use clang ; then + mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols=$(get-flag '-g*') + else + mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols + fi + else + mozconfig_add_options_ac 'Gentoo default' --disable-debug-symbols + fi + + if is-flag '-O0' ; then + mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O0 + elif is-flag '-O4' ; then + mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O4 + elif is-flag '-O3' ; then + mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O3 + elif is-flag '-O1' ; then + mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O1 + elif is-flag '-Os' ; then + mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-Os + else + mozconfig_add_options_ac "Gentoo default" --enable-optimize=-O2 + fi + fi + + # Debug flag was handled via configure + filter-flags '-g*' + + # Optimization flag was handled via configure + filter-flags '-O*' + + # elf-hack + # Filter "-z,pack-relative-relocs" and let the build system handle it instead. + if use amd64 || use x86 ; then + filter-flags "-z,pack-relative-relocs" + + if tc-ld-is-mold ; then + # relr-elf-hack is currently broken with mold, bgo#916259 + mozconfig_add_options_ac 'disable elf-hack with mold linker' --disable-elf-hack + else + mozconfig_add_options_ac 'relr elf-hack' --enable-elf-hack=relr + fi + elif use loong || use ppc64 || use riscv ; then + # '--disable-elf-hack' is not recognized on loong/ppc64/riscv, + # see bgo #917049, #930046 + :; + else + mozconfig_add_options_ac 'disable elf-hack on non-supported arches' --disable-elf-hack + fi + + if ! use elibc_glibc; then + mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc + fi + + # System-av1 fix + use system-av1 && append-ldflags "-Wl,--undefined-version" + + # Make revdep-rebuild.sh happy; Also required for musl + append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags + + # Pass $MAKEOPTS to build system + export MOZ_MAKE_FLAGS="${MAKEOPTS}" + + # Use system's Python environment + export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach + + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none" + + if ! use telemetry; then + mozconfig_add_options_mk '-telemetry setting' "MOZ_CRASHREPORTER=0" + mozconfig_add_options_mk '-telemetry setting' "MOZ_DATA_REPORTING=0" + mozconfig_add_options_mk '-telemetry setting' "MOZ_SERVICES_HEALTHREPORT=0" + mozconfig_add_options_mk '-telemetry setting' "MOZ_TELEMETRY_REPORTING=0" + fi + + mozconfig_use_enable test tests + + # Disable notification when build system has finished + export MOZ_NOSPAM=1 + + # Portage sets XARGS environment variable to "xargs -r" by default which + # breaks build system's check_prog() function which doesn't support arguments + mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs" + + # Set build dir + mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}" + + # Show flags we will use + einfo "Build BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}" + einfo "Build CFLAGS:\t\t${CFLAGS:-no value set}" + einfo "Build CXXFLAGS:\t\t${CXXFLAGS:-no value set}" + einfo "Build LDFLAGS:\t\t${LDFLAGS:-no value set}" + einfo "Build RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}" + + # Handle EXTRA_CONF and show summary + local ac opt hash reason + + # Apply EXTRA_ECONF entries to $MOZCONFIG + if [[ -n ${EXTRA_ECONF} ]] ; then + IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!} + for opt in "${ac[@]}"; do + mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--} + done + fi + + echo + echo "==========================================================" + echo "Building ${PF} with the following configuration" + grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do + [[ -z ${hash} || ${hash} == \# ]] \ + || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}" + printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}" + done + echo "==========================================================" + echo + + ./mach configure || die +} + +src_compile() { + local virtx_cmd= + + if [[ ${use_lto} == "yes" ]] && tc-ld-is-mold ; then + # increase ulimit with mold+lto, bugs #892641, #907485 + if ! ulimit -n 16384 1>/dev/null 2>&1 ; then + ewarn "Unable to modify ulimits - building with mold+lto might fail due to low ulimit -n resources." + ewarn "Please see bugs #892641 & #907485." + else + ulimit -n 16384 + fi + fi + + if use pgo; then + # Reset and cleanup environment variables used by GNOME/XDG + gnome2_environment_reset + + addpredict /root + + if ! use X; then + virtx_cmd=virtwl + else + virtx_cmd=virtx + fi + fi + + if ! use X; then + local -x GDK_BACKEND=wayland + else + local -x GDK_BACKEND=x11 + fi + + ${virtx_cmd} ./mach build --verbose || die +} + +src_test() { + # https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html + local -a failures=() + + # Some tests respect this + local -x MOZ_HEADLESS=1 + + # Check testing/mach_commands.py + einfo "Testing with cppunittest ..." + ./mach cppunittest + local ret=$? + if [[ ${ret} -ne 0 ]]; then + eerror "Test suite cppunittest failed with error code ${ret}" + failures+=( cppunittest ) + fi + + if [[ ${#failures} -eq 0 ]]; then + einfo "Test suites succeeded" + else + die "Test suites failed: ${failures[@]}" + fi +} + +src_install() { + # xpcshell is getting called during install + pax-mark m \ + "${BUILD_DIR}"/dist/bin/xpcshell \ + "${BUILD_DIR}"/dist/bin/${PN} \ + "${BUILD_DIR}"/dist/bin/plugin-container + + #DESTDIR="${D}" ./mach install || die + ## LibreWolf + # ./mach install doesn't install the locale information for some reason. + # Use packge-multi-locale instead + local mymozlangs=() + for lang_tuple in "${MOZ_LANG_MAP[@]}"; do + IFS=' ' read -r l10n lang <<< "${lang_tuple}" + + if use "${l10n}"; then + mymozlangs+=("${lang}") + fi + done + + if (( ${#mymozlangs[@]} == 0 )); then + einfo "Running ./mach package" + ./mach package || die + else + einfo "Running ./mach package-multi-locale" + ./mach package-multi-locale --locale "${mymozlangs[@]}" || die + fi + + dodir "${MOZILLA_FIVE_HOME}" || die + cp -r "${BUILD_DIR}"/dist/librewolf/* "${ED}"/"${MOZILLA_FIVE_HOME}" || die + + ## LibreWolf + # For some reason 'local-settings.js' doesn't get properly packaged. + # Install it manually + insinto "${MOZILLA_FIVE_HOME}/defaults/pref" + doins "${S}/lw/local-settings.js" + + # Upstream cannot ship symlink but we can (bmo#658850) + rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die + dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin + + # Don't install llvm-symbolizer from llvm-core/llvm package + if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then + rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die + fi + + ## Disabled for LibreWolf + # Install policy (currently only used to disable application updates) + # insinto "${MOZILLA_FIVE_HOME}/distribution" + # newins "${FILESDIR}"/distribution.ini distribution.ini + # newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Install system-wide preferences + local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" + insinto "${PREFS_DIR}" + newins "${FILESDIR}"/gentoo-default-prefs.js gentoo-prefs.js + + local GENTOO_PREFS="${ED}${PREFS_DIR}/gentoo-prefs.js" + + # Set dictionary path to use system hunspell + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref" + pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); + EOF + + # Force hwaccel prefs if USE=hwaccel is enabled + if use hwaccel ; then + cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-r4 \ + >>"${GENTOO_PREFS}" \ + || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js" + + if use wayland; then + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel wayland prefs" + pref("gfx.x11-egl.force-enabled", false); + EOF + else + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set hwaccel x11 prefs" + pref("gfx.x11-egl.force-enabled", true); + EOF + fi + + # Install the gfxtest binary on supported arches + exeinto "${MOZILLA_FIVE_HOME}" + doexe "${BUILD_DIR}"/dist/bin/gfxtest + fi + + if ! use gmp-autoupdate ; then + local plugin + for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do + einfo "Disabling auto-update for ${plugin} plugin ..." + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" + pref("media.${plugin}.autoupdate", false); + EOF + done + fi + + # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it + if use system-harfbuzz ; then + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref" + sticky_pref("gfx.font_rendering.graphite.enabled", true); + EOF + fi + + # Add telemetry config prefs, just in case something happens in future and telemetry build + # options stop working. + if ! use telemetry ; then + cat "${FILESDIR}"/gentoo-telemetry-prefs.js >>"${GENTOO_PREFS}" || die "failed to set telemetry prefs" + fi + + # Install icons + local icon_srcdir="${S}/browser/branding/${PN}" + + insinto /usr/share/icons/hicolor/symbolic/apps + + local icon size + for icon in "${icon_srcdir}"/default*.png ; do + size=${icon%.png} + size=${size##*/default} + + if [[ ${size} -eq 48 ]] ; then + newicon "${icon}" ${PN}.png + fi + + newicon -s ${size} "${icon}" ${PN}.png + done + + # Install menu + local app_name="LibreWolf" + local desktop_file="${FILESDIR}/icon/${MOZ_PN}-r3.desktop" + local desktop_filename="${PN}.desktop" + local exec_command="${PN}" + local icon="${PN}" + local use_wayland="false" + + if use wayland ; then + use_wayland="true" + fi + + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die + + sed -i \ + -e "s:@NAME@:${app_name}:" \ + -e "s:@EXEC@:${exec_command}:" \ + -e "s:@ICON@:${icon}:" \ + "${WORKDIR}/${PN}.desktop-template" || die + + newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" + + rm "${WORKDIR}/${PN}.desktop-template" || die + + # Install wrapper script + [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" + newbin "${FILESDIR}/${MOZ_PN}-r1.sh" ${PN} + + # Update wrapper + sed -i \ + -e "s:@PREFIX@:${EPREFIX}/usr:" \ + -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ + "${ED}/usr/bin/${PN}" || die + + readme.gentoo_create_doc +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! use gmp-autoupdate ; then + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" + elog "installing into new profiles:" + local plugin + for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do + elog "\t ${plugin}" + done + elog + fi + + readme.gentoo_print_elog + + optfeature_header "Optional programs for extra features:" + optfeature "desktop notifications" x11-libs/libnotify + optfeature "fallback mouse cursor theme e.g. on WMs" gnome-base/gsettings-desktop-schemas + optfeature "screencasting with pipewire" sys-apps/xdg-desktop-portal + + if ! has_version "sys-libs/glibc"; then + elog + elog "glibc not found! You won't be able to play DRM content." + elog "See Gentoo bug #910309 or upstream bug #1843683." + elog + fi +} -- cgit v1.3