Files
haikuports/www-client/waterfox/waterfox_bin-6.6.7.recipe
2025-12-31 00:02:29 +10:00

122 lines
3.3 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/threedeyes/Gecko4Haiku/releases/download/$portVersion/waterfox-$portVersion.en-US.haiku-x86_64.tar.xz#noarchive"
CHECKSUM_SHA256="cb94f11b346353f803335b96d68da433944d4ee98ecaf767818ab4bdb5fbe8bf"
PATCHES="waterfox_launcher-$portVersion.patchset"
ADDITIONAL_FILES="
waterfox.rdef.in
waterfox_launcher.rdef.in
"
ARCHITECTURES="x86_64"
DISABLE_SOURCE_PACKAGE="true"
PROVIDES="
waterfox_bin = $portVersion
app:Waterfox = $portVersion
"
CONFLICTS="
waterfox
"
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:libgio_2.0
lib:libglib_2.0
lib:libgobject_2.0
lib:libgtk_3
lib:libharfbuzz
lib:libintl
lib:libmediahelpers
lib:libnspr4
lib:libnss3
lib:libpango_1.0
lib:libpangocairo_1.0
lib:libpng16
lib:libz
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:tar
cmd:xz
"
BUILD()
{
cd tools/haiku-launcher
gcc -o "Waterfox Browser" launcher.cpp -lbe
}
INSTALL()
{
mkdir -p $appsDir
tar -xJf waterfox-$portVersion.en-US.haiku-x86_64.tar.xz -C $appsDir
mv $appsDir/waterfox $appsDir/Waterfox
mv $appsDir/Waterfox/waterfox $appsDir/Waterfox/Waterfox
cp "tools/haiku-launcher/Waterfox Browser" $appsDir/Waterfox
# arranging the files in lib directories
mkdir -p $appsDir/Waterfox/lib
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
}