diff options
Diffstat (limited to 'academic/xflr5/xflr5.SlackBuild')
-rw-r--r-- | academic/xflr5/xflr5.SlackBuild | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/academic/xflr5/xflr5.SlackBuild b/academic/xflr5/xflr5.SlackBuild index 5f7bfa5ccf..8bfc0a4705 100644 --- a/academic/xflr5/xflr5.SlackBuild +++ b/academic/xflr5/xflr5.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xflr5 -# Copyright 2019 Daniel Prosser, Lexington Park, MD, USA +# Copyright 2020-2023 Daniel Prosser, Lexington Park, MD, USA # 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=xflr5 -VERSION=${VERSION:-6.43} +VERSION=${VERSION:-6.61} 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} @@ -59,9 +69,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM -tar xvf $CWD/${PRGNAM}_${VERSION}_src.tar.gz -cd $PRGNAM +rm -rf ${PRGNAM}-${VERSION} +tar -xzvf $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 \ @@ -72,8 +82,15 @@ find -L . \ # Change default path for libraries installation sed -i "s/target\.path = \$\$PREFIX\/lib/target\.path = \$\$PREFIX\/lib${LIBDIRSUFFIX}/g" \ XFoil-lib/XFoil-lib.pro -sed -i "s/target\.path = \$\$PREFIX\/lib/target\.path = \$\$PREFIX\/lib${LIBDIRSUFFIX}/g" \ - xflr5-engine/xflr5-engine.pro + +# Fix some hardcoded paths in launcher +sed -i "s/Exec=\/usr\/local\/bin\/xflr5/Exec=\/usr\/bin\/xflr5/g" linux/xflr5.desktop +sed -i "s/Icon=\/usr\/local\/share\/xflr5\/xflr5.png/Icon=xflr5/g" linux/xflr5.desktop + +# Fix linking XFoil-lib +# Note: this patch *must* be gzipped, as it contain a mix of \n and \r\n +# line endings, and git would strip the \r's. +zcat $CWD/link_directly.patch.gz | patch -p0 qmake-qt5 \ PREFIX=/usr \ @@ -88,11 +105,11 @@ make install INSTALL_ROOT=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -mkdir -p $PKG/usr/share/icons/hicolor/64x64/apps -cp -a xflr5-gui/images/xflr5_64.png $PKG/usr/share/icons/hicolor/64x64/apps +mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps +cp -a res/xflr5.png $PKG/usr/share/icons/hicolor/128x128/apps mkdir -p $PKG/usr/share/applications -cp -a $CWD/xflr5.desktop $PKG/usr/share/applications +cp -a linux/xflr5.desktop $PKG/usr/share/applications mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a License.txt $PKG/usr/doc/$PRGNAM-$VERSION @@ -103,4 +120,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 |