summaryrefslogtreecommitdiffstats
path: root/development/mmtf-cpp/mmtf-cpp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/mmtf-cpp/mmtf-cpp.SlackBuild')
-rw-r--r--development/mmtf-cpp/mmtf-cpp.SlackBuild42
1 files changed, 8 insertions, 34 deletions
diff --git a/development/mmtf-cpp/mmtf-cpp.SlackBuild b/development/mmtf-cpp/mmtf-cpp.SlackBuild
index f40925bae6..deef578dfc 100644
--- a/development/mmtf-cpp/mmtf-cpp.SlackBuild
+++ b/development/mmtf-cpp/mmtf-cpp.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for mmtf-cpp
-# Copyright 2020-2022 Giancarlo Dessì, Cagliari, IT
+# Copyright 2020-2024 Giancarlo Dessì, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,22 +25,13 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mmtf-cpp
-VERSION=${VERSION:-1.0.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.1.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+ARCH=noarch
-# 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
@@ -50,20 +41,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
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
rm -rf $PKG
@@ -78,18 +55,15 @@ find -L . \
-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 {} \;
+
+sed -i ./CMakeLists.txt -e "s/find_package(msgpack)/find_package(msgpack-cxx)/g"
mkdir -p build
cd build
- cmake \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install/strip DESTDIR=$PKG
+ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr ..
+ DESTDIR=$PKG ninja install
cd ..
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-
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