summaryrefslogtreecommitdiffstats
path: root/academic/wxMaxima
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-06-27 02:58:04 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-07-08 16:41:57 +0700
commit37a52401c57c94842c962c933f51c7200763c34f (patch)
treeb8da29cdc9cf3f213e6d1251b58d80bb50d77cda /academic/wxMaxima
parent76828fdad0e7b3d951a2e667bf469eda36e188b6 (diff)
downloadslackbuilds-37a52401c57c94842c962c933f51c7200763c34f.tar.gz
slackbuilds-37a52401c57c94842c962c933f51c7200763c34f.tar.xz
academic/wxMaxima: Use DESTDIR properly.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/wxMaxima')
-rw-r--r--academic/wxMaxima/wxMaxima.SlackBuild20
1 files changed, 8 insertions, 12 deletions
diff --git a/academic/wxMaxima/wxMaxima.SlackBuild b/academic/wxMaxima/wxMaxima.SlackBuild
index 68391f9136..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
@@ -78,9 +74,9 @@ 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