aboutsummaryrefslogtreecommitdiff
path: root/academic/equalx/equalx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/equalx/equalx.SlackBuild')
-rw-r--r--academic/equalx/equalx.SlackBuild57
1 files changed, 39 insertions, 18 deletions
diff --git a/academic/equalx/equalx.SlackBuild b/academic/equalx/equalx.SlackBuild
index 085144e7d2944..900e97e5e6809 100644
--- a/academic/equalx/equalx.SlackBuild
+++ b/academic/equalx/equalx.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for equalx
# Copyright 2015 Charles E. Kauffman
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +23,25 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Now maintained by B. Watson <yalhcru@gmail.com>
+
+# 20200101 bkw:
+# - take over maintenance
+# - BUILD=2
+# - fix default paths for applications (gs, pdflatex, pdftocairo)
+# - actually use SLKCFLAGS
+# - strip binary
+# - use a .desktop file that validates
+# - minor cleanups/etc in script, slack-desc, README
+
PRGNAM=equalx
VERSION=${VERSION:-0.7.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +52,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,27 +75,36 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-qmake
+# Make sure the application can find the external binaries it runs,
+# without defaulting to silly things like .exe files. The patch actually
+# makes it look for pdflatex in both places it might be found (/usr/bin
+# for texlive, /usr/share/texmf/bin for tetex).
+zcat $CWD/externpaths.diff.gz | patch -p1
+
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" qmake
+sed -i "s,-O2,$SLKCFLAGS," Makefile
make
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/share/pixmaps $PKG/usr/share/applications
+# No install target in .pro file, do it manually.
+mkdir -p \
+ $PKG/usr/doc/$PRGNAM-$VERSION \
+ $PKG/usr/bin \
+ $PKG/usr/man/man1 \
+ $PKG/usr/share/pixmaps \
+ $PKG/usr/share/applications
-cp resources/icons/equalx/equalx-64x64.png $PKG/usr/share/pixmaps
-cp LICENSE README THANKS changelog $PKG/usr/doc/$PRGNAM-$VERSION
+install -s -m0755 -oroot -groot $PRGNAM $PKG/usr/bin
+gzip -9c < $PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+cp -a resources/icons/equalx/equalx-64x64.png $PKG/usr/share/pixmaps
+cp -a LICENSE README THANKS changelog $PKG/usr/doc/$PRGNAM-$VERSION
-cp equalx $PKG/usr/bin
-cp equalx.1 $PKG/usr/man/man1
+# Edited version of the .desktop that actually validates.
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-sed 's;0\.7\.0;0\.7\.1;' resources/equalx.desktop > $PKG/usr/share/applications/equalx.desktop
-
-find $PKG/usr/man -type f -exec gzip {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc