summaryrefslogtreecommitdiff
path: root/source/xap/seamonkey/seamonkey.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-03-02 19:05:10 +0000
committerEric Hameleers <alien@slackware.com>2020-03-03 08:59:49 +0100
commit11403357f20e37f8613bb0ea1cdc51c34c51f8a6 (patch)
tree09017083592f25e160079721bc5b91493f4b80ed /source/xap/seamonkey/seamonkey.SlackBuild
parentc10b5e1e04d4eae2e67963233548ed7053dd3be3 (diff)
downloadcurrent-11403357f20e37f8613bb0ea1cdc51c34c51f8a6.tar.gz
Mon Mar 2 19:05:10 UTC 202020200302190510
a/dialog-1.3_20200228-x86_64-1.txz: Upgraded. l/Mako-1.1.2-x86_64-1.txz: Upgraded. l/imagemagick-7.0.9_27-x86_64-1.txz: Upgraded. l/libcap-2.33-x86_64-1.txz: Upgraded. n/bind-9.16.0-x86_64-2.txz: Rebuilt. rc.bind: ensure /var/run/named exists before starting named. Thanks to MarcT. rc.bind: when stopping named, only kill processes in the current namespace. x/libevdev-1.9.0-x86_64-1.txz: Upgraded. x/wayland-protocols-1.20-noarch-1.txz: Upgraded. xap/seamonkey-2.53.1-x86_64-1.txz: Upgraded. This update contains security fixes and improvements. For more information, see: https://www.seamonkey-project.org/releases/seamonkey2.53.1 (* Security fix *) testing/packages/PAM/libcap-2.33-x86_64-1_pam.txz: Upgraded.
Diffstat (limited to 'source/xap/seamonkey/seamonkey.SlackBuild')
-rwxr-xr-xsource/xap/seamonkey/seamonkey.SlackBuild61
1 files changed, 40 insertions, 21 deletions
diff --git a/source/xap/seamonkey/seamonkey.SlackBuild b/source/xap/seamonkey/seamonkey.SlackBuild
index cfa82188..6f3dc56e 100755
--- a/source/xap/seamonkey/seamonkey.SlackBuild
+++ b/source/xap/seamonkey/seamonkey.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ PKGNAM=seamonkey
TARBALLVER=${VERSION:-$(basename $(ls seamonkey-*.tar.* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)}
# Strip the end from beta versions:
VERSION=$(echo $TARBALLVER | cut -f 1 -d b)
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -57,19 +57,32 @@ else
OPTIMIZE_FLAG=${OPTIMIZE_FLAG:-"-O1"}
fi
-# Link using gold. This avoids running out of memory on 32-bit systems, and
-# avoids a recurring build failure with GNU ld on other systems.
-PATH="$(pwd)/gold:$PATH"
-export CC=${CC:-"gcc -B$(pwd)/gold"}
-export CXX=${CXX:-"g++ -B$(pwd)/gold"}
+# Seamonkey has been requiring more and more memory, especially while linking
+# libxul. If it fails to build natively on x86 32-bit, it can be useful to
+# attempt the build using an x86_64 kernel and a 32-bit userspace. Detect this
+# situation and set the ARCH to i686. Later in the script we'll add some
+# options to the .mozconfig so that the compile will do the right thing.
+if [ "$(uname -m)" = "x86_64" -a "$(file -L /usr/bin/gcc | grep 80386 | grep 32-bit)" != "" ]; then
+ COMPILE_X86_UNDER_X86_64=true
+ ARCH=i686
+fi
+
+# Choose a compiler (gcc/g++ or clang/clang++):
+export CC=${CC:-clang}
+export CXX=${CXX:-clang++}
# -Wformat is needed for -Werror=format-security
-# -Wno-format-overflow bypasses gcc9 build failure
# -fno-delete-null-pointer-checks disables gcc6 optimization that leads to instability
-# -fno-schedule-insns2 don't do an additional pass of instruction scheduling
-# -fno-lifetime-dse allow object storage to persist beyond the lifetime of the object
-export CFLAGS="-Wformat -Wno-format-overflow -fno-delete-null-pointer-checks -fno-schedule-insns2"
-export CXXFLAGS="-Wformat -Wno-format-overflow -fno-delete-null-pointer-checks -fno-schedule-insns2 -fno-lifetime-dse -fpermissive"
+export CFLAGS="-Wformat -fno-delete-null-pointer-checks"
+export CXXFLAGS="-Wformat -fno-delete-null-pointer-checks -fpermissive"
+
+# Keep memory usage as low as possible when linking:
+SLKLDFLAGS=" -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats"
+export LDFLAGS="$SLKLDFLAGS"
+export MOZ_LINK_FLAGS="$SLKLDFLAGS"
+
+# Don't use icecream:
+PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -84,7 +97,7 @@ PKG=$TMP/package-seamonkey
# following these instructions:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1377987#c0
if [ -r /root/google-api-key ]; then
- GOOGLE_API_KEY="--with-google-api-keyfile=/root/google-api-key"
+ GOOGLE_API_KEY="--with-google-safebrowsing-api-keyfile=/root/google-api-key"
fi
rm -rf $PKG
@@ -110,10 +123,14 @@ cd seamonkey-${TARBALLVER} || exit 1
zcat $CWD/sm.ui.scrollToClick.diff.gz | patch -p1 --verbose || exit 1
# Fix for glibc-2.30's included gettid():
-zcat $CWD/seamonkey.gettid.patch.gz | patch -p2 --verbose || exit 1
+zcat $CWD/seamonkey.gettid.patch.gz | patch -p1 --verbose || exit 1
+
+# Don't fail on a Rust warning due to deprecated syntax:
+zcat $CWD/seamonkey.nsstring.patch.gz | patch -p0 --verbose || exit 1
-# Don't complain if Rust is i686:
-zcat $CWD/seamonkey.i686.triplet.fix.diff.gz | patch -p1 --verbose || exit 1
+# More Rust syntax changes:
+zcat $CWD/seamonkey.rust14x.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/seamonkey.rust.encoding_rs.diff.gz | patch -p1 --verbose || exit 1
# Make sure the perms/ownerships are sane:
chown -R root:root .
@@ -123,8 +140,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-chown -R root:root .
-
# Our building options, in a configure-like display ;)
OPTIONS="\
--prefix=/usr \
@@ -134,18 +149,16 @@ OPTIONS="\
--enable-startup-notification \
--enable-alsa \
--disable-debug \
- --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION} \
+ --enable-gold \
--enable-strip \
--disable-tests \
--disable-crashreporter \
--enable-accessibility \
$GOOGLE_API_KEY \
- --enable-safe-browsing \
--disable-updater \
--enable-chrome-format=omni \
--disable-necko-wifi \
--enable-extensions=default \
- --enable-rust \
--enable-js-shell \
--enable-elf-hack \
--enable-release \
@@ -182,6 +195,12 @@ mkdir -p mozilla/obj
# Set options for $OPTIMIZE_FLAG:
echo "ac_add_options --enable-optimize=\"${OPTIMIZE_FLAG}\"" >> .mozconfig
+if [ "$COMPILE_X86_UNDER_X86_64" = "true" ]; then
+ # Compile for i686 under an x86_64 kernel:
+ echo "ac_add_options --host=i686-pc-linux-gnu" >> .mozconfig
+ echo "ac_add_options --target=i686-pc-linux-gnu" >> .mozconfig
+fi
+
# Add the $OPTIONS above to .mozconfig:
for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done