From 29e11f50c6b9a9f5f7e30205c86e12e85c884b28 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Tue, 7 May 2024 17:40:25 +0200 Subject: [PATCH] development/gtest: Rework libraries installation. Copy also missing cmake files Signed-off-by: Matteo Bernardini Signed-off-by: Willy Sudiarto Raharjo --- development/gtest/gtest.SlackBuild | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/development/gtest/gtest.SlackBuild b/development/gtest/gtest.SlackBuild index 867de2d6e9..8de2381c4b 100644 --- a/development/gtest/gtest.SlackBuild +++ b/development/gtest/gtest.SlackBuild @@ -34,7 +34,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=gtest SRCNAM=googletest VERSION=${VERSION:-1.12.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -111,13 +111,20 @@ install -m 0644 googletest/include/$PRGNAM/internal/custom/*.h \ $PKG/usr/include/$PRGNAM/internal/custom # install the libs and the pkgconfig files! -install -s -m 0755 build/lib/*.so $PKG/usr/lib$LIBDIRSUFFIX +for i in build/lib/*.so ; do + install -s -m 0755 $i $PKG/usr/lib$LIBDIRSUFFIX/$(basename $i .so).so.$VERSION + ln -s $(basename $i .so).so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/$(basename $i .so).so +done mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig for i in gmock gmock_main gtest gtest_main ; do sed "s| -lpthread||g" build/googletest/generated/${i}.pc \ > $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig/${i}.pc done +# copy the cmake filesa +cp -a build/googletest/CMakeFiles/Export/lib$LIBDIRSUFFIX/cmake $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 0644 build/googletest/generated/*.cmake $PKG/usr/lib$LIBDIRSUFFIX/cmake/GTest + mkdir -p $PKG/usr/src cp -R googlemock $PKG/usr/src cp -R googletest $PKG/usr/src