Lines 41-48
Link Here
|
41 |
waf-utils_src_configure() { |
41 |
waf-utils_src_configure() { |
42 |
debug-print-function ${FUNCNAME} "$@" |
42 |
debug-print-function ${FUNCNAME} "$@" |
43 |
|
43 |
|
44 |
local libdir="" |
|
|
45 |
|
46 |
# @ECLASS-VARIABLE: WAF_BINARY |
44 |
# @ECLASS-VARIABLE: WAF_BINARY |
47 |
# @DESCRIPTION: |
45 |
# @DESCRIPTION: |
48 |
# Eclass can use different waf executable. Usually it is located in "${S}/waf". |
46 |
# Eclass can use different waf executable. Usually it is located in "${S}/waf". |
Lines 53-77
Link Here
|
53 |
# @DESCRIPTION: |
51 |
# @DESCRIPTION: |
54 |
# Variable specifying that you don't want to set the libdir for waf script. |
52 |
# Variable specifying that you don't want to set the libdir for waf script. |
55 |
# Some scripts does not allow setting it at all and die if they find it. |
53 |
# Some scripts does not allow setting it at all and die if they find it. |
56 |
[[ -z ${NO_WAF_LIBDIR} ]] && libdir="--libdir=${EPREFIX}/usr/$(get_libdir)" |
54 |
[[ -z ${NO_WAF_LIBDIR} ]] && set -- "--libdir=${EPREFIX}/usr/$(get_libdir)" "${@}" |
57 |
|
|
|
58 |
tc-export AR CC CPP CXX RANLIB |
59 |
echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir} $@ configure" |
60 |
|
55 |
|
61 |
# This condition is required because waf takes even whitespace as function |
56 |
if tc-is-cross-compiler; then |
62 |
# calls, awesome isn't it? |
57 |
if [[ -n ${PORTAGE_EMULATOR} ]]; then |
63 |
if [[ -z ${NO_WAF_LIBDIR} ]]; then |
58 |
set -- "--cross-compile" "--cross-execute=$(eval echo ${PORTAGE_EMULATOR})" "${@}" |
64 |
CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ |
59 |
else |
65 |
"--prefix=${EPREFIX}/usr" \ |
60 |
local T_CROSS_ANSWERS="${T}/waf-cross-answers.txt" |
66 |
"${libdir}" \ |
61 |
set -- "--cross-compile" "--cross-answers=${T_CROSS_ANSWERS}" "${@}" |
67 |
"$@" \ |
62 |
|
68 |
configure || die "configure failed" |
63 |
if [[ -n ${WAF_CROSS_ANSWERS} ]]; then |
69 |
else |
64 |
cp "${WAF_CROSS_ANSWERS}" "${T_CROSS_ANSWERS}" || die |
70 |
CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \ |
65 |
else |
71 |
"--prefix=${EPREFIX}/usr" \ |
66 |
echo "Checking simple C program: OK" > "${T_CROSS_ANSWERS}" || die |
72 |
"$@" \ |
67 |
fi |
73 |
configure || die "configure failed" |
68 |
|
|
|
69 |
ewarn "If the build fails then make a copy of ${T_CROSS_ANSWERS}," |
70 |
ewarn "fill in the answers, and point WAF_CROSS_ANSWERS to this copy before" |
71 |
ewarn "attempting the build again. Alternatively, set PORTAGE_EMULATOR." |
72 |
fi |
74 |
fi |
73 |
fi |
|
|
74 |
|
75 |
tc-export AR CC CPP CXX RANLIB |
76 |
echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr $@ configure" |
77 |
CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" "--prefix=${EPREFIX}/usr" "$@" configure || die "configure failed" |
75 |
} |
78 |
} |
76 |
|
79 |
|
77 |
# @FUNCTION: waf-utils_src_compile |
80 |
# @FUNCTION: waf-utils_src_compile |