aboutsummaryrefslogtreecommitdiff
path: root/libraries/spdlog/spdlog.SlackBuild
diff options
context:
space:
mode:
authorHunter Sezen <orbea@riseup.net>2019-09-28 08:43:09 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-09-28 08:43:09 +0700
commit941edb4285c6e19ba29050456c343bee094cb3f2 (patch)
tree42a895b19fcda4435820502858d1c63f3bde616b /libraries/spdlog/spdlog.SlackBuild
parent0a9fda0a01a70dc1bf2662e8cc42051f5f1a9910 (diff)
libraries/spdlog: Updated for version 1.4.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/spdlog/spdlog.SlackBuild')
-rw-r--r--libraries/spdlog/spdlog.SlackBuild35
1 files changed, 27 insertions, 8 deletions
diff --git a/libraries/spdlog/spdlog.SlackBuild b/libraries/spdlog/spdlog.SlackBuild
index 5b4d18658793..e1462798cf46 100644
--- a/libraries/spdlog/spdlog.SlackBuild
+++ b/libraries/spdlog/spdlog.SlackBuild
@@ -24,17 +24,37 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=spdlog
-VERSION=${VERSION:-1.3.1}
+VERSION=${VERSION:-1.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-ARCH=noarch
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
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 -eu
rm -rf $PKG
@@ -53,17 +73,16 @@ find -L . \
FMT=OFF
pkg-config --exists fmt && FMT=ON
-# cmake: Use DATAROOTDIR for pkg-config and cmake files.
-# This is not true in the master or in the upcomining 1.4 release.
-# https://github.com/gabime/spdlog/pull/1192
-sed -i 's/CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_DATAROOTDIR/' CMakeLists.txt
-
mkdir -p build
cd build
cmake \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DSPDLOG_BUILD_SHARED=ON \
+ -DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
- -DSPDLOG_BUILD_EXAMPLES=OFF \
+ -DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_FMT_EXTERNAL=$FMT \
-DCMAKE_BUILD_TYPE=Release ..
make