[arch-commits] Commit in gtest/repos (16 files)
Levente Polyak
anthraxx at archlinux.org
Wed Sep 28 16:11:25 UTC 2016
Date: Wednesday, September 28, 2016 @ 16:11:24
Author: anthraxx
Revision: 190719
archrelease: copy trunk to community-i686, community-x86_64
Added:
gtest/repos/community-i686/PKGBUILD
(from rev 190718, gtest/trunk/PKGBUILD)
gtest/repos/community-i686/gmock-install.patch
(from rev 190718, gtest/trunk/gmock-install.patch)
gtest/repos/community-i686/gmock.pc.in
(from rev 190718, gtest/trunk/gmock.pc.in)
gtest/repos/community-i686/gtest-pkgconfig.patch
(from rev 190718, gtest/trunk/gtest-pkgconfig.patch)
gtest/repos/community-i686/gtest.pc.in
(from rev 190718, gtest/trunk/gtest.pc.in)
gtest/repos/community-x86_64/PKGBUILD
(from rev 190718, gtest/trunk/PKGBUILD)
gtest/repos/community-x86_64/gmock-install.patch
(from rev 190718, gtest/trunk/gmock-install.patch)
gtest/repos/community-x86_64/gmock.pc.in
(from rev 190718, gtest/trunk/gmock.pc.in)
gtest/repos/community-x86_64/gtest-pkgconfig.patch
(from rev 190718, gtest/trunk/gtest-pkgconfig.patch)
gtest/repos/community-x86_64/gtest.pc.in
(from rev 190718, gtest/trunk/gtest.pc.in)
Deleted:
gtest/repos/community-i686/PKGBUILD
gtest/repos/community-i686/gtest.pc.in
gtest/repos/community-i686/pkgconfig.patch
gtest/repos/community-x86_64/PKGBUILD
gtest/repos/community-x86_64/gtest.pc.in
gtest/repos/community-x86_64/pkgconfig.patch
----------------------------------------+
/PKGBUILD | 206 +++++++++++++++++++++++++++++++
/gtest.pc.in | 20 +++
community-i686/PKGBUILD | 61 ---------
community-i686/gmock-install.patch | 79 +++++++++++
community-i686/gmock.pc.in | 10 +
community-i686/gtest-pkgconfig.patch | 27 ++++
community-i686/gtest.pc.in | 9 -
community-i686/pkgconfig.patch | 27 ----
community-x86_64/PKGBUILD | 61 ---------
community-x86_64/gmock-install.patch | 79 +++++++++++
community-x86_64/gmock.pc.in | 10 +
community-x86_64/gtest-pkgconfig.patch | 27 ++++
community-x86_64/gtest.pc.in | 9 -
community-x86_64/pkgconfig.patch | 27 ----
14 files changed, 458 insertions(+), 194 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-i686/PKGBUILD 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars 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>
-
-pkgname=gtest
-pkgver=1.7.0
-pkgrel=5
-pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit)"
-arch=('i686' 'x86_64')
-url="http://code.google.com/p/googletest/"
-license=('custom:BSD3')
-depends=('gcc-libs' 'sh')
-makedepends=('python2' 'cmake')
-source=(http://googletest.googlecode.com/files/$pkgname-$pkgver.zip
- pkgconfig.patch
- gtest.pc.in)
-sha512sums=('8859369f2dd32cbc2ac01aba029aa3ff20a321f40658b9643aff442d34c33468221866b801b28c66a28af47dbcd362d26941fc98db92b6efb7e41ea5b7be1a07'
- '7e9ad4cd470eaab7ed5fb1cce1d5721d40fc03a62b0c895b8f9657679ffa43f91b99800bb1e02a6c5c2d0a72e94bb8ea008aa6e74fdb1460b1326a84da5e9f91'
- '4760a6e039eaeb6c3b917cfac173e4738a5d4675b89b84ad91b0260b7f4386ce3561529c0b7d1f8c3792beb3c8535470372b196585ec4468739a17fa314637e0')
-
-prepare() {
- cd "$srcdir/$pkgname-$pkgver"
- cp "${srcdir}/gtest.pc.in" .
- sed -r "s|(Version:) .+|\1 ${pkgver}|" -i gtest.pc.in
- patch -p1 < "${srcdir}/pkgconfig.patch"
- mkdir build
-}
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # this is odd but needed only to generate gtest-config.
- ./configure --prefix=/usr
-
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_SHARED_LIBS=ON \
- -DCMAKE_SKIP_RPATH=ON ..
- make
-}
-
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- make -C build DESTDIR="${pkgdir}" install
- install -Dm 755 scripts/gtest-config -t "$pkgdir"/usr/bin
- install -Dm 644 m4/gtest.m4 -t "$pkgdir"/usr/share/aclocal
- install -Dm 644 build/libgtest{,_main}.so -t "$pkgdir"/usr/lib
- install -Dm 644 include/gtest/*.h -t "$pkgdir"/usr/include/gtest
- install -Dm 644 include/gtest/internal/*.h -t "$pkgdir"/usr/include/gtest/internal
- install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
- install -Dm 644 fused-src/gtest/* -t "$pkgdir"/usr/src/gtest/src
- install -Dm 644 cmake/* -t "$pkgdir"/usr/src/gtest/cmake
-
- # undo pkg-config patch so subprojects including this don't try to generate it
- patch -Rp1 < "${srcdir}/pkgconfig.patch"
- install -Dm 644 CMakeLists.txt -t "$pkgdir"/usr/src/gtest
-}
-
-# vim:set ts=2 sw=2 et:
Copied: gtest/repos/community-i686/PKGBUILD (from rev 190718, gtest/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,103 @@
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# 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.0
+pkgrel=1
+pkgdesc='Google Test - C++ testing utility'
+url='https://github.com/google/googletest/'
+arch=('i686' 'x86_64')
+license=('BSD')
+makedepends=('python2' 'cmake' 'gcc-libs' 'sh')
+options=(!makeflags)
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/google/googletest/archive/release-${pkgver}.tar.gz
+ gtest-pkgconfig.patch
+ gtest.pc.in
+ gmock-install.patch
+ gmock.pc.in)
+sha512sums=('1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d'
+ '7e9ad4cd470eaab7ed5fb1cce1d5721d40fc03a62b0c895b8f9657679ffa43f91b99800bb1e02a6c5c2d0a72e94bb8ea008aa6e74fdb1460b1326a84da5e9f91'
+ 'df3d23bc53c3b4ab5bacb4b6fad8823870b2ba6b86017e1e99067fb547533a649f2c8e8a8634e3583b344230e1afc280a047d41330cbc7510cfd0c5e843594c3'
+ '2c2417c178485a590695f7d37b26fad3a1a1993fdc9a0c869c34fec83d51769b8057b4f67000e0585f61919c092175186252704a032e9b06bfc1f0e7c0b900f9'
+ '3e4c2e96139292818d97b52536776b656bea30f119124dab4d5c2cb2f31098a3bfac928b74297f7c77229d3eb5fa3b734931c64d8bef2f867b585e43b390a59c')
+
+prepare() {
+ cd googletest-release-${pkgver}
+ find -name '*.py' -exec sed -i 's|env python|env python2|g' {} \;
+
+ msg2 "Preparing googletest..."
+ (cd googletest
+ autoreconf -fvi
+ cp "${srcdir}/gtest.pc.in" .
+ sed -r "s|(Version:) .+|\1 ${pkgver}|" -i gtest.pc.in
+ patch -p1 < "${srcdir}/gtest-pkgconfig.patch"
+ mkdir build
+ )
+
+ msg2 "Preparing googlemock..."
+ patch -p1 < "${srcdir}/gmock-install.patch"
+ (cd googlemock
+ cp "${srcdir}/gmock.pc.in" .
+ autoreconf -fvi
+ )
+}
+
+build() {
+ cd googletest-release-${pkgver}
+
+ msg2 "Building googletest..."
+ (cd googletest
+ # this is odd but needed only to generate gtest-config.
+ ./configure --prefix=/usr
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=ON ..
+ make
+ )
+
+ msg2 "Building googlemock..."
+ (cd googlemock
+ ./configure --prefix=/usr --with-gtest --enable-external-gtest
+ make
+ )
+}
+
+package_gtest() {
+ pkgdesc='Google Test - C++ testing utility based on the xUnit framework (like JUnit)'
+ depends=('gcc-libs' 'sh')
+
+ cd googletest-release-${pkgver}/googletest
+ make -C build DESTDIR="${pkgdir}" install
+ 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 build/libgtest{,_main}.so -t "${pkgdir}/usr/lib"
+ 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 -d "${pkgdir}/usr/include"
+ cp -r include/gtest -t "${pkgdir}/usr/include"
+
+ # undo pkg-config patch so subprojects including this don't try to generate it
+ patch -Rp1 < "${srcdir}/gtest-pkgconfig.patch"
+ 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')
+
+ cd googletest-release-${pkgver}/googlemock
+ make --trace -w -j1 DESTDIR="${pkgdir}" install
+ 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 include/gmock/internal/custom/* -t "${pkgdir}/usr/include/gmock/internal/custom"
+}
+
+# vim: ts=2 sw=2 et:
Copied: gtest/repos/community-i686/gmock-install.patch (from rev 190718, gtest/trunk/gmock-install.patch)
===================================================================
--- community-i686/gmock-install.patch (rev 0)
+++ community-i686/gmock-install.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,79 @@
+diff -urN gmock-1.7.0.orig/gtest/Makefile.am gmock-1.7.0/gtest/Makefile.am
+--- a/googletest/Makefile.am 2013-09-23 22:34:27.649060735 -0700
++++ b/googletest/Makefile.am 2013-09-23 22:39:16.097069357 -0700
+@@ -299,8 +299,2 @@
+
+-install-exec-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+- false
+
+-install-data-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+- false
+--- a/googlemock/Makefile.am
++++ b/googlemock/Makefile.am
+@@ -7,6 +7,8 @@ EXTRA_DIST = LICENSE
+ # included in the 'subdirs' variable.
+-SUBDIRS = $(subdirs)
+
++
++bin_SCRIPTS = scripts/gmock-config
++
+ # This is generated by the configure script, so clean it for distribution.
+ DISTCLEANFILES = scripts/gmock-config
+
+@@ -16,5 +19,8 @@ if HAVE_PTHREADS
+ lib_libgmock_la_SOURCES = src/gmock-all.cc
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gmock.pc
++
+ pkginclude_HEADERS = \
+ include/gmock/gmock-actions.h \
+ include/gmock/gmock-cardinalities.h \
+@@ -207,10 +213,11 @@ CLEANFILES = core
+ # Mock can lead to undefined behavior due to violation of the
+ # One-Definition Rule.
+
+-install-exec-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+- false
+-
+-install-data-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+- false
++install-exec-hook:
++ install -d "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 1
++ cp -rf scripts/generator "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 2
++ python2 -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 3
++ python2 -O -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 4
++ install -Dm 644 src/*.cc -t "$(DESTDIR)$(prefix)/src/@PACKAGE@" && echo 5
++ install -Dm 644 $(pkgconfig_DATA) -t "$(DESTDIR)$(pkgconfigdir)" && echo 6
++ sed -i s/src[/]//g "$(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc" && echo 7
+--- a/googlemock/Makefile.am 2016-09-28 17:47:02.926781189 +0200
++++ b/googlemock/Makefile.am 2016-09-28 17:47:38.066834777 +0200
+@@ -42,10 +42,7 @@
+ pkginclude_internal_HEADERS = \
+ include/gmock/internal/gmock-generated-internal-utils.h \
+ include/gmock/internal/gmock-internal-utils.h \
+- include/gmock/internal/gmock-port.h \
+- include/gmock/internal/custom/gmock-generated-actions.h \
+- include/gmock/internal/custom/gmock-matchers.h \
+- include/gmock/internal/custom/gmock-port.h
++ include/gmock/internal/gmock-port.h
+
+ lib_libgmock_main_la_SOURCES = src/gmock_main.cc
+ lib_libgmock_main_la_LIBADD = lib/libgmock.la
+diff --git a/configure.ac b/configure.ac
+index d268d5d..9d23176 100644
+--- a/googlemock/configure.ac
++++ b/googlemock/configure.ac
+@@ -10,7 +10,7 @@ AC_PREREQ([2.59])
+ AC_CONFIG_SRCDIR([./LICENSE])
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADERS([build-aux/config.h])
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile gmock.pc])
+ AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
+
+ # Initialize Automake with various options. We require at least v1.9, prevent
Copied: gtest/repos/community-i686/gmock.pc.in (from rev 190718, gtest/trunk/gmock.pc.in)
===================================================================
--- community-i686/gmock.pc.in (rev 0)
+++ community-i686/gmock.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,10 @@
+Name: gmock
+Description: Google C++ mocking framework
+URL: https://github.com/google/googletest
+Version: @VERSION@
+
+prefix=@prefix@
+includedir=@includedir@
+srcdir=@prefix@/src/gmock
+
+Cflags: -I${includedir}/gmock
Copied: gtest/repos/community-i686/gtest-pkgconfig.patch (from rev 190718, gtest/trunk/gtest-pkgconfig.patch)
===================================================================
--- community-i686/gtest-pkgconfig.patch (rev 0)
+++ community-i686/gtest-pkgconfig.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 281c4c2..e4354a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,6 +29,9 @@
+ pre_project_set_up_hermetic_build()
+ endif()
+
++# pkg-config support
++configure_file("gtest.pc.in" "gtest.pc" @ONLY)
++
+ ########################################################################
+ #
+ # Project-wide settings
+@@ -71,6 +71,10 @@
+ cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
+ target_link_libraries(gtest_main gtest)
+
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
++)
++
+ ########################################################################
+ #
+ # Samples on how to link user tests with gtest or gtest_main.
+--
+1.9.1
Deleted: community-i686/gtest.pc.in
===================================================================
--- community-i686/gtest.pc.in 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-i686/gtest.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,9 +0,0 @@
-Name: libgtest
-Description: Google's framework for writing C++ tests on a variety of platforms
-Version: 0.0.0
-
-prefix=@CMAKE_INSTALL_PREFIX@
-includedir=${prefix}/include
-libdir=${prefix}/lib
-Cflags:-I${includedir}/gtest
-Libs: -L${libdir} -lgtest -lgtest_main
Copied: gtest/repos/community-i686/gtest.pc.in (from rev 190718, gtest/trunk/gtest.pc.in)
===================================================================
--- community-i686/gtest.pc.in (rev 0)
+++ community-i686/gtest.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,10 @@
+Name: libgtest
+Description: Google's framework for writing C++ tests on a variety of platforms
+URL: https://github.com/google/googletest
+Version: 0.0.0
+
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+Cflags:-I${includedir}/gtest
+Libs: -L${libdir} -lgtest -lgtest_main
Deleted: community-i686/pkgconfig.patch
===================================================================
--- community-i686/pkgconfig.patch 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-i686/pkgconfig.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,27 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 281c4c2..e4354a8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -29,6 +29,9 @@
- pre_project_set_up_hermetic_build()
- endif()
-
-+# pkg-config support
-+configure_file("gtest.pc.in" "gtest.pc" @ONLY)
-+
- ########################################################################
- #
- # Project-wide settings
-@@ -71,6 +71,10 @@
- cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
- target_link_libraries(gtest_main gtest)
-
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
-+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
-+)
-+
- ########################################################################
- #
- # Samples on how to link user tests with gtest or gtest_main.
---
-1.9.1
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-x86_64/PKGBUILD 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars 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>
-
-pkgname=gtest
-pkgver=1.7.0
-pkgrel=5
-pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit)"
-arch=('i686' 'x86_64')
-url="http://code.google.com/p/googletest/"
-license=('custom:BSD3')
-depends=('gcc-libs' 'sh')
-makedepends=('python2' 'cmake')
-source=(http://googletest.googlecode.com/files/$pkgname-$pkgver.zip
- pkgconfig.patch
- gtest.pc.in)
-sha512sums=('8859369f2dd32cbc2ac01aba029aa3ff20a321f40658b9643aff442d34c33468221866b801b28c66a28af47dbcd362d26941fc98db92b6efb7e41ea5b7be1a07'
- '7e9ad4cd470eaab7ed5fb1cce1d5721d40fc03a62b0c895b8f9657679ffa43f91b99800bb1e02a6c5c2d0a72e94bb8ea008aa6e74fdb1460b1326a84da5e9f91'
- '4760a6e039eaeb6c3b917cfac173e4738a5d4675b89b84ad91b0260b7f4386ce3561529c0b7d1f8c3792beb3c8535470372b196585ec4468739a17fa314637e0')
-
-prepare() {
- cd "$srcdir/$pkgname-$pkgver"
- cp "${srcdir}/gtest.pc.in" .
- sed -r "s|(Version:) .+|\1 ${pkgver}|" -i gtest.pc.in
- patch -p1 < "${srcdir}/pkgconfig.patch"
- mkdir build
-}
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # this is odd but needed only to generate gtest-config.
- ./configure --prefix=/usr
-
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_SHARED_LIBS=ON \
- -DCMAKE_SKIP_RPATH=ON ..
- make
-}
-
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- make -C build DESTDIR="${pkgdir}" install
- install -Dm 755 scripts/gtest-config -t "$pkgdir"/usr/bin
- install -Dm 644 m4/gtest.m4 -t "$pkgdir"/usr/share/aclocal
- install -Dm 644 build/libgtest{,_main}.so -t "$pkgdir"/usr/lib
- install -Dm 644 include/gtest/*.h -t "$pkgdir"/usr/include/gtest
- install -Dm 644 include/gtest/internal/*.h -t "$pkgdir"/usr/include/gtest/internal
- install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
- install -Dm 644 fused-src/gtest/* -t "$pkgdir"/usr/src/gtest/src
- install -Dm 644 cmake/* -t "$pkgdir"/usr/src/gtest/cmake
-
- # undo pkg-config patch so subprojects including this don't try to generate it
- patch -Rp1 < "${srcdir}/pkgconfig.patch"
- install -Dm 644 CMakeLists.txt -t "$pkgdir"/usr/src/gtest
-}
-
-# vim:set ts=2 sw=2 et:
Copied: gtest/repos/community-x86_64/PKGBUILD (from rev 190718, gtest/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,103 @@
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# 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.0
+pkgrel=1
+pkgdesc='Google Test - C++ testing utility'
+url='https://github.com/google/googletest/'
+arch=('i686' 'x86_64')
+license=('BSD')
+makedepends=('python2' 'cmake' 'gcc-libs' 'sh')
+options=(!makeflags)
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/google/googletest/archive/release-${pkgver}.tar.gz
+ gtest-pkgconfig.patch
+ gtest.pc.in
+ gmock-install.patch
+ gmock.pc.in)
+sha512sums=('1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d'
+ '7e9ad4cd470eaab7ed5fb1cce1d5721d40fc03a62b0c895b8f9657679ffa43f91b99800bb1e02a6c5c2d0a72e94bb8ea008aa6e74fdb1460b1326a84da5e9f91'
+ 'df3d23bc53c3b4ab5bacb4b6fad8823870b2ba6b86017e1e99067fb547533a649f2c8e8a8634e3583b344230e1afc280a047d41330cbc7510cfd0c5e843594c3'
+ '2c2417c178485a590695f7d37b26fad3a1a1993fdc9a0c869c34fec83d51769b8057b4f67000e0585f61919c092175186252704a032e9b06bfc1f0e7c0b900f9'
+ '3e4c2e96139292818d97b52536776b656bea30f119124dab4d5c2cb2f31098a3bfac928b74297f7c77229d3eb5fa3b734931c64d8bef2f867b585e43b390a59c')
+
+prepare() {
+ cd googletest-release-${pkgver}
+ find -name '*.py' -exec sed -i 's|env python|env python2|g' {} \;
+
+ msg2 "Preparing googletest..."
+ (cd googletest
+ autoreconf -fvi
+ cp "${srcdir}/gtest.pc.in" .
+ sed -r "s|(Version:) .+|\1 ${pkgver}|" -i gtest.pc.in
+ patch -p1 < "${srcdir}/gtest-pkgconfig.patch"
+ mkdir build
+ )
+
+ msg2 "Preparing googlemock..."
+ patch -p1 < "${srcdir}/gmock-install.patch"
+ (cd googlemock
+ cp "${srcdir}/gmock.pc.in" .
+ autoreconf -fvi
+ )
+}
+
+build() {
+ cd googletest-release-${pkgver}
+
+ msg2 "Building googletest..."
+ (cd googletest
+ # this is odd but needed only to generate gtest-config.
+ ./configure --prefix=/usr
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=ON ..
+ make
+ )
+
+ msg2 "Building googlemock..."
+ (cd googlemock
+ ./configure --prefix=/usr --with-gtest --enable-external-gtest
+ make
+ )
+}
+
+package_gtest() {
+ pkgdesc='Google Test - C++ testing utility based on the xUnit framework (like JUnit)'
+ depends=('gcc-libs' 'sh')
+
+ cd googletest-release-${pkgver}/googletest
+ make -C build DESTDIR="${pkgdir}" install
+ 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 build/libgtest{,_main}.so -t "${pkgdir}/usr/lib"
+ 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 -d "${pkgdir}/usr/include"
+ cp -r include/gtest -t "${pkgdir}/usr/include"
+
+ # undo pkg-config patch so subprojects including this don't try to generate it
+ patch -Rp1 < "${srcdir}/gtest-pkgconfig.patch"
+ 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')
+
+ cd googletest-release-${pkgver}/googlemock
+ make --trace -w -j1 DESTDIR="${pkgdir}" install
+ 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 include/gmock/internal/custom/* -t "${pkgdir}/usr/include/gmock/internal/custom"
+}
+
+# vim: ts=2 sw=2 et:
Copied: gtest/repos/community-x86_64/gmock-install.patch (from rev 190718, gtest/trunk/gmock-install.patch)
===================================================================
--- community-x86_64/gmock-install.patch (rev 0)
+++ community-x86_64/gmock-install.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,79 @@
+diff -urN gmock-1.7.0.orig/gtest/Makefile.am gmock-1.7.0/gtest/Makefile.am
+--- a/googletest/Makefile.am 2013-09-23 22:34:27.649060735 -0700
++++ b/googletest/Makefile.am 2013-09-23 22:39:16.097069357 -0700
+@@ -299,8 +299,2 @@
+
+-install-exec-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+- false
+
+-install-data-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+- false
+--- a/googlemock/Makefile.am
++++ b/googlemock/Makefile.am
+@@ -7,6 +7,8 @@ EXTRA_DIST = LICENSE
+ # included in the 'subdirs' variable.
+-SUBDIRS = $(subdirs)
+
++
++bin_SCRIPTS = scripts/gmock-config
++
+ # This is generated by the configure script, so clean it for distribution.
+ DISTCLEANFILES = scripts/gmock-config
+
+@@ -16,5 +19,8 @@ if HAVE_PTHREADS
+ lib_libgmock_la_SOURCES = src/gmock-all.cc
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gmock.pc
++
+ pkginclude_HEADERS = \
+ include/gmock/gmock-actions.h \
+ include/gmock/gmock-cardinalities.h \
+@@ -207,10 +213,11 @@ CLEANFILES = core
+ # Mock can lead to undefined behavior due to violation of the
+ # One-Definition Rule.
+
+-install-exec-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+- false
+-
+-install-data-local:
+- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+- false
++install-exec-hook:
++ install -d "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 1
++ cp -rf scripts/generator "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 2
++ python2 -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 3
++ python2 -O -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" && echo 4
++ install -Dm 644 src/*.cc -t "$(DESTDIR)$(prefix)/src/@PACKAGE@" && echo 5
++ install -Dm 644 $(pkgconfig_DATA) -t "$(DESTDIR)$(pkgconfigdir)" && echo 6
++ sed -i s/src[/]//g "$(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc" && echo 7
+--- a/googlemock/Makefile.am 2016-09-28 17:47:02.926781189 +0200
++++ b/googlemock/Makefile.am 2016-09-28 17:47:38.066834777 +0200
+@@ -42,10 +42,7 @@
+ pkginclude_internal_HEADERS = \
+ include/gmock/internal/gmock-generated-internal-utils.h \
+ include/gmock/internal/gmock-internal-utils.h \
+- include/gmock/internal/gmock-port.h \
+- include/gmock/internal/custom/gmock-generated-actions.h \
+- include/gmock/internal/custom/gmock-matchers.h \
+- include/gmock/internal/custom/gmock-port.h
++ include/gmock/internal/gmock-port.h
+
+ lib_libgmock_main_la_SOURCES = src/gmock_main.cc
+ lib_libgmock_main_la_LIBADD = lib/libgmock.la
+diff --git a/configure.ac b/configure.ac
+index d268d5d..9d23176 100644
+--- a/googlemock/configure.ac
++++ b/googlemock/configure.ac
+@@ -10,7 +10,7 @@ AC_PREREQ([2.59])
+ AC_CONFIG_SRCDIR([./LICENSE])
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADERS([build-aux/config.h])
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile gmock.pc])
+ AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
+
+ # Initialize Automake with various options. We require at least v1.9, prevent
Copied: gtest/repos/community-x86_64/gmock.pc.in (from rev 190718, gtest/trunk/gmock.pc.in)
===================================================================
--- community-x86_64/gmock.pc.in (rev 0)
+++ community-x86_64/gmock.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,10 @@
+Name: gmock
+Description: Google C++ mocking framework
+URL: https://github.com/google/googletest
+Version: @VERSION@
+
+prefix=@prefix@
+includedir=@includedir@
+srcdir=@prefix@/src/gmock
+
+Cflags: -I${includedir}/gmock
Copied: gtest/repos/community-x86_64/gtest-pkgconfig.patch (from rev 190718, gtest/trunk/gtest-pkgconfig.patch)
===================================================================
--- community-x86_64/gtest-pkgconfig.patch (rev 0)
+++ community-x86_64/gtest-pkgconfig.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 281c4c2..e4354a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,6 +29,9 @@
+ pre_project_set_up_hermetic_build()
+ endif()
+
++# pkg-config support
++configure_file("gtest.pc.in" "gtest.pc" @ONLY)
++
+ ########################################################################
+ #
+ # Project-wide settings
+@@ -71,6 +71,10 @@
+ cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
+ target_link_libraries(gtest_main gtest)
+
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
++)
++
+ ########################################################################
+ #
+ # Samples on how to link user tests with gtest or gtest_main.
+--
+1.9.1
Deleted: community-x86_64/gtest.pc.in
===================================================================
--- community-x86_64/gtest.pc.in 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-x86_64/gtest.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,9 +0,0 @@
-Name: libgtest
-Description: Google's framework for writing C++ tests on a variety of platforms
-Version: 0.0.0
-
-prefix=@CMAKE_INSTALL_PREFIX@
-includedir=${prefix}/include
-libdir=${prefix}/lib
-Cflags:-I${includedir}/gtest
-Libs: -L${libdir} -lgtest -lgtest_main
Copied: gtest/repos/community-x86_64/gtest.pc.in (from rev 190718, gtest/trunk/gtest.pc.in)
===================================================================
--- community-x86_64/gtest.pc.in (rev 0)
+++ community-x86_64/gtest.pc.in 2016-09-28 16:11:24 UTC (rev 190719)
@@ -0,0 +1,10 @@
+Name: libgtest
+Description: Google's framework for writing C++ tests on a variety of platforms
+URL: https://github.com/google/googletest
+Version: 0.0.0
+
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+Cflags:-I${includedir}/gtest
+Libs: -L${libdir} -lgtest -lgtest_main
Deleted: community-x86_64/pkgconfig.patch
===================================================================
--- community-x86_64/pkgconfig.patch 2016-09-28 16:10:56 UTC (rev 190718)
+++ community-x86_64/pkgconfig.patch 2016-09-28 16:11:24 UTC (rev 190719)
@@ -1,27 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 281c4c2..e4354a8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -29,6 +29,9 @@
- pre_project_set_up_hermetic_build()
- endif()
-
-+# pkg-config support
-+configure_file("gtest.pc.in" "gtest.pc" @ONLY)
-+
- ########################################################################
- #
- # Project-wide settings
-@@ -71,6 +71,10 @@
- cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
- target_link_libraries(gtest_main gtest)
-
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
-+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
-+)
-+
- ########################################################################
- #
- # Samples on how to link user tests with gtest or gtest_main.
---
-1.9.1
More information about the arch-commits
mailing list