Skip to content

Commit

Permalink
www-client/brave: new package, add 1.59.117
Browse files Browse the repository at this point in the history
Signed-off-by: irort <[email protected]>
  • Loading branch information
irort committed Oct 13, 2023
1 parent ee67521 commit 90e68fc
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 0 deletions.
1 change: 1 addition & 0 deletions www-client/brave/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST brave-browser_1.59.117_amd64.deb 110413752 BLAKE2B 5e9ab48be2da89893f57faa7235494b8cd26b01f349fc8eff6e4324f7987a505d28a5ebb1bad6d1d74720ccf39af9b3b06cb8df40a6b901fa3d56e3d7a862ae7 SHA512 de88ac6c129c4be73de132663699b0ce9f1433852c4bba143c641cbc924ef2f200e807ad0d8e44598a34b8855595c52f83f64008d60042d1976fd5998877d3b7
115 changes: 115 additions & 0 deletions www-client/brave/brave-1.59.117.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr
gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk
sl sr sv sw ta te th tr uk ur vi zh-CN zh-TW"

inherit chromium-2 desktop pax-utils unpacker xdg

DESCRIPTION="Web browser that blocks ads and trackers by default"
HOMEPAGE="https://brave.com/"

LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="-* amd64"

MY_PN=${PN}-browser

SRC_URI="https://github.com/${PN}/${MY_PN}/releases/download/v${PV}/${MY_PN}_${PV}_amd64.deb"
IUSE="qt5 qt6"
RESTRICT="bindist mirror strip"

RDEPEND="
>=app-accessibility/at-spi2-core-2.46.0:2
dev-libs/expat
dev-libs/glib:2
dev-libs/nspr
dev-libs/nss
media-libs/alsa-lib
media-libs/mesa[gbm(+)]
net-misc/curl
net-print/cups
sys-apps/dbus
sys-libs/glibc
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:3
x11-libs/libdrm
x11-libs/libxcb
x11-libs/libxkbcommon
x11-libs/libxshmfence
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXrandr
x11-libs/pango
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5[X]
dev-qt/qtwidgets:5
)
qt6? ( dev-qt/qtbase:6[gui,widgets] )
"

QA_PREBUILT="*"
S=${WORKDIR}
BRAVE_HOME="opt/brave.com/brave${PN#brave}"

pkg_setup() {
chromium_suid_sandbox_check_kernel_config
}

src_unpack() {
:
}

src_install() {
dodir /
cd "${ED}" || die
unpacker

# The appdata directory is deprecated.
mv usr/share/{appdata,metainfo}/ || die

# Remove cron job and menu for updating from Debian repos.
rm -r ${BRAVE_HOME}/cron/ || die
rm -r etc usr/share/menu || die

# Rename docs directory to our needs.
mv usr/share/doc/${MY_PN} usr/share/doc/${PF} || die

# Decompress the docs.
gzip -d usr/share/doc/${PF}/changelog.gz || die
gzip -d usr/share/man/man1/${MY_PN}-stable.1.gz || die
if [[ -L usr/share/man/man1/brave-browser.1.gz ]]; then
rm usr/share/man/man1/brave-browser.1.gz || die
dosym ${MY_PN}-stable.1 usr/share/man/man1/brave-browser.1
fi

# Remove unused language packs
pushd "${BRAVE_HOME}/locales" > /dev/null || die
chromium_remove_language_paks
popd > /dev/null || die

if ! use qt5; then
rm "${BRAVE_HOME}/libqt5_shim.so" || die
fi
if ! use qt6; then
rm "${BRAVE_HOME}/libqt6_shim.so" || die
fi

local logo size
for logo in "${ED}"/${BRAVE_HOME}/product_logo_*.png; do
size=${logo##*_}
size=${size%.*}
newicon -s "${size}" "${logo}" ${PN}.png
done

pax-mark m "${BRAVE_HOME}/brave"
fperms 4711 "/${BRAVE_HOME}/chrome-sandbox"
}
12 changes: 12 additions & 0 deletions www-client/brave/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE
pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>irort</name>
</maintainer>
<upstream>
<remote-id type="github">brave/brave-browser</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 90e68fc

Please sign in to comment.