Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464702 - dev-cpp/gtest - add multilib ABI support
Summary: dev-cpp/gtest - add multilib ABI support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks: 464704
  Show dependency tree
 
Reported: 2013-04-05 10:18 UTC by Karl Lindén
Modified: 2013-04-06 07:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The proposed ebuild with multilib ABI support. (gtest-1.6.0-r2.ebuild,1.36 KB, text/plain)
2013-04-05 10:18 UTC, Karl Lindén
Details

Note You need to log in before you can comment on or make changes to this bug.
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)