Files
haikuports/www-client/waterfox/waterfox-6.6.7.recipe
Gerasim Troeglazov 4bbe2d8c6d waterfox: bump version
2025-12-31 00:02:14 +10:00

195 lines
4.7 KiB
Bash

SUMMARY="A Firefox fork with privacy, usability, and speed enhancements"
DESCRIPTION="Waterfox is an open-source, privacy-focused browser based on the popular \
open source browser with a red panda as a mascot. It is designed to be a drop-in \
replacement for said browser that offers enhanced privacy features, performance \
improvements, and customizability while maintaining compatibility with existing extensions.
Key Features:
* Privacy-focused: Removal of telemetry and tracking, with bare minimum of data collection for operation.
* Performance-oriented: Optimized for modern systems
* Customizable: Support for classic and modern extensions
* Cross-platform: Available for Windows, macOS, Linux, Android and Haiku
* Modern: Regular updates to stay current with web standards"
HOMEPAGE="https://www.waterfox.net/"
COPYRIGHT="1995-2025 Mozilla Developers, BrowserWorks"
LICENSE="MPL v2.0"
REVISION="1"
SOURCE_URI="https://github.com/BrowserWorks/Waterfox/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="9c141c32d8fef0863fce37e4c8bfb9c10ed9e4067c495bbd87f416454e941255"
SOURCE_DIR="waterfox-$portVersion"
srcGitRev="5889642a59bf99590ff704624ee4e0b172e6b361"
SOURCE_URI_2="https://github.com/BrowserWorks/l10n/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256_2="9f8410b8c264ddf0e1ef67820ddd3a914bae84563c41bf4e239b0b38597c33c7"
SOURCE_DIR_2="l10n-$srcGitRev"
PATCHES="
waterfox-$portVersion.patchset
waterfox_launcher-$portVersion.patchset
"
ADDITIONAL_FILES="
waterfox.rdef.in
waterfox_launcher.rdef.in
mozconfig
"
ARCHITECTURES="!x86_64"
PROVIDES="
waterfox= $portVersion
app:Waterfox= $portVersion
"
CONFLICTS="
waterfox_bin
"
REQUIRES="
haiku
lib:libatk_1.0
lib:libcairo
lib:libcairo_gobject
lib:libdbus_1
lib:libevent_2.1
lib:libgdk_3
lib:libgdk_pixbuf_2.0
lib:libglib_2.0
lib:libgtk_3
lib:libharfbuzz
lib:libintl
lib:libmediahelpers
lib:libnotify
lib:libnspr4
lib:libnss3
lib:libpango_1.0
lib:libpangocairo_1.0
lib:libpng16
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libdbus_1
devel:libdbus_glib_1
devel:libevent
devel:libglib_2.0
devel:libgtk_3
devel:libmediahelpers
devel:libnotify
devel:libnspr4
devel:libnss3
devel:libpng16
devel:libvpx
devel:libwebp
devel:libzstd
"
BUILD_PREREQUIRES="
llvm20
nodejs20
rust_bin
cmd:autoconf_2.13
cmd:cbindgen
cmd:clang++
cmd:gawk
cmd:gcc
cmd:git
cmd:gn
cmd:lld >= 20
cmd:m4
cmd:make
cmd:nasm
cmd:perl
cmd:pip3
cmd:pkg_config
cmd:python3
cmd:tar
cmd:unzip
cmd:xargs
cmd:zip
"
BUILD()
{
chmod +x \
build/cargo-linker \
mach
rm -f .mozconfig
cp -f $portDir/additional-files/mozconfig .mozconfig
echo "export MOZ_APP_VERSION=$portVersion" >> .mozconfig
echo "export MOZ_APP_VERSION_DISPLAY=$portVersion" >> .mozconfig
echo $portVersion >> browser/config/version.txt
echo $portVersion >> browser/config/version_display.txt
rm -rf waterfox/browser/locales
ln -s $sourceDir2 waterfox/browser/locales
export DISABLE_ASLR=1
export MOZBUILD_STATE_PATH="$sourceDir/.buildstate"
./mach -vv \
--no-interactive bootstrap \
--application-choice="Firefox for Desktop" \
--exclude=sysroot-wasm32-wasi
./mach python build/gn_processor.py dom/media/webrtc/third_party_build/gn-configs/webrtc.json
./mach build
cd tools/haiku-launcher
gcc -o "Waterfox Browser" launcher.cpp -lbe
}
INSTALL()
{
export DISABLE_ASLR=1
export MOZBUILD_STATE_PATH="$sourceDir/.buildstate"
./mach install
./mach package
mkdir -p $appsDir
mv /usr/local/lib/waterfox $appsDir/Waterfox
mv $appsDir/Waterfox/waterfox $appsDir/Waterfox/Waterfox
cp "tools/haiku-launcher/Waterfox Browser" $appsDir/Waterfox
mkdir -p $appsDir/Waterfox/lib
# arranging the files in lib directories
cd $appsDir/Waterfox
mv \
libgkcodecs.so \
liblgpllibs.so \
libmozavcodec.so \
libmozavutil.so \
libmozgtk.so \
libmozsqlite3.so \
libmozwayland.so \
libxul.so \
lib
local APP_SIGNATURE="application/x-vnd.waterfox"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/waterfox.rdef.in > waterfox.rdef
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/waterfox_launcher.rdef.in > waterfox_launcher.rdef
addResourcesToBinaries waterfox.rdef $appsDir/Waterfox/Waterfox
addResourcesToBinaries waterfox_launcher.rdef "$appsDir/Waterfox/Waterfox Browser"
addAppDeskbarSymlink $appsDir/Waterfox/Waterfox
}