summaryrefslogtreecommitdiffstats
path: root/office/texstudio/texstudio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/texstudio/texstudio.SlackBuild')
-rw-r--r--office/texstudio/texstudio.SlackBuild24
1 files changed, 17 insertions, 7 deletions
diff --git a/office/texstudio/texstudio.SlackBuild b/office/texstudio/texstudio.SlackBuild
index dce23faf56..6f66cddb63 100644
--- a/office/texstudio/texstudio.SlackBuild
+++ b/office/texstudio/texstudio.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for texstudio
-# Copyright 2013-2019 Larry Hajali <larryhaja[at]gmail[dot]com>
+# Copyright 2013-2020 Larry Hajali <larryhaja[at]gmail[dot]com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# 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=texstudio
-VERSION=${VERSION:-2.12.16}
+VERSION=${VERSION:-4.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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}
@@ -72,8 +82,8 @@ find -L . \
# Fix .desktop item.
sed -i -e '/^Encoding/d' -e "/^Icon/s|=.*|=$PRGNAM|" utilities/texstudio.desktop
-# Use Qt5 if QT5GUI is yes, otherwise, default to Qt4.
-if [ "${QT5GUI:-no}" == "yes" ]; then
+# Use Qt4 if QT5GUI is no, otherwise, default to Qt5.
+if [ "${QT5GUI:-yes}" == "yes" ]; then
qmake-qt5 LIBS+="-L/usr/lib${LIBDIRSUFFIX}" QMAKE_CFLAGS+="$SLKCFLAGS" \
QMAKE_CXXFLAGS+="$SLKCFLAGS" CONFIG-=debug -o Makefile $PRGNAM.pro
else
@@ -108,4 +118,4 @@ 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:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE