aboutsummaryrefslogtreecommitdiff
path: root/network/PaleMoon
diff options
context:
space:
mode:
authorkhronosschoty <khronosschoty@posteo.org>2017-05-21 11:55:51 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-05-27 07:29:29 +0700
commit23746ccc8683490a78d09c4df3e1ec58f71da97a (patch)
tree899e05f89f164c276b55ac3a4a48c46351fe8098 /network/PaleMoon
parent549a874b9c7dfffaf4bfd18ee2400a4191cb2298 (diff)
network/PaleMoon: Update build script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/PaleMoon')
-rw-r--r--network/PaleMoon/PaleMoon.SlackBuild52
1 files changed, 23 insertions, 29 deletions
diff --git a/network/PaleMoon/PaleMoon.SlackBuild b/network/PaleMoon/PaleMoon.SlackBuild
index c1e26d93d7ce2..f87fae99da223 100644
--- a/network/PaleMoon/PaleMoon.SlackBuild
+++ b/network/PaleMoon/PaleMoon.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=PaleMoon
VERSION=${VERSION:-27.3.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -64,24 +64,17 @@ fi
# PaleMoon is most likely gcc-4.9.4.
#
# If the user has specified a compiler, use that. Other wise
-# look to see if gcc-4.9.4 and g++-4.9.4 can be found.
-if [ "$CC" = "" ] && [ "$CXX" = "" ]; then
- GCC494=$(type -P gcc-4.9.4) && GCXX494=$(type -P g++-gcc-4.9.4)
-fi
-# If no compiler is specified by the user, default to using
-# gcc-4.9.4 and g++-gcc-4.9.4; if they are present and can be found.
-if [ "$GCC494" != "" ] && [ "$GCXX494" != "" ]; then
- CC=gcc-4.9.4 && CXX=g++-gcc-4.9.4
-# If gcc-4.9.4 is not found look for it, and if found, use gcc-4.8.2
-elif [ "$GCC494" = "" ] && [ "$GCXX494" = "" ]; then
- GCC482=$(type -P gcc-4.8.2) && GCXX482=$(type -P g++-gcc-4.8.2)
- if [ "$GCC482" != "" ] && [ "$GCXX482" != "" ]; then
- CC=gcc-4.8.2 && CXX=g++-gcc-4.8.2
-# Lastly, if there is no user defined compiler to use, and,
-# gcc-4.9.4 can not be found, use the default Slackware gcc
-# and g++.
- else CC=gcc && CXX=g++
- fi
+# look to see if gcc-4.9.4 or gcc-4.8.2 and g++-4.9.4 or
+# g++-4.8.2 can be found. If nothing else, default to using
+# Slackware's stock compiler.
+#
+# Thank you to Orbea; for suggesting this method.
+if command -v gcc-4.9.4 >/dev/null && command -v g++-gcc-4.9.4 >/dev/null; then
+ CC="${CC:-gcc-4.9.4}" && CXX="${CXX:-g++-gcc-4.9.4}"
+elif command -v gcc-4.8.2 >/dev/null && command -v g++-gcc-4.8.2 >/dev/null; then
+ CC="${CC:-gcc-4.8.2}" && CXX="${CXX:-g++-gcc-4.8.2}"
+else
+ CC="${CC:-gcc}" && CXX="${CXX:-g++}"
fi
export CC="$CC"
@@ -245,19 +238,20 @@ if [ "${USE_SYSTEM_HUNSPELL}" = "yes" ]; then
cp -vsr /usr/share/hunspell usr/lib${LIBDIRSUFFIX}/palemoon-$VERSION/dictionaries
fi
-# Icons
-mkdir -p $PKG/usr/share/icons/hicolor/{16x16,32x32,48x48,128x128}/apps
-mkdir -p $PKG/usr/share/applications
-ln -s /usr/lib${LIBDIRSUFFIX}/palemoon-$VERSION/browser/chrome/icons/default/default16.png \
- usr/share/icons/hicolor/16x16/apps/${PRGNAM}-$VERSION.png
-ln -s /usr/lib${LIBDIRSUFFIX}/chrome/icons/default/default32.png \
- usr/share/icons/hicolor/32x32/apps/${PRGNAM}-$VERSION.png
-ln -s /usr/lib${LIBDIRSUFFIX}/chrome/icons/default/default48.png \
- usr/share/icons/hicolor/48x48/apps/${PRGNAM}-$VERSION.png
+
+# 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}/palemoon-$VERSION/browser/chrome/icons/default/default${PX}.png \
+ $PKG/usr/share/icons/hicolor/${PX}x${PX}/apps/${PRGNAM}-$VERSION.png
+done
+# ... and the 128px icon file too:
+mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
ln -s /usr/lib${LIBDIRSUFFIX}/palemoon-$VERSION/browser/icons/mozicon128.png \
- usr/share/icons/hicolor/128x128/apps/${PRGNAM}-$VERSION.png
+ $PKG/usr/share/icons/hicolor/128x128/apps/${PRGNAM}-$VERSION.png
# Install .desktop file
+mkdir -p $PKG/usr/share/applications
sed "s|@VERSION@|$VERSION|" $CWD/$PRGNAM.desktop \
> $PKG/usr/share/applications/$PRGNAM.desktop