4 |
# be verbose or nor (true|false} |
# be verbose or nor (true|false} |
5 |
: ${MULTILIB_VERBOSE="true"} |
: ${MULTILIB_VERBOSE="true"} |
6 |
|
|
7 |
|
# multilib should call all dependant includes, which gets overridden |
8 |
|
sminclude mtools |
9 |
|
|
10 |
# do not define EMUL_LINUX_32 after inherit of multlib !! |
# do not define EMUL_LINUX_32 after inherit of multlib !! |
11 |
# it may break i*86 builds |
# it may break i*86 builds |
12 |
|
|
69 |
export ABI_LIBDIR="lib" |
export ABI_LIBDIR="lib" |
70 |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
71 |
then |
then |
72 |
export LDFLAGS="-L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}" |
local saved_ldflags="${LDFLAGS}" |
73 |
|
export LDFLAGS="${LDFLAGS} -L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}" |
74 |
fi |
fi |
75 |
# keep pkgconfig clean |
# keep pkgconfig clean |
76 |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
110 |
# run any given command |
# run any given command |
111 |
eval $@ || die |
eval $@ || die |
112 |
|
|
113 |
unset ABI CC CXX ABI_LIBDIR LDFLAGS |
unset ABI CC CXX ABI_LIBDIR |
114 |
# keep pkgconfig clean |
# keep pkgconfig clean |
115 |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
116 |
|
export LDFLAGS="${saved_ldflags}" |
117 |
|
|
118 |
# restore original settings |
# restore original settings |
119 |
if [[ ${EMUL_LINUX_32} = true ]] |
if [[ ${EMUL_LINUX_32} = true ]] |
131 |
export ABI_LIBDIR="lib64" |
export ABI_LIBDIR="lib64" |
132 |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
133 |
then |
then |
134 |
|
local saved_ldflags="${LDFLAGS}" |
135 |
export LDFLAGS="-L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}" |
export LDFLAGS="-L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}" |
136 |
fi |
fi |
137 |
# keep pkgconfig clean |
# keep pkgconfig clean |
158 |
# run any given command |
# run any given command |
159 |
eval $@ || die |
eval $@ || die |
160 |
|
|
161 |
unset ABI CC CXX ABI_LIBDIR LDFLAGS |
unset ABI CC CXX ABI_LIBDIR |
162 |
# keep pkgconfig clean |
# keep pkgconfig clean |
163 |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
164 |
|
export LDFLAGS="${saved_ldflags}" |
165 |
} |
} |
166 |
|
|
167 |
only-m32() |
only-m32() |
429 |
{ |
{ |
430 |
local abi |
local abi |
431 |
local docfiles |
local docfiles |
|
docfiles="$@" |
|
432 |
|
|
433 |
local abis_to_run="${MULTILIB_ABIS}" |
local abis_to_run="${MULTILIB_ABIS}" |
434 |
|
|
438 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
439 |
do |
do |
440 |
cd ${SRCDIR}-${abi} |
cd ${SRCDIR}-${abi} |
441 |
if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
oldminstalldocs $@ || die |
|
then |
|
|
install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
|
|
fi |
|
|
|
|
|
for i in ${docfiles} |
|
|
do |
|
|
cat ${SRCDIR}-${abi}/${i} | gzip -9c > ${SRCDIR}-${abi}/${i}.gz || die "gzipping docs." |
|
|
install -m 0644 ${SRCDIR}-${abi}/${i}.gz \ |
|
|
${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "coping docs." |
|
|
done |
|
442 |
done |
done |
443 |
} |
} |
444 |
|
|
456 |
mmake |
mmake |
457 |
} |
} |
458 |
|
|
459 |
|
multilib_src_check() |
460 |
|
{ |
461 |
|
mmake -j1 -k check || die |
462 |
|
} |
463 |
|
|
464 |
multilib_src_install() |
multilib_src_install() |
465 |
{ |
{ |
466 |
minstall_destdir |
minstall_destdir |
480 |
done |
done |
481 |
} |
} |
482 |
|
|
483 |
export_inherits multilib src_prepare src_compile src_install |
export_inherits multilib src_prepare src_compile src_check src_install |