From 6f91c36feda215c6df5e999ef26c08f757f2088b Mon Sep 17 00:00:00 2001 From: eroen Date: Sat, 8 Jun 2013 05:11:56 +0200 Subject: gtest-1.6.0-r2 from gentoo --- dev-cpp/gtest/Manifest | 4 + .../files/configure-fix-pthread-linking.patch | 93 ++++++++++++++++++++++ dev-cpp/gtest/gtest-1.6.0-r2.ebuild | 66 +++++++++++++++ dev-cpp/gtest/metadata.xml | 12 +++ 4 files changed, 175 insertions(+) create mode 100644 dev-cpp/gtest/Manifest create mode 100644 dev-cpp/gtest/files/configure-fix-pthread-linking.patch create mode 100644 dev-cpp/gtest/gtest-1.6.0-r2.ebuild create mode 100644 dev-cpp/gtest/metadata.xml (limited to 'dev-cpp') diff --git a/dev-cpp/gtest/Manifest b/dev-cpp/gtest/Manifest new file mode 100644 index 00000000..fee21af2 --- /dev/null +++ b/dev-cpp/gtest/Manifest @@ -0,0 +1,4 @@ +AUX configure-fix-pthread-linking.patch 3142 SHA256 501f42dd4f4f4412fcb18fc4eb5f1100f5c5a6b19610f6548bccc84989c6f83e SHA512 4347570606853c75e43d3d1abe449cd562538e531136658e6742f8e2dddcc1767932b427a063f711b868467ca85ff947f24c4ed3e328319bd0a739bb66093016 WHIRLPOOL 5ab7be10a9bd675398884f2a4ad8c30fef17412ff3fbaae5d14cf290ebf723ccc005d2ea1dd7ad68c8bd8db57d06cc0fadd79d7f9f2ab46ea5ed0a87df8201fb +DIST gtest-1.6.0.zip 1121697 SHA256 5ec97df8e75b4ee796604e74716d1b50582beba22c5502edd055a7e67a3965d8 SHA512 f4718dfbfa3339bb9449c3f14e5b44ae405ea7df64c10a0957a6300985b71c4642981d069a1382e27ae041a4e2873527a9e442aff978447e795a190f99fac115 WHIRLPOOL 745a49020d4353ed2fa38adfc80bbd777358c831719bbe3b7c90d243f84256615222ba5f04d48d98b9e1a803bb40766799b3aedd575024c19d853d9239a12f8a +EBUILD gtest-1.6.0-r2.ebuild 1484 SHA256 c87b022ee9816a1db01d912665fd9e9d7d6a3a604c85bd12c0169211adfc58e6 SHA512 f54d7c3a52874c7e93d60285023ff937b06f1732284d498eb2b3ad340a2d1c01d31dd490d8af98f809f67d0eb013458d0867900c759974eac3ac1a4d53179bef WHIRLPOOL 44659378b0fa21ac79e634bec082f05adc801916229e0c9278295a1432f474ff99ef093fa374b218c48d7f1122d9c7a22edf803f1102295554988ef57be7205c +MISC metadata.xml 374 SHA256 776842821130b79f552271fe642b3e455006874c6eae5d1b9323e46a1670310a SHA512 a1248ebd1cc76617b425db3d91d8e96894561acb2fcca70c8524f50fa2f933e024d0d4a4d61797a90b42c00a6cfdce8a68057e94a82ce63dfd156037359a60cf WHIRLPOOL 99afc26196452541537ad72d29362547d3154c5f3772d5fd6fb9484ba499ed4b3567873b8eac3c5f2fa7f812b0466f2f3e5c5f25b168e9a069eb4ad2845fa99a diff --git a/dev-cpp/gtest/files/configure-fix-pthread-linking.patch b/dev-cpp/gtest/files/configure-fix-pthread-linking.patch new file mode 100644 index 00000000..75e5219b --- /dev/null +++ b/dev-cpp/gtest/files/configure-fix-pthread-linking.patch @@ -0,0 +1,93 @@ +From fb71154012e634a5e780e93af5434bcdafaf2b24 Mon Sep 17 00:00:00 2001 +From: Justin Bronder +Date: Mon, 15 Oct 2012 17:25:07 -0400 +Subject: [PATCH] configure: fix pthread linking + +- Update the pthread check to make sure that we don't need -lpthread when +compiling with -nostdlib. + +- Make sure that the necessary pthread library is passed to libtool. + +Fixes: + +$ ldd -r /usr/lib/libgtest.so + linux-vdso.so.1 (0x00007fffe7dff000) + libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libstdc++.so.6 (0x00007fbe09a9f000) + libc.so.6 => /lib64/libc.so.6 (0x00007fbe096f7000) + libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 (0x00007fbe094e1000) + libm.so.6 => /lib64/libm.so.6 (0x00007fbe091ee000) + /lib64/ld-linux-x86-64.so.2 (0x00007fbe0a005000) +undefined symbol: pthread_key_create (/usr/lib/libgtest.so) +undefined symbol: pthread_getspecific (/usr/lib/libgtest.so) +undefined symbol: pthread_key_delete (/usr/lib/libgtest.so) +undefined symbol: pthread_setspecific (/usr/lib/libgtest.so) +--- + Makefile.am | 1 + + m4/acx_pthread.m4 | 39 ++++++++++++++++++++++++++++++++++++++- + 2 files changed, 39 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index cb350b7..db2606e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -181,6 +181,7 @@ endif + lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la + + lib_libgtest_la_SOURCES = src/gtest-all.cc ++lib_libgtest_la_LIBADD = $(AM_LIBS) + + pkginclude_HEADERS = \ + include/gtest/gtest-death-test.h \ +diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4 +index 2cf20de..7fba4d9 100644 +--- a/m4/acx_pthread.m4 ++++ b/m4/acx_pthread.m4 +@@ -339,7 +339,44 @@ if test "x$acx_pthread_ok" = xyes; then + # so it's not safe to assume that we may use pthreads + acx_pthread_ok=no + fi +- ++ ++ AC_MSG_CHECKING([whether what we have so far is sufficient with -nostdlib]) ++ CFLAGS="-nostdlib $CFLAGS" ++ # we need c with nostdlib ++ LIBS="$LIBS -lc" ++ AC_TRY_LINK([#include ], ++ [pthread_t th; pthread_join(th, 0); ++ pthread_attr_init(0); pthread_cleanup_push(0, 0); ++ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], ++ [done=yes],[done=no]) ++ ++ if test "x$done" = xyes; then ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_RESULT([no]) ++ fi ++ ++ if test x"$done" = xno; then ++ AC_MSG_CHECKING([whether -lpthread saves the day]) ++ LIBS="-lpthread $LIBS" ++ AC_TRY_LINK([#include ], ++ [pthread_t th; pthread_join(th, 0); ++ pthread_attr_init(0); pthread_cleanup_push(0, 0); ++ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], ++ [done=yes],[done=no]) ++ ++ if test "x$done" = xyes; then ++ AC_MSG_RESULT([yes]) ++ PTHREAD_LIBS="$PTHREAD_LIBS -lpthread" ++ else ++ AC_MSG_RESULT([no]) ++ AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries and -nostdlib]) ++ fi ++ fi ++ ++ CFLAGS="$save_CFLAGS" ++ LIBS="$save_LIBS" ++ CC="$save_CC" + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" + CC="$save_CC" +-- +1.7.8.6 + diff --git a/dev-cpp/gtest/gtest-1.6.0-r2.ebuild b/dev-cpp/gtest/gtest-1.6.0-r2.ebuild new file mode 100644 index 00000000..bf91bbb5 --- /dev/null +++ b/dev-cpp/gtest/gtest-1.6.0-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/gtest/gtest-1.6.0-r2.ebuild,v 1.1 2013/04/06 07:45:16 tomka Exp $ + +EAPI="5" +PYTHON_DEPEND="2" + +inherit eutils python autotools-multilib + +DESCRIPTION="Google C++ Testing Framework" +HOMEPAGE="http://code.google.com/p/googletest/" +SRC_URI="http://googletest.googlecode.com/files/${P}.zip" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos" +IUSE="examples static-libs" + +DEPEND="app-arch/unzip" +RDEPEND="" + +PATCHES=( + "${FILESDIR}/configure-fix-pthread-linking.patch" #371647 +) + +AUTOTOOLS_AUTORECONF="1" + +pkg_setup() { + python_pkg_setup + python_set_active_version 2 +} + +src_prepare() { + sed -i -e "s|/tmp|${T}|g" test/gtest-filepath_test.cc || die + sed -i -r \ + -e '/^install-(data|exec)-local:/s|^.*$|&\ndisabled-&|' \ + Makefile.am || die + autotools-multilib_src_prepare + + python_convert_shebangs -r 2 . + + multilib_copy_sources +} + +src_configure() { + multilib_parallel_foreach_abi gtest_src_configure +} + +src_install() { + autotools-multilib_src_install + multilib_for_best_abi gtest-config_install + + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins samples/*.{cc,h} + fi +} + +gtest_src_configure() { + ECONF_SOURCE="${BUILD_DIR}" + autotools-utils_src_configure +} + +gtest-config_install() { + dobin "${BUILD_DIR}/scripts/gtest-config" +} diff --git a/dev-cpp/gtest/metadata.xml b/dev-cpp/gtest/metadata.xml new file mode 100644 index 00000000..00270970 --- /dev/null +++ b/dev-cpp/gtest/metadata.xml @@ -0,0 +1,12 @@ + + + + + tomka@gentoo.org + Thomas Kahle + + + http://code.google.com/p/googletest/w/list + googletest + + -- cgit v1.2.1