mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
development/unittest-cpp: Updated for version 2.0.0. Use CMake
Signed-off-by: Christoph Willing <chris.willing@iinet.net.au>
This commit is contained in:
parent
6f465bf1e0
commit
fe5838774a
3 changed files with 47 additions and 22 deletions
26
development/unittest-cpp/000_libdirsuffix.diff
Normal file
26
development/unittest-cpp/000_libdirsuffix.diff
Normal file
|
@ -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")
|
|
@ -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,7 +23,7 @@
|
|||
# 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}
|
||||
|
||||
|
@ -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
|
||||
|
||||
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
|
||||
|
|
|
@ -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=""
|
||||
|
|
Loading…
Reference in a new issue