added LibreOffice and palemoon builds, need to clean up contact info still.

This commit is contained in:
shelldweller 2023-04-08 11:04:53 -05:00
parent ad0da153ef
commit b49bea4666
17 changed files with 1477 additions and 0 deletions

View File

@ -0,0 +1,326 @@
#!/bin/bash
#
# ex:set ai shiftwidth=4 inputtab=spaces smarttab noautotab:
# Slackware build script for LibreOffice
# Copyright 2015-2023 Christoph Willing Brisbane, Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=LibreOffice
SRCNAM=libreoffice
VERSION=${VERSION:-7.5.2.2}
SHORT_VERSION=${VERSION%.*.*}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-txz}
HAVE_SRCS_TARBALL=${HAVE_SRCS_TARBALL:-1}
unset UNO_PATH
unset URE_BOOTSTRAP
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/blds}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
cd $SRCNAM-$VERSION
if [ -r $CWD/$SRCNAM-${VERSION}-srcs.tar.xz ]; then
tar xvf $CWD/$SRCNAM-${VERSION}-srcs.tar.xz
# For 7.2.0.4 these aren't found as previously so unpack them manually
cd $TMP
tar xf libreoffice-${VERSION}/external/tarballs/libreoffice-translations-${VERSION}.tar.xz
tar xf libreoffice-${VERSION}/external/tarballs/libreoffice-help-${VERSION}.tar.xz
cd $SRCNAM-$VERSION
else
HAVE_SRCS_TARBALL=0
fi
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
LOLANGS=${LOLANGS:-"de es fr id it ja nl vi zh-CN"}
# By default, LibreOffice ignores MAKEFLAGS -j option and uses all available cpu cores.
parallel=""
# If MAKEFLAGS contains -j option, we extract its value to override the default.
jval="$(echo $MAKEFLAGS |grep -o "\-j *[0-9]*" | grep -o "[0-9]*")" || true
[ -n "$jval" ] && parallel="--with-parallelism=$jval"
# If PARALLEL environment variable is set, use that to override everything.
[ "${PARALLEL:-0}" != "0" ] && parallel="--with-parallelism=$PARALLEL"
# General optional use of packages available from SBo. If not found, LibreOffice internal versions are used
if pkg-config --exists coinmp ; then coinmp="--with-system-coinmp" ; else coinmp="" ; fi
if pkg-config --exists cppunit ; then cppunit="--with-system-cppunit" ; else cppunit="" ; fi
if pkg-config --exists glm ; then glm="--with-system-glm" ; else glm="" ; fi
if pkg-config --exists libabw-0.1 ; then libabw="--with-system-libabw" ; else libabw="" ; fi
if pkg-config --exists libcdr-0.1 ; then libcdr="--with-system-libcdr" ; else libcdr="" ; fi
if pkg-config --exists liblangtag ; then liblangtag="--with-system-liblangtag" ; else liblangtag="" ; fi
if pkg-config --exists libcmis-0.5 ; then libcmis="--with-system-libcmis" ; else libcmis="" ; fi
if pkg-config --exists libe-book-0.1 ; then libebook="--with-system-libebook" ; else libebook="" ; fi
if pkg-config --exists libepubgen-0.1 ; then libepubgen="--with-system-libepubgen" ; else libepubgen="" ; fi
if pkg-config --exists libeot ; then libeot="--with-system-libeot" ; else libeot="" ; fi
if pkg-config --exists libetonyek-0.1 ; then libetonyek="--with-system-libetonyek" ; else libetonyek="" ; fi
if pkg-config --exists libexttextcat ; then libexttextcat="--with-system-libexttextcat" ; else libexttextcat="" ; fi
if pkg-config --exists libfreehand-0.1 ; then libfreehand="--with-system-libfreehand" ; else libfreehand="" ; fi
if pkg-config --exists libmspub-0.1 ; then libmspub="--with-system-libmspub" ; else libmspub="" ; fi
if pkg-config --exists libmwaw-0.3 ; then libmwaw="--with-system-libmwaw" ; else libmwaw="" ; fi
if pkg-config --exists libnumbertext ; then libnumbertext="--with-system-libnumbertext" ; else libnumbertext="" ; fi
if pkg-config --exists liborcus-0.14 ; then liborcus="--with-system-orcus" ; else liborcus="" ; fi
if pkg-config --exists libpagemaker-0.0 ; then libpagemaker="--with-system-libpagemaker" ; else libpagemaker="" ; fi
if pkg-config --exists libqxp-0.0 ; then libqxp="--with-system-libqxp" ; else libqxp="" ; fi
if pkg-config --exists libstaroffice-0.0 ; then libstaroffice="--with-system-libstaroffice" ; else libstaroffice="" ; fi
if pkg-config --exists libtommath ; then libtommath="--with-system-libtommath" ; else libtommath="" ; fi
if pkg-config --exists libwps-0.4 ; then libwps="--with-system-libwps" ; else libwps="" ; fi
if pkg-config --exists libzmf-0.0 ; then libzmf="--with-system-libzmf" ; else libzmf="" ; fi
if pkg-config --exists libpq ; then postgresql="--with-system-postgresql" ; else postgresql="" ; fi
if pkg-config --exists libucpp ; then ucpp="--with-system-ucpp" ; else ucpp="" ; fi
if test -e /usr/include/lpsolve ; then lpsolve="--with-system-lpsolve" ; else lpsolve="" ; fi
if pkg-config --exists mdds-1.4 ; then mdds="--with-system-mdds" ; else mdds="" ; fi
if pkg-config --exists mythes ; then mythes="--with-system-mythes" ; else mythes="" ; fi
if test -x /usr/bin/odbc_config ; then odbc="--with-system-odbc" ; else odbc="" ; fi
#if test -d /usr/lib${LIBDIRSUFFIX}/python3*/site-packages/lxml ; then lxml="--with-system-lxml" ; else lxml="" ; fi
if pkg-config --exists xmlsec1 ; then
xmlsec="--with-system-xmlsec"
else
xmlsec=""
# Also ensure correct nspr implementation is used if building libreoffice supplied xmlsec
sed -i -e 's:openssl:openssl --with-mozilla-ver=/usr:' external/xmlsec/ExternalProject_xmlsec.mk
fi
#if test -e /usr/share/ant/lib/rhino.jar ; then rhino="--with-system-rhino --with-rhino-jar=/usr/share/ant/lib/rhino.jar" ; else rhino="" ; fi
if pkg-config --exists libvlc ; then vlc="--enable-vlc" ; else vlc="" ; fi
# Building with vlc backend is marked as experimental so demand explicit indication via environment variable VLC to do it.
[ "${VLC:-no}" != "yes" ] && vlc=""
# Other options
if pkg-config --exists avahi-core ; then avahi="--enable-avahi" ; else avahi="" ; fi
if pkg-config --exists valgrind ; then valgrind="--with-valgrind" ; else valgrind="" ; fi
use_ccache="--disable-ccache" ; [ "${USE_CCACHE:-no}" != "no" ] && use_ccache=""
# Extensions
extct2n="--enable-ext-ct2n"; [ "${EXTCT2N:-no}" != "yes" ] && extct2n=""
extnumbertext="--enable-ext-numbertext"; [ "${EXTNUMBERTEXT:-no}" != "yes" ] && extnumbertext=""
extlanguagetool="--enable-ext-languagetool"; [ "${EXTLANGUAGETOOL:-no}" != "yes" ] && extlanguagetool=""
extwikipub="--enable-ext-wiki-publisher"; [ "${EXTWIKIPUB:-no}" != "yes" ] && extwikipub=""
extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] && extnlpsolver=""
./configure \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
NSS_CFLAGS="$(pkg-config --cflags-only-I mozilla-nss)"\
--prefix=/usr \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--libdir=/usr/lib$LIBDIRSUFFIX \
--sysconfdir=/etc \
--build=$ARCH-slackware-linux \
--with-vendor="shelldweller" \
--with-lang="$LOLANGS" \
--enable-release-build=yes \
--enable-qt5 \
--enable-python=system \
--enable-gio \
$extct2n \
$extnumbertext \
$extnlpsolver \
$extlanguagetool \
$extwikipub \
$avahi \
$vlc \
--enable-ccache \
--with-java=no \
$parallel \
--with-tls="nss" \
--with-x \
--without-krb5 \
--without-gssapi \
--without-junit \
--with-help \
--with-system-bluez \
--with-system-boost \
--with-system-bzip2 \
--with-system-cairo \
--with-system-clucene \
--with-system-curl \
--with-system-dicts \
--with-system-epoxy \
--with-system-expat \
--with-system-hunspell \
--with-system-icu \
--with-system-jpeg \
--with-system-lcms2 \
--with-system-libodfgen \
--with-system-libpng \
--with-system-librevenge \
--with-system-libtiff \
--with-system-libvisio \
--with-system-libwpd \
--with-system-libwpg \
--with-system-libxml \
--with-system-mariadb \
--with-system-nss \
--with-system-openldap \
--with-system-openssl \
--with-system-poppler \
--with-system-sane \
--with-system-zlib \
$coinmp \
$cppunit \
$glm \
$libabw \
$libcdr \
$libcmis \
$libebook \
$libeot \
$libepubgen \
$mdds \
$libetonyek \
$libexttextcat \
$libfreehand \
$libmspub \
$libmwaw \
$liborcus \
$libnumbertext \
$libpagemaker \
$libqxp \
$libstaroffice \
$libtommath \
$libwps \
$libzmf \
$lpsolve \
$mythes \
$postgresql \
$valgrind \
$ucpp \
$odbc \
$xmlsec \
#Create a srcs tarball if we don't already have one
chmod a+x bin/unpack-sources
if [ "$HAVE_SRCS_TARBALL" = "0" ]; then
make fetch
tar cvf - external/tarballs | xz -c > $CWD/$SRCNAM-$VERSION-srcs.tar.xz
echo ; echo "Run build script again with HAVE_SRCS_TARBALL=1"
exit 0
fi
patch -p0 < $CWD/no-check-if-root.diff
# GCC10 requirements (Tx alienBOB)
sed -i external/libebook/ExternalProject_libebook.mk \
-e '/configure /i \\t\t&& sed -i "s/TRUE/true/g" src/lib/EBOOKCharsetConverter.cpp \\'
export LDFLAGS="-lboost_system"
make build
make distro-pack-install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
cd $PKG/usr/lib$LIBDIRSUFFIX
mv $SRCNAM $SRCNAM-$VERSION
ln -s $SRCNAM-$VERSION $SRCNAM
cd -
for df in $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM-$VERSION/share/xdg/*.desktop ; do
sed -i -e "s/libreofficedev$SHORT_VERSION/libreoffice/g" $df
done
# Only enable pyuno if requested
if [ "${PYUNO:-no}" == "yes" ]; then
# Use the system python if we have it, else use the python just built with LibreOffice
PYTHONEXE=$(which python3) || PYTHONEXE=$PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM/program/python
PYSITEDIR=$($PYTHONEXE -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
mkdir -p $PKG/$PYSITEDIR
cat <<EOF >$PKG/$PYSITEDIR/pyuno.pth
import sys; sys.path.insert(0,'/usr/lib$LIBDIRSUFFIX/libreoffice/program')
EOF
chmod 0644 $PKG/$PYSITEDIR/pyuno.pth
fi
mkdir -p $PKG/etc/profile.d
sd_prog=/usr/lib$LIBDIRSUFFIX/libreoffice/program
cat <<EOF >$PKG/etc/profile.d/libreoffice.sh
export UNO_PATH=$sd_prog
export URE_BOOTSTRAP=vnd.sun.star.pathname:$sd_prog/fundamentalrc
export PATH=\${PATH}:$sd_prog
EOF
cat <<EOF >$PKG/etc/profile.d/libreoffice.csh
setenv UNO_PATH $sd_prog
setenv URE_BOOTSTRAP vnd.sun.star.pathname:$sd_prog/fundamentalrc
setenv PATH \${PATH}:$sd_prog
EOF
chmod 0755 $PKG/etc/profile.d/libreoffice.{csh,sh}
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING* README* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View File

@ -0,0 +1,12 @@
PRGNAM="LibreOffice"
VERSION="7.5.2.2"
HOMEPAGE="https://www.libreoffice.org"
DOWNLOAD="https://download.documentfoundation.org/libreoffice/src/7.5.2/libreoffice-7.5.2.2.tar.xz \
https://sourceforge.net/projects/slackbuildsdirectlinks/files/LibreOffice/libreoffice-7.5.2.2-srcs.tar.xz"
MD5SUM="636a4fa94c7361d9d0fd0bf840783c27 \
7c179f70639056ff005b91153a20d0a2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="zulu-openjdk11 apache-ant perl-Archive-Zip"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"

104
LibreOffice/README Normal file
View File

@ -0,0 +1,104 @@
LibreOffice is a powerful office suite; its clean interface
and powerful tools let you unleash your creativity and grow your
productivity. LibreOffice embeds several applications that make it the
most powerful Free & Open Source Office suite on the market: Writer,
the word processor, Calc, the spreadsheet application, Impress, the
presentation engine, Draw, our drawing and flowcharting application,
Base, our database and database frontend, and Math for editing
mathematics.
This SlackBuild builds the entire project from its source code. In
seeking a fully functional LibreOffice, most optional features are
included by default, using internal versions of any external software
components that may be needed. This results in a very small number of
directly required additional software packages.
However most of this additional software is also available as SBo
SlackBuilds. During configuration, the LibreOffice SlackBuild will
detect any such packages that are already installed and use them in
preference to building its own internal versions. Packages from SBo
that will be use in this way are:
CoinMP cppunit glm libabw libcdr libcmis libe-book libeot
libepubgen libexttextcat libfreehand libmspub libmwaw
libnumbertext liborcus libpagemaker libqxp libnumbertext
libstaroffice libtommath libwps libzmf lpsolve mythes postgresql
qt5 valgrind ucpp unixODBC avahi libetonyek xmlsec
Remember, these packages are not essential but entirely optional. If
not found, LibreOffice will simply build its own internal versions.
Also keep in mind that any package from the above list which is
detected and used when building LibreOffice will most likely become
a runtime dependency too e.g. if avahi is detected and used at build
time, it will also need to be installed at run time.
Build time environment variables that may be set to vary features are
as follows:
1. support additional languages by overriding the LOLANGS variable,
whose default setting is LOLANGS="de es fr id it ja nl vi zh-CN".
Note that en-US is always added to whatever LOLANGS is set. Thus
building with, for example,
LOLANGS="de" sh LibreOffice.SlackBuild
would build LibreOffice with support for german and US english
languages. Additionally, setting LOLANGS="ALL" will build in
support for all available languages.
2. A number of Java Development Kits are suitable for building
LibreOffice. Since Slackware-15.0 and LiberOffice-7.3.1.3, the
default JDK is zulu-openjdk11. Other JDKs will probably work if
the JAVA_HOME environment variable is set appropriately in a file
in /etc/profile.d/, where this SlackBuild will search.
It is also possible to build LibreOffice without any Java support
(with somewhat reduced capability in LO Base) by running:
JAVA=no sh LibreOffice.SlackBuild
3. The number of parallel make jobs used by the LibreOffice build
system defaults to the number of available cpu cores. If the
MAKEFLAGS environment variable contains the -j option e.g.
MAKEFLAGS=-j6
then the SlackBuild will pass this to the LibreOffice build system
(via its --with-parallelism configure option). The number of parallel
jobs is further controlled by the PARALLEL environment variable e.g:
PARALLEL=1 sh LibreOffice.SlackBuild
which would limit building to a single make process, overriding any
value set with the -j option in MAKEFLAGS.
4. Use of ccache during building is turned off by default to save disk
space (and possible build failure due to lack of disk space). It may
be reinstated by setting the USE_CCACHE environment to "yes" e.g.
USE_CCACHE=yes sh LibreOffice.SlackBuild
5. PyUNO is a Python interface to the LibreOffice API. It is disabled by
default due to interference with Openshot (therefore possibly other
packages). It may be enabled by setting the PYUNO environment
variable e.g.
PYUNO=yes sh LibreOffice.SlackBuild
Even without PyUNO enabled in this way, PyUNO scripts may still be
executed by suitably extending the PYTHONPATH in the environment at
runtime e.g.
PYTHONPATH=/usr/lib64/libreoffice/program my_python_uno_script.py
Spell checking of documents at runtime requires installation of a
suitable wordlist for the language concerned. This can be achieved in
either of two ways:
1. Build & install hunspell-en (or hunspell-es, hunspell-pl) from SBo
2. Search for the desired language dictionary at:
http://extensions.libreoffice.org/extension-center?getCategories=Dictionary
and download the relevant file e.g. dict-en.oxt. Now open LO's
extension manager and press the "Add..." button which will open a file
browser with which to locate and open the downloaded .oxt file. The
new dictionary will now appear in the Extension Manager.
Some people have experienced difficulties building LibreOffice while a
previous version is still installed. It is therefore recommended that
any previous version should be removed before building LibreOffice. As
well as removing any LibreOffice installation, it is important to also
clear environment variables that were set by the installation i.e.
/sbin/removepkg LibreOffice
unset UNO_PATH
unset URE_BOOTSTRAP
Good luck!

13
LibreOffice/doinst.sh Normal file
View File

@ -0,0 +1,13 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -0,0 +1,11 @@
--- Makefile.orig 2021-08-21 10:12:14.335000000 +1000
+++ Makefile 2021-08-21 10:13:38.458000000 +1000
@@ -65,7 +65,7 @@
echo; \
echo 'Building LibreOffice as root is a very bad idea, use a regular user.'; \
echo; \
- exit 1; \
+# exit 1; \
fi \
fi

19
LibreOffice/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
LibreOffice: LibreOffice (LibreOffice Productivity Suite)
LibreOffice:
LibreOffice: LibreOffice is the free power-packed Open Source personal
LibreOffice: productivity suite for Windows, Macintosh and Linux, providing six
LibreOffice: feature-rich applications for all your document production and
LibreOffice: data processing needs: Writer, Calc, Impress, Draw, Math and Base.
LibreOffice:
LibreOffice:
LibreOffice:
LibreOffice:
LibreOffice:

58
palemoon/README Normal file
View File

@ -0,0 +1,58 @@
palemoon (Web browser -- BUILD FROM SOURCE)
This SlackBuild builds Pale Moon from source.
For a binary repackage, see 'palemoon-bin' at SlackBuilds.org.
Pale Moon is an Open Source, Goanna-based web browser available for
Microsoft Windows and Linux (with other operating systems in
development), focusing on efficiency and ease of use.
This SlackBuild attempts to compile, build and package Pale Moon,
Slackware style, in a manner that conforms to official Pale Moon Linux
releases; while, at the same time, providing useful and easy ways to
deviate if desired. This SlackBuild may conflict with the alternative
SlackBuild known, here at SBo, as "palemoon-bin"; which repackages
binaries offically released by the Pale Moon devs.
------------------------------------------------------------------------
See http://docs.slackware.com/howtos:software:palemoon for additional
tips and help resources.
Using the Oxygen theme is known to cause Pale Moon to crash; if you are
experiencing crashes, and segfaults, make sure you are not using this
theme; or use Alienbob's patched oxygen-gtk2; which will fix this issue.
http://www.slackware.com/~alien/slackbuilds/oxygen-gtk2/build/ See the
help doc link above for other creative tips and workarounds.
A native fork of FireFox's developer tools exists as an external add-on
or internally. Pale Moon by default ships with the developer tools
internally; if this is undesirable, dev tools can be disabled by passing
the script the parameter:
DEVTOOLS=no ./palemoon.SlackBuild
Pale Moon's default is to build, ship, and use its own internal
dictionary; if desired, however, do USE_SYSTEM_HUNSPELL=yes
./palemoon.SlackBuild, to use the Slackware system Hunspell instead.
This assumes you have dictionaries such as hunspell-en or hunspell-es
installed in /usr/share/hunspell -- the location that a few SlackBuilds
at SBo install them.
If your processor doesn't support sse2 instructions or you get
segfaults, try looking in the SlackBuild for the OPTIMIZE build option
(eventually refer to the Pale Moon developers for help).
jack-audio-connection-kit is an optional dependency and, if detected,
automatically built. If this is undesirable you can blacklist jack, by
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

Binary file not shown.

9
palemoon/doinst.sh Normal file
View File

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -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
/*

283
palemoon/palemoon.SlackBuild Executable file
View File

@ -0,0 +1,283 @@
#!/bin/bash
# Slackware build script for Pale Moon
# Copyright 2018,2019,2022 Vasily Sora USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by SlackBuilds.org
# Special thanks to Ponce
#
## Modified again by shelldweller@beauxbead.com for a NewMoon package
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=palemoon
VERSION=${VERSION:-31.3.0.1}
SRCNAM1=${SRCNAM1:-$PRGNAM-${VERSION}_Release}
SRCNAM2=${SRCNAM2:-uxp-RB_20220928}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-txz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/blds}
OBJ=${OBJ:-obj-$PRGNAM}
GTK=${GTK:-gtk2}
DOCS="AUTHORS LICENSE README.md SECURITY.md"
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.
OPTIMIZE=${OPTIMIZE:-"-O2 -msse2 -mfpmath=sse"}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -Wno-format-overflow"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
# The default is to build with official branding. This SlackBuild is used to
# produce officially approved third party "contributed builds" of Pale Moon.
# This SlackBuild can also be used to produce unapproved packages -- which
# requires the use of the "new moon", or if applicable, "unstable" branding.
# In general, the "unstable" branding is intended for those building from the
# master trunck of the Pale Moon github repository.
BRANDING=${BRANDING:---disable-official-branding --with-branding=palemoon/branding/unofficial}
#if [ "$BRANDING" = "NewMoon" ]; then
# BRANDING="--disable-official-branding --with-branding=palemoon/branding/unofficial"
#elif [ "$BRANDING" = "unstable" ]; then
# BRANDING="--disable-official-branding --with-branding=palemoon/branding/unstable"
#fi
rm -rf $PKG $TMP/gold $TMP/$OBJ
mkdir -p $TMP $PKG $OUTPUT $TMP/gold $TMP/$OBJ
DEBUG=" --enable-strip --disable-debug --disable-debug-symbols --enable-release"
if [ "${ENABLE_DEBUG:-no}" = "yes" ]; then
DEBUG=" --disable-strip --disable-install-strip --enable-debug --enable-debug-symbols "
# On IA32, use gold since GNU ld runs out of memory linking libxul.so
# when debug is turned on
if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then
echo "#!/bin/bash" >> $TMP/gold/gold
echo "/usr/bin/ld.gold \"\$@\"" >> $TMP/gold/gold
cp $TMP/gold/gold $TMP/gold/ld
chmod +x $TMP/gold/*
PATH="$TMP/gold:$PATH"
export CC="$CC -B$TMP/gold"
export CXX="$CXX -B$TMP/gold"
fi
fi
set -e
# We need to use the incredibly ancient autoconf-2.13 for this :/
# (Taken from Slackware's Firefox build Script)
cd $TMP
rm -rf autoconf-2.13
tar xvf $CWD/autoconf-2.13.tar.xz
cd autoconf-2.13
zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Build a temporary copy of autoconf-2.13 only to be used to compile
# Pale Moon, since it somewhat inexplicably requires this ancient version:
rm -rf $TMP/autoconf-tmp
mkdir -p $TMP/autoconf-tmp
# This will be at the beginning of the $PATH, so protect against nonsense
# happening in $TMP:
chmod 700 $TMP/autoconf-tmp
rm -rf $TMP/autoconf-tmp/*
mkdir -p $TMP/autoconf-tmp/usr
./configure \
--prefix=$TMP/autoconf-tmp/usr \
--program-suffix=-2.13 \
--infodir=$TMP/autoconf-tmp/usr/info \
--mandir=$TMP/autoconf-tmp/usr/man \
--build=$ARCH-slackware-linux
make || make -j1
make install
PATH=$TMP/autoconf-tmp/usr/bin:$PATH
# Build Pale Moon
cd $TMP
rm -rf $SRCNAM1
tar -xvzf $CWD/$SRCNAM1.tar.gz # --transform s/pale-moon/${SRCNAM1}/
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 . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Without LANG=C, building the Python environment may fail with:
# "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)"
export LANG=C
export MOZCONFIG="$TMP/$SRCNAM1/.mozconfig"
export MOZILLA_OFFICIAL=1
export MOZ_MAKE_FLAGS=$MAKEFLAGS
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export BUILDING_RELEASE=1
export MOZ_ADDON_SIGNING=
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=
export PYTHON=/usr/bin/python2
# A stale DBUS_SESSION_BUS_ADDRESS var can cause build failures
unset DBUS_SESSION_BUS_ADDRESS
# Dev tools are enabled by default in the official binaries, so we should do the same here;
# passing DEVTOOLS=no to the script, however, will disable them.
if [ "$DEVTOOLS" = "no" ]; then
DEVTOOLS="--disable-devtools"
else
DEVTOOLS="--enable-devtools"
fi
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
# Our building options, in a configure-like display ;)
OPTIONS="\
${BRANDING} \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION \
--x-libraries=/usr/lib${LIBDIRSUFFIX} \
--enable-default-toolkit=cairo-$GTK \
--disable-accessibility \
$DEBUG \
$DEVTOOLS \
--enable-application=$PRGNAM \
--disable-crashreporter \
--disable-updater \
--disable-tests \
--enable-jemalloc \
--with-pthreads"
echo "mk_add_options MOZ_OBJDIR=$TMP/$OBJ" > .mozconfig
# Write in the .mozconfig the options above
for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
echo "ac_add_options --enable-optimize=\"$OPTIMIZE\"" >> .mozconfig
if ! pkg-config --exists libpulse; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
elif [ $ALSA = 1 ]; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
fi
if pkg-config --exists jack && [ "${BLACKLIST_JACK:-no}" != "yes" ]; then
echo "ac_add_options --enable-jack" >> .mozconfig; fi
./mach build
## Clean up; and package Pale Moon.
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
cd $TMP/$OBJ
make install DESTDIR=$PKG
cd $PKG
# We don't need these (just symlinks anyway):
rm -rf usr/lib${LIBDIRSUFFIX}/$PRGNAM-devel-$VERSION
# Avoid duplicate binaries; details: https://bugzilla.mozilla.org/show_bug.cgi?id=658850
# Pale Moon package scripts appear to attempt this, on other 'distros'; those scripts,
# however, appear to fail on Slackware.
rm -f usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/$PRGNAM-bin
# Use system provided Hunspell, if desired.
if [ "${USE_SYSTEM_HUNSPELL}" = "yes" ]; then
rm -rfv usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
cp -vsr /usr/share/hunspell usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
fi
# Install icons:
for PX in 16 32 48 ; do
mkdir -p $PKG/usr/share/icons/hicolor/${PX}x${PX}/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/chrome/icons/default/default${PX}.png \
$PKG/usr/share/icons/hicolor/${PX}x${PX}/apps/$PRGNAM.png
done
# ... and the 128px icon file too:
mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/icons/mozicon128.png \
$PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
cat $CWD/palemoon.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/UXP
for docs in $DOCS; do
cp $TMP/${SRCNAM1}/$docs $PKG/usr/doc/$PRGNAM-$VERSION/ || true
cp $TMP/${SRCNAM1}/platform/$docs $PKG/usr/doc/$PRGNAM-$VERSION/UXP/ || true
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View File

@ -0,0 +1,281 @@
#!/bin/bash
# Slackware build script for Pale Moon
# Copyright 2018,2019,2022 Vasily Sora USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by SlackBuilds.org
# Special thanks to Ponce
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=palemoon
VERSION=${VERSION:-31.3.0.1}
SRCNAM1=${SRCNAM1:-$PRGNAM-${VERSION}_Release}
SRCNAM2=${SRCNAM2:-uxp-RB_20220928}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
OBJ=${OBJ:-obj-$PRGNAM}
GTK=${GTK:-gtk2}
DOCS="AUTHORS LICENSE README.md SECURITY.md"
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.
OPTIMIZE=${OPTIMIZE:-"-O2 -msse2 -mfpmath=sse"}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -Wno-format-overflow"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
# The default is to build with official branding. This SlackBuild is used to
# produce officially approved third party "contributed builds" of Pale Moon.
# This SlackBuild can also be used to produce unapproved packages -- which
# requires the use of the "new moon", or if applicable, "unstable" branding.
# In general, the "unstable" branding is intended for those building from the
# master trunck of the Pale Moon github repository.
BRANDING=${BRANDING:---enable-official-branding}
if [ "$BRANDING" = "NewMoon" ]; then
BRANDING="--disable-official-branding --with-branding=palemoon/branding/unofficial"
elif [ "$BRANDING" = "unstable" ]; then
BRANDING="--disable-official-branding --with-branding=palemoon/branding/unstable"
fi
rm -rf $PKG $TMP/gold $TMP/$OBJ
mkdir -p $TMP $PKG $OUTPUT $TMP/gold $TMP/$OBJ
DEBUG=" --enable-strip --disable-debug --disable-debug-symbols --enable-release"
if [ "${ENABLE_DEBUG:-no}" = "yes" ]; then
DEBUG=" --disable-strip --disable-install-strip --enable-debug --enable-debug-symbols "
# On IA32, use gold since GNU ld runs out of memory linking libxul.so
# when debug is turned on
if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then
echo "#!/bin/bash" >> $TMP/gold/gold
echo "/usr/bin/ld.gold \"\$@\"" >> $TMP/gold/gold
cp $TMP/gold/gold $TMP/gold/ld
chmod +x $TMP/gold/*
PATH="$TMP/gold:$PATH"
export CC="$CC -B$TMP/gold"
export CXX="$CXX -B$TMP/gold"
fi
fi
set -e
# We need to use the incredibly ancient autoconf-2.13 for this :/
# (Taken from Slackware's Firefox build Script)
cd $TMP
rm -rf autoconf-2.13
tar xvf $CWD/autoconf-2.13.tar.xz
cd autoconf-2.13
zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Build a temporary copy of autoconf-2.13 only to be used to compile
# Pale Moon, since it somewhat inexplicably requires this ancient version:
rm -rf $TMP/autoconf-tmp
mkdir -p $TMP/autoconf-tmp
# This will be at the beginning of the $PATH, so protect against nonsense
# happening in $TMP:
chmod 700 $TMP/autoconf-tmp
rm -rf $TMP/autoconf-tmp/*
mkdir -p $TMP/autoconf-tmp/usr
./configure \
--prefix=$TMP/autoconf-tmp/usr \
--program-suffix=-2.13 \
--infodir=$TMP/autoconf-tmp/usr/info \
--mandir=$TMP/autoconf-tmp/usr/man \
--build=$ARCH-slackware-linux
make || make -j1
make install
PATH=$TMP/autoconf-tmp/usr/bin:$PATH
# Build Pale Moon
cd $TMP
rm -rf $SRCNAM1
tar -xvzf $CWD/$SRCNAM1.tar.gz # --transform s/pale-moon/${SRCNAM1}/
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 . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Without LANG=C, building the Python environment may fail with:
# "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)"
export LANG=C
export MOZCONFIG="$TMP/$SRCNAM1/.mozconfig"
export MOZILLA_OFFICIAL=1
export MOZ_MAKE_FLAGS=$MAKEFLAGS
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export BUILDING_RELEASE=1
export MOZ_ADDON_SIGNING=
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=
export PYTHON=/usr/bin/python2
# A stale DBUS_SESSION_BUS_ADDRESS var can cause build failures
unset DBUS_SESSION_BUS_ADDRESS
# Dev tools are enabled by default in the official binaries, so we should do the same here;
# passing DEVTOOLS=no to the script, however, will disable them.
if [ "$DEVTOOLS" = "no" ]; then
DEVTOOLS="--disable-devtools"
else
DEVTOOLS="--enable-devtools"
fi
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
# Our building options, in a configure-like display ;)
OPTIONS="\
${BRANDING} \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION \
--x-libraries=/usr/lib${LIBDIRSUFFIX} \
--enable-default-toolkit=cairo-$GTK \
--disable-accessibility \
$DEBUG \
$DEVTOOLS \
--enable-application=$PRGNAM \
--disable-crashreporter \
--disable-updater \
--disable-tests \
--enable-jemalloc \
--with-pthreads"
echo "mk_add_options MOZ_OBJDIR=$TMP/$OBJ" > .mozconfig
# Write in the .mozconfig the options above
for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
echo "ac_add_options --enable-optimize=\"$OPTIMIZE\"" >> .mozconfig
if ! pkg-config --exists libpulse; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
elif [ $ALSA = 1 ]; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
fi
if pkg-config --exists jack && [ "${BLACKLIST_JACK:-no}" != "yes" ]; then
echo "ac_add_options --enable-jack" >> .mozconfig; fi
./mach build
## Clean up; and package Pale Moon.
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
cd $TMP/$OBJ
make install DESTDIR=$PKG
cd $PKG
# We don't need these (just symlinks anyway):
rm -rf usr/lib${LIBDIRSUFFIX}/$PRGNAM-devel-$VERSION
# Avoid duplicate binaries; details: https://bugzilla.mozilla.org/show_bug.cgi?id=658850
# Pale Moon package scripts appear to attempt this, on other 'distros'; those scripts,
# however, appear to fail on Slackware.
rm -f usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/$PRGNAM-bin
# Use system provided Hunspell, if desired.
if [ "${USE_SYSTEM_HUNSPELL}" = "yes" ]; then
rm -rfv usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
cp -vsr /usr/share/hunspell usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
fi
# Install icons:
for PX in 16 32 48 ; do
mkdir -p $PKG/usr/share/icons/hicolor/${PX}x${PX}/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/chrome/icons/default/default${PX}.png \
$PKG/usr/share/icons/hicolor/${PX}x${PX}/apps/$PRGNAM.png
done
# ... and the 128px icon file too:
mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/icons/mozicon128.png \
$PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
cat $CWD/palemoon.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/UXP
for docs in $DOCS; do
cp $TMP/${SRCNAM1}/$docs $PKG/usr/doc/$PRGNAM-$VERSION/ || true
cp $TMP/${SRCNAM1}/platform/$docs $PKG/usr/doc/$PRGNAM-$VERSION/UXP/ || true
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View File

@ -0,0 +1,281 @@
#!/bin/bash
# Slackware build script for Pale Moon
# Copyright 2018,2019,2022 Vasily Sora USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by SlackBuilds.org
# Special thanks to Ponce
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=palemoon
VERSION=${VERSION:-31.3.0.1}
SRCNAM1=${SRCNAM1:-$PRGNAM-${VERSION}_Release}
SRCNAM2=${SRCNAM2:-uxp-RB_20220928}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
OBJ=${OBJ:-obj-$PRGNAM}
GTK=${GTK:-gtk2}
DOCS="AUTHORS LICENSE README.md SECURITY.md"
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.
OPTIMIZE=${OPTIMIZE:-"-O2 -msse2 -mfpmath=sse"}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -Wno-format-overflow"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
# The default is to build with official branding. This SlackBuild is used to
# produce officially approved third party "contributed builds" of Pale Moon.
# This SlackBuild can also be used to produce unapproved packages -- which
# requires the use of the "new moon", or if applicable, "unstable" branding.
# In general, the "unstable" branding is intended for those building from the
# master trunck of the Pale Moon github repository.
BRANDING=${BRANDING:---enable-official-branding}
if [ "$BRANDING" = "NewMoon" ]; then
BRANDING="--disable-official-branding --with-branding=palemoon/branding/unofficial"
elif [ "$BRANDING" = "unstable" ]; then
BRANDING="--disable-official-branding --with-branding=palemoon/branding/unstable"
fi
rm -rf $PKG $TMP/gold $TMP/$OBJ
mkdir -p $TMP $PKG $OUTPUT $TMP/gold $TMP/$OBJ
DEBUG=" --enable-strip --disable-debug --disable-debug-symbols --enable-release"
if [ "${ENABLE_DEBUG:-no}" = "yes" ]; then
DEBUG=" --disable-strip --disable-install-strip --enable-debug --enable-debug-symbols "
# On IA32, use gold since GNU ld runs out of memory linking libxul.so
# when debug is turned on
if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then
echo "#!/bin/bash" >> $TMP/gold/gold
echo "/usr/bin/ld.gold \"\$@\"" >> $TMP/gold/gold
cp $TMP/gold/gold $TMP/gold/ld
chmod +x $TMP/gold/*
PATH="$TMP/gold:$PATH"
export CC="$CC -B$TMP/gold"
export CXX="$CXX -B$TMP/gold"
fi
fi
set -e
# We need to use the incredibly ancient autoconf-2.13 for this :/
# (Taken from Slackware's Firefox build Script)
cd $TMP
rm -rf autoconf-2.13
tar xvf $CWD/autoconf-2.13.tar.xz
cd autoconf-2.13
zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Build a temporary copy of autoconf-2.13 only to be used to compile
# Pale Moon, since it somewhat inexplicably requires this ancient version:
rm -rf $TMP/autoconf-tmp
mkdir -p $TMP/autoconf-tmp
# This will be at the beginning of the $PATH, so protect against nonsense
# happening in $TMP:
chmod 700 $TMP/autoconf-tmp
rm -rf $TMP/autoconf-tmp/*
mkdir -p $TMP/autoconf-tmp/usr
./configure \
--prefix=$TMP/autoconf-tmp/usr \
--program-suffix=-2.13 \
--infodir=$TMP/autoconf-tmp/usr/info \
--mandir=$TMP/autoconf-tmp/usr/man \
--build=$ARCH-slackware-linux
make || make -j1
make install
PATH=$TMP/autoconf-tmp/usr/bin:$PATH
# Build Pale Moon
cd $TMP
rm -rf $SRCNAM1
tar -xvzf $CWD/$SRCNAM1.tar.gz # --transform s/pale-moon/${SRCNAM1}/
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 . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Without LANG=C, building the Python environment may fail with:
# "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)"
export LANG=C
export MOZCONFIG="$TMP/$SRCNAM1/.mozconfig"
export MOZILLA_OFFICIAL=1
export MOZ_MAKE_FLAGS=$MAKEFLAGS
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export BUILDING_RELEASE=1
export MOZ_ADDON_SIGNING=
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=
export PYTHON=/usr/bin/python2
# A stale DBUS_SESSION_BUS_ADDRESS var can cause build failures
unset DBUS_SESSION_BUS_ADDRESS
# Dev tools are enabled by default in the official binaries, so we should do the same here;
# passing DEVTOOLS=no to the script, however, will disable them.
if [ "$DEVTOOLS" = "no" ]; then
DEVTOOLS="--disable-devtools"
else
DEVTOOLS="--enable-devtools"
fi
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
# Our building options, in a configure-like display ;)
OPTIONS="\
${BRANDING} \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION \
--x-libraries=/usr/lib${LIBDIRSUFFIX} \
--enable-default-toolkit=cairo-$GTK \
--disable-accessibility \
$DEBUG \
$DEVTOOLS \
--enable-application=$PRGNAM \
--disable-crashreporter \
--disable-updater \
--disable-tests \
--enable-jemalloc \
--with-pthreads"
echo "mk_add_options MOZ_OBJDIR=$TMP/$OBJ" > .mozconfig
# Write in the .mozconfig the options above
for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
echo "ac_add_options --enable-optimize=\"$OPTIMIZE\"" >> .mozconfig
if ! pkg-config --exists libpulse; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
elif [ $ALSA = 1 ]; then
echo "ac_add_options --disable-pulseaudio" >> .mozconfig
TAG=${TAG}_alsa
fi
if pkg-config --exists jack && [ "${BLACKLIST_JACK:-no}" != "yes" ]; then
echo "ac_add_options --enable-jack" >> .mozconfig; fi
./mach build
## Clean up; and package Pale Moon.
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
cd $TMP/$OBJ
make install DESTDIR=$PKG
cd $PKG
# We don't need these (just symlinks anyway):
rm -rf usr/lib${LIBDIRSUFFIX}/$PRGNAM-devel-$VERSION
# Avoid duplicate binaries; details: https://bugzilla.mozilla.org/show_bug.cgi?id=658850
# Pale Moon package scripts appear to attempt this, on other 'distros'; those scripts,
# however, appear to fail on Slackware.
rm -f usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/$PRGNAM-bin
# Use system provided Hunspell, if desired.
if [ "${USE_SYSTEM_HUNSPELL}" = "yes" ]; then
rm -rfv usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
cp -vsr /usr/share/hunspell usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/dictionaries
fi
# Install icons:
for PX in 16 32 48 ; do
mkdir -p $PKG/usr/share/icons/hicolor/${PX}x${PX}/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/chrome/icons/default/default${PX}.png \
$PKG/usr/share/icons/hicolor/${PX}x${PX}/apps/$PRGNAM.png
done
# ... and the 128px icon file too:
mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
ln -s /usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/browser/icons/mozicon128.png \
$PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
cat $CWD/palemoon.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/UXP
for docs in $DOCS; do
cp $TMP/${SRCNAM1}/$docs $PKG/usr/doc/$PRGNAM-$VERSION/ || true
cp $TMP/${SRCNAM1}/platform/$docs $PKG/usr/doc/$PRGNAM-$VERSION/UXP/ || true
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

13
palemoon/palemoon.desktop Normal file
View File

@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Name=Pale Moon Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=palemoon %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=palemoon
Categories=Network;WebBrowser
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

14
palemoon/palemoon.info Normal file
View File

@ -0,0 +1,14 @@
PRGNAM="palemoon"
VERSION="31.3.0.1"
HOMEPAGE="http://www.palemoon.org/"
DOWNLOAD="http://git.schotynet.org/palemoon/snapshot/palemoon-31.3.0.1_Release.tar.gz \
http://git.schotynet.org/uxp/snapshot/uxp-RB_20220928.tar.gz \
http://ponce.cc/slackware/sources/repo/autoconf-2.13.tar.xz"
MD5SUM="95d91ab1ab2730221a85668e5a91b04c \
19c48eaf945f2313cb975b08fc7475f0 \
f2994d302cf736e7e71974edfa51da3c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="shelldweller"
EMAIL="shelldweller@beauxbead.com"

View File

@ -0,0 +1,14 @@
PRGNAM="palemoon"
VERSION="31.3.0.1"
HOMEPAGE="http://www.palemoon.org/"
DOWNLOAD="http://git.schotynet.org/palemoon/snapshot/palemoon-31.3.0.1_Release.tar.gz \
http://git.schotynet.org/uxp/snapshot/uxp-RB_20220928.tar.gz \
http://ponce.cc/slackware/sources/repo/autoconf-2.13.tar.xz"
MD5SUM="95d91ab1ab2730221a85668e5a91b04c \
19c48eaf945f2313cb975b08fc7475f0 \
f2994d302cf736e7e71974edfa51da3c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="khronosschoty"
EMAIL="khronosschoty@posteo.org"

19
palemoon/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
palemoon: palemoon (Web browser -- BUILD FROM SOURCE)
palemoon:
palemoon: Pale Moon is an Open Source, Goanna-based web browser available for
palemoon: Microsoft Windows and Linux (with other operating systems in
palemoon: development), focusing on efficiency and ease of use. Make sure to
palemoon: get the most out of your browser!
palemoon:
palemoon: Pale Moon's been built from its own, independently developed source
palemoon: that has been forked off from Firefox/Mozilla code.
palemoon:
palemoon: