www/linux-brave: add new port (+)

The chrome-driven web browser from Brave Software, Inc.

Block ads. Save data. And get way faster webpages.

Sponsored by:	Future Crew, LLC
This commit is contained in:
Dima Panov 2024-11-07 15:18:10 +03:00
parent a1c3a678ff
commit eb367c0419
No known key found for this signature in database
GPG key ID: FB8BA09DD5398F29
8 changed files with 254 additions and 0 deletions

View file

@ -320,6 +320,7 @@
SUBDIR += linklint SUBDIR += linklint
SUBDIR += links SUBDIR += links
SUBDIR += links1 SUBDIR += links1
SUBDIR += linux-brave
SUBDIR += linux-c7-qtwebkit SUBDIR += linux-c7-qtwebkit
SUBDIR += linux-chrome SUBDIR += linux-chrome
SUBDIR += linux-freetube SUBDIR += linux-freetube

58
www/linux-brave/Makefile Normal file
View file

@ -0,0 +1,58 @@
PORTNAME= brave
PORTVERSION= ${BRAVE_VER}
CATEGORIES= www linux
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}-browser/releases/download/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-browser-${BRAVE_VER}-${BRAVE_BUILD}${EXTRACT_SUFX_${ARCH}}
PKGNAMEPREFIX= linux-
MAINTAINER= emulation@FreeBSD.org
COMMENT= Brave web browser based on WebKit
WWW= https://www.brave.com
RUN_DEPENDS= update-mime-database:misc/shared-mime-info
USES= cpe desktop-file-utils gnome linux:rl9 shared-mime-info shebangfix
USE_LINUX= alsalib alsa-plugins-oss alsa-plugins-pulseaudio ca-certificates \
cups-libs curl dbuslibs dri ffmpeg-libs gnupg gstreamer1-libav \
gtk3 libunistring nss p11-kit sqlite3 wget xorglibs
ONLY_FOR_ARCHS= amd64
SHEBANG_FILES= opt/brave.com/brave/brave-browser
NO_BUILD= yes
NO_WRKSUBDIR= yes
EXTRACT_SUFX?= .rpm
EXTRACT_SUFX_aarch64?= .aarch64
EXTRACT_SUFX_amd64?= .x86_64
SRC_SUFX?= .src${EXTRACT_SUFX}
REINPLACE_ARGS= -i ""
BRAVE_VER?= 1.71.123
BRAVE_BUILD?= 1
DATADIR= ${PREFIX}/share/${PORTNAME}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}
OPTIONS_DEFINE= DOCS
SUB_FILES= brave-browser
post-extract:
@${REINPLACE_CMD} -e 's|/usr/bin/brave-browser-stable|${LOCALBASE}/bin/brave-browser|' \
${WRKSRC}/usr/share/applications/brave-browser.desktop
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/brave-browser ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}/opt/brave.com && ${CP} -r brave ${STAGEDIR}${PREFIX}/share
cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share
.for sz in 16 24 32 48 64 128 256
${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${sz}x${sz}/apps
${CP} ${STAGEDIR}${DATADIR}/product_logo_${sz}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${sz}x${sz}/apps/brave-browser.png
.endfor
${MKDIR} ${STAGEDIR}/etc/brave/policies/managed
${INSTALL_DATA} ${FILESDIR}/brave.json ${STAGEDIR}/etc/brave/policies/managed
${INSTALL_DATA} ${FILESDIR}/webrtc.json ${STAGEDIR}/etc/brave/policies/managed
.include <bsd.port.mk>

3
www/linux-brave/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1730981377
SHA256 (brave-browser-1.71.123-1.x86_64.rpm) = 2db4d840b82bb87b76cb7ea6c02c7717bd0338d4204c11241759bc2a71e1fa4e
SIZE (brave-browser-1.71.123-1.x86_64.rpm) = 122338289

View file

@ -0,0 +1,20 @@
#!/bin/sh
get_pa_sock_path()
{
PA_SOCK_PATH=$(sockstat | awk -v me=$(whoami) -F'[ \t]+' '
$1 == me && $2 == "pulseaudio" && $6 ~ /native/ {
print $6;
exit 0
}'
)
}
get_pa_sock_path
[ -S "$PA_SOCK_PATH" ] && export PULSE_SERVER=unix:$PA_SOCK_PATH && export PULSE_COOKIE="~/.config/pulse/cookie"
export BRAVE_PATH="%%DATADIR%%/brave"
export BRAVE_WRAPPER="$(readlink -f "$0")"
export LIBGL_DRI3_DISABLE=1
/usr/local/bin/brave-watch &
exec "$BRAVE_PATH" --no-sandbox --no-zygote --test-type --v=0 "$@"

View file

@ -0,0 +1,3 @@
{
"BraveRewardsDisabled": true
}

View file

@ -0,0 +1,3 @@
{
"WebRtcIPHandling": "default_public_interface_only"
}

View file

@ -0,0 +1,2 @@
The web browser from Brave
Browse faster by blocking ads and trackers that violate your privacy and cost you time and money.

164
www/linux-brave/pkg-plist Normal file
View file

@ -0,0 +1,164 @@
bin/brave-browser
/%%ETCDIR%%/policies/managed/brave.json
/%%ETCDIR%%/policies/managed/webrtc.json
share/applications/brave-browser.desktop
share/appdata/brave-browser.appdata.xml
%%DATADIR%%/LICENSE
%%DATADIR%%/MEIPreload/manifest.json
%%DATADIR%%/MEIPreload/preloaded_data.pb
%%DATADIR%%/PrivacySandboxAttestationsPreloaded/manifest.json
%%DATADIR%%/PrivacySandboxAttestationsPreloaded/privacy-sandbox-attestations.dat
%%DATADIR%%/brave
%%DATADIR%%/brave-browser
%%DATADIR%%/brave_100_percent.pak
%%DATADIR%%/brave_200_percent.pak
%%DATADIR%%/brave_resources.pak
%%DATADIR%%/chrome-management-service
%%DATADIR%%/chrome-sandbox
%%DATADIR%%/chrome_100_percent.pak
%%DATADIR%%/chrome_200_percent.pak
%%DATADIR%%/chrome_crashpad_handler
%%DATADIR%%/default-app-block
%%DATADIR%%/icudtl.dat
%%DATADIR%%/libEGL.so
%%DATADIR%%/libGLESv2.so
%%DATADIR%%/libqt5_shim.so
%%DATADIR%%/libqt6_shim.so
%%DATADIR%%/libvk_swiftshader.so
%%DATADIR%%/libvulkan.so.1
%%DATADIR%%/locales/af.pak
%%DATADIR%%/locales/am.pak
%%DATADIR%%/locales/ar.pak
%%DATADIR%%/locales/bg.pak
%%DATADIR%%/locales/bn.pak
%%DATADIR%%/locales/ca.pak
%%DATADIR%%/locales/cs.pak
%%DATADIR%%/locales/da.pak
%%DATADIR%%/locales/de.pak
%%DATADIR%%/locales/el.pak
%%DATADIR%%/locales/en-GB.pak
%%DATADIR%%/locales/en-US.pak
%%DATADIR%%/locales/es-419.pak
%%DATADIR%%/locales/es.pak
%%DATADIR%%/locales/et.pak
%%DATADIR%%/locales/fa.pak
%%DATADIR%%/locales/fi.pak
%%DATADIR%%/locales/fil.pak
%%DATADIR%%/locales/fr.pak
%%DATADIR%%/locales/gu.pak
%%DATADIR%%/locales/he.pak
%%DATADIR%%/locales/hi.pak
%%DATADIR%%/locales/hr.pak
%%DATADIR%%/locales/hu.pak
%%DATADIR%%/locales/id.pak
%%DATADIR%%/locales/it.pak
%%DATADIR%%/locales/ja.pak
%%DATADIR%%/locales/kn.pak
%%DATADIR%%/locales/ko.pak
%%DATADIR%%/locales/lt.pak
%%DATADIR%%/locales/lv.pak
%%DATADIR%%/locales/ml.pak
%%DATADIR%%/locales/mr.pak
%%DATADIR%%/locales/ms.pak
%%DATADIR%%/locales/nb.pak
%%DATADIR%%/locales/nl.pak
%%DATADIR%%/locales/pl.pak
%%DATADIR%%/locales/pt-BR.pak
%%DATADIR%%/locales/pt-PT.pak
%%DATADIR%%/locales/ro.pak
%%DATADIR%%/locales/ru.pak
%%DATADIR%%/locales/sk.pak
%%DATADIR%%/locales/sl.pak
%%DATADIR%%/locales/sr.pak
%%DATADIR%%/locales/sv.pak
%%DATADIR%%/locales/sw.pak
%%DATADIR%%/locales/ta.pak
%%DATADIR%%/locales/te.pak
%%DATADIR%%/locales/th.pak
%%DATADIR%%/locales/tr.pak
%%DATADIR%%/locales/uk.pak
%%DATADIR%%/locales/ur.pak
%%DATADIR%%/locales/vi.pak
%%DATADIR%%/locales/zh-CN.pak
%%DATADIR%%/locales/zh-TW.pak
%%DATADIR%%/product_logo_128.png
%%DATADIR%%/product_logo_16.png
%%DATADIR%%/product_logo_24.png
%%DATADIR%%/product_logo_256.png
%%DATADIR%%/product_logo_32.png
%%DATADIR%%/product_logo_32.xpm
%%DATADIR%%/product_logo_48.png
%%DATADIR%%/product_logo_64.png
%%DATADIR%%/resources.pak
%%DATADIR%%/resources/brave_extension/_locales/af/messages.json
%%DATADIR%%/resources/brave_extension/_locales/am/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ar/messages.json
%%DATADIR%%/resources/brave_extension/_locales/bg/messages.json
%%DATADIR%%/resources/brave_extension/_locales/bn/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ca/messages.json
%%DATADIR%%/resources/brave_extension/_locales/cs/messages.json
%%DATADIR%%/resources/brave_extension/_locales/da/messages.json
%%DATADIR%%/resources/brave_extension/_locales/de/messages.json
%%DATADIR%%/resources/brave_extension/_locales/el/messages.json
%%DATADIR%%/resources/brave_extension/_locales/en_GB/messages.json
%%DATADIR%%/resources/brave_extension/_locales/en_US/messages.json
%%DATADIR%%/resources/brave_extension/_locales/es/messages.json
%%DATADIR%%/resources/brave_extension/_locales/es_419/messages.json
%%DATADIR%%/resources/brave_extension/_locales/et/messages.json
%%DATADIR%%/resources/brave_extension/_locales/fa/messages.json
%%DATADIR%%/resources/brave_extension/_locales/fi/messages.json
%%DATADIR%%/resources/brave_extension/_locales/fil/messages.json
%%DATADIR%%/resources/brave_extension/_locales/fr/messages.json
%%DATADIR%%/resources/brave_extension/_locales/gu/messages.json
%%DATADIR%%/resources/brave_extension/_locales/he/messages.json
%%DATADIR%%/resources/brave_extension/_locales/hi/messages.json
%%DATADIR%%/resources/brave_extension/_locales/hr/messages.json
%%DATADIR%%/resources/brave_extension/_locales/hu/messages.json
%%DATADIR%%/resources/brave_extension/_locales/id/messages.json
%%DATADIR%%/resources/brave_extension/_locales/it/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ja/messages.json
%%DATADIR%%/resources/brave_extension/_locales/kn/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ko/messages.json
%%DATADIR%%/resources/brave_extension/_locales/lt/messages.json
%%DATADIR%%/resources/brave_extension/_locales/lv/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ml/messages.json
%%DATADIR%%/resources/brave_extension/_locales/mr/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ms/messages.json
%%DATADIR%%/resources/brave_extension/_locales/nb/messages.json
%%DATADIR%%/resources/brave_extension/_locales/nl/messages.json
%%DATADIR%%/resources/brave_extension/_locales/pl/messages.json
%%DATADIR%%/resources/brave_extension/_locales/pt_BR/messages.json
%%DATADIR%%/resources/brave_extension/_locales/pt_PT/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ro/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ru/messages.json
%%DATADIR%%/resources/brave_extension/_locales/sk/messages.json
%%DATADIR%%/resources/brave_extension/_locales/sl/messages.json
%%DATADIR%%/resources/brave_extension/_locales/sr/messages.json
%%DATADIR%%/resources/brave_extension/_locales/sv/messages.json
%%DATADIR%%/resources/brave_extension/_locales/sw/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ta/messages.json
%%DATADIR%%/resources/brave_extension/_locales/te/messages.json
%%DATADIR%%/resources/brave_extension/_locales/th/messages.json
%%DATADIR%%/resources/brave_extension/_locales/tr/messages.json
%%DATADIR%%/resources/brave_extension/_locales/uk/messages.json
%%DATADIR%%/resources/brave_extension/_locales/ur/messages.json
%%DATADIR%%/resources/brave_extension/_locales/vi/messages.json
%%DATADIR%%/resources/brave_extension/_locales/zh_CN/messages.json
%%DATADIR%%/resources/brave_extension/_locales/zh_TW/messages.json
%%DATADIR%%/v8_context_snapshot.bin
%%DATADIR%%/vk_swiftshader_icd.json
%%DATADIR%%/xdg-mime
%%DATADIR%%/xdg-settings
share/gnome-control-center/default-apps/brave-browser.xml
share/icons/hicolor/128x128/apps/brave-browser.png
share/icons/hicolor/16x16/apps/brave-browser.png
share/icons/hicolor/24x24/apps/brave-browser.png
share/icons/hicolor/256x256/apps/brave-browser.png
share/icons/hicolor/32x32/apps/brave-browser.png
share/icons/hicolor/48x48/apps/brave-browser.png
share/icons/hicolor/64x64/apps/brave-browser.png
share/man/man1/brave-browser-stable.1.gz
share/man/man1/brave-browser.1.gz
@dir /%%ETCDIR%%/policies/managed
@dir /%%ETCDIR%%/policies
@dir /%%ETCDIR%%