summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-06 00:55:02 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-06 00:55:02 +0100
commit36ab9378686ad6f3783f26696615e33e170e235f (patch)
tree7391d53042c149279b8d95e9013a8e565f64bc9d
parent1d73d1e0e7e00491813f8e4fd8aecfbb63b10c10 (diff)
downloadmidipix_build-36ab9378686ad6f3783f26696615e33e170e235f.tar.bz2
midipix_build-36ab9378686ad6f3783f26696615e33e170e235f.tar.xz
build.sh, {subr,vars}/*: general cleanup.
-rwxr-xr-xbuild.sh9
-rw-r--r--subr/build.subr14
-rw-r--r--subr/pkg_configure.subr3
-rw-r--r--subr/pkg_extract.subr3
-rw-r--r--subr/pkg_install.subr3
-rw-r--r--subr/pkg_patch_pre.subr3
-rw-r--r--vars/gcc.vars172
-rw-r--r--vars/musl.vars103
8 files changed, 155 insertions, 155 deletions
diff --git a/build.sh b/build.sh
index 39abb7ef..8511e7bf 100755
--- a/build.sh
+++ b/build.sh
@@ -68,9 +68,10 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do
PKG_BUILD_STEPS="$(get_var_unsafe PKG_$(echo ${PKG_NAME} | tr a-z A-Z)_BUILD_STEPS)";
set -- ${PKG_BUILD_STEPS:-${BUILD_STEPS}};
while [ ${#} -gt 0 ]; do
- _pkg_step_cmds="";
+ _pkg_step_cmds=""; _pkg_step_cmd_args="";
case "${1#*:}" in
- abstract) _pkg_step_cmds="pkg_${PKG_NAME}_${1%:*}"; ;;
+ abstract) _pkg_step_cmds="pkg_${PKG_NAME}_${1%:*}";
+ _pkg_step_cmd_args="${ARG_RESTART_AT}"; ;;
always) _pkg_step_cmds="pkg_${1%:*}"; ;;
main) if [ -n "${BUILD_PACKAGES_RESTART}" ]; then
if [ -z "${ARG_RESTART_AT}" ]\
@@ -87,7 +88,9 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do
esac;
for __ in ${_pkg_step_cmds}; do
if test_cmd "${__}"; then
- "${__}";
+ test_cmd "${__}_pre" && "${__}_pre";
+ "${__}" ${_pkg_step_cmd_args};
+ test_cmd "${__}_post" && "${__}_post";
set_build_script_done "${PKG_NAME}" "${1%:*}" \
${2:+-${2%:*}}; break;
fi;
diff --git a/subr/build.subr b/subr/build.subr
index e95bf44d..698a71e8 100644
--- a/subr/build.subr
+++ b/subr/build.subr
@@ -75,11 +75,17 @@ install_files() {
};
is_build_script_done() {
- local _done_fname="${WORKDIR}/.${1}.${2}";
- if [ -e "${_done_fname}" ]; then
- return 0; # Skip
+ local _done_fname="${WORKDIR}/.${1}.${2}" _restart_at="${2}";
+ if [ -z "${_restart_at}" ]; then
+ if [ -e "${_done_fname}" ]; then
+ return 0; # Skip
+ else
+ return 1; # Build
+ fi;
+ elif lmatch "${_restart_at}" , "${2}"; then
+ return 1; # Build
else
- return 1; # Build
+ return 0; # Skip
fi;
};
diff --git a/subr/pkg_configure.subr b/subr/pkg_configure.subr
index b631a429..528d3001 100644
--- a/subr/pkg_configure.subr
+++ b/subr/pkg_configure.subr
@@ -4,9 +4,6 @@
pkg_configure() {
if [ ${__no_autoconf:-0} -eq 0 ]; then
- if test_cmd pkg_${PKG_NAME}_configure_pre; then
- pkg_${PKG_NAME}_configure_pre;
- fi;
CFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}"\
LDFLAGS="${PKG_LDFLAGS_CONFIGURE}${PKG_LDFLAGS_CONFIGURE_EXTRA:+ ${PKG_LDFLAGS_CONFIGURE_EXTRA}}"\
${PKG_CONFIGURE} \
diff --git a/subr/pkg_extract.subr b/subr/pkg_extract.subr
index 95c32d5d..d4766479 100644
--- a/subr/pkg_extract.subr
+++ b/subr/pkg_extract.subr
@@ -24,9 +24,6 @@ pkg_extract() {
else
tar ${PKG_SUBDIR_CREATE:+-C ${PKG_SUBDIR}} -xf ${DLCACHEDIR}/${PKG_FNAME};
fi;
- if test_cmd pkg_${PKG_NAME}_extract_post; then
- pkg_${PKG_NAME}_extract_post;
- fi;
fi;
};
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index 673dd92d..727cef8e 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -66,9 +66,6 @@ pkg_install() {
DESTDIR=${PKG_PREFIX_EXTRA};
fi;
fi;
- if test_cmd pkg_${PKG_NAME}_install_post; then
- pkg_${PKG_NAME}_install_post;
- fi;
pkgp_install_clean_lib;
if [ -n "${PKG_INSTALL_FILES}" ]; then
(install_files -v ${PKG_PREFIX} ${PKG_INSTALL_FILES});
diff --git a/subr/pkg_patch_pre.subr b/subr/pkg_patch_pre.subr
index 566299a2..64f60f1e 100644
--- a/subr/pkg_patch_pre.subr
+++ b/subr/pkg_patch_pre.subr
@@ -14,9 +14,6 @@ pkg_patch_pre() {
patch -b -d ${PKG_SUBDIR} -p1 < ${__};
fi;
done;
- if test_cmd pkg_${PKG_NAME}_patch_pre_post; then
- pkg_${PKG_NAME}_patch_pre_post;
- fi;
};
# vim:filetype=sh
diff --git a/vars/gcc.vars b/vars/gcc.vars
index 69d02b28..b1f6abab 100644
--- a/vars/gcc.vars
+++ b/vars/gcc.vars
@@ -7,25 +7,25 @@
pkgp_gcc_setup_env() {
local __;
export MAKE="make LIBTOOL=slibtool";
- export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \
- cbb_sysroot_for_libgcc=${PKG_PREFIX} \
- cbb_target=${PKG_TARGET};
- case ${PKG_NAME} in
+ export cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
+ cbb_sysroot_for_libgcc="${PKG_PREFIX}" \
+ cbb_target="${PKG_TARGET}";
+ case "${PKG_NAME}" in
gcc_stage1)
export cbb_neutral_libiberty=no \
- cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; ;;
+ cbb_xgcc_for_specs="${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;;
gcc_stage1_cross_x86_64_w64_mingw32)
export cbb_neutral_libiberty=no \
- cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; ;;
+ cbb_xgcc_for_specs="${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;;
gcc_stage1_native_x86_64_w64_mingw32)
export cbb_neutral_libiberty=no \
- cbb_xgcc_for_specs=${PKG_TARGET}-gcc; ;;
+ cbb_xgcc_for_specs="${PKG_TARGET}-gcc"; ;;
gcc_native)
- export cbb_xgcc_for_specs=${PKG_TARGET}-gcc \
- sysroot_headers_suffix=${PKG_PREFIX}; ;;
+ export cbb_xgcc_for_specs="${PKG_TARGET}-gcc" \
+ sysroot_headers_suffix="${PKG_PREFIX}"; ;;
esac;
GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
- GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h)";
+ GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f "${WORKDIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h")";
for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
export "${__}=${GCCFLAGS}";
done;
@@ -39,10 +39,10 @@ pkgp_gcc_setup_env() {
};
pkgp_gcc_configure() {
- build_fileop rm ${PKG_BUILD_DIR};
- build_fileop mkdir ${PKG_BUILD_DIR};
- build_fileop cd ${PKG_BUILD_DIR};
- ../cbb-gcc-${PKG_GCC_VERSION}/configure "${@}" \
+ build_fileop rm "${PKG_BUILD_DIR}";
+ build_fileop mkdir "${PKG_BUILD_DIR}";
+ build_fileop cd "${PKG_BUILD_DIR}";
+ "../cbb-gcc-${PKG_GCC_VERSION}/configure" "${@}"\
--disable-bootstrap \
--disable-libmudflap \
--disable-multilib \
@@ -62,9 +62,9 @@ pkgp_gcc_configure() {
--enable-secureplt \
--enable-shared \
--enable-threads=posix \
- --target=${PKG_TARGET} \
+ --target="${PKG_TARGET}" \
--with-fpmath=sse;
- set_build_script_done ${PKG_NAME} configure -build;
+ set_build_script_done "${PKG_NAME}" configure -build;
};
pkg_gcc_stage1_cross_x86_64_w64_mingw32_all() {
@@ -76,169 +76,173 @@ pkg_gcc_stage1_native_x86_64_w64_mingw32_all() {
};
pkg_gcc_stage1_all() {
- local __;
- case ${PKG_NAME} in
+ local __ _restart_at="${1}";
+ case "${PKG_NAME}" in
gcc_stage1)
PKG_GCC_VERSION="${PKG_GCC_STAGE1_VERSION}";
- set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
+ set_build_dir "cbb-gcc-${PKG_GCC_VERSION}" cross;
;;
gcc_stage1_cross_x86_64_w64_mingw32)
PKG_GCC_VERSION="${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_VERSION}";
- set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
+ set_build_dir "cbb-gcc-${PKG_GCC_VERSION}" cross;
;;
gcc_stage1_native_x86_64_w64_mingw32)
PKG_GCC_VERSION="${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_VERSION}";
- set_build_dir cbb-gcc-${PKG_GCC_VERSION} native;
+ set_build_dir "cbb-gcc-${PKG_GCC_VERSION}" native;
;;
esac;
# GCC, stage1.
- if ! is_build_script_done ${PKG_NAME} fetch; then
+ if ! is_build_script_done "${PKG_NAME}" fetch "${_restart_at}"; then
pkg_fetch -git "cbb-gcc-${PKG_GCC_VERSION}=${GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}";
- set_build_script_done ${PKG_NAME} fetch -configure;
+ set_build_script_done "${PKG_NAME}" fetch -configure;
fi;
- pkgp_gcc_setup_env ${PKG_GCC_VERSION};
- if ! is_build_script_done ${PKG_NAME} configure; then
- build_fileop mkdir ${PKG_PREFIX}/include;
- [ \! -d ${PKG_PREFIX}/usr ] && \
- build_fileop ln_symbolic . ${PKG_PREFIX}/usr;
- case ${PKG_NAME} in
+ pkgp_gcc_setup_env "${PKG_GCC_VERSION}";
+ if ! is_build_script_done "${PKG_NAME}" configure "${_restart_at}"; then
+ build_fileop mkdir "${PKG_PREFIX}/include";
+ [ \! -d "${PKG_PREFIX}/usr" ] && \
+ build_fileop ln_symbolic . "${PKG_PREFIX}/usr";
+ case "${PKG_NAME}" in
gcc_stage1)
pkgp_gcc_configure \
--disable-sjlj-exceptions \
- --prefix=${PREFIX} \
- --with-sysroot=${PREFIX}/${PKG_TARGET}; ;;
+ --prefix="${PREFIX}" \
+ --with-sysroot="${PREFIX}/${PKG_TARGET}"; ;;
gcc_stage1_cross_x86_64_w64_mingw32)
pkgp_gcc_configure \
--enable-sjlj-exceptions \
- --prefix=${PREFIX} \
- --with-sysroot=${PREFIX}/${PKG_TARGET} \
+ --prefix="${PREFIX}" \
+ --with-sysroot="${PREFIX}/${PKG_TARGET}"\
--without-headers; ;;
gcc_stage1_native_x86_64_w64_mingw32)
- patch -b -d cbb-gcc-4.6.4 -p1 < ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch;
+ patch -b -d cbb-gcc-4.6.4 -p1 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch";
pkgp_gcc_configure \
--build=x86_64-unknown-linux-gnu \
--enable-sjlj-exceptions \
--host=x86_64-nt64-midipix \
--prefix=/ \
- --with-elf=${PKG_PREFIX} \
- --with-gmp=${PKG_PREFIX} \
- --with-mpc=${PKG_PREFIX} \
- --with-mpfr=${PKG_PREFIX} \
+ --with-elf="${PKG_PREFIX}" \
+ --with-gmp="${PKG_PREFIX}" \
+ --with-mpc="${PKG_PREFIX}" \
+ --with-mpfr="${PKG_PREFIX}" \
--with-sysroot= \
--without-headers; ;;
esac;
else
- build_fileop cd ${PKG_BUILD_DIR};
+ build_fileop cd "${PKG_BUILD_DIR}";
fi;
- if ! is_build_script_done ${PKG_NAME} build; then
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-gcc;
- set_build_script_done ${PKG_NAME} build -install;
+ set_build_script_done "${PKG_NAME}" build -install;
fi;
- if ! is_build_script_done ${PKG_NAME} install; then
- case ${PKG_NAME} in
+ if ! is_build_script_done "${PKG_NAME}" install "${_restart_at}"; then
+ case "${PKG_NAME}" in
gcc_stage1)
make ${MAKEFLAGS} install-gcc; ;;
gcc_stage1_cross_x86_64_w64_mingw32)
make ${MAKEFLAGS} install-gcc; ;;
gcc_stage1_native_x86_64_w64_mingw32)
- make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install-gcc; ;;
+ make ${MAKEFLAGS} "DESTDIR=${PKG_PREFIX}" install-gcc; ;;
esac;
__="$(uname -s)";
if [ "${__#*CYGWIN*}" != "${__}" ]; then
- build_fileop ln_symbolic ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \
- build_fileop ln_symbolic ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so;
+ build_fileop ln_symbolic "${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a" \
+ build_fileop ln_symbolic "${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so";
fi;
- set_build_script_done ${PKG_NAME} install finish;
+ set_build_script_done "${PKG_NAME}" install finish;
fi;
exit 0;
};
pkg_gcc_runtime_all() {
+ local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
- set_build_dir cbb-gcc-${PKG_GCC_RUNTIME_VERSION} cross;
- build_fileop cd ${PKG_BUILD_DIR};
+ set_build_dir "cbb-gcc-${PKG_GCC_RUNTIME_VERSION}" cross;
+ build_fileop cd "${PKG_BUILD_DIR}";
# GCC, compiler runtime.
- if ! is_build_script_done ${PKG_NAME} build; then
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-target-libgcc;
- set_build_script_done ${PKG_NAME} build -install;
+ set_build_script_done "${PKG_NAME}" build -install;
fi;
- if ! is_build_script_done ${PKG_NAME} install; then
+ if ! is_build_script_done "${PKG_NAME}" install "${_restart_at}"; then
make ${MAKEFLAGS} install-target-libgcc;
- set_build_script_done ${PKG_NAME} install finish;
+ set_build_script_done "${PKG_NAME}" install finish;
fi;
exit 0;
};
pkg_gcc_libstdcpp_v3_all() {
+ local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
- set_build_dir cbb-gcc-${PKG_GCC_LIBSTDCPP_V3_VERSION} cross;
- build_fileop cd ${PKG_BUILD_DIR};
+ set_build_dir "cbb-gcc-${PKG_GCC_LIBSTDCPP_V3_VERSION}" cross;
+ build_fileop cd "${PKG_BUILD_DIR}";
# GCC, libstdc++-v3.
- if ! is_build_script_done ${PKG_NAME} build; then
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-target-libstdc++-v3;
- set_build_script_done ${PKG_NAME} build -install;
+ set_build_script_done "${PKG_NAME}" build -install;
fi;
- if ! is_build_script_done ${PKG_NAME} install; then
+ if ! is_build_script_done "${PKG_NAME}" install "${_restart_at}"; then
make ${MAKEFLAGS} install-target-libstdc++-v3;
- set_build_script_done ${PKG_NAME} install finish;
+ set_build_script_done "${PKG_NAME}" install finish;
fi;
exit 0;
};
pkg_gcc_full_all() {
+ local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
- set_build_dir cbb-gcc-${PKG_GCC_FULL_VERSION} cross;
- build_fileop cd ${PKG_BUILD_DIR};
+ set_build_dir "cbb-gcc-${PKG_GCC_FULL_VERSION}" cross;
+ build_fileop cd "${PKG_BUILD_DIR}";
# GCC, everything else.
- if ! is_build_script_done ${PKG_NAME} build; then
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS};
- set_build_script_done ${PKG_NAME} build -install;
+ set_build_script_done "${PKG_NAME}" build -install;
fi;
- if ! is_build_script_done ${PKG_NAME} install; then
+ if ! is_build_script_done "${PKG_NAME}" install "${_restart_at}"; then
make ${MAKEFLAGS} install;
- set_build_script_done ${PKG_NAME} install finish;
+ set_build_script_done "${PKG_NAME}" install finish;
fi;
exit 0;
};
pkg_gcc_native_all() {
+ local _restart_at="${1}" _configure_host;
PKG_GCC_VERSION="${PKG_GCC_NATIVE_VERSION}";
export MAKE="make LIBTOOL=slibtool";
# GCC, native.
- set_build_dir cbb-gcc-${PKG_GCC_VERSION} native;
- pkgp_gcc_setup_env ${PKG_GCC_VERSION};
- if ! is_build_script_done ${PKG_NAME} configure; then
- build_fileop mkdir ${PKG_PREFIX}/${PKG_TARGET};
- if [ \! -d ${PKG_PREFIX}/${PKG_TARGET}/usr ]; then
- build_fileop ln_symbolic . ${PKG_PREFIX}/${PKG_TARGET}/usr;
+ set_build_dir "cbb-gcc-${PKG_GCC_VERSION}" native;
+ pkgp_gcc_setup_env "${PKG_GCC_VERSION}";
+ if ! is_build_script_done "${PKG_NAME}" configure "${_restart_at}"; then
+ build_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}";
+ if [ \! -d "${PKG_PREFIX}/${PKG_TARGET}/usr" ]; then
+ build_fileop ln_symbolic . "${PKG_PREFIX}/${PKG_TARGET}/usr";
fi;
if [ "${ARCH}" = nt32 ]; then
- _pgna_host="i686-nt32-midipix";
+ _configure_host="i686-nt32-midipix";
else
- _pgna_host="x86_64-nt64-midipix";
+ _configure_host="x86_64-nt64-midipix";
fi;
pkgp_gcc_configure \
--disable-sjlj-exceptions \
- --host=${_pgna_host} \
+ --host="${_configure_host}" \
--prefix=/ \
- --with-elf=${PKG_PREFIX} \
- --with-gmp=${PKG_PREFIX} \
- --with-mpc=${PKG_PREFIX} \
- --with-mpfr=${PKG_PREFIX} \
+ --with-elf="${PKG_PREFIX}" \
+ --with-gmp="${PKG_PREFIX}" \
+ --with-mpc="${PKG_PREFIX}" \
+ --with-mpfr="${PKG_PREFIX}" \
--with-sysroot=;
else
- build_fileop cd ${PKG_BUILD_DIR};
+ build_fileop cd "${PKG_BUILD_DIR}";
fi;
- if ! is_build_script_done ${PKG_NAME} build; then
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-gcc;
make ${MAKEFLAGS} all-target-libgcc;
make ${MAKEFLAGS} all-target-libstdc++-v3;
make ${MAKEFLAGS} all;
- set_build_script_done ${PKG_NAME} build -install;
+ set_build_script_done "${PKG_NAME}" build -install;
fi;
- if ! is_build_script_done ${PKG_NAME} install; then
- make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install;
- set_build_script_done ${PKG_NAME} install finish;
+ if ! is_build_script_done "${PKG_NAME}" install "${_restart_at}"; then
+ make ${MAKEFLAGS} "DESTDIR=${PKG_PREFIX}" install;
+ set_build_script_done "${PKG_NAME}" install finish;
fi;
exit 0;
};
diff --git a/vars/musl.vars b/vars/musl.vars
index 1c50fc74..5ba6e793 100644
--- a/vars/musl.vars
+++ b/vars/musl.vars
@@ -4,100 +4,99 @@
#
pkgp_musl_configure() {
- build_fileop rm ${PKG_BUILD_DIR};
- build_fileop mkdir ${PKG_BUILD_DIR};
- build_fileop cd ${PKG_BUILD_DIR};
- env lz_cflags_cmdline="" \
- lz_debug="yes" \
- ../lazy/lazy \
- -a ${ARCH} \
- -c gcc \
- -f ${PKG_PREFIX} \
- -n musl \
- -p ../musl-${PKG_MUSL_VERSION} \
- -t ${lz_target} \
+ build_fileop rm "${PKG_BUILD_DIR}";
+ build_fileop mkdir "${PKG_BUILD_DIR}";
+ build_fileop cd "${PKG_BUILD_DIR}";
+ env lz_cflags_cmdline="" \
+ lz_debug="yes" \
+ ../lazy/lazy \
+ -a "${ARCH}" \
+ -c gcc \
+ -f "${PKG_PREFIX}" \
+ -n musl \
+ -p "../musl-${PKG_MUSL_VERSION}" \
+ -t "${lz_target}" \
-x config;
};
pkg_musl_no_complex_all() {
- local _install;
+ local _install _restart_at="${1}";
PKG_MUSL_VERSION="${PKG_MUSL_NO_COMPLEX_VERSION}";
# Git clone what we need.
pkg_fetch -git "lazy=${GITROOT}/lazy";
- export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}";
# Musl: build (no-complex)
_install=install_no_complex;
- set_build_dir musl-${PKG_MUSL_VERSION}-${2} cross;
- if ! is_build_script_done ${PKG_NAME} fetch; then
- pkg_fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz \
- ${PKG_MUSL_NO_COMPLEX_SHA256SUM};
+ set_build_dir "musl-${PKG_MUSL_VERSION}" cross;
+ if ! is_build_script_done "${PKG_NAME}" fetch "${_restart_at}"; then
+ pkg_fetch "http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz" \
+ "${PKG_MUSL_NO_COMPLEX_SHA256SUM}";
build_fileop rm mmglue;
pkg_fetch -git "mmglue=${GITROOT}/mmglue";
- set_build_script_done ${PKG_NAME} fetch -extract;
+ set_build_script_done "${PKG_NAME}" fetch -extract;
fi;
- if ! is_build_script_done ${PKG_NAME} extract; then
- build_fileop rm musl-${PKG_MUSL_VERSION};
- tar -xf ${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz;
- set +o noglob; build_fileop cp mmglue/* musl-${PKG_MUSL_VERSION}/; set -o noglob;
- set_build_script_done ${PKG_NAME} extract -configure;
+ if ! is_build_script_done "${PKG_NAME}" extract "${_restart_at}"; then
+ build_fileop rm "musl-${PKG_MUSL_VERSION}";
+ tar -xf "${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz";
+ set +o noglob;
+ build_fileop cp mmglue/* "musl-${PKG_MUSL_VERSION}/";
+ set -o noglob;
+ set_build_script_done "${PKG_NAME}" extract -configure;
fi;
- if ! is_build_script_done ${PKG_NAME} configure; then
+ if ! is_build_script_done "${PKG_NAME}" configure "${_restart_at}"; then
pkgp_musl_configure;
- set_build_script_done ${PKG_NAME} configure -build;
+ set_build_script_done "${PKG_NAME}" configure -build;
else
- build_fileop cd ${PKG_BUILD_DIR};
+ build_fileop cd "${PKG_BUILD_DIR}";
fi;
- if ! is_build_script_done ${PKG_NAME} build; then
- ./lazy -e ${_install} \
- -x build;
- set_build_script_done ${PKG_NAME} build finish;
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
+ ./lazy -e "${_install}" -x build;
+ set_build_script_done "${PKG_NAME}" build finish;
fi;
exit 0;
};
pkg_musl_native_all() {
- local _install;
+ local _install _restart_at="${1}";
PKG_MUSL_VERSION="${PKG_MUSL_NATIVE_VERSION}";
# Git clone what we need.
pkg_fetch -git "lazy=${GITROOT}/lazy";
- export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}";
# Musl: build (full)
_install=install;
- set_build_dir musl-${PKG_MUSL_VERSION} native;
- if ! is_build_script_done ${PKG_NAME} configure; then
+ set_build_dir "musl-${PKG_MUSL_VERSION}" native;
+ if ! is_build_script_done "${PKG_NAME}" configure "${_restart_at}"; then
pkgp_musl_configure;
- set_build_script_done ${PKG_NAME} configure -build;
+ set_build_script_done "${PKG_NAME}" configure -build;
else
- build_fileop cd ${PKG_BUILD_DIR};
+ build_fileop cd "${PKG_BUILD_DIR}";
fi;
- if ! is_build_script_done ${PKG_NAME} build; then
- ./lazy -e ${_install} \
- -x build;
- build_fileop ln_symbolic ../lib/libc.so ${PKG_PREFIX}/bin/ldd;
- set_build_script_done ${PKG_NAME} build finish;
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
+ ./lazy -e "${_install}" -x build;
+ build_fileop ln_symbolic ../lib/libc.so "${PKG_PREFIX}/bin/ldd";
+ set_build_script_done "${PKG_NAME}" build finish;
fi;
exit 0;
};
pkg_musl_full_all() {
- local _install;
+ local _install _restart_at="${1}";
PKG_MUSL_VERSION="${PKG_MUSL_FULL_VERSION}";
# Git clone what we need.
pkg_fetch -git "lazy=${GITROOT}/lazy";
- export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}";
# Musl: build (full)
_install=install;
- set_build_dir musl-${PKG_MUSL_VERSION} cross;
- if ! is_build_script_done ${PKG_NAME} configure; then
+ set_build_dir "musl-${PKG_MUSL_VERSION}" cross;
+ if ! is_build_script_done "${PKG_NAME}" configure "${_restart_at}"; then
pkgp_musl_configure;
- set_build_script_done ${PKG_NAME} configure -build;
+ set_build_script_done "${PKG_NAME}" configure -build;
else
- build_fileop cd ${PKG_BUILD_DIR};
+ build_fileop cd "${PKG_BUILD_DIR}";
fi;
- if ! is_build_script_done ${PKG_NAME} build; then
- ./lazy -e ${_install} \
- -x build;
- set_build_script_done ${PKG_NAME} build finish;
+ if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
+ ./lazy -e "${_install}" -x build;
+ set_build_script_done "${PKG_NAME}" build finish;
fi;
exit 0;
};