academic/equalx: New maintainer, various fixes.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
B. Watson 2020-01-01 14:54:43 -05:00 committed by Robby Workman
parent d17144bd97
commit 32f9f8518c
3 changed files with 43 additions and 20 deletions

View File

@ -1,3 +1,5 @@
equalx (equation editor)
Equalx is an equation editor and viewer that uses a LaTeX
installation to generate LaTeX math code to either eps, png,
pdf, jpg, tex, ps, or svg format.

View File

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

View File

@ -6,5 +6,5 @@ MD5SUM="f7164b254f25fb265388b46e3fb8e464"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="exempi"
MAINTAINER="Charles E. Kauffman"
EMAIL="molbolom@gmail.com"
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"