From fb961d20e68d13e8b125bdae2588655bdd99d3df Mon Sep 17 00:00:00 2001 From: khronosschoty Date: Sat, 8 Oct 2022 00:04:38 +0000 Subject: network/palemoon: added glibc patch for current --- network/palemoon/README | 4 ++++ network/palemoon/glib-c-arc4random.c.patch | 20 ++++++++++++++++++++ network/palemoon/palemoon.SlackBuild | 8 ++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 network/palemoon/glib-c-arc4random.c.patch diff --git a/network/palemoon/README b/network/palemoon/README index 8894515c8e..bc814b6490 100644 --- a/network/palemoon/README +++ b/network/palemoon/README @@ -49,6 +49,10 @@ passing the variable: BLACKLIST_JACK=yes ./palemoon.SlackBuild +ALSA=1 will disable pulse audio and build a pure alsa Pale Moon. +GLIB-C-1PATCH=1 is a patch that will enable compiling on newer glibc +(such as is found in Slackware current). + To enable debug information, pass the script the parameter ENABLE_DEBUG=yes diff --git a/network/palemoon/glib-c-arc4random.c.patch b/network/palemoon/glib-c-arc4random.c.patch new file mode 100644 index 0000000000..467434614b --- /dev/null +++ b/network/palemoon/glib-c-arc4random.c.patch @@ -0,0 +1,20 @@ +--- a/palemoon-31.3.0.1_Release/platform/ipc/chromium/src/third_party/libevent/arc4random.c 2022-09-27 20:12:40.000000000 -0000 ++++ b/palemoon-31.3.0.1_Release/platform/ipc/chromium/src/third_party/libevent/arc4random.c 2022-10-03 10:09:16.859171354 -0000 +@@ -481,7 +481,8 @@ + } + #endif + +-#ifndef HAVE_ARC4RANDOM_BUF ++#if defined(_we_have_arc4random_buf) || !defined(XP_SOLARIS) ++#if (__GLIBC__ <= 2 && __GLIBC_MINOR__ < 36) || !defined(XP_LINUX) + ARC4RANDOM_EXPORT void + arc4random_buf(void *_buf, size_t n) + { +@@ -496,6 +497,7 @@ + _ARC4_UNLOCK(); + } + #endif ++#endif + + #ifndef ARC4RANDOM_NOUNIFORM + /* diff --git a/network/palemoon/palemoon.SlackBuild b/network/palemoon/palemoon.SlackBuild index b92e6d4e7e..8a60ad7fbe 100644 --- a/network/palemoon/palemoon.SlackBuild +++ b/network/palemoon/palemoon.SlackBuild @@ -31,7 +31,7 @@ PRGNAM=palemoon VERSION=${VERSION:-31.3.0.1} SRCNAM1=${SRCNAM1:-$PRGNAM-${VERSION}_Release} SRCNAM2=${SRCNAM2:-uxp-RB_20220928} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -59,7 +59,7 @@ OBJ=${OBJ:-obj-$PRGNAM} GTK=${GTK:-gtk2} DOCS="AUTHORS LICENSE README.md SECURITY.md" -ALSA=${ALSA:-1} +ALSA=${ALSA:-0} # You can try changing the optimization level to simply "-O2" if your processor # doesn't support sse2 instructions. # "-Os" might help if you experience segfaults. @@ -155,6 +155,10 @@ cd $SRCNAM1 tar -xvzf $CWD/$SRCNAM2.tar.gz --transform s/${SRCNAM2}/platform/ #patch -p1 < $CWD/basilisk-include-limits.patch +GLIB_C_1PATCH=${GLIB_C_1PATCH:-0} +if [ $GLIB_C_1PATCH = 1 ]; then + patch -p2 < $CWD/glib-c-arc4random.c.patch +fi chown -R root:root . find -L . \ -- cgit v1.2.3