Re: [gentoo-commits] gentoo-x86 commit in dev-libs/nspr: nspr-4.8.8.ebuild ChangeLog

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [gentoo-commits] gentoo-x86 commit in dev-libs/nspr: nspr-4.8.8.ebuild ChangeLog

pva0xd
В Птн, 13/05/2011 в 21:13 +0000, Jory Pratt (anarchy) пишет:
> plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nspr/ChangeLog?rev=1.161&content-type=text/plain

> src_configure() {
> cd "${S}"/build
>
> echo > "${T}"/test.c
> $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o
> case $(scanelf -BF'%M' "${T}"/test.o)$(scanmacho -BF'%M' "${T}"/test.o) in
> ELFCLASS64*|POWERPC64*|X86_64*) myconf="${myconf} --enable-64bit";;
> ELFCLASS32*|POWERPC*|I386*|ARM*) ;;
> *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
> esac

Why do you need such complex detection? Also in nss ebuild I see
different detection:

> Index: nss-3.12.10.ebuild
[snip]
> src_compile() {
> strip-flags
>
> echo > "${T}"/test.c
> $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o
> case $(file "${T}"/test.o) in
> *64-bit*|*ppc64*|*x86_64*) export USE_64=1;;
> *32-bit*|*ppc*|*i386*) ;;
> *) die "Failed to detect whether your arch is 64bits or 32bits,
disable distcc if you're using it, please";;
> esac

It looks like good idea to unify them.

--
Peter.


Reply | Threaded
Open this post in threaded view
|

Re: [gentoo-commits] gentoo-x86 commit in dev-libs/nspr: nspr-4.8.8.ebuild ChangeLog

Diego Elio Pettenò
Il giorno lun, 16/05/2011 alle 13.15 +0400, Peter Volkov ha scritto:
> It looks like good idea to unify them.

Or you could use, you know, $(tc-arch) from toolchain-funcs.eclass? :)



Reply | Threaded
Open this post in threaded view
|

Re: Re: [gentoo-commits] gentoo-x86 commit in dev-libs/nspr: nspr-4.8.8.ebuild ChangeLog

Paweł Hajdan, Jr.
In reply to this post by pva0xd
On 5/16/11 11:15 AM, Peter Volkov wrote:
> Why do you need such complex detection?

Is it possibly similar to the scenario from
<http://bugs.gentoo.org/show_bug.cgi?id=296917>, i.e. multilib portage
and other non-standard configurations? If so, it may also be useful to
re-use the detection logic in www-client/chromium and dev-lang/v8.


signature.asc (201 bytes) Download Attachment