diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2016-06-23 08:50:09 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2016-06-23 08:50:09 +0000 |
commit | 3243be768ad8a601b2636be4dd23dbb6c2d7dd9b (patch) | |
tree | cabb6414ea898fa0e0375aa4d0603861819d854c /build.sh | |
parent | a0c044e739c6161692408ee2595870e184640f27 (diff) | |
download | midipix_build-3243be768ad8a601b2636be4dd23dbb6c2d7dd9b.tar.bz2 midipix_build-3243be768ad8a601b2636be4dd23dbb6c2d7dd9b.tar.xz |
- Adds and integrates pkgconf_host and pkgconf; fixes Irssi and other
packages that depend on pkg-config(1) and makes their build variables
significantly less hacky (apk_tools, irssi, nano, ncurses, ncursestw
ncursesw, and pacman.) pkgconf_host installs a ${TARGET}-pkg-config
wrapper script that passes --define-variable=prefix=${PREFIX_NATIVE}
when cross-compiling.
- Adds -i flag to insert a link to pkg.build for a new build script
and automatically rename build scripts with higher consecutive build
levels.
- Consistently quote [(1) operands correctly wherever necessary.
- Reorganise build level 3 script levels:
1) 300-319: library dependencies, ordered by dependencies and alphabetically,
2) 320-389: leaf packages, ordered alphabetically.
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -7,6 +7,8 @@ while [ ${#} -gt 0 ]; do case ${1} in -c) ARG_CLEAN=1; ;; +-i) [ -z "${2}" ] && exec cat build.usage ||\ + insert_build_script_link "${2}"; exit $?; ;; -nd) ARG_NO_DOWNLOAD=1; ;; -pt) ARG_PEDANTIC=1; ;; -r) [ -n "${ARG_RESTART_SCRIPT}" ] && exec cat build.usage; @@ -26,11 +28,11 @@ esac; shift; done; [ -f ${HOME}/midipix_build.vars ] && . ${HOME}/midipix_build.vars; [ -f ../midipix_build.vars ] && . ../midipix_build.vars; . ./build.vars; +clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT}; +check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${CHECK_PREREQ_CMDS}; if ! [ -d ${PREFIX} ]; then mkdir ${PREFIX}; fi; -clear_env_with_except ${CLEAR_ENV_VARS_EXCEPT}; -check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${CHECK_PREREQ_CMDS}; {( update_build_status build_start; build_times_init; trap "clean_build_status abort; exit 1" HUP INT TERM USR1 USR2; log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}."; @@ -53,7 +55,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do , "${BUILD_SCRIPT_FNAME}"; then log_msg info "Skipped build script \`${BUILD_SCRIPT_FNAME}' (--build-scripts policy.)"; continue; - elif [ ! -f ${BUILD_SCRIPT_FNAME} ]; then + elif [ ! -f "${BUILD_SCRIPT_FNAME}" ]; then log_msg info "Build script \`${BUILD_SCRIPT_FNAME}' non-existent or not a file."; continue; else @@ -68,6 +70,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do SCRIPT_FNAME=${BUILD_SCRIPT_FNAME}; \ SCRIPT_NAME=${SCRIPT_FNAME%%.build*}; \ export PREFIX_LVL="$(eval echo \${PREFIX_LVL${BUILD_LVL}})"; \ + export PKG_TARGET=${TARGET}; \ export MIDIPIX_BUILD_PWD=$(pwd); cd ${WORKDIR}; \ for SCRIPT_SOURCE in build.subr ${SCRIPT_NAME}.vars \ ${BUILD_SCRIPT_FNAME}; do \ @@ -83,7 +86,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do SCRIPT_NAME=${BUILD_SCRIPT_FNAME%%.build}; SCRIPT_NAME=${SCRIPT_NAME#*.}; SCRIPT_NAME=$(echo "${SCRIPT_NAME}" | tr a-z A-Z); - if [ -z ${PKG_SUBDIR=$(get_var_unsafe PKG_${SCRIPT_NAME}_SUBDIR)} ]; then + if [ -z "${PKG_SUBDIR=$(get_var_unsafe PKG_${SCRIPT_NAME}_SUBDIR)}" ]; then PKG_URL=$(get_var_unsafe PKG_${SCRIPT_NAME}_URL); PKG_FNAME=${PKG_URL##*/}; PKG_SUBDIR=${PKG_FNAME%%.tar*}; |