286 |
} |
} |
287 |
fi |
fi |
288 |
|
|
|
if [[ ! -z $(typeset -f cmake_configure) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_cmake_configure=old$(typeset -f cmake_configure) |
|
|
eval "${old_cmake_configure}" |
|
|
|
|
|
cmake_configure() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
local saved_SRCDIR="${SRCDIR}" |
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
SRCDIR="${saved_SRCDIR}-${abi}" |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR} |
|
|
fi |
|
|
abi-${abi} oldcmake_configure $@ || die |
|
|
done |
|
|
# restore SRCDIR |
|
|
SRCDIR="${saved_SRCDIR}" |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f cmake_src_compile) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_cmake_src_compile=old$(typeset -f cmake_src_compile) |
|
|
eval "${old_cmake_src_compile}" |
|
|
|
|
|
cmake_src_compile() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# remove build dir if exist |
|
|
[[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi} |
|
|
|
|
|
# build outside of the source dir |
|
|
install -d ${BUILDDIR}/build-${abi} || die |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
done |
|
|
|
|
|
cmake_configure || die |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
abi-${abi} oldmmake $@ || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f cmake_src_check) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_cmake_src_check=old$(typeset -f cmake_src_check) |
|
|
eval "${old_cmake_check}" |
|
|
|
|
|
cmake_src_check() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR}-${abi} |
|
|
fi |
|
|
mmake -j1 -k check || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f cmake_src_install) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_cmake_src_install=old$(typeset -f cmake_src_install) |
|
|
eval "${old_cmake_install}" |
|
|
|
|
|
cmake_src_install() |
|
|
{ |
|
|
local abi |
|
|
local abis_to_run="${MULTILIB_ABIS}" |
|
|
|
|
|
# respect MULTILIB_ONLY_ABI variable |
|
|
[[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
# honor inside and outside build-dir builds |
|
|
if [ -d ${BUILDDIR}/build-${abi} ] |
|
|
then |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
else |
|
|
cd ${SRCDIR}-${abi} |
|
|
fi |
|
|
abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
289 |
if [[ ! -z $(typeset -f munpack) ]] |
if [[ ! -z $(typeset -f munpack) ]] |
290 |
then |
then |
291 |
# rename the old one |
# rename the old one |
463 |
done |
done |
464 |
} |
} |
465 |
fi |
fi |
|
|
|
|
## |
|
|
# multilib mbuild wrappers |
|
|
## |
|
|
multilib_src_prepare() |
|
|
{ |
|
|
munpack ${SRCFILE} || die |
|
|
} |
|
|
|
|
|
multilib_src_compile() |
|
|
{ |
|
|
if [[ ! -z $(typeset -f cmake_src_compile) ]] |
|
|
then |
|
|
cmake_src_compile || die |
|
|
else |
|
|
mconfigure || die |
|
|
mmake || die |
|
|
fi |
|
|
} |
|
|
|
|
|
multilib_src_check() |
|
|
{ |
|
|
if [[ ! -z $(typeset -f cmake_src_check) ]] |
|
|
then |
|
|
cmake_src_check || die |
|
|
else |
|
|
mmake -j1 -k check || die |
|
|
fi |
|
|
} |
|
|
|
|
|
multilib_src_install() |
|
|
{ |
|
|
if [[ ! -z $(typeset -f cmake_src_install) ]] |
|
|
then |
|
|
cmake_src_install || die |
|
|
else |
|
|
mmake DESTDIR=${BINDIR} install || die |
|
|
fi |
|
|
|
|
|
local i |
|
|
for abi in ${MULTILIB_ABIS} |
|
|
do |
|
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
|
|
for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
|
|
FAQ LICENSE NEWS README TODO |
|
|
do |
|
|
if [ -f ${SRCDIR}-${abi}/${i} ] |
|
|
then |
|
|
minstalldocs ${i} || die |
|
|
fi |
|
|
done |
|
|
done |
|
|
} |
|
|
|
|
|
export_inherits multilib src_prepare src_compile src_check src_install |
|