|
lalbornoz |
340f4c |
export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}";
|
|
lalbornoz |
340f4c |
|
|
lalbornoz |
340f4c |
if is_build_script_done finished; then
|
|
lalbornoz |
340f4c |
exit 212;
|
|
lalbornoz |
340f4c |
elif [ "x${3}" = "xno-complex" ]; then
|
|
lalbornoz |
340f4c |
# Musl: build (no-complex)
|
|
lalbornoz |
340f4c |
_install="install_no_complex";
|
|
lalbornoz |
340f4c |
set_build_dir "musl-${MUSL_VERSION}" "${TARGET}-${3}";
|
|
lalbornoz |
340f4c |
fetch "http://www.musl-libc.org/releases/musl-${MUSL_VERSION}.tar.gz";
|
|
lalbornoz |
340f4c |
if ! is_build_script_done extracted; then
|
|
lalbornoz |
340f4c |
rm_if_exists "musl-${MUSL_VERSION}";
|
|
lalbornoz |
340f4c |
tar -xf "musl-${MUSL_VERSION}.tar.gz";
|
|
lalbornoz |
340f4c |
cp -R mmglue/* "musl-${MUSL_VERSION}/";
|
|
lalbornoz |
340f4c |
set_build_script_done extracted -configured;
|
|
lalbornoz |
340f4c |
fi;
|
|
lalbornoz |
340f4c |
elif [ "x${3}" = "xnative" ]; then
|
|
lalbornoz |
340f4c |
# Musl: build (full)
|
|
lalbornoz |
340f4c |
_destdir="${PREFIX_NATIVE}";
|
|
lalbornoz |
340f4c |
_install="install";
|
|
lalbornoz |
340f4c |
set_build_dir "musl-${MUSL_VERSION}" "${3}";
|
|
lalbornoz |
340f4c |
else
|
|
lalbornoz |
340f4c |
# Musl: build (full)
|
|
lalbornoz |
340f4c |
_install="install";
|
|
lalbornoz |
340f4c |
set_build_dir "musl-${MUSL_VERSION}" "${TARGET}";
|
|
lalbornoz |
340f4c |
fi;
|
|
lalbornoz |
340f4c |
if ! is_build_script_done configured; then
|
|
lalbornoz |
340f4c |
rm_if_exists -m -c "${_build_dir}";
|
|
lalbornoz |
340f4c |
../lazy/lazy \
|
|
lalbornoz |
340f4c |
-a "${ARCH}" \
|
|
lalbornoz |
340f4c |
-c gcc \
|
|
lalbornoz |
340f4c |
-f "${_destdir:-${PREFIX_TARGET}}" \
|
|
lalbornoz |
340f4c |
-n musl \
|
|
lalbornoz |
340f4c |
-p "../musl-${MUSL_VERSION}" \
|
|
lalbornoz |
340f4c |
-t "${lz_target}" \
|
|
lalbornoz |
340f4c |
-x config;
|
|
lalbornoz |
340f4c |
set_build_script_done configured -built;
|
|
lalbornoz |
340f4c |
else
|
|
lalbornoz |
340f4c |
cd "${_build_dir}";
|
|
lalbornoz |
340f4c |
fi;
|
|
lalbornoz |
340f4c |
if ! is_build_script_done built; then
|
|
lalbornoz |
340f4c |
./lazy \
|
|
lalbornoz |
340f4c |
-e "${_install}" \
|
|
lalbornoz |
340f4c |
-x build;
|
|
lalbornoz |
340f4c |
set_build_script_done built finished;
|
|
lalbornoz |
340f4c |
fi;
|
|
lalbornoz |
340f4c |
|
|
lalbornoz |
340f4c |
# vim:filetype=sh
|