Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 464702

Summary: dev-cpp/gtest - add multilib ABI support
Product: Gentoo Linux Reporter: Karl Lindén <karl.j.linden>
Component: [OLD] DevelopmentAssignee: Thomas Kahle (RETIRED) <tomka>
Status: RESOLVED FIXED    
Severity: normal Keywords: EBUILD, PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 464704    
Attachments: The proposed ebuild with multilib ABI support.

Description Karl Lindén 2013-04-05 10:18:00 UTC
Created attachment 344482 [details]
The proposed ebuild with multilib ABI support.

It would be great if dev-cpp/gtest had support for multilib ABIs. It currently has not. The 32-bit library is not provided by any other package so no blockers on emulation packages are needed and it does not need any other multilib libraries.

I'm posting a proposed ebuild which works for me. The test functionality is working for fine for me. Worth knowing is that the package won't compile out of source, hence the workaround in the ebuild.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-04-05 17:02:10 UTC
Comment on attachment 344482 [details]
The proposed ebuild with multilib ABI support.

--- gtest-1.6.0-r1.ebuild       2013-03-29 16:54:26.810099756 +0100
+++ -   2013-04-05 19:01:47.548364890 +0200
@@ -1,11 +1,11 @@
 # 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-r1.ebuild,v 1.14 2013/03/29 01:55:22 vapier Exp $
+# $Header: $

-EAPI="4"
+EAPI="5"
 PYTHON_DEPEND="2"

-inherit eutils python autotools
+inherit eutils python autotools-multilib
 
 DESCRIPTION="Google C++ Testing Framework"
 HOMEPAGE="http://code.google.com/p/googletest/"
@@ -13,12 +13,18 @@
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos"
+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
@@ -29,32 +35,32 @@
        sed -i -r \
                -e '/^install-(data|exec)-local:/s|^.*$|&\ndisabled-&|' \
                Makefile.am || die
-       epatch "${FILESDIR}"/configure-fix-pthread-linking.patch #371647
-       eautoreconf
+       autotools-multilib_src_prepare

        python_convert_shebangs -r 2 .
-}

-src_configure() {
-       econf \
-               $(use_enable static-libs static)
+       multilib_copy_sources
 }

-src_test() {
-       # explicitly use parallel make
-       emake check || die
+src_configure() {
+       multilib_parallel_foreach_abi gtest_src_configure
 }
 
 src_install() {
-       default
-       dobin scripts/gtest-config
-
-       if ! use static-libs ; then
-               rm "${ED}"/usr/lib*/*.la || die
-       fi
+       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"
+}
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2013-04-06 07:49:07 UTC
Hi, 
thanks for your patch.  I added your -r2 ebuild.

+*gtest-1.6.0-r2 (06 Apr 2013)
+
+  06 Apr 2013; Thomas Kahle <tomka@gentoo.org> +gtest-1.6.0-r2.ebuild:
+  add multilib support, thanks to Karl Lindén (bug 464702)