aboutsummaryrefslogtreecommitdiff
path: root/development/unittest-cpp
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
parent6f465bf1e0baef8d3b5fa06eb5c6b3e1a5627492 (diff)
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')
-rw-r--r--development/unittest-cpp/000_libdirsuffix.diff26
-rw-r--r--development/unittest-cpp/unittest-cpp.SlackBuild37
-rw-r--r--development/unittest-cpp/unittest-cpp.info6
3 files changed, 47 insertions, 22 deletions
diff --git a/development/unittest-cpp/000_libdirsuffix.diff b/development/unittest-cpp/000_libdirsuffix.diff
new file mode 100644
index 000000000000..4edc236529ea
--- /dev/null
+++ b/development/unittest-cpp/000_libdirsuffix.diff
@@ -0,0 +1,26 @@
+--- CMakeLists.txt.orig 2017-01-14 07:55:01.000000000 +1000
++++ CMakeLists.txt 2017-01-23 11:18:46.243967086 +1000
+@@ -92,10 +92,10 @@
+ set (UTPP_INSTALL_DESTINATION "include/UnitTestPP")
+ endif()
+
+-set(config_install_dir_ lib/cmake/${PROJECT_NAME})
++set(config_install_dir_ lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})
+ set(targets_export_name_ "${PROJECT_NAME}Targets")
+
+-install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib)
++install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib${LIB_SUFFIX})
+ install(FILES ${headers_} DESTINATION ${UTPP_INSTALL_DESTINATION})
+ install(FILES ${platformHeaders_} DESTINATION ${UTPP_INSTALL_DESTINATION}/${platformDir_})
+ install(FILES cmake/UnitTest++Config.cmake DESTINATION "${config_install_dir_}")
+@@ -103,8 +103,8 @@
+
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
+-set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
++set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+ set(includedir ${CMAKE_INSTALL_PREFIX}/include/UnitTest++)
+ configure_file("UnitTest++.pc.in" "UnitTest++.pc" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/UnitTest++.pc"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
diff --git a/development/unittest-cpp/unittest-cpp.SlackBuild b/development/unittest-cpp/unittest-cpp.SlackBuild
index 0003ee24e86d..94091f4e61c7 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
diff --git a/development/unittest-cpp/unittest-cpp.info b/development/unittest-cpp/unittest-cpp.info
index f1a45dcea45b..66c7bba555e1 100644
--- a/development/unittest-cpp/unittest-cpp.info
+++ b/development/unittest-cpp/unittest-cpp.info
@@ -1,8 +1,8 @@
PRGNAM="unittest-cpp"
-VERSION="1.6.1"
+VERSION="2.0.0"
HOMEPAGE="https://github.com/unittest-cpp/unittest-cpp"
-DOWNLOAD="https://github.com/unittest-cpp/unittest-cpp/releases/download/v1.6.1/unittest-cpp-1.6.1.tar.gz"
-MD5SUM="b4849a686b78ba198a51a49966b8ddba"
+DOWNLOAD="https://github.com/unittest-cpp/unittest-cpp/archive/v2.0.0/unittest-cpp-2.0.0.tar.gz"
+MD5SUM="edaccca3e61d977881bdf1e0cf372243"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""