summaryrefslogtreecommitdiff
path: root/development/unittest-cpp/unittest-cpp.SlackBuild
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@iinet.net.au>2017-01-23 11:40:03 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-01-24 07:23:19 +0700
commitfe5838774a1c59ecc6e9416b21626860de76e225 (patch)
tree2b3795519b1d0fb2ae7bd6729bdd243f300ba51c /development/unittest-cpp/unittest-cpp.SlackBuild
parent6f465bf1e0baef8d3b5fa06eb5c6b3e1a5627492 (diff)
downloadslackbuilds-fe5838774a1c59ecc6e9416b21626860de76e225.tar.gz
development/unittest-cpp: Updated for version 2.0.0. Use CMake
Signed-off-by: Christoph Willing <chris.willing@iinet.net.au>
Diffstat (limited to 'development/unittest-cpp/unittest-cpp.SlackBuild')
-rw-r--r--development/unittest-cpp/unittest-cpp.SlackBuild37
1 files changed, 18 insertions, 19 deletions
diff --git a/development/unittest-cpp/unittest-cpp.SlackBuild b/development/unittest-cpp/unittest-cpp.SlackBuild
index 0003ee24e8..94091f4e61 100644
--- a/development/unittest-cpp/unittest-cpp.SlackBuild
+++ b/development/unittest-cpp/unittest-cpp.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for unittest-cpp
-# Copyright 2016 Christoph Willing Brisbane, Australia
+# Copyright 2016-2017 Christoph Willing Brisbane, Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=unittest-cpp
-VERSION=${VERSION:-1.6.1}
+VERSION=${VERSION:-2.0.0}
BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
+TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -62,6 +62,7 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+patch -p0 < $CWD/000_libdirsuffix.diff
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,27 +70,25 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
-rm $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog
+cp -a \
+ AUTHORS INSTALL LICENSE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install