summaryrefslogtreecommitdiffstats
path: root/development/unittest-cpp/unittest-cpp.SlackBuild
diff options
context:
space:
mode:
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