diff options
author | nathan <nathansmith@disroot.org> | 2025-06-28 15:51:59 -0600 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-06-28 15:51:59 -0600 |
commit | 9319e88a471903745ba6aafdd4b514fa269f1f7e (patch) | |
tree | a84a573bc96245042cbe4f31562783d0c4a4925e |
first commit
-rw-r--r-- | README.org | 7 | ||||
-rw-r--r-- | palemoon/patches/install-dir.patch | 19 | ||||
-rw-r--r-- | palemoon/patches/set-max-stack-size.patch | 15 | ||||
-rw-r--r-- | palemoon/template | 104 |
4 files changed, 145 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..381dc38 --- /dev/null +++ b/README.org @@ -0,0 +1,7 @@ +* palemoon for void linux +A lazy palemoon xbps package halfway stolen from [[https://github.com/hazen2215/palemoon-void][hazen2215]] +This palemoon package has timezone spoofing out of box! + +** Installing +[[https://github.com/void-linux/void-packages/?tab=readme-ov-file#quick-start][Setup void-packages]] and copy =palemoon= to =void-packages/srcpkgs/= + diff --git a/palemoon/patches/install-dir.patch b/palemoon/patches/install-dir.patch new file mode 100644 index 0000000..4771cfa --- /dev/null +++ b/palemoon/patches/install-dir.patch @@ -0,0 +1,19 @@ +diff --git a/platform/config/baseconfig.mk b/platform/config/baseconfig.mk +index 47a12b16e..2facdd257 100644 +--- a/platform/config/baseconfig.mk ++++ b/platform/config/baseconfig.mk +@@ -2,10 +2,10 @@ + # directly in python/mozbuild/mozbuild/base.py for gmake validation. + # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending + # whether a normal build is happening or whether the check is running. +-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++includedir := $(includedir)/$(MOZ_APP_NAME) ++idldir = $(datadir)/idl/$(MOZ_APP_NAME) ++installdir = $(libdir)/$(MOZ_APP_NAME) ++sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel + ifeq (.,$(DEPTH)) + DIST = dist + else diff --git a/palemoon/patches/set-max-stack-size.patch b/palemoon/patches/set-max-stack-size.patch new file mode 100644 index 0000000..40c40ea --- /dev/null +++ b/palemoon/patches/set-max-stack-size.patch @@ -0,0 +1,15 @@ +set max stack size to 2MB, +see https://repo.palemoon.org/MoonchildProductions/UXP/commit/00f22ddbe62f9ab4cf314b1beb18b7f9a91edae2 +diff --git a/platform/js/xpconnect/src/XPCJSContext.cpp b/platform/js/xpconnect/src/XPCJSContext.cpp +index 9d11356e27..9b06c94fbc 100644 +--- a/platform/js/xpconnect/src/XPCJSContext.cpp ++++ b/platform/js/xpconnect/src/XPCJSContext.cpp +@@ -3231,7 +3231,7 @@ XPCJSContext::Initialize() + // Most Linux distributions set default stack size to 8MB. Use it as the + // maximum value. + // Solaris uses 8 or 10 MB, depending, so this is a safe max there too. +- const size_t kStackQuotaMax = 8 * 1024 * 1024; ++ const size_t kStackQuotaMax = 2 * 1024 * 1024; + #if defined(MOZ_ASAN) || defined(DEBUG) + // Bug 803182: account for the 4x difference in the size of js::Interpret + // between optimized and debug builds. We use 2x since the JIT part diff --git a/palemoon/template b/palemoon/template new file mode 100644 index 0000000..2f3463a --- /dev/null +++ b/palemoon/template @@ -0,0 +1,104 @@ +# Template file for 'palemoon' +pkgname=palemoon +version=33.7.2 +revision=1 +_UXP_version=RB_20250602 +create_wrksrc=yes +build_wrksrc="pale-moon" +hostmakedepends="autoconf213 perl pkg-config python2 unzip yasm zip tar +which" +makedepends="gtk+3-devel dbus-glib-devel pulseaudio-devel alsa-lib-devel +libXScrnSaver-devel sndio-devel libXt-devel base-devel gtk+-devel" +python_version="2.7" +short_desc="Open source web browser based on Firefox focusing on efficiency" +maintainer="Nathan Smith <nathansmith@disroot.org>" +license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later" +homepage="https://www.palemoon.org/" +distfiles="https://repo.palemoon.org/MoonchildProductions/Pale-Moon/archive/${version}_Release.tar.gz +https://repo.palemoon.org/MoonchildProductions/UXP/archive/${_UXP_version}.tar.gz" +checksum="97ad80685257f0aae1a283d94f312b55303ea2d7cfc962e3778cfb306879c36d +1e85037baab214ccb33075f2e66d363017e9410f5770102b0770f4a8b1ec92a1" +patch_args="-Np1 --directory=${build_wrksrc}" + +post_extract() { + rmdir pale-moon/platform + mv uxp pale-moon/platform +} + +do_build(){ + export LDFLAGS="-Wl,-rpath=/usr/lib/palemoon" + + # increase default stack size as palemoon uses a recursive js parser + export LDFLAGS+=" -Wl,-z,stack-size=2097152" + + cat <<-! >.mozconfig + ac_add_options --prefix=/usr + ac_add_options --libdir=/usr/lib + ac_add_options --enable-application=palemoon + ac_add_options --enable-optimize="-O2 -w" + ac_add_options --enable-default-toolkit=cairo-gtk3 + ac_add_options --enable-jemalloc + ac_add_options --enable-strip + ac_add_options --enable-devtools + ac_add_options --enable-av1 + ac_add_options --enable-jxl + ac_add_options --disable-webrtc + ac_add_options --disable-gamepad + ac_add_options --disable-tests + ac_add_options --disable-debug + ac_add_options --disable-necko-wifi + ac_add_options --disable-updater + ac_add_options --with-pthreads + ac_add_options --disable-gconf + ac_add_options --disable-crashreporter + ac_add_options --disable-parental-controls + ac_add_options --disable-maintenance-service + ac_add_options --disable-strip + ac_add_options --disable-install-strip + ac_add_options --disable-profiling + + ac_add_options --enable-official-branding + export MOZILLA_OFFICIAL=1 + + ac_add_options --x-libraries=/usr/lib64 + + mk_add_options PYTHON=/usr/bin/python2 + + export MOZ_PKG_SPECIAL=gtk3 +! + + rm -f old-configure + ./mach build +} + +do_install() { + export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild" + DESTDIR="$DESTDIR" ./mach install + + vinstall palemoon/branding/official/palemoon.desktop 644 \ + usr/share/applications + + for i in 16 22 24 32 48 256; do + vinstall palemoon/branding/official/default$i.png 644 \ + usr/share/icons/hicolor/${i}x${i}/apps palemoon.png + done + + # We don't want the development stuff + rm -rf ${DESTDIR}/usr/{include,lib/palemoon-devel,share/idl} + + # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 + ln -sf palemoon ${DESTDIR}/usr/lib/palemoon/palemoon-bin +} + +post_install() { + # timezone spoof + rm ${DESTDIR}/usr/bin/palemoon + + cat <<-! >${DESTDIR}/usr/bin/palemoon +#! /bin/sh +TZ=UTC /usr/lib/palemoon/palemoon \$@ +! + + chmod +x ${DESTDIR}/usr/bin/palemoon +} + |