summaryrefslogtreecommitdiff
path: root/libraries
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
parent0a9fda0a01a70dc1bf2662e8cc42051f5f1a9910 (diff)
downloadslackbuilds-941edb4285c6e19ba29050456c343bee094cb3f2.tar.gz
libraries/spdlog: Updated for version 1.4.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/spdlog/spdlog.SlackBuild35
-rw-r--r--libraries/spdlog/spdlog.info6
2 files changed, 30 insertions, 11 deletions
diff --git a/libraries/spdlog/spdlog.SlackBuild b/libraries/spdlog/spdlog.SlackBuild
index 5b4d186587..e1462798cf 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
diff --git a/libraries/spdlog/spdlog.info b/libraries/spdlog/spdlog.info
index e2fbaca5c5..8f81ff63e3 100644
--- a/libraries/spdlog/spdlog.info
+++ b/libraries/spdlog/spdlog.info
@@ -1,8 +1,8 @@
PRGNAM="spdlog"
-VERSION="1.3.1"
+VERSION="1.4.1"
HOMEPAGE="https://github.com/gabime/spdlog"
-DOWNLOAD="https://github.com/gabime/spdlog/archive/v1.3.1/spdlog-1.3.1.tar.gz"
-MD5SUM="3c17dd6983de2a66eca8b5a0b213d29f"
+DOWNLOAD="https://github.com/gabime/spdlog/archive/v1.4.1/spdlog-1.4.1.tar.gz"
+MD5SUM="0665423466670146551d4fe752da315d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""