7 |
# be verbose or nor (true|false} |
# be verbose or nor (true|false} |
8 |
: ${MULTILIB_VERBOSE="true"} |
: ${MULTILIB_VERBOSE="true"} |
9 |
|
|
10 |
|
# enter the abi srcdir as default setting |
11 |
|
: ${MULTILIB_ENTER_SRCDIR="true"} |
12 |
|
|
13 |
# multilib should call all dependant includes, which gets overridden |
# multilib should call all dependant includes, which gets overridden |
14 |
sminclude mtools |
sminclude mtools |
15 |
|
|
57 |
## |
## |
58 |
mlibdir() |
mlibdir() |
59 |
{ |
{ |
60 |
local libdir=lib |
local libdir="${ABI_DEFAULT_LIBDIR}" |
61 |
[[ ${ARCH} = x86_64 ]] && libdir=lib64 |
[[ ${ARCH} = i686 ]] && libdir="${ABI_X86_LIBDIR}" |
62 |
|
[[ ${ARCH} = x86_64 ]] && libdir="${ABI_X86_64_LIBDIR}" |
63 |
|
[[ ${MABI} = m32 ]] && libdir="${ABI_X86_LIBDIR}" |
64 |
|
[[ ${MABI} = m64 ]] && libdir="${ABI_X86_64_LIBDIR}" |
65 |
[[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}" |
[[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}" |
66 |
|
|
67 |
echo "${libdir}" |
echo "${libdir}" |
75 |
export ABI="m32" |
export ABI="m32" |
76 |
export CC="gcc -${ABI}" |
export CC="gcc -${ABI}" |
77 |
export CXX="g++ -${ABI}" |
export CXX="g++ -${ABI}" |
78 |
export ABI_LIBDIR="lib" |
export ABI_LIBDIR="${ABI_X86_LIBDIR}" |
79 |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
80 |
then |
then |
81 |
local saved_ldflags="${LDFLAGS}" |
local saved_ldflags="${LDFLAGS}" |
85 |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
86 |
export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}" |
export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}" |
87 |
|
|
88 |
|
# honor rust |
89 |
|
case ${ARCH} in |
90 |
|
# use native abi as RUST_TARGET |
91 |
|
i686) export RUST_TARGET="${ARCH}-unknown-linux-gnu" ;; |
92 |
|
# use i686 as RUST_TARGET for i{3,4,5}86 targets and on multilib-x86_64 target too |
93 |
|
i*86|x86_64) export RUST_TARGET="i686-unknown-linux-gnu" ;; |
94 |
|
*) die "unknown RUST_TARGET '${ARCH}'" ;; |
95 |
|
esac |
96 |
|
|
97 |
if [[ ${MULTILIB_VERBOSE} = true ]] |
if [[ ${MULTILIB_VERBOSE} = true ]] |
98 |
then |
then |
99 |
echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}" |
108 |
echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" |
echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" |
109 |
fi |
fi |
110 |
echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" |
echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" |
111 |
|
echo -e "${COLBLUE}*** ${COLGREEN} RUST_TARGET${COLDEFAULT}='${RUST_TARGET}'" |
112 |
echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" |
echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" |
113 |
echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" |
echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" |
114 |
fi |
fi |
121 |
echo -e "${COLBLUE}*** ${COLGREEN} EMUL_LINUX_32${COLDEFAULT}='${EMUL_LINUX_32}'" |
echo -e "${COLBLUE}*** ${COLGREEN} EMUL_LINUX_32${COLDEFAULT}='${EMUL_LINUX_32}'" |
122 |
fi |
fi |
123 |
uname(){ linux32 uname $@; } && export -f uname |
uname(){ linux32 uname $@; } && export -f uname |
124 |
local orig_chost="${CHOST}" && export CHOST="i686-pc-linux-gnu" |
local orig_chost="${CHOST}" && export CHOST="${ABI_X86_CHOST}" |
125 |
fi |
fi |
126 |
if [[ ${MULTILIB_VERBOSE} = true ]] |
if [[ ${MULTILIB_VERBOSE} = true ]] |
127 |
then |
then |
129 |
fi |
fi |
130 |
|
|
131 |
# run any given command |
# run any given command |
132 |
|
if [[ ${MULTILIB_VERBOSE} = true ]] |
133 |
|
then |
134 |
|
echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'" |
135 |
|
fi |
136 |
eval $@ || die |
eval $@ || die |
137 |
|
|
138 |
unset ABI CC CXX ABI_LIBDIR |
unset ABI CC CXX ABI_LIBDIR RUST_TARGET |
139 |
# keep pkgconfig clean |
# keep pkgconfig clean |
140 |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
141 |
export LDFLAGS="${saved_ldflags}" |
export LDFLAGS="${saved_ldflags}" |
153 |
export ABI="m64" |
export ABI="m64" |
154 |
export CC="gcc -${ABI}" |
export CC="gcc -${ABI}" |
155 |
export CXX="g++ -${ABI}" |
export CXX="g++ -${ABI}" |
156 |
export ABI_LIBDIR="lib64" |
export ABI_LIBDIR="${ABI_X86_64_LIBDIR}" |
157 |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
if [[ ${EXPORT_ABI_LDFLAGS} != false ]] |
158 |
then |
then |
159 |
local saved_ldflags="${LDFLAGS}" |
local saved_ldflags="${LDFLAGS}" |
163 |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
local orig_pkg_config_path="${PKG_CONFIG_PATH}" |
164 |
export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}" |
export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}" |
165 |
|
|
166 |
|
# honor rust |
167 |
|
case ${ARCH} in |
168 |
|
# use native abi as RUST_TARGET |
169 |
|
x86_64) export RUST_TARGET="${ARCH}-unknown-linux-gnu" ;; |
170 |
|
*) die "unknown RUST_TARGET '${ARCH}'" ;; |
171 |
|
esac |
172 |
|
|
173 |
if [[ ${MULTILIB_VERBOSE} = true ]] |
if [[ ${MULTILIB_VERBOSE} = true ]] |
174 |
then |
then |
175 |
echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}" |
184 |
echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" |
echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" |
185 |
fi |
fi |
186 |
echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" |
echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" |
187 |
|
echo -e "${COLBLUE}*** ${COLGREEN} RUST_TARGET${COLDEFAULT}='${RUST_TARGET}'" |
188 |
echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" |
echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" |
189 |
echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" |
echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" |
190 |
fi |
fi |
191 |
|
|
192 |
# run any given command |
# run any given command |
193 |
|
if [[ ${MULTILIB_VERBOSE} = true ]] |
194 |
|
then |
195 |
|
echo -e "${COLGREEN}Executing:${COLDEFAULT} '$@'" |
196 |
|
fi |
197 |
eval $@ || die |
eval $@ || die |
198 |
|
|
199 |
unset ABI CC CXX ABI_LIBDIR |
unset ABI CC CXX ABI_LIBDIR RUST_TARGET |
200 |
# keep pkgconfig clean |
# keep pkgconfig clean |
201 |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
export PKG_CONFIG_PATH="${orig_pkg_config_path}" |
202 |
export LDFLAGS="${saved_ldflags}" |
export LDFLAGS="${saved_ldflags}" |
214 |
# export this for mpatch etc (to repect only-${abi}) |
# export this for mpatch etc (to repect only-${abi}) |
215 |
export MULTILIB_ONLY_ABI=${abi} |
export MULTILIB_ONLY_ABI=${abi} |
216 |
|
|
217 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
218 |
|
then |
219 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
220 |
|
fi |
221 |
abi-${abi} $@ || die |
abi-${abi} $@ || die |
222 |
|
|
223 |
# unset this is very important |
# unset this is very important |
238 |
# export this for mpatch etc (to repect only-${abi}) |
# export this for mpatch etc (to repect only-${abi}) |
239 |
export MULTILIB_ONLY_ABI=${abi} |
export MULTILIB_ONLY_ABI=${abi} |
240 |
|
|
241 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
242 |
|
then |
243 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
244 |
|
fi |
245 |
abi-${abi} $@ || die |
abi-${abi} $@ || die |
246 |
|
|
247 |
# unset this is very important |
# unset this is very important |
255 |
local abi |
local abi |
256 |
for abi in ${MULTILIB_ABIS} |
for abi in ${MULTILIB_ABIS} |
257 |
do |
do |
258 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
259 |
|
then |
260 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
261 |
|
fi |
262 |
abi-${abi} $@ || die |
abi-${abi} $@ || die |
263 |
done |
done |
264 |
} |
} |
313 |
|
|
314 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
315 |
do |
do |
316 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
|
abi-${abi} oldmconfigure $@ || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
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} ] |
|
317 |
then |
then |
318 |
cd ${BUILDDIR}/build-${abi} |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
|
else |
|
|
cd ${SRCDIR}-${abi} |
|
|
fi |
|
|
abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f mninja) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_mninja=old$(typeset -f mninja) |
|
|
eval "${old_mninja}" |
|
|
|
|
|
mninja() |
|
|
{ |
|
|
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 |
|
|
echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" |
|
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
|
|
abi-${abi} oldmninja $@ || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_configure) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_configure=old$(typeset -f meson_configure) |
|
|
eval "${old_meson_configure}" |
|
|
|
|
|
meson_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} oldmeson_configure $@ || die |
|
|
done |
|
|
# restore SRCDIR |
|
|
SRCDIR="${saved_SRCDIR}" |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_compile) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_compile=old$(typeset -f meson_src_compile) |
|
|
eval "${old_meson_src_compile}" |
|
|
|
|
|
meson_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 |
|
|
|
|
|
meson_configure || die |
|
|
|
|
|
for abi in ${abis_to_run} |
|
|
do |
|
|
cd ${BUILDDIR}/build-${abi} |
|
|
abi-${abi} oldmninja $@ || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_check) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_check=old$(typeset -f meson_src_check) |
|
|
eval "${old_meson_check}" |
|
|
|
|
|
meson_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 |
|
|
meson test || die |
|
|
done |
|
|
} |
|
|
fi |
|
|
|
|
|
if [[ ! -z $(typeset -f meson_src_install) ]] |
|
|
then |
|
|
# rename the old one |
|
|
old_meson_src_install=old$(typeset -f meson_src_install) |
|
|
eval "${old_meson_install}" |
|
|
|
|
|
meson_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} |
|
319 |
fi |
fi |
320 |
abi-${abi} DESTDIR=${BINDIR} oldmninja $@ install || die |
abi-${abi} oldmconfigure $@ || die |
321 |
done |
done |
322 |
} |
} |
323 |
fi |
fi |
362 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
363 |
do |
do |
364 |
echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" |
365 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
366 |
|
then |
367 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
368 |
|
fi |
369 |
abi-${abi} oldmmake $@ || die |
abi-${abi} oldmmake $@ || die |
370 |
done |
done |
371 |
} |
} |
388 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
389 |
do |
do |
390 |
echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" |
391 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
392 |
|
then |
393 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
394 |
|
fi |
395 |
abi-${abi} oldminstall $@ || die |
abi-${abi} oldminstall $@ || die |
396 |
done |
done |
397 |
} |
} |
408 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
409 |
do |
do |
410 |
echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" |
411 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
412 |
|
then |
413 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
414 |
|
fi |
415 |
make DESTDIR=${BINDIR} $@ install || die |
make DESTDIR=${BINDIR} $@ install || die |
416 |
done |
done |
417 |
} |
} |
433 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
434 |
do |
do |
435 |
echo -e "${COLBLUE}*** ${COLGREEN}appling patch for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}appling patch for ABI -${abi}${COLDEFAULT}" |
436 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
437 |
|
then |
438 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
439 |
|
fi |
440 |
oldmpatch $@ || die |
oldmpatch $@ || die |
441 |
done |
done |
442 |
} |
} |
459 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
460 |
do |
do |
461 |
echo -e "${COLBLUE}*** ${COLGREEN}running mlibtoolize for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}running mlibtoolize for ABI -${abi}${COLDEFAULT}" |
462 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
463 |
|
then |
464 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
465 |
|
fi |
466 |
oldmlibtoolize $@ || die |
oldmlibtoolize $@ || die |
467 |
done |
done |
468 |
} |
} |
485 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
486 |
do |
do |
487 |
echo -e "${COLBLUE}*** ${COLGREEN}running mautoreconf for ABI -${abi}${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}running mautoreconf for ABI -${abi}${COLDEFAULT}" |
488 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
489 |
|
then |
490 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
491 |
|
fi |
492 |
oldmautoreconf $@ || die |
oldmautoreconf $@ || die |
493 |
done |
done |
494 |
} |
} |
512 |
|
|
513 |
for abi in ${abis_to_run} |
for abi in ${abis_to_run} |
514 |
do |
do |
515 |
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] |
516 |
|
then |
517 |
|
cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
518 |
|
fi |
519 |
oldminstalldocs $@ || die |
oldminstalldocs $@ || die |
520 |
done |
done |
521 |
} |
} |
522 |
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 |
|