diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-30 04:18:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-30 04:18:30 +0000 |
commit | 5b5371f1d1fb1555c42eff7f69736d789677da28 (patch) | |
tree | f360094312a5be2113b54ef0e8605d6d2347edc3 /www-client | |
parent | 57e786aa1e103c8c3641a35c3316dedc4cbe6e08 (diff) |
www-client/ungoogled-chromium : new package
Diffstat (limited to 'www-client')
5 files changed, 232 insertions, 0 deletions
diff --git a/www-client/ungoogled-chromium/Manifest b/www-client/ungoogled-chromium/Manifest new file mode 100644 index 00000000..fe443aca --- /dev/null +++ b/www-client/ungoogled-chromium/Manifest @@ -0,0 +1 @@ +DIST ungoogled-chromium_121.0.6167.85-1.1_linux.tar.xz 123723196 BLAKE2B 1ce54a7702e142b5c7d3035e8c2a0bea23e5e1ca772b437006173d5567b3a6276e34190e90c5d7fcae14c8464e06684d740abf24b6c0b75cc4b3feeb83abe35f SHA512 b6b004664cc9a6395982f9becb55815113b68b06f59b0fdd99810d157a9bb51163d4141305286379a3b544f87e6e80ca5ff0da946eb9da3fb058032d1314883a diff --git a/www-client/ungoogled-chromium/files/chromium-browser.xml b/www-client/ungoogled-chromium/files/chromium-browser.xml new file mode 100644 index 00000000..2c95a558 --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium-browser.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd"> +<default-apps> + <web-browsers> + <web-browser> + <name>Chromium</name> + <executable>chromium-browser</executable> + <command>chromium-browser %s</command> + <icon-name>chromium-browser</icon-name> + <run-in-terminal>false</run-in-terminal> + </web-browser> + </web-browsers> +</default-apps> diff --git a/www-client/ungoogled-chromium/files/chromium-launcher.sh b/www-client/ungoogled-chromium/files/chromium-launcher.sh new file mode 100644 index 00000000..1163ff3d --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium-launcher.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# Allow the user to override command-line flags, bug #357629. +# This is based on Debian's chromium-browser package, and is intended +# to be consistent with Debian. +for f in /etc/chromium/*; do + [[ -f ${f} ]] && source "${f}" +done + +# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system +# default CHROMIUM_FLAGS (from /etc/chromium/default). +CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"} + +# Let the wrapped binary know that it has been run through the wrapper +export CHROME_WRAPPER=$(readlink -f "$0") + +PROGDIR=${CHROME_WRAPPER%/*} + +case ":$PATH:" in + *:$PROGDIR:*) + # $PATH already contains $PROGDIR + ;; + *) + # Append $PROGDIR to $PATH + export PATH="$PATH:$PROGDIR" + ;; +esac + +if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then + # Running as root with HOME owned by root. + # Pass --user-data-dir to work around upstream failsafe. + CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium + ${CHROMIUM_FLAGS}" +fi + +# Select session type and platform +if @@OZONE_AUTO_SESSION@@; then + platform= + if [[ ${XDG_SESSION_TYPE} == x11 ]]; then + platform=x11 + elif [[ ${XDG_SESSION_TYPE} == wayland ]]; then + platform=wayland + else + if [[ -n ${WAYLAND_DISPLAY} ]]; then + platform=wayland + else + platform=x11 + fi + fi + if ${DISABLE_OZONE_PLATFORM:-false}; then + platform=x11 + fi + CHROMIUM_FLAGS="--ozone-platform=${platform} ${CHROMIUM_FLAGS}" +fi + +# Set the .desktop file name +export CHROME_DESKTOP="chromium-browser-chromium.desktop" + +exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@" diff --git a/www-client/ungoogled-chromium/files/chromium.default b/www-client/ungoogled-chromium/files/chromium.default new file mode 100644 index 00000000..c140cdeb --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium.default @@ -0,0 +1,5 @@ +# Default settings for chromium. This file is sourced by /bin/bash from +# the chromium launcher. + +# Options to pass to chromium. +#CHROMIUM_FLAGS="" diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-121.0.6167.85.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-121.0.6167.85.ebuild new file mode 100644 index 00000000..d6e76f97 --- /dev/null +++ b/www-client/ungoogled-chromium/ungoogled-chromium-121.0.6167.85.ebuild @@ -0,0 +1,154 @@ +# Copyright 2006-2024 Redcore Linux Project +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop readme.gentoo-r1 xdg-utils + +DESCRIPTION="Modifications to Chromium for removing Google integration and enhancing privacy" +HOMEPAGE="https://www.chromium.org/Home https://github.com/ungoogled-software/ungoogled-chromium" +SRC_URI="http://mirrors.redcorelinux.org/redcorelinux/amd64/distfiles/${PN}_${PV}-1.1_linux.tar.xz" +RESTRICT="mirror" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +CDEPEND=" + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + >=x11-libs/libXi-1.6.0 + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst + x11-libs/libxcb + media-libs/libva + >=net-print/cups-1.3.11 + dev-libs/expat + dev-libs/glib:2 + >=dev-libs/libxml2-2.9.4-r3[icu] + dev-libs/nspr + >=dev-libs/nss-3.26 + >=media-libs/alsa-lib-1.0.19 + media-libs/fontconfig + media-libs/freetype + media-libs/libjpeg-turbo + media-libs/libpng + media-libs/libpulse + sys-apps/dbus + sys-apps/pciutils + virtual/udev + x11-libs/cairo + x11-libs/pango + media-libs/flac + >=media-libs/libwebp-0.4.0 + sys-libs/zlib[minizip] + app-accessibility/at-spi2-core + x11-libs/gtk+:3[X] + media-libs/lcms + dev-libs/libxslt + >=dev-libs/icu-71.1:=" + +RDEPEND="${CDEPEND} + x11-misc/xdg-utils + virtual/opengl + virtual/ttf-fonts + !www-client/chromium" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +Some web pages may require additional fonts to display properly. +Try installing some of the following packages if some characters +are not displayed properly: +- media-fonts/arphicfonts +- media-fonts/droid +- media-fonts/ipamonafont +- media-fonts/noto +- media-fonts/noto-emoji +- media-fonts/ja-ipafonts +- media-fonts/takao-fonts +- media-fonts/wqy-microhei +- media-fonts/wqy-zenhei + +To fix broken icons on the Downloads page, you should install an icon +theme that covers the appropriate MIME types, and configure this as your +GTK+ icon theme. + +For native file dialogs in KDE, install kde-apps/kdialog." + +QA_PREBUILT="*" +S="${WORKDIR}/${PN}_${PV}-1.1_linux" + +src_install() { + local CHROMIUM_HOME="/opt/chromium-browser" + dodir "${CHROMIUM_HOME}" + exeinto "${CHROMIUM_HOME}" + doexe "${FILESDIR}"/chromium-launcher.sh + doexe chrome + doexe chrome_crashpad_handler + doexe chromedriver + doexe chrome_sandbox + doexe chrome-wrapper + doexe xdg-mime + doexe xdg-settings + fperms 4711 "${CHROMIUM_HOME}"/chrome_sandbox + + insinto "${CHROMIUM_HOME}" + doins *.bin + doins *.pak + doins *.so + doins *.so.1 + doins icudtl.dat + doins -r locales + doins -r resources + doins vk_swiftshader_icd.json + + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium + + dodir /etc/chromium + insinto /etc/chromium + newins "${FILESDIR}"/chromium.default default + + newicon -s 48 product_logo_48.png chromium-browser.png + + local mime_types="text/html;text/xml;application/xhtml+xml;" + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 + mime_types+="x-scheme-handler/ftp;" # bug #412185 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 + + make_desktop_entry \ + chromium-browser \ + "Chromium Browser (unGoogled)" \ + chromium-browser \ + "Network;WebBrowser" \ + "MimeType=${mime_types}\nStartupWMClass=chromium-browser" + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die + + dodir /usr/share/gnome-control-center/default-apps + insinto /usr/share/gnome-control-center/default-apps + doins "${FILESDIR}"/chromium-browser.xml + + readme.gentoo_create_doc +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postinst() { + elog "VA-API is disabled by default at runtime. You have to enable it" + elog "by adding --enable-features=VaapiVideoDecoder and " + elog "--disable-features=UseChromeOSDirectVideoDecoder to CHROMIUM_FLAGS" + elog "in /etc/chromium/default." + + xdg_icon_cache_update + xdg_desktop_database_update + readme.gentoo_print_elog +} |