summaryrefslogtreecommitdiffstats
path: root/academic/wxMaxima/wxMaxima.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/wxMaxima/wxMaxima.SlackBuild')
-rw-r--r--academic/wxMaxima/wxMaxima.SlackBuild22
1 files changed, 9 insertions, 13 deletions
diff --git a/academic/wxMaxima/wxMaxima.SlackBuild b/academic/wxMaxima/wxMaxima.SlackBuild
index 8480fdecab..feb51615b1 100644
--- a/academic/wxMaxima/wxMaxima.SlackBuild
+++ b/academic/wxMaxima/wxMaxima.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - use DESTDIR properly, to avoid baking $PKG into the binary.
+
# Mar 2021 - updated for v. 21.01, Judah Milgram, milgram at cgpp com
cd $(dirname $0) ; CWD=$(pwd)
@@ -29,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wxMaxima
SRCNAM=wxmaxima
VERSION=${VERSION:-21.01.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -55,16 +55,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -73,14 +69,14 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-Version-$VERSION
-tar xvf $CWD/Version-$VERSION.tar.gz
+tar xvf $CWD/$SRCNAM-Version-$VERSION.tar.gz
cd $SRCNAM-Version-$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 \
+ -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 {} +
BUILDDIR=build
mkdir -p $BUILDDIR
@@ -88,11 +84,11 @@ mkdir -p $BUILDDIR
export PATH="/opt/cmake-202x/bin:$PATH"
cmake \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=$PKG/usr \
+ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja -S . -B $BUILDDIR
cmake --build $BUILDDIR
-cmake --install $BUILDDIR
+DESTDIR=$PKG cmake --install $BUILDDIR
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