summaryrefslogtreecommitdiffstats
path: root/academic/xcircuit/xcircuit.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/xcircuit/xcircuit.SlackBuild')
-rw-r--r--academic/xcircuit/xcircuit.SlackBuild70
1 files changed, 49 insertions, 21 deletions
diff --git a/academic/xcircuit/xcircuit.SlackBuild b/academic/xcircuit/xcircuit.SlackBuild
index 2336153e6c..9429418716 100644
--- a/academic/xcircuit/xcircuit.SlackBuild
+++ b/academic/xcircuit/xcircuit.SlackBuild
@@ -1,28 +1,55 @@
-#!/bin/sh
+#!/bin/bash
+
+# Slackware build script for xcircuit
-# Slackware build script for grace
# Written by B. Jogai <jogaib {at} comcast [dot] net>
+# Copyright 2023 Johannes Schoepfer, Germany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# 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=xcircuit
-VERSION=${VERSION:-3.7.54}
+VERSION=${VERSION:-3.10.30}
BUILD=${BUILD:-1}
TAG=${TAG:-"_SBo"}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+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}
-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"
@@ -45,10 +72,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.tgz
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 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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -56,27 +83,28 @@ CFLAGS="$SLKCFLAGS" \
--bindir=/usr/bin \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --with-x \
+ --with-cairo \
--with-ngspice \
--with-tcl=/usr/lib${LIBDIRSUFFIX} \
+ --with-tk=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux \
make
make DESTDIR=$PKG install
+[ "$ARCH" = "x86_64" ] && mv $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Add desktop menu entries
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-cat $CWD/xcircuit.png > $PKG/usr/share/pixmaps/xcircuit.png
-cat $CWD/xcircuit.desktop > $PKG/usr/share/applications/xcircuit.desktop
-
-# Copy the man pages from the lib to the man directory.
-# Don't move it in case the program needs it there for some reason.
-rm -rf $PKG/usr/man
-mkdir -p $PKG/usr/man/man1
-cp $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM-3.7/man/*.1 $PKG/usr/man/man1
+mkdir -p $PKG/usr/share/{applications,icons}
+convert $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM-*.*/pixmaps/$PRGNAM.gif \
+ $PKG/usr/share/icons/$PRGNAM.png
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir $PKG/usr/man
+mv $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM-*.*/man $PKG/usr/man/man1
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -89,4 +117,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