[arch-commits] Commit in gtest/repos/community-x86_64 (6 files)
Levente Polyak
anthraxx at archlinux.org
Mon Oct 1 16:11:56 UTC 2018
Date: Monday, October 1, 2018 @ 16:11:56
Author: anthraxx
Revision: 388898
archrelease: copy trunk to community-x86_64
Added:
gtest/repos/community-x86_64/PKGBUILD
(from rev 388897, gtest/trunk/PKGBUILD)
gtest/repos/community-x86_64/gtest-1.8.1-libversion.patch
(from rev 388897, gtest/trunk/gtest-1.8.1-libversion.patch)
gtest/repos/community-x86_64/gtest-1.8.1-null-pointer.patch
(from rev 388897, gtest/trunk/gtest-1.8.1-null-pointer.patch)
Deleted:
gtest/repos/community-x86_64/PKGBUILD
gtest/repos/community-x86_64/gtest-1.8.1-libversion.patch
gtest/repos/community-x86_64/gtest-1.8.1-null-pointer.patch
--------------------------------+
PKGBUILD | 221 +++++++++++++++++++--------------------
gtest-1.8.1-libversion.patch | 58 +++++-----
gtest-1.8.1-null-pointer.patch | 34 +++---
3 files changed, 157 insertions(+), 156 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-10-01 16:11:49 UTC (rev 388897)
+++ PKGBUILD 2018-10-01 16:11:56 UTC (rev 388898)
@@ -1,110 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-# Contributor: Alexandre Bique <bique.alexandre at gmail.com>
-# Contributor: Louis R. Marascio <lrm at fitnr.com>
-# Contributor: Cody Maloney <cmaloney at theoreticalchaos.com>
-
-pkgbase=gtest
-pkgname=('gtest' 'gmock')
-pkgver=1.8.1
-pkgrel=2
-pkgdesc='Google Test - C++ testing utility'
-url='https://github.com/google/googletest'
-arch=('x86_64')
-license=('BSD')
-makedepends=('python2' 'cmake' 'gcc-libs' 'sh' 'ninja')
-_srcname=googletest-release-${pkgver}
-source=(${_srcname}.tar.gz::https://github.com/google/googletest/archive/release-${pkgver}.tar.gz
- gtest-1.8.1-libversion.patch
- gtest-1.8.1-null-pointer.patch)
-sha512sums=('e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7'
- 'fd53e4a703c39cf4f1bc2eec2fac6c567e583d5e5a2ab4b52700ead77caf4f4903c4d32b8b25b983c5f650fc2b1e835fdf124b04a971705f42a707a42b34a99e'
- 'afa75f975d8aed453c901245dae753939958d8b72e3e5c52995efe7980f44de4fd1ea08f1b0a4cc927443d858de0a1fe34a919512ce05ae443bfb9600b08f029')
-
-prepare() {
- cd ${_srcname}
-
- # https://src.fedoraproject.org/rpms/gtest/tree/master
- patch -Np1 -i ../gtest-1.8.1-libversion.patch
- patch -Np1 -i ../gtest-1.8.1-null-pointer.patch
-
- find . -name '*.py' -exec sed -i '1s|python$|&2|g' {} +
-
- # fixup version as they are never correct
- sed -E "s|(GOOGLETEST_VERSION) [0-9\\.]+|\\1 ${pkgver}|" -i CMakeLists.txt
- sed -E "s|^( +)\\[[0-9\\.]+\\],$|\\1[${pkgver}],|" -i {googletest,googlemock,.}/configure.ac
- sed -E "s|(GTEST_MIN_VERSION)=\"1.8.0\"|\\1=\"${pkgver}\"|" -i googlemock/configure.ac
-}
-
-build() {
- mkdir build build-ac
- cd build
-
- cmake -G Ninja ../${_srcname} \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DBUILD_SHARED_LIBS=ON \
- -DPython_ADDITIONAL_VERSIONS=2.7 \
- -Dgtest_build_tests=ON
- cmake --build .
-
- # Only for g{test,mock}-config
- cd ../${_srcname}/googletest
- autoreconf -fvi
- ./configure --prefix=/usr
- cd ../googlemock
- autoreconf -fvi
- ./configure --prefix=/usr
-}
-
-check() {
- cmake --build build --target test
-}
-
-package_gtest() {
- pkgdesc='Google Test - C++ testing utility based on the xUnit framework (like JUnit)'
- depends=('gcc-libs' 'sh')
-
- DESTDIR="${pkgdir}" cmake --build build --target install
-
- # Shouldn't be present
- find "${pkgdir}" -name '*.pump' -printf 'Removing %P\n' -delete
-
- # Split gmock
- mkdir -p gmock/{include,lib/pkgconfig}
- mv "${pkgdir}"/usr/include/gmock gmock/include/
- mv "${pkgdir}"/usr/lib/libgmock* gmock/lib/
- mv "${pkgdir}"/usr/lib/pkgconfig/gmock* gmock/lib/pkgconfig/
-
- cd ${_srcname}/googletest
- install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
- install -Dm 644 README.md CHANGES CONTRIBUTORS -t "${pkgdir}/usr/share/doc/${pkgname}"
- install -Dm 755 scripts/gtest-config -t "${pkgdir}/usr/bin"
- install -Dm 644 m4/gtest.m4 -t "${pkgdir}/usr/share/aclocal"
- install -Dm 644 cmake/* -t "${pkgdir}/usr/src/gtest/cmake"
- install -Dm 644 src/* -t "${pkgdir}/usr/src/gtest/src"
- install -Dm 644 CMakeLists.txt -t "${pkgdir}/usr/src/gtest"
-}
-
-package_gmock() {
- pkgdesc='Google Mock - A library for writing and using C++ mock classes'
- depends=('python2' 'gtest' 'gcc-libs' 'sh')
-
- mv gmock "${pkgdir}/usr"
-
- cd ${_srcname}/googlemock
- install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
- install -Dm 644 README.md CHANGES CONTRIBUTORS -t "${pkgdir}/usr/share/doc/${pkgname}"
- install -Dm 755 scripts/gmock-config -t "${pkgdir}/usr/bin"
- install -Dm 644 src/* -t "${pkgdir}/usr/src/gmock"
- install -Dm 644 scripts/generator/{*.py,LICENSE,README*} -t "${pkgdir}/usr/share/gmock/generator"
- install -Dm 644 scripts/generator/cpp/* -t "${pkgdir}/usr/share/gmock/generator/cpp"
-
- sed -i 's|src/||' "${pkgdir}/usr/src/gmock/gmock-all.cc"
-
- python2 -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
- python2 -O -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
-}
-
-# vim: ts=2 sw=2 et:
Copied: gtest/repos/community-x86_64/PKGBUILD (from rev 388897, gtest/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-10-01 16:11:56 UTC (rev 388898)
@@ -0,0 +1,111 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Contributor: Alexandre Bique <bique.alexandre at gmail.com>
+# Contributor: Louis R. Marascio <lrm at fitnr.com>
+# Contributor: Cody Maloney <cmaloney at theoreticalchaos.com>
+
+pkgbase=gtest
+pkgname=('gtest' 'gmock')
+pkgver=1.8.1
+pkgrel=3
+pkgdesc='Google Test - C++ testing utility'
+url='https://github.com/google/googletest'
+arch=('x86_64')
+license=('BSD')
+makedepends=('python2' 'cmake' 'gcc-libs' 'sh' 'ninja')
+_srcname=googletest-release-${pkgver}
+source=(${_srcname}.tar.gz::https://github.com/google/googletest/archive/release-${pkgver}.tar.gz
+ gtest-1.8.1-libversion.patch
+ gtest-1.8.1-null-pointer.patch)
+sha512sums=('e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7'
+ 'e9bd9d65f6e54f71be0026b84c6543a71f9e3d5c0da92eb7f01df3f5937871eff2b8177e3680fec8d733888327eda5f5f3caaf88a3263ada542cdd2b42475ac5'
+ 'afa75f975d8aed453c901245dae753939958d8b72e3e5c52995efe7980f44de4fd1ea08f1b0a4cc927443d858de0a1fe34a919512ce05ae443bfb9600b08f029')
+
+prepare() {
+ cd ${_srcname}
+ cp ../gtest-1.8.1-libversion.patch gtest-1.8.1-libversion.patch
+ sed "s|__GOOGLETEST_VERSION__|${pkgver}|g" -i gtest-1.8.1-libversion.patch
+ # https://src.fedoraproject.org/rpms/gtest/tree/master
+ patch -Np1 -i gtest-1.8.1-libversion.patch
+ patch -Np1 -i ../gtest-1.8.1-null-pointer.patch
+
+ find . -name '*.py' -exec sed -i '1s|python$|&2|g' {} +
+
+ # fixup version as they are never correct
+ sed -E "s|(GOOGLETEST_VERSION) [0-9\\.]+|\\1 ${pkgver}|" -i CMakeLists.txt
+ sed -E "s|^( +)\\[[0-9\\.]+\\],$|\\1[${pkgver}],|" -i {googletest,googlemock,.}/configure.ac
+ sed -E "s|(GTEST_MIN_VERSION)=\"1.8.0\"|\\1=\"${pkgver}\"|" -i googlemock/configure.ac
+}
+
+build() {
+ mkdir build build-ac
+ cd build
+
+ cmake -G Ninja ../${_srcname} \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=ON \
+ -DPython_ADDITIONAL_VERSIONS=2.7 \
+ -Dgtest_build_tests=ON
+ cmake --build .
+
+ # Only for g{test,mock}-config
+ cd ../${_srcname}/googletest
+ autoreconf -fvi
+ ./configure --prefix=/usr
+ cd ../googlemock
+ autoreconf -fvi
+ ./configure --prefix=/usr
+}
+
+check() {
+ cmake --build build --target test
+}
+
+package_gtest() {
+ pkgdesc='Google Test - C++ testing utility based on the xUnit framework (like JUnit)'
+ depends=('gcc-libs' 'sh')
+
+ DESTDIR="${pkgdir}" cmake --build build --target install
+
+ # Shouldn't be present
+ find "${pkgdir}" -name '*.pump' -printf 'Removing %P\n' -delete
+
+ # Split gmock
+ mkdir -p gmock/{include,lib/pkgconfig}
+ mv "${pkgdir}"/usr/include/gmock gmock/include/
+ mv "${pkgdir}"/usr/lib/libgmock* gmock/lib/
+ mv "${pkgdir}"/usr/lib/pkgconfig/gmock* gmock/lib/pkgconfig/
+
+ cd ${_srcname}/googletest
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md CHANGES CONTRIBUTORS -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 755 scripts/gtest-config -t "${pkgdir}/usr/bin"
+ install -Dm 644 m4/gtest.m4 -t "${pkgdir}/usr/share/aclocal"
+ install -Dm 644 cmake/* -t "${pkgdir}/usr/src/gtest/cmake"
+ install -Dm 644 src/* -t "${pkgdir}/usr/src/gtest/src"
+ install -Dm 644 CMakeLists.txt -t "${pkgdir}/usr/src/gtest"
+}
+
+package_gmock() {
+ pkgdesc='Google Mock - A library for writing and using C++ mock classes'
+ depends=('python2' 'gtest' 'gcc-libs' 'sh')
+
+ mv gmock "${pkgdir}/usr"
+
+ cd ${_srcname}/googlemock
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md CHANGES CONTRIBUTORS -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 755 scripts/gmock-config -t "${pkgdir}/usr/bin"
+ install -Dm 644 src/* -t "${pkgdir}/usr/src/gmock"
+ install -Dm 644 scripts/generator/{*.py,LICENSE,README*} -t "${pkgdir}/usr/share/gmock/generator"
+ install -Dm 644 scripts/generator/cpp/* -t "${pkgdir}/usr/share/gmock/generator/cpp"
+
+ sed -i 's|src/||' "${pkgdir}/usr/src/gmock/gmock-all.cc"
+
+ python2 -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
+ python2 -O -m compileall -d /usr/share/gmock "${pkgdir}/usr/share/gmock"
+}
+
+# vim: ts=2 sw=2 et:
Deleted: gtest-1.8.1-libversion.patch
===================================================================
--- gtest-1.8.1-libversion.patch 2018-10-01 16:11:49 UTC (rev 388897)
+++ gtest-1.8.1-libversion.patch 2018-10-01 16:11:56 UTC (rev 388898)
@@ -1,29 +0,0 @@
-diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
-index 8a8de1f..3d86a59 100644
---- a/googlemock/CMakeLists.txt
-+++ b/googlemock/CMakeLists.txt
-@@ -109,8 +109,10 @@ if (MSVC)
- else()
- cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
- target_link_libraries(gmock PUBLIC gtest)
-+ set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION})
- cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
- target_link_libraries(gmock_main PUBLIC gmock)
-+ set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
- endif()
- # If the CMake version supports it, attach header directory information
- # to the targets for when we are part of a parent build (ie being pulled
-diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
-index 9ee7940..8099130 100644
---- a/googletest/CMakeLists.txt
-+++ b/googletest/CMakeLists.txt
-@@ -131,7 +131,9 @@ endif()
- # are used for other targets, to ensure that gtest can be compiled by a user
- # aggressive about warnings.
- cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
-+set_target_properties(gtest PROPERTIES VERSION ${GOOGLETEST_VERSION})
- cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
-+set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
- # If the CMake version supports it, attach header directory information
- # to the targets for when we are part of a parent build (ie being pulled
- # in via add_subdirectory() rather than being a standalone build).
Copied: gtest/repos/community-x86_64/gtest-1.8.1-libversion.patch (from rev 388897, gtest/trunk/gtest-1.8.1-libversion.patch)
===================================================================
--- gtest-1.8.1-libversion.patch (rev 0)
+++ gtest-1.8.1-libversion.patch 2018-10-01 16:11:56 UTC (rev 388898)
@@ -0,0 +1,29 @@
+diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
+index 8a8de1f..3d86a59 100644
+--- a/googlemock/CMakeLists.txt
++++ b/googlemock/CMakeLists.txt
+@@ -109,8 +109,10 @@ if (MSVC)
+ else()
+ cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
+ target_link_libraries(gmock PUBLIC gtest)
++ set_target_properties(gmock PROPERTIES VERSION __GOOGLETEST_VERSION__)
+ cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
+ target_link_libraries(gmock_main PUBLIC gmock)
++ set_target_properties(gmock_main PROPERTIES VERSION __GOOGLETEST_VERSION__)
+ endif()
+ # If the CMake version supports it, attach header directory information
+ # to the targets for when we are part of a parent build (ie being pulled
+diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
+index 9ee7940..8099130 100644
+--- a/googletest/CMakeLists.txt
++++ b/googletest/CMakeLists.txt
+@@ -131,7 +131,9 @@ endif()
+ # are used for other targets, to ensure that gtest can be compiled by a user
+ # aggressive about warnings.
+ cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
++set_target_properties(gtest PROPERTIES VERSION __GOOGLETEST_VERSION__)
+ cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
++set_target_properties(gtest_main PROPERTIES VERSION __GOOGLETEST_VERSION__)
+ # If the CMake version supports it, attach header directory information
+ # to the targets for when we are part of a parent build (ie being pulled
+ # in via add_subdirectory() rather than being a standalone build).
Deleted: gtest-1.8.1-null-pointer.patch
===================================================================
--- gtest-1.8.1-null-pointer.patch 2018-10-01 16:11:49 UTC (rev 388897)
+++ gtest-1.8.1-null-pointer.patch 2018-10-01 16:11:56 UTC (rev 388898)
@@ -1,17 +0,0 @@
-diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
-index 96b07c6..4af3e5a 100644
---- a/googletest/src/gtest.cc
-+++ b/googletest/src/gtest.cc
-@@ -2693,10 +2693,12 @@ void TestInfo::Run() {
- test->Run();
- }
-
-+ if (test != NULL) {
- // Deletes the test object.
- impl->os_stack_trace_getter()->UponLeavingGTest();
- internal::HandleExceptionsInMethodIfSupported(
- test, &Test::DeleteSelf_, "the test fixture's destructor");
-+ }
-
- result_.set_elapsed_time(internal::GetTimeInMillis() - start);
-
Copied: gtest/repos/community-x86_64/gtest-1.8.1-null-pointer.patch (from rev 388897, gtest/trunk/gtest-1.8.1-null-pointer.patch)
===================================================================
--- gtest-1.8.1-null-pointer.patch (rev 0)
+++ gtest-1.8.1-null-pointer.patch 2018-10-01 16:11:56 UTC (rev 388898)
@@ -0,0 +1,17 @@
+diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
+index 96b07c6..4af3e5a 100644
+--- a/googletest/src/gtest.cc
++++ b/googletest/src/gtest.cc
+@@ -2693,10 +2693,12 @@ void TestInfo::Run() {
+ test->Run();
+ }
+
++ if (test != NULL) {
+ // Deletes the test object.
+ impl->os_stack_trace_getter()->UponLeavingGTest();
+ internal::HandleExceptionsInMethodIfSupported(
+ test, &Test::DeleteSelf_, "the test fixture's destructor");
++ }
+
+ result_.set_elapsed_time(internal::GetTimeInMillis() - start);
+
More information about the arch-commits
mailing list