Date: Saturday, August 6, 2016 @ 10:50:57 Author: anthraxx Revision: 185595
addpkg: gmock 1.7.0-3 Added: gmock/ gmock/repos/ gmock/trunk/ gmock/trunk/PKGBUILD gmock/trunk/install.patch ---------------+ PKGBUILD | 49 ++++++++++++++++++++++++++++++++ install.patch | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) Added: gmock/trunk/PKGBUILD =================================================================== --- gmock/trunk/PKGBUILD (rev 0) +++ gmock/trunk/PKGBUILD 2016-08-06 10:50:57 UTC (rev 185595) @@ -0,0 +1,49 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor: Harry Jeffery <harry|@|exec64|.|co|.|uk> +# Contributor: Jacob Emmert-Aronson <jacob at mlaronson dot com> +# Contributor: Xiao-Long Chen <chenxiaolong at cxl dot epac dot to> +# Contributor: Paul Viren <paul dot viren at ircameras dot com> +# Contributor: Dominic Meiser <dosm dot mail at gmail dot com> + +pkgname=gmock +_gitname=googlemock +pkgver=1.7.0 +pkgrel=3 +pkgdesc='Google Mock - A library for writing and using C++ mock classes' +url='https://github.com/google/googlemock' +arch=('i686' 'x86_64') +license=('BSD') +depends=('python2' 'gtest' 'gcc-libs' 'sh') +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/google/googlemock/archive/release-${pkgver}.tar.gz + gtest-${pkgver}.tar.gz::https://github.com/google/googletest/archive/release-${pkgver}.tar.gz + install.patch) +sha512sums=('adf33728dde55d95e1c65c38a10b0578dd63a44e6beeb550dc976dc134f83a3af8096094ae2258f16cd5bebe2326f344db8981f11088bac3ffe04b384d9d2f2d' + 'c623d5720c4ed574e95158529872815ecff478c03bdcee8b79c9b042a603533f93fe55f939bcfe2cd745ce340fd626ad6d9a95981596f1a4d05053d874cd1dfc' + 'b33cc8626dbbe4f634d015f3c988c79c7ef95c36ec741d390ce52d3a2ed2ec40c1279f2da1df29a90e99918a26743f6ec997c8a3a56fe4b092482278255c8945') + +prepare() { + cd ${_gitname}-release-${pkgver} + mv "${srcdir}/googletest-release-${pkgver}" gtest + + patch -p1 < "${srcdir}/install.patch" + find -name '*.py' -exec sed -i 's|env python|env python2|g' {} \; + + rm -r gtest/{Makefile,configure}* + autoreconf -fiv +} + +build() { + cd ${_gitname}-release-${pkgver} + ./configure --prefix=/usr --with-gtest --enable-external-gtest + make +} + +package() { + cd ${_gitname}-release-${pkgver} + make DESTDIR="${pkgdir}" install + install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm 644 README CHANGES CONTRIBUTORS -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 755 scripts/gmock-config -t "${pkgdir}/usr/bin" +} + +# vim: ts=2 sw=2 et: Added: gmock/trunk/install.patch =================================================================== --- gmock/trunk/install.patch (rev 0) +++ gmock/trunk/install.patch 2016-08-06 10:50:57 UTC (rev 185595) @@ -0,0 +1,85 @@ +diff -urN gmock-1.7.0.orig/gtest/Makefile.am gmock-1.7.0/gtest/Makefile.am +--- a/gtest/Makefile.am 2013-09-23 22:34:27.649060735 -0700 ++++ b/gtest/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/Makefile.am ++++ b/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@" ++ cp -rf scripts/generator "$(DESTDIR)$(datadir)/@PACKAGE@" ++ python2 -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" ++ python2 -O -m compileall "$(DESTDIR)$(datadir)/@PACKAGE@" ++ install -Dm 644 src/*.cc -t "$(DESTDIR)$(prefix)/src/@PACKAGE@" ++ install -Dm 644 $(pkgconfig_DATA) -t "$(DESTDIR)$(pkgconfigdir)" ++ sed -i s/src[/]//g "$(DESTDIR)$(prefix)/src/@PACKAGE@/gmock-all.cc" +diff --git a/configure.ac b/configure.ac +index d268d5d..9d23176 100644 +--- a/configure.ac ++++ b/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 +diff --git a/gmock.pc.in b/gmock.pc.in +new file mode 100644 +index 0000000..da4b6c4 +--- /dev/null ++++ b/gmock.pc.in +@@ -0,0 +1,14 @@ ++############################# ++# Pkg-Config file for gmock # ++############################# ++ ++Name: gmock ++Description: Google C++ mocking framework ++URL: https://github.com/google/googlemock ++Version: @VERSION@ ++ ++prefix=@prefix@ ++includedir=@includedir@ ++srcdir=@prefix@/src/gmock ++ ++Cflags: -I${includedir}/gmock
