В Птн, 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 via email to