From 7aeb71a705809cd2b55160e950cfee84c3656cb6 Mon Sep 17 00:00:00 2001 From: khronosschoty Date: Fri, 4 Mar 2022 19:21:40 -0800 Subject: palemoon.SlackBuild: formatting improvement, unset var that might cause build fail, removed no longer needed patch for gcc 11 --- palemoon.SlackBuild | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/palemoon.SlackBuild b/palemoon.SlackBuild index 827ea3e..7e00d33 100644 --- a/palemoon.SlackBuild +++ b/palemoon.SlackBuild @@ -93,9 +93,10 @@ fi # master trunck of the Pale Moon github repository. BRANDING=${BRANDING:---with-branding=other-licenses/branding/palemoon/unstable} if [ "$BRANDING" = "NewMoon" ]; then - BRANDING="--disable-official-branding --with-branding=browser/branding/unofficial" -elif [ "$BRANDING" = "unstable" ]; then - BRANDING="--disable-official-branding --with-branding=other-licenses/branding/palemoon/unstable" + BRANDING="--disable-official-branding --with-branding=browser/branding/unofficial" +elif + [ "$BRANDING" = "unstable" ]; then + BRANDING="--disable-official-branding --with-branding=other-licenses/branding/palemoon/unstable" fi rm -rf $PKG $TMP/gold $TMP/$OBJ @@ -158,22 +159,21 @@ PATH=$TMP/autoconf-tmp/usr/bin:$PATH # fetch Pale Moon and platform sources from git if [ "$SRCNAM1" = "${PRGNAM}-git.source" ]; then -if [ ! -d $CWD/$SRCNAM1/.git ]; then -cd $CWD -git clone -b master --depth=1 git://git.schotynet.org/Pale-Moon $SRCNAM1 -else -cd $CWD/$SRCNAM1 -git pull --depth=1 origin master -fi - -if [ ! -d $CWD/$SRCNAM2/.git ]; then -cd $CWD -git clone -b master --depth=1 git://git.schotynet.org/GRE $SRCNAM2 -else -cd $CWD/$SRCNAM2 -git pull --depth=1 origin master -fi + if [ ! -d $CWD/$SRCNAM1/.git ]; then + cd $CWD + git clone -b master --depth=1 git://git.schotynet.org/Pale-Moon $SRCNAM1 + else + cd $CWD/$SRCNAM1 + git pull --rebase --depth=1 origin master + fi + if [ ! -d $CWD/$SRCNAM2/.git ]; then + cd $CWD + git clone -b master --depth=1 git://git.schotynet.org/GRE $SRCNAM2 + else + cd $CWD/$SRCNAM2 + git pull --rebase --depth=1 origin master + fi fi # Build Pale Moon @@ -181,27 +181,27 @@ cd $TMP rm -rf $SRCNAM1 if [ "$SRCNAM1" = "${PRGNAM}-git.source" ]; then -git clone -b master --depth=1 file://localhost:$CWD/$SRCNAM1 $SRCNAM1 + git clone -b master --depth=1 file://localhost:$CWD/$SRCNAM1 $SRCNAM1 else -tar -xvf $CWD/$SRCNAM1.tar.xz + tar -xvf $CWD/$SRCNAM1.tar.xz fi cd $SRCNAM1 if [ "$SRCNAM1" = "${PRGNAM}-git.source" ]; then -git clone -b master --depth=1 file://localhost:$CWD/$SRCNAM2 platform + git clone -b master --depth=1 file://localhost:$CWD/$SRCNAM2 platform else -tar xvf $CWD/$SRCNAM2.tar.xz --transform="flags=r;s/$SRCNAM2/platform/" + tar xvf $CWD/$SRCNAM2.tar.xz --transform="flags=r;s/$SRCNAM2/platform/" fi # Set the package and internal "dist" version: if [ "$SRCNAM1" = "${PRGNAM}-git.source" ]; then -"{COMMIT:=}" ] && git fetch --unshallow --tags && git checkout "$COMMIT" -HEAD="$(git rev-parse --short HEAD)" -DATE="$(git show -s --format=%cd --date=format:%Y.%m.%d)" -PKGVERSION="${DATE}_$HEAD" -VERSION=$(cat ./browser/config/version.txt) + "{COMMIT:=}" ] && git --git-dir platform/.git fetch --unshallow --tags && git --git-dir platform/.git checkout "$COMMIT" + HEAD="$(git --git-dir platform/.git rev-parse --short HEAD)" + DATE="$(git --git-dir platform/.git --git-dir platform/.git show -s --format=%cd --date=format:%Y.%m.%d)" + PKGVERSION="${DATE}_$HEAD" + VERSION=$(cat ./browser/config/version.txt) else -PKGVERSION=$VERSION -VERSION=$(cat ./browser/config/version.txt) + PKGVERSION=$VERSION + VERSION=$(cat ./browser/config/version.txt) fi # look into updating this patch @@ -209,8 +209,6 @@ fi # patch -p1 < $CWD/adNauseam-unblock.patch #fi -patch -p1 < $CWD/0001-system-graphics-2d-BaseRect.h-system-network-base-ns.patch - chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -233,13 +231,15 @@ 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" + DEVTOOLS="--disable-devtools" else - DEVTOOLS="--enable-devtools" + DEVTOOLS="--enable-devtools" fi @@ -269,11 +269,11 @@ 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; fi - + echo "ac_add_options --disable-pulseaudio" >> .mozconfig +fi if pkg-config --exists jack && [ "${BLACKLIST_JACK:-no}" != "yes" ]; then -echo "ac_add_options --enable-jack" >> .mozconfig; fi - + echo "ac_add_options --enable-jack" >> .mozconfig +fi ./mach build ## Clean up; and package Pale Moon. -- cgit v1.2.3