mirror of
https://aur.archlinux.org/firedragon.git
synced 2024-12-25 12:14:14 +00:00
chore: update firedragon
This commit was automatically generated to reflect changes to this package in another repository. Unfortunately, due to a misconfiguration, the URL of the source repository is not available.
This commit is contained in:
parent
e39f3ac66f
commit
428ba83958
18
.SRCINFO
18
.SRCINFO
@ -1,6 +1,6 @@
|
||||
pkgbase = firedragon
|
||||
pkgdesc = Floorp fork build using custom branding & settings
|
||||
pkgver = 11.11.2
|
||||
pkgver = 11.12.0
|
||||
pkgrel = 1
|
||||
epoch = 1
|
||||
url = http://dr460nf1r3.org
|
||||
@ -67,17 +67,17 @@ pkgbase = firedragon
|
||||
options = !strip
|
||||
backup = usr/lib/firedragon/firedragon.cfg
|
||||
backup = usr/lib/firedragon/distribution/policies.json
|
||||
source = https://github.com/Floorp-Projects/Floorp/archive/refs/tags/v11.11.2.tar.gz
|
||||
source = floorp-core::git+https://github.com/Floorp-Projects/Floorp-core#commit=09cc05ed3a469f71aaf4ada1b5a08acd08f99af8
|
||||
source = floorp-l10n-central::git+https://github.com/Floorp-Projects/Unified-l10n-central#commit=b1cfac382d73f99251cf3e7076cc90e4612572f6
|
||||
source = floorp-private::git+https://github.com/floorp-Projects/Floorp-private-components#commit=69519e444dbb05118e512c1e23a456520004b700
|
||||
source = https://github.com/Floorp-Projects/Floorp/archive/refs/tags/v11.12.0.tar.gz
|
||||
source = floorp-core::git+https://github.com/Floorp-Projects/Floorp-core#commit=c54e98bdcb80c3dd9e10fe668d9f1b052ac23e62
|
||||
source = floorp-l10n-central::git+https://github.com/Floorp-Projects/Unified-l10n-central#commit=b7a652ebf828e1c695a19903a568505d818463d2
|
||||
source = floorp-private::git+https://github.com/floorp-Projects/Floorp-private-components#commit=fd03f5cc34377591f63a293e82f0b5eb55a8c5fc
|
||||
source = common::git+https://gitlab.com/garuda-linux/firedragon/common.git
|
||||
source = settings::git+https://gitlab.com/garuda-linux/firedragon/settings.git
|
||||
source = firedragon.desktop
|
||||
sha256sums = 18250e72d551e81ec34c7206c58c3026a465d5cdc780eb10cdc3ea050b2ff824
|
||||
sha256sums = ac1824366321e33651b0a388d3fd9ca82709361f9291664d16890e37630f33cb
|
||||
sha256sums = 86b211b89b5aa742b2f583655ba85273ea56d6c4942ba3b5a3ec2d52d6afc36f
|
||||
sha256sums = 9fd6541b7f8d1b212db18a71a501727d707ff11b9a995300579d3f6f92114eeb
|
||||
sha256sums = 4d1c6b6c69b139e90f2ae6b192f2774f7525eaca265fcb58247a8c0a20a18ae5
|
||||
sha256sums = 04659d794809a3e2dcb13e051b8752ddf322364f552d389e9ece28f9285fabab
|
||||
sha256sums = 5f9a31c9a7166328ac364b9172e3b40bff822f142976fa009de5ada65a7dd938
|
||||
sha256sums = 58d690b35080a70d99a665c7fb8db0d6dfc229a37bdea7ff2111c922687141c7
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = 53d3e743f3750522318a786befa196237892c93f20571443fdf82a480e7f0560
|
||||
|
478
PKGBUILD
478
PKGBUILD
@ -9,111 +9,111 @@
|
||||
|
||||
pkgname=firedragon
|
||||
_pkgname=FireDragon
|
||||
pkgver=11.11.2
|
||||
_floorp_core_commit="09cc05ed3a469f71aaf4ada1b5a08acd08f99af8"
|
||||
_floorp_l10n_commit="b1cfac382d73f99251cf3e7076cc90e4612572f6"
|
||||
_floorp_private_commit="69519e444dbb05118e512c1e23a456520004b700"
|
||||
pkgver=11.12.0
|
||||
_floorp_core_commit="c54e98bdcb80c3dd9e10fe668d9f1b052ac23e62"
|
||||
_floorp_l10n_commit="b7a652ebf828e1c695a19903a568505d818463d2"
|
||||
_floorp_private_commit="fd03f5cc34377591f63a293e82f0b5eb55a8c5fc"
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc="Floorp fork build using custom branding & settings"
|
||||
url='http://dr460nf1r3.org'
|
||||
pkgdesc="Floorp fork build using custom branding and settings"
|
||||
url='https://garudalinux.org'
|
||||
arch=('x86_64')
|
||||
license=('MPL2')
|
||||
license=('MPL2' 'Floorp Shared Source License')
|
||||
depends=(dbus
|
||||
dbus-glib
|
||||
ffmpeg
|
||||
gtk3
|
||||
libevent
|
||||
libjpeg
|
||||
libpulse
|
||||
libvpx
|
||||
libwebp
|
||||
libxss
|
||||
libxt
|
||||
mime-types
|
||||
nss
|
||||
pipewire
|
||||
ttf-font
|
||||
zlib)
|
||||
dbus-glib
|
||||
ffmpeg
|
||||
gtk3
|
||||
libevent
|
||||
libjpeg
|
||||
libpulse
|
||||
libvpx
|
||||
libwebp
|
||||
libxss
|
||||
libxt
|
||||
mime-types
|
||||
nss
|
||||
pipewire
|
||||
ttf-font
|
||||
zlib)
|
||||
makedepends=(cbindgen
|
||||
clang
|
||||
diffutils
|
||||
dump_syms
|
||||
imagemagick
|
||||
imake
|
||||
inetutils
|
||||
git
|
||||
jack
|
||||
lld
|
||||
llvm
|
||||
mesa
|
||||
mold
|
||||
nasm
|
||||
nodejs
|
||||
python
|
||||
rust
|
||||
unzip
|
||||
wasi-compiler-rt
|
||||
wasi-libc
|
||||
wasi-libc++
|
||||
wasi-libc++abi
|
||||
xorg-server-xvfb
|
||||
yasm
|
||||
zip)
|
||||
clang
|
||||
diffutils
|
||||
dump_syms
|
||||
imagemagick
|
||||
imake
|
||||
inetutils
|
||||
git
|
||||
jack
|
||||
lld
|
||||
llvm
|
||||
mesa
|
||||
mold
|
||||
nasm
|
||||
nodejs
|
||||
python
|
||||
rust
|
||||
unzip
|
||||
wasi-compiler-rt
|
||||
wasi-libc
|
||||
wasi-libc++
|
||||
wasi-libc++abi
|
||||
xorg-server-xvfb
|
||||
yasm
|
||||
zip)
|
||||
optdepends=('hunspell-dictionary: Spell checking'
|
||||
'libnotify: Notification integration'
|
||||
'networkmanager: Location detection via available WiFi networks'
|
||||
'profile-sync-daemon: Load the browser profile into RAM'
|
||||
'pulseaudio: Audio support'
|
||||
'searx: Searching the web using a locally running searX instance'
|
||||
'speech-dispatcher: Text-to-Speech'
|
||||
'whoogle: Searching the web using a locally running Whoogle instance'
|
||||
'xdg-desktop-portal: Screensharing with Wayland')
|
||||
'libnotify: Notification integration'
|
||||
'networkmanager: Location detection via available WiFi networks'
|
||||
'profile-sync-daemon: Load the browser profile into RAM'
|
||||
'pulseaudio: Audio support'
|
||||
'searx: Searching the web using a locally running searX instance'
|
||||
'speech-dispatcher: Text-to-Speech'
|
||||
'whoogle: Searching the web using a locally running Whoogle instance'
|
||||
'xdg-desktop-portal: Screensharing with Wayland')
|
||||
replaces=(firedragon-next)
|
||||
options=(!debug
|
||||
!emptydirs
|
||||
!lto
|
||||
!makeflags
|
||||
!strip)
|
||||
!emptydirs
|
||||
!lto
|
||||
!makeflags
|
||||
!strip)
|
||||
backup=("usr/lib/${pkgname}/${pkgname}.cfg"
|
||||
"usr/lib/${pkgname}/distribution/policies.json")
|
||||
"usr/lib/${pkgname}/distribution/policies.json")
|
||||
source=(https://github.com/Floorp-Projects/Floorp/archive/refs/tags/v"${pkgver}".tar.gz
|
||||
"floorp-core::git+https://github.com/Floorp-Projects/Floorp-core#commit=$_floorp_core_commit"
|
||||
"floorp-l10n-central::git+https://github.com/Floorp-Projects/Unified-l10n-central#commit=$_floorp_l10n_commit"
|
||||
"floorp-private::git+https://github.com/floorp-Projects/Floorp-private-components#commit=$_floorp_private_commit"
|
||||
"common::git+https://gitlab.com/garuda-linux/firedragon/common.git"
|
||||
"settings::git+https://gitlab.com/garuda-linux/firedragon/settings.git"
|
||||
"${pkgname}.desktop")
|
||||
sha256sums=('18250e72d551e81ec34c7206c58c3026a465d5cdc780eb10cdc3ea050b2ff824'
|
||||
'ac1824366321e33651b0a388d3fd9ca82709361f9291664d16890e37630f33cb'
|
||||
'86b211b89b5aa742b2f583655ba85273ea56d6c4942ba3b5a3ec2d52d6afc36f'
|
||||
'9fd6541b7f8d1b212db18a71a501727d707ff11b9a995300579d3f6f92114eeb'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'53d3e743f3750522318a786befa196237892c93f20571443fdf82a480e7f0560')
|
||||
"floorp-core::git+https://github.com/Floorp-Projects/Floorp-core#commit=$_floorp_core_commit"
|
||||
"floorp-l10n-central::git+https://github.com/Floorp-Projects/Unified-l10n-central#commit=$_floorp_l10n_commit"
|
||||
"floorp-private::git+https://github.com/floorp-Projects/Floorp-private-components#commit=$_floorp_private_commit"
|
||||
"common::git+https://gitlab.com/garuda-linux/firedragon/common.git"
|
||||
"settings::git+https://gitlab.com/garuda-linux/firedragon/settings.git"
|
||||
"${pkgname}.desktop")
|
||||
sha256sums=('4d1c6b6c69b139e90f2ae6b192f2774f7525eaca265fcb58247a8c0a20a18ae5'
|
||||
'04659d794809a3e2dcb13e051b8752ddf322364f552d389e9ece28f9285fabab'
|
||||
'5f9a31c9a7166328ac364b9172e3b40bff822f142976fa009de5ada65a7dd938'
|
||||
'58d690b35080a70d99a665c7fb8db0d6dfc229a37bdea7ff2111c922687141c7'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'53d3e743f3750522318a786befa196237892c93f20571443fdf82a480e7f0560')
|
||||
install="${pkgname}.install"
|
||||
|
||||
# Select the method of profiling
|
||||
if [[ "${_build_pgo::1}" == "t" ]]; then
|
||||
if [[ "${_build_pgo_xvfb::1}" == "t" ]]; then
|
||||
makedepends+=(xorg-server-xvfb)
|
||||
else
|
||||
makedepends+=(weston xwayland-run)
|
||||
fi
|
||||
if [[ "${_build_pgo_xvfb::1}" == "t" ]]; then
|
||||
makedepends+=(xorg-server-xvfb)
|
||||
else
|
||||
makedepends+=(weston xwayland-run)
|
||||
fi
|
||||
fi
|
||||
|
||||
prepare() {
|
||||
# Floorp's shenanigan to make the build work without cloning the whole
|
||||
# git source (puts submodules' content in place)
|
||||
mv -f "${srcdir}"/floorp-core/* ./Floorp-"${pkgver}"/floorp
|
||||
mv -f "${srcdir}"/floorp-private/* ./Floorp-"${pkgver}"/floorp/Floorp-private-components
|
||||
mv -f "${srcdir}"/floorp-l10n-central/* ./Floorp-"${pkgver}"/floorp/browser/locales/l10n-central
|
||||
# Floorp's shenanigan to make the build work without cloning the whole
|
||||
# git source (puts submodules' content in place)
|
||||
mv -f "${srcdir}"/floorp-core/* ./Floorp-"${pkgver}"/floorp
|
||||
mv -f "${srcdir}"/floorp-private/* ./Floorp-"${pkgver}"/floorp/Floorp-private-components
|
||||
mv -f "${srcdir}"/floorp-l10n-central/* ./Floorp-"${pkgver}"/floorp/browser/locales/l10n-central
|
||||
|
||||
rm -rf "${srcdir}/mozbuild"
|
||||
mkdir "${srcdir}/mozbuild"
|
||||
rm -rf "${srcdir}/mozbuild"
|
||||
mkdir "${srcdir}/mozbuild"
|
||||
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
cat >../mozconfig <<END
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
cat > ../mozconfig << END
|
||||
ac_add_options --with-app-basename=${_pkgname}
|
||||
ac_add_options --with-app-name=${pkgname}
|
||||
ac_add_options --with-branding=browser/branding/firedragon
|
||||
@ -199,160 +199,160 @@ export NM=llvm-nm
|
||||
export RANLIB=llvm-ranlib
|
||||
END
|
||||
|
||||
local _patches_dir
|
||||
_patches_dir="${srcdir}/common/patches"
|
||||
local _patches_dir
|
||||
_patches_dir="${srcdir}/common/patches"
|
||||
|
||||
local _floorp_patches_dir
|
||||
_floorp_patches_dir="${srcdir}/common/patches/floorp/"
|
||||
local _floorp_patches_dir
|
||||
_floorp_patches_dir="${srcdir}/common/patches/floorp/"
|
||||
|
||||
_patch() {
|
||||
printf 'Patching %s ...\n' "$1"
|
||||
patch -Np1 -i "$1"
|
||||
}
|
||||
_patch() {
|
||||
printf 'Patching %s ...\n' "$1"
|
||||
patch -Np1 -i "$1"
|
||||
}
|
||||
|
||||
# Remove some pre-installed addons that might be questionable
|
||||
_patch "${_floorp_patches_dir}"/remove_addons.patch
|
||||
# Remove some pre-installed addons that might be questionable
|
||||
_patch "${_floorp_patches_dir}"/remove_addons.patch
|
||||
|
||||
# Stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10)
|
||||
_patch "${_floorp_patches_dir}"/sed-patches/stop-undesired-requests.patch
|
||||
# Stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10)
|
||||
_patch "${_floorp_patches_dir}"/sed-patches/stop-undesired-requests.patch
|
||||
|
||||
# Assorted patches
|
||||
_patch "${_floorp_patches_dir}"/urlbarprovider-interventions.patch
|
||||
# Assorted patches
|
||||
_patch "${_floorp_patches_dir}"/urlbarprovider-interventions.patch
|
||||
|
||||
# Allow uBlockOrigin to run in private mode by default, without user intervention
|
||||
_patch "${_floorp_patches_dir}"/allow-ubo-private-mode.patch
|
||||
# Allow uBlockOrigin to run in private mode by default, without user intervention
|
||||
_patch "${_floorp_patches_dir}"/allow-ubo-private-mode.patch
|
||||
|
||||
# Add custom uBO assets (on first launch only)
|
||||
_patch "${_floorp_patches_dir}"/custom-ubo-assets-bootstrap-location.patch
|
||||
# Add custom uBO assets (on first launch only)
|
||||
_patch "${_floorp_patches_dir}"/custom-ubo-assets-bootstrap-location.patch
|
||||
|
||||
# Allows hiding the password manager (from the lw pref pane) / via a pref
|
||||
_patch "${_floorp_patches_dir}"/hide-passwordmgr.patch
|
||||
# Allows hiding the password manager (from the lw pref pane) / via a pref
|
||||
_patch "${_floorp_patches_dir}"/hide-passwordmgr.patch
|
||||
|
||||
# Add Firedragon Preferences Pane
|
||||
_patch "${_patches_dir}"/pref-pane/pref-pane-small.patch
|
||||
cp "${_patches_dir}/pref-pane/category-firedragon.svg" browser/themes/shared/preferences/category-firedragon.svg
|
||||
cp "${_patches_dir}/pref-pane/firedragon.css" browser/themes/shared/preferences/firedragon.css
|
||||
cp "${_patches_dir}/pref-pane/firedragon.inc.xhtml" browser/components/preferences/firedragon.inc.xhtml
|
||||
cp "${_patches_dir}/pref-pane/firedragon.js" browser/components/preferences/firedragon.js
|
||||
cat <"${_patches_dir}/pref-pane/preferences.ftl" >>browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
# Add Firedragon Preferences Pane
|
||||
_patch "${_patches_dir}"/pref-pane/pref-pane-small.patch
|
||||
cp "${_patches_dir}/pref-pane/category-firedragon.svg" browser/themes/shared/preferences/category-firedragon.svg
|
||||
cp "${_patches_dir}/pref-pane/firedragon.css" browser/themes/shared/preferences/firedragon.css
|
||||
cp "${_patches_dir}/pref-pane/firedragon.inc.xhtml" browser/components/preferences/firedragon.inc.xhtml
|
||||
cp "${_patches_dir}/pref-pane/firedragon.js" browser/components/preferences/firedragon.js
|
||||
cat < "${_patches_dir}/pref-pane/preferences.ftl" >> browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
|
||||
# Update privacy preferences -- DISABLED to test UI changes and allow user to easily change the setting
|
||||
# _patch "${_patches_dir}"/custom/privacy-preferences.patch
|
||||
# Update privacy preferences -- DISABLED to test UI changes and allow user to easily change the setting
|
||||
# _patch "${_patches_dir}"/custom/privacy-preferences.patch
|
||||
|
||||
rm -f "${srcdir}"/common/source_files/mozconfig
|
||||
cp -r "${srcdir}"/common/source_files/* ./
|
||||
rm -f "${srcdir}"/common/source_files/mozconfig
|
||||
cp -r "${srcdir}"/common/source_files/* ./
|
||||
}
|
||||
|
||||
build() {
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
|
||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip
|
||||
export MOZBUILD_STATE_PATH="${srcdir}/mozbuild"
|
||||
export MOZ_ENABLE_FULL_SYMBOLS=1
|
||||
export MOZ_NOSPAM=1
|
||||
export MOZ_PROFILER_STARTUP=1 # Starts the profiler is started as early as possible during startup.
|
||||
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip
|
||||
export MOZBUILD_STATE_PATH="${srcdir}/mozbuild"
|
||||
export MOZ_ENABLE_FULL_SYMBOLS=1
|
||||
export MOZ_NOSPAM=1
|
||||
export MOZ_PROFILER_STARTUP=1 # Starts the profiler is started as early as possible during startup.
|
||||
|
||||
# Fix DRI/zink issues during compilation
|
||||
export LIBGL_ALWAYS_SOFTWARE=true
|
||||
# Fix DRI/zink issues during compilation
|
||||
export LIBGL_ALWAYS_SOFTWARE=true
|
||||
|
||||
# Malloc_usable_size is used in various parts of the codebase
|
||||
CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
# Malloc_usable_size is used in various parts of the codebase
|
||||
CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
|
||||
# LTO needs more open files
|
||||
ulimit -n 4096
|
||||
# LTO needs more open files
|
||||
ulimit -n 4096
|
||||
|
||||
# Do 3-tier PGO
|
||||
if [[ "${_build_pgo::1}" == "t" ]]; then
|
||||
local _old_profdata="${SRCDEST:-$startdir}/merged.profdata"
|
||||
local _old_jarlog="${SRCDEST:-$startdir}/jarlog"
|
||||
# Do 3-tier PGO
|
||||
if [[ "${_build_pgo::1}" == "t" ]]; then
|
||||
local _old_profdata="${SRCDEST:-$startdir}/merged.profdata"
|
||||
local _old_jarlog="${SRCDEST:-$startdir}/jarlog"
|
||||
|
||||
# Restore old profile
|
||||
if [[ "${_build_pgo_reuse::1}" == "t" ]]; then
|
||||
if [[ -s "$_old_profdata" ]]; then
|
||||
echo "Restoring old profile data."
|
||||
cp --reflink=auto -f "$_old_profdata" merged.profdata
|
||||
fi
|
||||
# Restore old profile
|
||||
if [[ "${_build_pgo_reuse::1}" == "t" ]]; then
|
||||
if [[ -s "$_old_profdata" ]]; then
|
||||
echo "Restoring old profile data."
|
||||
cp --reflink=auto -f "$_old_profdata" merged.profdata
|
||||
fi
|
||||
|
||||
if [[ -s "$_old_jarlog" ]]; then
|
||||
echo "Restoring old jar log."
|
||||
cp --reflink=auto -f "$_old_jarlog" jarlog
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make new profile
|
||||
if [[ "${_build_pgo_reuse::1}" != "t" ]] || [[ ! -s merged.profdata ]]; then
|
||||
echo "Building instrumented browser..."
|
||||
cat >.mozconfig ../mozconfig
|
||||
echo >>.mozconfig "ac_add_options --enable-profile-generate=cross"
|
||||
./mach build
|
||||
|
||||
echo "Profiling instrumented browser..."
|
||||
./mach package
|
||||
|
||||
if [[ "${_build_pgo_xvfb::1}" == "t" ]]; then
|
||||
local _headless_run=(
|
||||
xvfb-run
|
||||
-s "-screen 0 1920x1080x24 -nolisten local"
|
||||
)
|
||||
else
|
||||
local _headless_run=(
|
||||
wlheadless-run
|
||||
-c weston --width=1920 --height=1080
|
||||
)
|
||||
fi
|
||||
|
||||
LLVM_PROFDATA=llvm-profdata JARLOG_FILE=${PWD@Q}/jarlog \
|
||||
"${_headless_run[@]}" -- ./mach python build/pgo/profileserver.py
|
||||
|
||||
echo "Removing instrumented browser..."
|
||||
./mach clobber
|
||||
fi
|
||||
|
||||
echo "Building optimized browser..."
|
||||
cat >.mozconfig ../mozconfig
|
||||
|
||||
if [[ -s merged.profdata ]]; then
|
||||
stat -c "Profile data found (%s bytes)" merged.profdata
|
||||
echo >>.mozconfig "ac_add_options --enable-profile-use=cross"
|
||||
echo >>.mozconfig "ac_add_options --with-pgo-profile-path='${PWD@Q}/merged.profdata'"
|
||||
|
||||
# save profdata for reuse
|
||||
cp --reflink=auto -f merged.profdata "$_old_profdata"
|
||||
else
|
||||
echo "Profile data not found."
|
||||
fi
|
||||
|
||||
if [[ -s jarlog ]]; then
|
||||
stat -c "Jar log found (%s bytes)" jarlog
|
||||
echo >>.mozconfig "ac_add_options --with-pgo-jarlog='${PWD@Q}/jarlog'"
|
||||
|
||||
# save jarlog for reuse
|
||||
cp --reflink=auto -f jarlog "$_old_jarlog"
|
||||
else
|
||||
echo "Jar log not found."
|
||||
fi
|
||||
|
||||
./mach build
|
||||
else
|
||||
echo "Building browser..."
|
||||
cat >.mozconfig ../mozconfig
|
||||
./mach build
|
||||
if [[ -s "$_old_jarlog" ]]; then
|
||||
echo "Restoring old jar log."
|
||||
cp --reflink=auto -f "$_old_jarlog" jarlog
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Building symbol archive..."
|
||||
./mach buildsymbols
|
||||
# Make new profile
|
||||
if [[ "${_build_pgo_reuse::1}" != "t" ]] || [[ ! -s merged.profdata ]]; then
|
||||
echo "Building instrumented browser..."
|
||||
cat > .mozconfig ../mozconfig
|
||||
echo >> .mozconfig "ac_add_options --enable-profile-generate=cross"
|
||||
./mach build
|
||||
|
||||
echo "Profiling instrumented browser..."
|
||||
./mach package
|
||||
|
||||
if [[ "${_build_pgo_xvfb::1}" == "t" ]]; then
|
||||
local _headless_run=(
|
||||
xvfb-run
|
||||
-s "-screen 0 1920x1080x24 -nolisten local"
|
||||
)
|
||||
else
|
||||
local _headless_run=(
|
||||
wlheadless-run
|
||||
-c weston --width=1920 --height=1080
|
||||
)
|
||||
fi
|
||||
|
||||
LLVM_PROFDATA=llvm-profdata JARLOG_FILE=${PWD@Q}/jarlog \
|
||||
"${_headless_run[@]}" -- ./mach python build/pgo/profileserver.py
|
||||
|
||||
echo "Removing instrumented browser..."
|
||||
./mach clobber
|
||||
fi
|
||||
|
||||
echo "Building optimized browser..."
|
||||
cat > .mozconfig ../mozconfig
|
||||
|
||||
if [[ -s merged.profdata ]]; then
|
||||
stat -c "Profile data found (%s bytes)" merged.profdata
|
||||
echo >> .mozconfig "ac_add_options --enable-profile-use=cross"
|
||||
echo >> .mozconfig "ac_add_options --with-pgo-profile-path='${PWD@Q}/merged.profdata'"
|
||||
|
||||
# save profdata for reuse
|
||||
cp --reflink=auto -f merged.profdata "$_old_profdata"
|
||||
else
|
||||
echo "Profile data not found."
|
||||
fi
|
||||
|
||||
if [[ -s jarlog ]]; then
|
||||
stat -c "Jar log found (%s bytes)" jarlog
|
||||
echo >> .mozconfig "ac_add_options --with-pgo-jarlog='${PWD@Q}/jarlog'"
|
||||
|
||||
# save jarlog for reuse
|
||||
cp --reflink=auto -f jarlog "$_old_jarlog"
|
||||
else
|
||||
echo "Jar log not found."
|
||||
fi
|
||||
|
||||
./mach build
|
||||
else
|
||||
echo "Building browser..."
|
||||
cat > .mozconfig ../mozconfig
|
||||
./mach build
|
||||
fi
|
||||
|
||||
echo "Building symbol archive..."
|
||||
./mach buildsymbols
|
||||
}
|
||||
|
||||
package() {
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
cd Floorp-"${pkgver}" || exit
|
||||
|
||||
DESTDIR="${pkgdir}" ./mach install
|
||||
DESTDIR="${pkgdir}" ./mach install
|
||||
|
||||
rm "${pkgdir}/usr/lib/${pkgname}/pingsender"
|
||||
rm "${pkgdir}/usr/lib/${pkgname}/pingsender"
|
||||
|
||||
local vendorjs="${pkgdir}/usr/lib/${pkgname}/browser/defaults/preferences/vendor.js"
|
||||
install -Dvm644 /dev/stdin "${vendorjs}" <<END
|
||||
local vendorjs="${pkgdir}/usr/lib/${pkgname}/browser/defaults/preferences/vendor.js"
|
||||
install -Dvm644 /dev/stdin "${vendorjs}" << END
|
||||
// Use LANG environment variable to choose locale
|
||||
pref("intl.locale.requested", "");
|
||||
|
||||
@ -369,8 +369,8 @@ pref("extensions.autoDisableScopes", 11);
|
||||
pref("browser.gnome-search-provider.enabled", true);
|
||||
END
|
||||
|
||||
local distini="${pkgdir}/usr/lib/${pkgname}/distribution/distribution.ini"
|
||||
install -Dvm644 /dev/stdin "${distini}" <<END
|
||||
local distini="${pkgdir}/usr/lib/${pkgname}/distribution/distribution.ini"
|
||||
install -Dvm644 /dev/stdin "${distini}" << END
|
||||
[Global]
|
||||
id=${pkgname}
|
||||
version=${pkgver}-${pkgrel}
|
||||
@ -382,18 +382,18 @@ app.distributor.channel=${pkgname}
|
||||
app.partner.garudalinux=garudalinux
|
||||
END
|
||||
|
||||
# Use system certificates
|
||||
local nssckbi="${pkgdir}/usr/lib/${pkgname}/libnssckbi.so"
|
||||
if [[ -e "${nssckbi}" ]]; then
|
||||
ln -srfv "${pkgdir}/usr/lib/libnssckbi.so" "${nssckbi}"
|
||||
fi
|
||||
# Use system certificates
|
||||
local nssckbi="${pkgdir}/usr/lib/${pkgname}/libnssckbi.so"
|
||||
if [[ -e "${nssckbi}" ]]; then
|
||||
ln -srfv "${pkgdir}/usr/lib/libnssckbi.so" "${nssckbi}"
|
||||
fi
|
||||
|
||||
# Make native messaging work
|
||||
ln -s "/usr/lib/mozilla/native-messaging-hosts" "${pkgdir}/usr/lib/${pkgname}/native-messaging-hosts"
|
||||
# Make native messaging work
|
||||
ln -s "/usr/lib/mozilla/native-messaging-hosts" "${pkgdir}/usr/lib/${pkgname}/native-messaging-hosts"
|
||||
|
||||
# GNOME search provider
|
||||
local sprovider="$pkgdir/usr/share/gnome-shell/search-providers/$pkgname.search-provider.ini"
|
||||
install -Dvm644 /dev/stdin "$sprovider" <<END
|
||||
# GNOME search provider
|
||||
local sprovider="$pkgdir/usr/share/gnome-shell/search-providers/$pkgname.search-provider.ini"
|
||||
install -Dvm644 /dev/stdin "$sprovider" << END
|
||||
[Shell Search Provider]
|
||||
DesktopId=$pkgname.desktop
|
||||
BusName=org.mozilla.${pkgname//-/}.SearchProvider
|
||||
@ -401,22 +401,22 @@ ObjectPath=/org/mozilla/${pkgname//-/}/SearchProvider
|
||||
Version=2
|
||||
END
|
||||
|
||||
# Application icons
|
||||
for i in 16 32 48 64 128; do
|
||||
install -Dvm644 browser/branding/firedragon/default$i.png \
|
||||
"${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
|
||||
done
|
||||
install -Dvm644 browser/branding/firedragon/content/about-logo.png \
|
||||
"${pkgdir}/usr/share/icons/hicolor/192x192/apps/${pkgname}.png"
|
||||
# Application icons
|
||||
for i in 16 32 48 64 128; do
|
||||
install -Dvm644 browser/branding/firedragon/default$i.png \
|
||||
"${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
|
||||
done
|
||||
install -Dvm644 browser/branding/firedragon/content/about-logo.png \
|
||||
"${pkgdir}/usr/share/icons/hicolor/192x192/apps/${pkgname}.png"
|
||||
|
||||
# Replace duplicate binary with wrapper
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
||||
ln -srfv "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/lib/$pkgname/${pkgname%-*}-bin"
|
||||
# Replace duplicate binary with wrapper
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
||||
ln -srfv "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/lib/$pkgname/${pkgname%-*}-bin"
|
||||
|
||||
# All the needed configuration files
|
||||
install -Dvm644 "../${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
install -Dvm644 "${srcdir}/settings/firedragon.cfg" "${pkgdir}/usr/lib/${pkgname}/firedragon.cfg"
|
||||
install -Dvm644 "${srcdir}/settings/firedragon.psd" "${pkgdir}/usr/share/psd/browsers/firedragon"
|
||||
install -Dvm644 "${srcdir}/settings/defaults/pref/local-settings.js" "${pkgdir}/usr/lib/${pkgname}/defaults/pref/local-settings.js"
|
||||
install -Dvm644 "${srcdir}/settings/distribution/policies.json" "${pkgdir}/usr/lib/${pkgname}/distribution/policies.json"
|
||||
# All the needed configuration files
|
||||
install -Dvm644 "../${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
install -Dvm644 "${srcdir}/settings/firedragon.cfg" "${pkgdir}/usr/lib/${pkgname}/firedragon.cfg"
|
||||
install -Dvm644 "${srcdir}/settings/firedragon.psd" "${pkgdir}/usr/share/psd/browsers/firedragon"
|
||||
install -Dvm644 "${srcdir}/settings/defaults/pref/local-settings.js" "${pkgdir}/usr/lib/${pkgname}/defaults/pref/local-settings.js"
|
||||
install -Dvm644 "${srcdir}/settings/distribution/policies.json" "${pkgdir}/usr/lib/${pkgname}/distribution/policies.json"
|
||||
}
|
||||
|
@ -12,4 +12,4 @@ many settings as well as cookies, localstorage data may be reset to allow for
|
||||
the new Floorp experience. A backup of the previous profile has been saved under:
|
||||
~/.firedragon/\$defaultprofile-pre-floorp-backup."
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user