Date: Saturday, January 21, 2023 @ 23:08:02
Author: arojas
Revision: 1387629
archrelease: copy trunk to community-staging-x86_64
Added:
gtest/repos/community-staging-x86_64/
gtest/repos/community-staging-x86_64/PKGBUILD
(from rev 1387628, gtest/trunk/PKGBUILD)
gtest/repos/community-staging-x86_64/gtest-version.patch
(from rev 1387628, gtest/trunk/gtest-version.patch)
---------------------+
PKGBUILD | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
gtest-version.patch | 22 +++++++++++++++
2 files changed, 94 insertions(+)
Copied: gtest/repos/community-staging-x86_64/PKGBUILD (from rev 1387628,
gtest/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-01-21 23:08:02 UTC (rev 1387629)
@@ -0,0 +1,72 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Jan Alexander Steffens (heftig) <[email protected]>
+# Contributor: Alexandre Bique <[email protected]>
+# Contributor: Louis R. Marascio <[email protected]>
+# Contributor: Cody Maloney <[email protected]>
+# Contributor: acxz <akashpatel2008 at yahoo dot com>
+
+pkgname=gtest
+pkgver=1.13.0
+pkgrel=1
+pkgdesc='Google Test - C++ testing utility'
+url='https://github.com/google/googletest'
+arch=('x86_64')
+license=('BSD')
+depends=('gcc-libs' 'sh')
+makedepends=('python' 'cmake' 'gcc-libs' 'sh')
+optdepends=('python: gmock generator')
+conflicts=('gmock')
+replaces=('gmock')
+provides=('gmock')
+_srcname=googletest-${pkgver}
+source=(${_srcname}.tar.gz::https://github.com/google/googletest/archive/v${pkgver}.tar.gz
+ gtest-version.patch)
+sha512sums=('70c0cfb1b4147bdecb467ecb22ae5b5529eec0abc085763213a796b7cdbd81d1761d12b342060539b936fa54f345d33f060601544874d6213fdde79111fa813e'
+
'ebfd53ac33298e870c04a1f89609d8327152d3d73e7842219af3a11d5ee484033543064b557cc9c8f45057e608e0ee347318070a3ea5d17040bace02110ed8df')
+
+prepare() {
+ cd ${_srcname}
+ sed "s|__GOOGLETEST_VERSION__|${pkgver}|g" -i ../gtest-version.patch
+ patch -Np1 -i ../gtest-version.patch
+}
+
+build() {
+ cmake -H${_srcname} -Bbuild \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -Dgtest_build_tests=ON
+ cmake --build build
+}
+
+check() {
+ cmake --build build --target test
+}
+
+package() {
+ DESTDIR="${pkgdir}" cmake --build build --target install
+
+ # Shouldn't be present
+ find "${pkgdir}" -name '*.pump' -printf 'Removing %P\n' -delete
+
+ cd ${_srcname}
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md CONTRIBUTORS -t
"${pkgdir}/usr/share/doc/${pkgname}"
+
+ cd googletest
+ install -Dm 644 cmake/* -t "${pkgdir}/usr/src/googletest/cmake"
+ install -Dm 644 src/* -t "${pkgdir}/usr/src/googletest/src"
+ install -Dm 644 CMakeLists.txt -t "${pkgdir}/usr/src/googletest"
+
+ cd ../googlemock
+ install -Dm 644 cmake/* -t "${pkgdir}/usr/src/gmock/cmake"
+ install -Dm 644 src/* -t "${pkgdir}/usr/src/gmock/src"
+ install -Dm 644 CMakeLists.txt -t "${pkgdir}/usr/src/gmock"
+
+ sed -i 's|src/||' "${pkgdir}/usr/src/gmock/src/gmock-all.cc"
+
+ python -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
+ python -O -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
+}
+
+# vim: ts=2 sw=2 et:
Copied: gtest/repos/community-staging-x86_64/gtest-version.patch (from rev
1387628, gtest/trunk/gtest-version.patch)
===================================================================
--- community-staging-x86_64/gtest-version.patch
(rev 0)
+++ community-staging-x86_64/gtest-version.patch 2023-01-21 23:08:02 UTC
(rev 1387629)
@@ -0,0 +1,22 @@
+diff --unified --recursive --text
googletest-release-1.11.0.orig/googlemock/CMakeLists.txt
googletest-release-1.11.0/googlemock/CMakeLists.txt
+--- googletest-release-1.11.0.orig/googlemock/CMakeLists.txt 2020-11-13
14:33:36.022632459 -0500
++++ googletest-release-1.11.0/googlemock/CMakeLists.txt 2020-11-13
14:35:01.806861990 -0500
+@@ -40,6 +40,7 @@
+ # Language "C" is required for find_package(Threads).
+ cmake_minimum_required(VERSION 3.5)
+ cmake_policy(SET CMP0048 NEW)
++ set(GOOGLETEST_VERSION __GOOGLETEST_VERSION__)
+ project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
+
+ if (COMMAND set_up_hermetic_build)
+diff --unified --recursive --text
googletest-release-1.11.0.orig/googletest/CMakeLists.txt
googletest-release-1.11.0/googletest/CMakeLists.txt
+--- googletest-release-1.11.0.orig/googletest/CMakeLists.txt 2020-11-13
14:33:36.039299268 -0500
++++ googletest-release-1.11.0/googletest/CMakeLists.txt 2020-11-13
14:37:10.274915300 -0500
+@@ -46,6 +46,7 @@
+
+ cmake_minimum_required(VERSION 3.5)
+ cmake_policy(SET CMP0048 NEW)
++set(GOOGLETEST_VERSION __GOOGLETEST_VERSION__)
+ project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
+
+ if (POLICY CMP0063) # Visibility