summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh2
-rw-r--r--dist/dist_gitref.dist2
-rw-r--r--dist/dist_minipix.dist2
-rw-r--r--dist/dist_zipdist.dist2
-rw-r--r--groups/000.host_tools.group1
-rw-r--r--groups/010.host_deps.group2
-rw-r--r--groups/211.native_packages_cmdline.group2
-rw-r--r--groups/231.native_packages_etc.group2
-rw-r--r--groups/261.native_packages_x11.group3
-rw-r--r--midipix.env31
-rwxr-xr-xpkgtool.sh4
-rw-r--r--subr/build_init.subr150
-rw-r--r--subr/ex_pkg.subr6
-rw-r--r--subr/ex_pkg_dispatch.subr4
-rw-r--r--subr/ex_pkg_env.subr24
-rw-r--r--subr/ex_pkg_exec.subr10
-rw-r--r--subr/pkg_build.subr38
-rw-r--r--subr/pkg_clean.subr2
-rw-r--r--subr/pkg_configure.subr25
-rw-r--r--subr/pkg_configure_autotools.subr15
-rw-r--r--subr/pkg_configure_patch.subr4
-rw-r--r--subr/pkg_configure_patch_pre.subr9
-rw-r--r--subr/pkg_fetch_download.subr6
-rw-r--r--subr/pkg_fetch_extract.subr4
-rw-r--r--subr/pkg_install.subr4
-rw-r--r--subr/pkg_install_files.subr4
-rw-r--r--subr/pkg_install_libs.subr2
-rw-r--r--subr/pkg_install_make.subr24
-rw-r--r--subr/pkg_install_rpm.subr6
-rw-r--r--subr/pkg_install_subdirs.subr6
-rw-r--r--subr/pkgtool_init.subr2
-rw-r--r--subr/rtl.subr2
-rw-r--r--subr/rtl_complex.subr4
-rw-r--r--subr/rtl_fetch.subr8
-rw-r--r--subr/rtl_fileop.subr32
-rw-r--r--subr/rtl_install.subr2
-rw-r--r--subr/rtl_list.subr4
-rw-r--r--subr/rtl_log.subr2
-rw-r--r--subr/rtl_state.subr5
-rw-r--r--subr/rtl_string.subr2
-rw-r--r--vars/apr.vars2
-rw-r--r--vars/bash.vars2
-rw-r--r--vars/binutils.vars2
-rw-r--r--vars/bison.vars2
-rw-r--r--vars/busybox.vars2
-rw-r--r--vars/ca_certificates.vars2
-rw-r--r--vars/chainport_host.vars2
-rw-r--r--vars/clang_host.vars2
-rw-r--r--vars/cmake.vars2
-rw-r--r--vars/dbus_host.vars2
-rw-r--r--vars/emacs.vars2
-rw-r--r--vars/gcc.vars4
-rw-r--r--vars/gdb.vars2
-rw-r--r--vars/gdk.vars2
-rw-r--r--vars/ghostscript.vars2
-rw-r--r--vars/git.vars2
-rw-r--r--vars/glib.vars2
-rw-r--r--vars/gnutls.vars2
-rw-r--r--vars/htop.vars2
-rw-r--r--vars/install_strip_host.vars2
-rw-r--r--vars/libevent.vars2
-rw-r--r--vars/libfirm.vars2
-rw-r--r--vars/libgcrypt.vars2
-rw-r--r--vars/libjpeg_turbo.vars2
-rw-r--r--vars/libksba.vars2
-rw-r--r--vars/libnettle.vars2
-rw-r--r--vars/libpcap.vars2
-rw-r--r--vars/libressl_host.vars2
-rw-r--r--vars/libsolv.vars2
-rw-r--r--vars/libtool_host.vars26
-rw-r--r--vars/libxml2.vars2
-rw-r--r--vars/libzip.vars2
-rw-r--r--vars/lighttpd.vars2
-rw-r--r--vars/llvm_host.vars2
-rw-r--r--vars/lolcode.vars2
-rw-r--r--vars/make.vars2
-rw-r--r--vars/mc.vars2
-rw-r--r--vars/mpackage_host.vars2
-rw-r--r--vars/musl.vars2
-rw-r--r--vars/mutt.vars2
-rw-r--r--vars/nano.vars2
-rw-r--r--vars/nasm_host.vars2
-rw-r--r--vars/nginx.vars2
-rw-r--r--vars/nullmailer.vars2
-rw-r--r--vars/openbsd_baseutils.vars2
-rw-r--r--vars/openjpeg.vars2
-rw-r--r--vars/perl.vars2
-rw-r--r--vars/pkgconf_host.vars2
-rw-r--r--vars/procps_ng.vars2
-rw-r--r--vars/psxstub_host.vars2
-rw-r--r--vars/python2.vars2
-rw-r--r--vars/python2_host.vars2
-rw-r--r--vars/python3.vars2
-rw-r--r--vars/python3_host.vars2
-rw-r--r--vars/rc.vars2
-rw-r--r--vars/rpm_host.vars2
-rw-r--r--vars/ruby.vars2
-rw-r--r--vars/sdl1.vars2
-rw-r--r--vars/smallbasic.vars2
-rw-r--r--vars/tcl.vars2
-rw-r--r--vars/texinfo.vars14
-rw-r--r--vars/texinfo_host.vars2
-rw-r--r--vars/tzdb_host.vars2
-rw-r--r--vars/util_linux.vars2
-rw-r--r--vars/vim.vars2
-rw-r--r--vars/w3m.vars2
-rw-r--r--vars/xcb.vars2
-rw-r--r--vars/yabasic.vars2
-rw-r--r--vars/zsh.vars2
109 files changed, 337 insertions, 298 deletions
diff --git a/build.sh b/build.sh
index c36eae05..1588b279 100755
--- a/build.sh
+++ b/build.sh
@@ -146,6 +146,6 @@ build() {
fi;
};
-set +o errexit -o noglob; build "${@}";
+set +o errexit -o noglob -o nounset; build "${@}";
# vim:filetype=sh textwidth=0
diff --git a/dist/dist_gitref.dist b/dist/dist_gitref.dist
index a04b0f01..4ebd4124 100644
--- a/dist/dist_gitref.dist
+++ b/dist/dist_gitref.dist
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_dist_gitref_all() {
diff --git a/dist/dist_minipix.dist b/dist/dist_minipix.dist
index 99d4b2f8..5bcc05b9 100644
--- a/dist/dist_minipix.dist
+++ b/dist/dist_minipix.dist
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_dist_minipix_all() {
diff --git a/dist/dist_zipdist.dist b/dist/dist_zipdist.dist
index 27d68ac7..70063264 100644
--- a/dist/dist_zipdist.dist
+++ b/dist/dist_zipdist.dist
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_dist_zipdist_all() {
diff --git a/groups/000.host_tools.group b/groups/000.host_tools.group
index 6c9318b0..7e2b3358 100644
--- a/groups/000.host_tools.group
+++ b/groups/000.host_tools.group
@@ -27,6 +27,7 @@ HOST_TOOLS_PREFIX="${PREFIX}";
: ${PKG_LIBTOOL_HOST_SHA256SUM:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f};
: ${PKG_LIBTOOL_HOST_VERSION:=2.4.6};
: ${PKG_LIBTOOL_HOST_URL:=https://ftp.gnu.org/gnu/libtool/libtool-${PKG_LIBTOOL_HOST_VERSION}.tar.xz};
+: ${PKG_LIBTOOL_HOST_LIBTOOL:=none};
: ${PKG_M4_HOST_DEPENDS:="pkgconf_host slibtool_host"};
: ${PKG_M4_HOST_SHA256SUM:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07};
: ${PKG_M4_HOST_VERSION:=1.4.18};
diff --git a/groups/010.host_deps.group b/groups/010.host_deps.group
index 584810c0..97b87d7e 100644
--- a/groups/010.host_deps.group
+++ b/groups/010.host_deps.group
@@ -92,7 +92,7 @@ HOST_DEPS_PREFIX="${PREFIX}";
: ${PKG_GLIB_HOST_BUILD_STEPS_DISABLE:=configure_patch};
: ${PKG_GLIB_HOST_CONFIGURE_ARGS_EXTRA:="--with-pcre=internal --with-python=${PREFIX}/bin/python3 --disable-dtrace --disable-libelf --disable-libmount"};
: ${PKG_GLIB_HOST_CFLAGS_BUILD_EXTRA:="-Wno-missing-include-dirs -Wno-format-nonliteral -Wno-format-overflow"};
-: ${PKG_GLIB_HOST_ENV_VARS_EXTRA:="LIBFFI_CFLAGS=-I${PREFIX}/lib/libffi-${PKG_LIBFFI_HOST_VERSION}/include:LIBFFI_LIBS=-L${PREFIX}/lib -lffi"};
+: ${PKG_GLIB_HOST_ENV_VARS_EXTRA:="LIBFFI_CFLAGS=-I${PREFIX}/lib/libffi-3.2.1/include:LIBFFI_LIBS=-L${PREFIX}/lib -lffi"};
: ${PKG_GLIB_HOST_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX}/lib};
: ${PKG_GPERF_HOST_SHA256SUM:=588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2};
: ${PKG_GPERF_HOST_VERSION:=3.1};
diff --git a/groups/211.native_packages_cmdline.group b/groups/211.native_packages_cmdline.group
index eb277e50..feb5fed5 100644
--- a/groups/211.native_packages_cmdline.group
+++ b/groups/211.native_packages_cmdline.group
@@ -41,7 +41,7 @@ the_silver_searcher toilet tree terminally_tetris ubase which zsh")";
: ${PKG_DOS2UNIX_SHA256SUM:=1cd58a60b03ed28fa39046102a185c5e88c4f7665e1e0417c25de7f8b9f78623};
: ${PKG_DOS2UNIX_VERSION:=7.4.1};
: ${PKG_DOS2UNIX_URL:=http://waterlan.home.xs4all.nl/dos2unix/dos2unix-${PKG_DOS2UNIX_VERSION}.tar.gz};
-: ${PKG_DOS2UNIX_CFLAGS_BUILD_EXTRA:=${PACKAGES_CFLAGS_CONFIGURE}};
+: ${PKG_DOS2UNIX_CFLAGS_BUILD_EXTRA:=${NATIVE_PACKAGES_CFLAGS_CONFIGURE}};
: ${PKG_DOS2UNIX_IN_TREE:=1};
: ${PKG_DOS2UNIX_INSTALL_FILES:="../dos2unix-${PKG_DOS2UNIX_VERSION}/dos2unix=bin/ ../dos2unix-${PKG_DOS2UNIX_VERSION}/unix2dos=bin/ @dos2unix=bin/mac2unix @unix2dos=bin/unix2mac"};
: ${PKG_ED_SHA256SUM:=ad4489c0ad7a108c514262da28e6c2a426946fb408a3977ef1ed34308bdfd174};
diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group
index 6ee80c64..b9e32e6e 100644
--- a/groups/231.native_packages_etc.group
+++ b/groups/231.native_packages_etc.group
@@ -351,7 +351,7 @@ zstd")";
: ${PKG_ZSTD_SHA256SUM:=92e41b6e8dd26bbd46248e8aa1d86f1551bc221a796277ae9362954f26d605a9};
: ${PKG_ZSTD_VERSION:=1.3.4};
: ${PKG_ZSTD_URL:=https://github.com/facebook/zstd/archive/v${PKG_ZSTD_VERSION}.tar.gz};
-: ${PKG_ZSTD_CFLAGS_BUILD_EXTRA:=${NATIVE_PACKAGES_DEPS_CFLAGS_CONFIGURE}};
+: ${PKG_ZSTD_CFLAGS_BUILD_EXTRA:=${NATIVE_PACKAGES_CFLAGS_CONFIGURE}};
: ${PKG_ZSTD_IN_TREE:=1};
: ${PKG_ZSTD_SUBDIR:=zstd-${PKG_ZSTD_VERSION}};
diff --git a/groups/261.native_packages_x11.group b/groups/261.native_packages_x11.group
index 9e12c691..95d515f0 100644
--- a/groups/261.native_packages_x11.group
+++ b/groups/261.native_packages_x11.group
@@ -187,7 +187,6 @@ xtrans xwd xwin")";
: ${PKG_LIBXT_SHA256SUM:=46eeb6be780211fdd98c5109286618f6707712235fdd19df4ce1e6954f349f1a};
: ${PKG_LIBXT_VERSION:=1.1.5};
: ${PKG_LIBXT_URL:=https://www.x.org/releases/individual/lib/libXt-${PKG_LIBXT_VERSION}.tar.bz2};
-: ${PKG_LIBXT_CFLAGS_CONFIGURE:=${PACKAGES_CFLAGS_CONFIGURE_DEFAULT}};
: ${PKG_LIBXT_LDFLAGS_CONFIGURE:=-g};
: ${PKG_LIBXTST_DEPENDS:="libX11 libXext libXi xorgproto"};
: ${PKG_LIBXTST_SHA256SUM:=4655498a1b8e844e3d6f21f3b2c4e2b571effb5fd83199d428a6ba7ea4bf5204};
@@ -239,7 +238,7 @@ xtrans xwd xwin")";
: ${PKG_ST_VERSION:=0.7};
: ${PKG_ST_URL:=https://dl.suckless.org/st/st-${PKG_ST_VERSION}.tar.gz};
: ${PKG_ST_BUILD_STEPS_DISABLE:=install_make};
-: ${PKG_ST_CFLAGS_BUILD_EXTRA:=${LEAF_PACKAGES_CFLAGS_CONFIGURE} -I${PREFIX_NATIVE}/include/freetype2 -I${PREFIX_NATIVE}/include};
+: ${PKG_ST_CFLAGS_BUILD_EXTRA:="-I${PREFIX_NATIVE}/include/freetype2 -I${PREFIX_NATIVE}/include"};
: ${PKG_ST_IN_TREE:=1};
: ${PKG_ST_INSTALL_FILES:=../st-${PKG_ST_VERSION}/st=bin/ ../st-${PKG_ST_VERSION}/st.1=share/man/man1/ ../st-${PKG_ST_VERSION}/st.info=bin/};
: ${PKG_ST_LDFLAGS_BUILD_EXTRA:=-L${PREFIX_NATIVE}/lib -lX11 -lXft -lfreetype -lfontconfig};
diff --git a/midipix.env b/midipix.env
index b6df0bca..15ede3c2 100644
--- a/midipix.env
+++ b/midipix.env
@@ -79,6 +79,37 @@ DEFAULT_BUILD_VARS="
: ${DEFAULT_CFLAGS_CONFIGURE:=${DEFAULT_CFLAGS}};
: ${DEFAULT_CFLAGS_HOST:=$(rtl_get_var_unsafe "DEFAULT_CFLAGS_$(rtl_toupper "${BUILD}")_HOST")};
: ${DEFAULT_CFLAGS_RUNTIME:=$(rtl_get_var_unsafe "DEFAULT_CFLAGS_$(rtl_toupper "${BUILD}")_RUNTIME")};
+: ${DEFAULT_CPPFLAGS_DEBUG:="-g2 -O0"};
+: ${DEFAULT_CPPFLAGS_DEBUG_HOST:="-g0 -O2"};
+: ${DEFAULT_CPPFLAGS_DEBUG_RUNTIME:="-g3 -O0"};
+: ${DEFAULT_CPPFLAGS_RELEASE:="-g0 -O0"};
+: ${DEFAULT_CPPFLAGS_RELEASE_HOST:="-g0 -O0"};
+: ${DEFAULT_CPPFLAGS_RELEASE_RUNTIME:="-g0 -O0"};
+: ${DEFAULT_CPPFLAGS:=$(rtl_get_var_unsafe "DEFAULT_CPPFLAGS_$(rtl_toupper "${BUILD}")")};
+: ${DEFAULT_CPPFLAGS_CONFIGURE:=${DEFAULT_CPPFLAGS}};
+: ${DEFAULT_CPPFLAGS_HOST:=$(rtl_get_var_unsafe "DEFAULT_CPPFLAGS_$(rtl_toupper "${BUILD}")_HOST")};
+: ${DEFAULT_CPPFLAGS_RUNTIME:=$(rtl_get_var_unsafe "DEFAULT_CPPFLAGS_$(rtl_toupper "${BUILD}")_RUNTIME")};
+: ${DEFAULT_CXXFLAGS_DEBUG:="-g2 -O0"};
+: ${DEFAULT_CXXFLAGS_DEBUG_HOST:="-g0 -O2"};
+: ${DEFAULT_CXXFLAGS_DEBUG_RUNTIME:="-g3 -O0"};
+: ${DEFAULT_CXXFLAGS_RELEASE:="-g0 -O0"};
+: ${DEFAULT_CXXFLAGS_RELEASE_HOST:="-g0 -O0"};
+: ${DEFAULT_CXXFLAGS_RELEASE_RUNTIME:="-g0 -O0"};
+: ${DEFAULT_CXXFLAGS:=$(rtl_get_var_unsafe "DEFAULT_CXXFLAGS_$(rtl_toupper "${BUILD}")")};
+: ${DEFAULT_CXXFLAGS_CONFIGURE:=${DEFAULT_CXXFLAGS}};
+: ${DEFAULT_CXXFLAGS_HOST:=$(rtl_get_var_unsafe "DEFAULT_CXXFLAGS_$(rtl_toupper "${BUILD}")_HOST")};
+: ${DEFAULT_CXXFLAGS_RUNTIME:=$(rtl_get_var_unsafe "DEFAULT_CXXFLAGS_$(rtl_toupper "${BUILD}")_RUNTIME")};
+: ${DEFAULT_LDFLAGS_DEBUG:=""};
+: ${DEFAULT_LDFLAGS_DEBUG_HOST:=""};
+: ${DEFAULT_LDFLAGS_DEBUG_RUNTIME:=""};
+: ${DEFAULT_LDFLAGS_RELEASE:=""};
+: ${DEFAULT_LDFLAGS_RELEASE_HOST:=""};
+: ${DEFAULT_LDFLAGS_RELEASE_RUNTIME:=""};
+: ${DEFAULT_LDFLAGS:=$(rtl_get_var_unsafe "DEFAULT_LDFLAGS_$(rtl_toupper "${BUILD}")")};
+: ${DEFAULT_LDFLAGS_CONFIGURE:=${DEFAULT_LDFLAGS}};
+: ${DEFAULT_LDFLAGS_HOST:=$(rtl_get_var_unsafe "DEFAULT_LDFLAGS_$(rtl_toupper "${BUILD}")_HOST")};
+: ${DEFAULT_LDFLAGS_RUNTIME:=$(rtl_get_var_unsafe "DEFAULT_LDFLAGS_$(rtl_toupper "${BUILD}")_RUNTIME")};
+
: ${DEFAULT_GITROOT:=git://midipix.org};
: ${DEFAULT_GITROOT_HEAD:=git://midipix.org};
: ${DEFAULT_MAKE_INSTALL_VNAME:=DESTDIR};
diff --git a/pkgtool.sh b/pkgtool.sh
index c8dd2bb6..28e6dfd4 100755
--- a/pkgtool.sh
+++ b/pkgtool.sh
@@ -15,7 +15,7 @@ pkgtoolp_info() {
"${_group_name}" 1 "${_pkg_name}" "" "${BUILD_WORKDIR}"; then
_rc=1; _status="Error: failed to set package environment for \`${_pkg_name}'.";
else rtl_log_env_vars "package" $(rtl_get_vars_fast "^PKG_${_pkg_name_uc}");
- if [ -z "${PKG_DEPENDS}" ]; then
+ if [ -z "${PKG_DEPENDS:-}" ]; then
rtl_log_msg info "Package \`%s' has no dependencies." "${_pkg_name}";
else rtl_log_msg info "Direct dependencies of \`%s': %s" "${_pkg_name}" "${PKG_DEPENDS}";
if ! ex_pkg_unfold_depends 1 1 "${_group_name}" "${_pkg_names}" "${_pkg_name}" 0; then
@@ -186,6 +186,6 @@ pkgtool() {
fi;
};
-set +o errexit -o noglob; pkgtool "${@}";
+set +o errexit -o noglob -o nounset; pkgtool "${@}";
# vim:filetype=sh textwidth=0
diff --git a/subr/build_init.subr b/subr/build_init.subr
index 91784f83..6d1635db 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
buildp_init_args() {
@@ -11,86 +11,72 @@ buildp_init_args() {
&& [ -e "${PREFIX}/build.gitref" ]\
&& [ "$(git rev-parse HEAD)" = "$(cat "${PREFIX}/build.gitref")" ]; then
_rc=0; _status="Git repository has not changed since last build and --as-needed was specified.";
- else case "${ARG_PARALLEL}" in
- auto) if ! ARG_PARALLEL="$(rtl_get_cpu_count)"; then
- _rc=1; _status="Error: failed to get CPU count.";
- else
- ARG_PARALLEL=$((${ARG_PARALLEL}/2));
- fi; ;;
- "") ARG_PARALLEL=1; ;;
- *) if ! rtl_isnumber "${ARG_PARALLEL}"; then
- _rc=1; _status="Error: invalid jobs count \`${ARG_PARALLEL}'.";
- fi; ;;
+ else case "${ARG_FETCH_FORCE}" in
+ ipv4) DEFAULT_GIT_ARGS="$(rtl_lconcat "-4" "${DEFAULT_GIT_ARGS}")";
+ DEFAULT_WGET_ARGS="$(rtl_lconcat "-4" "${DEFAULT_GIT_ARGS}")"; ;;
+ ipv6) DEFAULT_GIT_ARGS="$(rtl_lconcat "-6" "${DEFAULT_GIT_ARGS}")";
+ DEFAULT_WGET_ARGS="$(rtl_lconcat "-6" "${DEFAULT_GIT_ARGS}")"; ;;
+ esac;
+ case "${ARG_RESTART}" in
+ \*\*\*[a-zA-Z]*)
+ ARG_RESTART="${ARG_RESTART#\*\*\*}"; ARG_RESTART_RECURSIVE=3; ;;
+ \*\*[a-zA-Z]*) ARG_RESTART="${ARG_RESTART#\*\*}"; ARG_RESTART_RECURSIVE=2; ;;
+ \*[a-zA-Z]*) ARG_RESTART="${ARG_RESTART#\*}"; ARG_RESTART_RECURSIVE=1; ;;
+ ALL) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=2; ;;
+ LAST) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=0;
+ if [ -n "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]\
+ && [ -e "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]; then
+ _last_pkg="$(cat "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}")";
+ rtl_fileop rm "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}";
+ rtl_state_clear "${BUILD_WORKDIR}" "${_last_pkg}";
+ ARG_RESTART="${_last_pkg}";
+ else
+ _rc=1; _status="Error: cannot rebuild last failed package.";
+ fi; ;;
esac;
if [ "${_rc:-0}" -eq 0 ]; then
- DEFAULT_BUILD_CPUS="${ARG_PARALLEL}";
- case "${ARG_FETCH_FORCE}" in
- ipv4) DEFAULT_GIT_ARGS="$(rtl_lconcat "-4" "${DEFAULT_GIT_ARGS}")";
- DEFAULT_WGET_ARGS="$(rtl_lconcat "-4" "${DEFAULT_GIT_ARGS}")"; ;;
- ipv6) DEFAULT_GIT_ARGS="$(rtl_lconcat "-6" "${DEFAULT_GIT_ARGS}")";
- DEFAULT_WGET_ARGS="$(rtl_lconcat "-6" "${DEFAULT_GIT_ARGS}")"; ;;
- esac;
case "${ARG_RESTART}" in
- \*\*\*[a-zA-Z]*)
- ARG_RESTART="${ARG_RESTART#\*\*\*}"; ARG_RESTART_RECURSIVE=3; ;;
- \*\*[a-zA-Z]*) ARG_RESTART="${ARG_RESTART#\*\*}"; ARG_RESTART_RECURSIVE=2; ;;
- \*[a-zA-Z]*) ARG_RESTART="${ARG_RESTART#\*}"; ARG_RESTART_RECURSIVE=1; ;;
- ALL) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=2; ;;
- LAST) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=0;
- if [ -n "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]\
- && [ -e "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]; then
- _last_pkg="$(cat "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}")";
- rtl_fileop rm "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}";
- rtl_state_clear "${BUILD_WORKDIR}" "${_last_pkg}";
- ARG_RESTART="${_last_pkg}";
- else
- _rc=1; _status="Error: cannot rebuild last failed package.";
- fi; ;;
+ *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="$(rtl_llift "${ARG_RESTART%%:*}" "," " ")"; ;;
+ *) ARG_RESTART="$(rtl_llift "${ARG_RESTART}" "," " ")"; ARG_RESTART_AT=ALL; ;;
esac;
- if [ "${_rc:-0}" -eq 0 ]; then
- case "${ARG_RESTART}" in
- *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="$(rtl_llift "${ARG_RESTART%%:*}" "," " ")"; ;;
- *) ARG_RESTART="$(rtl_llift "${ARG_RESTART}" "," " ")"; ARG_RESTART_AT=ALL; ;;
- esac;
- if ! ex_pkg_load_groups; then
- _rc=1; _status="Error: failed to load build groups.";
- else if ! rtl_lmatch "${ARG_DIST}" "rpm" ","; then
- EX_PKG_BUILD_GROUPS="$(rtl_lfilter "${EX_PKG_BUILD_GROUPS}" "host_deps_rpm")";
+ if ! ex_pkg_load_groups; then
+ _rc=1; _status="Error: failed to load build groups.";
+ else if ! rtl_lmatch "${ARG_DIST}" "rpm" ","; then
+ EX_PKG_BUILD_GROUPS="$(rtl_lfilter "${EX_PKG_BUILD_GROUPS}" "host_deps_rpm")";
+ fi;
+ if [ -z "${BUILD_GROUPS}" ]; then
+ BUILD_GROUPS="${EX_PKG_BUILD_GROUPS}";
+ else for _group in ${BUILD_GROUPS}; do
+ if ! rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then
+ _rc=1; _status="Error: unknown build group \`${_group}'."; break;
+ fi;
+ done;
+ fi;
+ if [ "${_rc:-0}" -eq 0 ]; then
+ if [ -n "${ARG_DIST}" ]; then
+ BUILD_GROUPS="$(rtl_lconcat "$(rtl_lfilter "${BUILD_GROUPS}" "dist")" "dist")";
fi;
- if [ -z "${BUILD_GROUPS}" ]; then
- BUILD_GROUPS="${EX_PKG_BUILD_GROUPS}";
- else for _group in ${BUILD_GROUPS}; do
- if ! rtl_lmatch "${EX_PKG_BUILD_GROUPS}" "${_group}"; then
- _rc=1; _status="Error: unknown build group \`${_group}'."; break;
+ if [ -n "${ARG_RESTART}" ]; then
+ for _pkg_name in ${ARG_RESTART}; do
+ if ! ex_pkg_find_package "${BUILD_GROUPS}" "${_pkg_name}" >/dev/null; then
+ _pkg_names_unknown="$(rtl_lconcat "${_pkg_names_unknown}" "${_pkg_name}")";
fi;
done;
+ case "$(rtl_llength "${_pkg_names_unknown}")" in
+ 0) ;;
+ 1) _rc=1; _status="Error: unknown package \`${_pkg_names_unknown}'."; ;;
+ *) _rc=1; _status="Error: unknown packages: $(rtl_subst "${_pkg_names_unknown}" " " ", ")"; ;;
+ esac;
fi;
- if [ "${_rc:-0}" -eq 0 ]; then
- if [ -n "${ARG_DIST}" ]; then
- BUILD_GROUPS="$(rtl_lconcat "$(rtl_lfilter "${BUILD_GROUPS}" "dist")" "dist")";
- fi;
- if [ -n "${ARG_RESTART}" ]; then
- for _pkg_name in ${ARG_RESTART}; do
- if ! ex_pkg_find_package "${BUILD_GROUPS}" "${_pkg_name}" >/dev/null; then
- _pkg_names_unknown="$(rtl_lconcat "${_pkg_names_unknown}" "${_pkg_name}")";
- fi;
- done;
- case "$(rtl_llength "${_pkg_names_unknown}")" in
- 0) ;;
- 1) _rc=1; _status="Error: unknown package \`${_pkg_names_unknown}'."; ;;
- *) _rc=1; _status="Error: unknown packages: $(rtl_subst "${_pkg_names_unknown}" " " ", ")"; ;;
- esac;
- fi;
- if [ "${_rc}" -eq 0 ]; then
- case "${ARG_VERBOSE:-0}" in
- 0) rtl_fileop_set_log 0; rtl_log_set_lvl 0; ;;
- 1) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
- 2) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
- 3) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
- 4) rtl_fileop_set_log 1; rtl_log_set_lvl 3; ;;
- *) _rc=1; _status="Error: invalid verbosity level (max. -vvvv)"; ;;
- esac;
- fi;
+ if [ "${_rc}" -eq 0 ]; then
+ case "${ARG_VERBOSE:-0}" in
+ 0) rtl_fileop_set_log 0; rtl_log_set_lvl 0; ;;
+ 1) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
+ 2) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
+ 3) rtl_fileop_set_log 0; rtl_log_set_lvl 2; ;;
+ 4) rtl_fileop_set_log 1; rtl_log_set_lvl 3; ;;
+ *) _rc=1; _status="Error: invalid verbosity level (max. -vvvv)"; ;;
+ esac;
fi;
fi;
fi;
@@ -156,7 +142,7 @@ buildp_init_getopts() {
: ${ARCH:="nt64"}; : ${BUILD:="debug"};
ARG_AS_NEEDED=0; ARG_CLEAN_BUILDS=""; ARG_DEBUG_MINIPIX=0; ARG_DIST=1; ARG_DUMP_IN="";
ARG_DUMP_ON_ABORT=0; ARG_FETCH_FORCE=0; ARG_PARALLEL=1; ARG_RELAXED=0; ARG_RESTART="";
- ARG_VERBOSE=0;
+ ARG_RESTART_AT=""; ARG_RESTART_RECURSIVE=""; ARG_VERBOSE=0;
while [ "${#}" -gt 0 ]; do
case "${1}" in
--as-needed) ARG_AS_NEEDED=1; _shiftfl=1; ;;
@@ -209,6 +195,22 @@ buildp_init_getopts() {
*) BUILD_GROUPS="$(rtl_lconcat "${BUILD_GROUPS}" "${_arg}")"; ;;
esac; shift;
done;
+ if [ "${_rc:-0}" -eq 0 ]; then
+ case "${ARG_PARALLEL}" in
+ auto) if ! ARG_PARALLEL="$(rtl_get_cpu_count)"; then
+ _rc=1; _status="Error: failed to get CPU count.";
+ else
+ ARG_PARALLEL=$((${ARG_PARALLEL}/2));
+ fi; ;;
+ "") ARG_PARALLEL=1; ;;
+ *) if ! rtl_isnumber "${ARG_PARALLEL}"; then
+ _rc=1; _status="Error: invalid jobs count \`${ARG_PARALLEL}'.";
+ fi; ;;
+ esac;
+ if [ "${_rc:-0}" -eq 0 ]; then
+ DEFAULT_BUILD_CPUS="${ARG_PARALLEL}";
+ fi;
+ fi;
fi;
return "${_rc}";
};
diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr
index 3dcfbc7e..e19d987d 100644
--- a/subr/ex_pkg.subr
+++ b/subr/ex_pkg.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
#
@@ -130,14 +130,14 @@ ex_pkg_load_groups() {
local _build_groups="" _fname="" _group="" _groups="";
for _fname in $(find ./groups -name *.group | sort); do
rtl_fileop source_opt "${_fname}";
- if [ -n "${GROUP_TARGET}" ]; then
+ if [ -n "${GROUP_TARGET:-}" ]; then
_group="${GROUP_TARGET}"; unset GROUP_TARGET;
else
_group="${_fname##*/}"; _group="${_group%.group}"; _group="${_group#*.}";
fi;
if ! rtl_lmatch "${_groups}" "${_group}"; then
_groups="$(rtl_lconcat "${_groups}" "${_group}")";
- if [ -n "${GROUP_AUTO}" ]; then
+ if [ -n "${GROUP_AUTO:-}" ]; then
if [ "${GROUP_AUTO:-0}" -ne 0 ]; then
_build_groups="$(rtl_lconcat "${_build_groups}" "${_group}")";
fi;
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 44ed8d43..669357cd 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
#
@@ -129,7 +129,7 @@ exp_pkg_dispatch_package() {
printf \"fail %s %s\n\" \"${_group_name}\" \"${_pkg_name}\" >&3; \
pkill -U "${$}"; \
fi;" EXIT HUP INT TERM USR1 USR2;
- set +o errexit -o noglob; BUILD_IS_PARENT=0; rtl_log_set_fname ""; rtl_log_set_no_attr 1;
+ set +o errexit -o noglob -o nounset; BUILD_IS_PARENT=0; rtl_log_set_fname ""; rtl_log_set_no_attr 1;
if ex_pkg_env "${_build_steps_default}" "${_build_vars_default}" \
"${_group_name}" 0 "${_pkg_name}" "${_restart_at}" "${_workdir}"; then
ex_pkg_exec "${_dispatch_fn}" "${_group_name}" "${_pkg_name}" "${_restart_at}";
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 48b57535..ca701296 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
#
@@ -15,17 +15,23 @@ exp_pkg_env_defaults() {
: ${PKG_NAME:="${_pkg_name}"};
: ${MIDIPIX_BUILD_PWD:="$(pwd)"};
: ${PKG_BASE_DIR:="${_workdir}/${_pkg_name}-${PKG_BUILD_TYPE}-${PKG_TARGET}"};
- : ${PKG_FNAME:="${PKG_URL##*/}"};
- : ${PKG_BUILD_STEPS:="$(rtl_lfilter "${_build_steps_default}" "${PKG_BUILD_STEPS_DISABLE}")"};
- if [ -z "${PKG_SUBDIR}" ]; then
- if [ -n "${PKG_URLS_GIT}" ]; then
+ if [ -n "${PKG_BUILD_STEPS_DISABLE:-}" ]; then
+ : ${PKG_BUILD_STEPS:="$(rtl_lfilter "${_build_steps_default}" "${PKG_BUILD_STEPS_DISABLE:-}")"};
+ else
+ : ${PKG_BUILD_STEPS:="${_build_steps_default}"};
+ fi;
+ if [ -n "${PKG_URL:-}" ]; then
+ : ${PKG_FNAME:="${PKG_URL##*/}"};
+ fi;
+ if [ -z "${PKG_SUBDIR:-}" ]; then
+ if [ -n "${PKG_URLS_GIT:-}" ]; then
PKG_SUBDIR="${PKG_URLS_GIT%%=*}";
- else case "${PKG_FNAME}" in
+ else case "${PKG_FNAME:-}" in
*.t*) PKG_SUBDIR="${PKG_FNAME%%.t*}"; ;;
*) PKG_SUBDIR="${_pkg_name}"; ;;
esac; fi;
fi;
- if [ -z "${PKG_BUILD_DIR}" ]; then
+ if [ -z "${PKG_BUILD_DIR:-}" ]; then
case "${PKG_IN_TREE:-0}" in
0) PKG_BUILD_DIR="obj"; ;;
1) PKG_BUILD_DIR="${PKG_SUBDIR}"; ;;
@@ -57,7 +63,7 @@ exp_pkg_env_set() {
rtl_set_vars _vars_set INHERIT_FROM "PKG_${_pkg_name}";
_var_prefixes="$(rtl_toupper "DEFAULT DEFAULT_${PKG_BUILD_TYPE} ${_group_name}")";
for _vname in $(rtl_lfilter "${_build_vars_default}" BUILD_TYPE); do
- if [ -n "${PKG_INHERIT_FROM}" ]; then
+ if [ -n "${PKG_INHERIT_FROM:-}" ]; then
rtl_set_vars _vars_set "${_vname}" \
"$(rtl_lconcat "${_var_prefixes}" \
"$(rtl_toupper "PKG_${PKG_INHERIT_FROM} PKG_${_pkg_name}")")"
@@ -67,7 +73,7 @@ exp_pkg_env_set() {
"$(rtl_toupper "PKG_${_pkg_name}")")";
fi;
done;
- IFS0="${IFS}"; IFS=":"; for _vname in ${PKG_ENV_VARS_EXTRA}; do
+ IFS0="${IFS}"; IFS=":"; for _vname in ${PKG_ENV_VARS_EXTRA:-}; do
export "${_vname}";
done; IFS="${IFS0}";
if [ "${_nounset:-0}" -eq 0 ]; then
diff --git a/subr/ex_pkg_exec.subr b/subr/ex_pkg_exec.subr
index 4519ce25..d21289b7 100644
--- a/subr/ex_pkg_exec.subr
+++ b/subr/ex_pkg_exec.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
exp_pkg_exec_filter_vars_fn() {
@@ -27,9 +27,9 @@ exp_pkg_exec_filter_vars_fn() {
#
exp_pkg_exec_pre() {
local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}";
- if [ -z "${PKG_URL}" ]\
- && [ -z "${PKG_URLS_GIT}" ]\
- && [ -z "${PKG_VERSION}" ]\
+ if [ -z "${PKG_URL:-}" ]\
+ && [ -z "${PKG_URLS_GIT:-}" ]\
+ && [ -z "${PKG_VERSION:-}" ]\
&& ! rtl_test_cmd "pkg_${_pkg_name}_all"; then
"${_dispatch_fn}" missing_pkg "${_group_name}" "${_pkg_name}";
return 1;
@@ -94,7 +94,7 @@ ex_pkg_exec() {
"pkg_${_pkg_name}_all" "${_restart_at}"; _rc="${?}";
else set -- ${PKG_BUILD_STEPS};
while [ ${#} -gt 0 ]; do
- _step="${1}"; _step_next="${2}"; shift;
+ _step="${1}"; _step_next="${2:-}"; shift;
if [ "${ARG_DUMP_IN}" = "${_step}" ]; then
printf "" > "${BUILD_WORKDIR}/${_pkg_name}.dump";
rtl_filter_vars exp_pkg_exec_filter_vars_fn >> "${BUILD_WORKDIR}/${_pkg_name}.dump";
diff --git a/subr/pkg_build.subr b/subr/pkg_build.subr
index 2433ea81..d1808213 100644
--- a/subr/pkg_build.subr
+++ b/subr/pkg_build.subr
@@ -1,27 +1,35 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_build() {
- local _no_autoconf="";
- if [ ! -x "${PKG_CONFIGURE}" ]; then
+ local _libtool="" _no_autoconf="";
+ case "${PKG_LIBTOOL:-}" in
+ "") _libtool=""; ;;
+ none) _libtool=""; ;;
+ *) _libtool="${PKG_LIBTOOL}"; ;;
+ esac;
+ if [ ! -x "${PKG_CONFIGURE:-}" ]; then
_no_autoconf=1;
fi;
# N.B. We only specify CC= here if the current package does not use GNU
# autoconf as it often abuses it by appending -std={gnu99,...} to it
# instead of amending CFLAGS.
- rtl_run_cmd_unsplit make \
- ${PKG_MAKEFLAGS_BUILD} \
- ${PKG_MAKEFLAGS_BUILD_EXTRA} \
- "AR=${PKG_AR}" "${_no_autoconf:+CC=${PKG_CC}}" \
- "RANLIB=${PKG_RANLIB}" \
- "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}" \
- "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}" \
- "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}" \
- "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"\
- "${PKG_PKG_CONFIG:+PKG_CONFIG=${PKG_PKG_CONFIG}}" \
- "${PKG_PKG_CONFIG_PATH:+PKG_CONFIG_PATH=${PKG_PKG_CONFIG_PATH}}"\
- "LIBTOOL=${PKG_LIBTOOL:-slibtool}";
+ rtl_run_cmd_unsplit make \
+ ${PKG_MAKEFLAGS_BUILD:-} \
+ ${PKG_MAKEFLAGS_BUILD_EXTRA:-} \
+ "AR=${PKG_AR}" "${_no_autoconf:+CC=${PKG_CC}}" "RANLIB=${PKG_RANLIB}" \
+ "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}" \
+ "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}" \
+ "${PKG_CPPFLAGS_BUILD:+CPPFLAGS=${PKG_CPPFLAGS_BUILD}}" \
+ "${PKG_CPPFLAGS_BUILD_EXTRA:+CPPFLAGS+=${PKG_CPPFLAGS_BUILD_EXTRA}}" \
+ "${PKG_CXXFLAGS_BUILD:+CXXFLAGS=${PKG_CXXFLAGS_BUILD}}" \
+ "${PKG_CXXFLAGS_BUILD_EXTRA:+CXXFLAGS+=${PKG_CXXFLAGS_BUILD_EXTRA}}" \
+ "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}" \
+ "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}" \
+ "${PKG_PKG_CONFIG:+PKG_CONFIG=${PKG_PKG_CONFIG}}" \
+ "${PKG_PKG_CONFIG_PATH:+PKG_CONFIG_PATH=${PKG_PKG_CONFIG_PATH}}" \
+ ${_libtool:+"LIBTOOL=${_libtool}"};
};
# vim:filetype=sh
diff --git a/subr/pkg_clean.subr b/subr/pkg_clean.subr
index a7df7920..39b0ead5 100644
--- a/subr/pkg_clean.subr
+++ b/subr/pkg_clean.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_clean() {
diff --git a/subr/pkg_configure.subr b/subr/pkg_configure.subr
index 974e708f..f2b64f92 100644
--- a/subr/pkg_configure.subr
+++ b/subr/pkg_configure.subr
@@ -1,20 +1,27 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_configure() {
local _rc=0;
- if [ -x "${PKG_CONFIGURE}" ]; then
- rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}" PYTHON "${PKG_PYTHON}";
+ if [ -x "${PKG_CONFIGURE:-}" ]; then
+ rtl_export_vars \
+ PKG_CONFIG "${PKG_PKG_CONFIG:-}" \
+ PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH:-}" \
+ PYTHON "${PKG_PYTHON:-}";
AR="${PKG_AR}" \
CC="${PKG_CC}" \
RANLIB="${PKG_RANLIB}" \
- CFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}" \
- CPPFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}" \
- CXXFLAGS="${PKG_CXXFLAGS_CONFIGURE}${PKG_CXXFLAGS_CONFIGURE_EXTRA:+ ${PKG_CXXFLAGS_CONFIGURE_EXTRA}}" \
- LDFLAGS="${PKG_LDFLAGS_CONFIGURE}${PKG_LDFLAGS_CONFIGURE_EXTRA:+ ${PKG_LDFLAGS_CONFIGURE_EXTRA}}" \
- "${PKG_CONFIGURE}" ${PKG_CONFIGURE_ARGS} ${PKG_CONFIGURE_ARGS_EXTRA} ${PKG_CONFIGURE_ARGS_EXTRA_DEBUG}; _rc="${?}"
- rtl_export_vars -u PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}" PYTHON "${PKG_PYTHON}";
+ CFLAGS="${PKG_CFLAGS_CONFIGURE:-}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}" \
+ CPPFLAGS="${PKG_CFLAGS_CONFIGURE:-}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}" \
+ CXXFLAGS="${PKG_CXXFLAGS_CONFIGURE:-}${PKG_CXXFLAGS_CONFIGURE_EXTRA:+ ${PKG_CXXFLAGS_CONFIGURE_EXTRA}}" \
+ LDFLAGS="${PKG_LDFLAGS_CONFIGURE:-}${PKG_LDFLAGS_CONFIGURE_EXTRA:+ ${PKG_LDFLAGS_CONFIGURE_EXTRA}}" \
+ "${PKG_CONFIGURE}" ${PKG_CONFIGURE_ARGS:-} ${PKG_CONFIGURE_ARGS_EXTRA:-} ${PKG_CONFIGURE_ARGS_EXTRA_DEBUG:-};
+ _rc="${?}"
+ rtl_export_vars -u \
+ PKG_CONFIG "${PKG_PKG_CONFIG:-}" \
+ PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH:-}" \
+ PYTHON "${PKG_PYTHON:-}";
return "${_rc}";
fi;
};
diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr
index 32daedc1..86a9dd39 100644
--- a/subr/pkg_configure_autotools.subr
+++ b/subr/pkg_configure_autotools.subr
@@ -1,12 +1,12 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_configure_autotools() {
local _config_cache="" _fname="" _subdir_tgt="";
if rtl_exists_any "${PKG_BASE_DIR}/${PKG_SUBDIR}" \
"config.guess" "configure.ac" "configure.in" "configure";
- then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}";
+ then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH:-}";
if [ "${PKG_FORCE_AUTORECONF:-0}" -eq 1 ]\
&& ! (cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoreconf -fiv); then
return 1;
@@ -50,10 +50,11 @@ pkg_configure_autotools() {
if ! rtl_fileop touch "${PKG_BUILD_DIR}/config.cache"; then
return 1;
else for _config_cache in \
- "${PKG_CONFIG_CACHE}" \
- "${PKG_CONFIG_CACHE_LOCAL}" \
- "${PKG_CONFIG_CACHE_EXTRA}";
- do if ! printf "%s" "${_config_cache}" |\
+ "${PKG_CONFIG_CACHE:-}" \
+ "${PKG_CONFIG_CACHE_LOCAL:-}" \
+ "${PKG_CONFIG_CACHE_EXTRA:-}";
+ do if [ -n "${_config_cache}" ]\
+ && ! printf "%s\n" "${_config_cache}" |\
tr " " "\n" >> "${PKG_BUILD_DIR}/config.cache"; then
return 1;
fi;
@@ -63,7 +64,7 @@ pkg_configure_autotools() {
fi;
fi;
fi;
- rtl_export_vars -u PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}";
+ rtl_export_vars -u PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH:-}";
fi;
};
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index 88f3f3d1..6b4bcdd3 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_configure_patch() {
@@ -10,7 +10,7 @@ pkg_configure_patch() {
"${_patch_dir}/${_pkg_name}/"*.patch \
"${_patch_dir}/${_pkg_name_full}.local.patch" \
"${_patch_dir}/${_pkg_name_full}.local@${BUILD_HNAME}.patch" \
- ${PKG_PATCHES_EXTRA}; do
+ ${PKG_PATCHES_EXTRA:-}; do
if [ -r "${_patch_fname}" ]\
&& ! rtl_lmatch "${_patches_done}" "${_patch_fname}"; then
if ! patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}"; then
diff --git a/subr/pkg_configure_patch_pre.subr b/subr/pkg_configure_patch_pre.subr
index 434b1cf7..c78b65b2 100644
--- a/subr/pkg_configure_patch_pre.subr
+++ b/subr/pkg_configure_patch_pre.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkgp_configure_patch_pre() {
@@ -15,8 +15,11 @@ pkgp_configure_patch_pre() {
};
pkgp_configure_patch_pre_chainport() {
- local _chainport_patch_fname="${BUILD_WORKDIR}/chainport/patches/${PKG_NAME%%_*}/${PKG_NAME%%_*}-${PKG_VERSION}.midipix.patch"\
- _chainport_patch_dname="${PKG_BASE_DIR}/${PKG_SUBDIR}/patches/${PKG_NAME%%_*}" _oldpwd="";
+ local _chainport_patch_dname="" _chainport_patch_fname="" _oldpwd="";
+ _chainport_patch_dname="${PKG_BASE_DIR}/${PKG_SUBDIR}/patches/${PKG_NAME%%_*}";
+ if [ -n "${PKG_VERSION:-}" ]; then
+ _chainport_patch_fname="${BUILD_WORKDIR}/chainport/patches/${PKG_NAME%%_*}/${PKG_NAME%%_*}-${PKG_VERSION}.midipix.patch";
+ fi;
if [ -e "${_chainport_patch_fname}" ]; then
if ! rtl_fileop mkdir "${_chainport_patch_dname}"\
|| ! rtl_fileop cp "${_chainport_patch_fname}" "${_chainport_patch_dname}"; then
diff --git a/subr/pkg_fetch_download.subr b/subr/pkg_fetch_download.subr
index 126675ad..57cad8be 100644
--- a/subr/pkg_fetch_download.subr
+++ b/subr/pkg_fetch_download.subr
@@ -1,14 +1,14 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_fetch_download() {
- if [ -n "${PKG_URL}" ]; then
+ if [ -n "${PKG_URL:-}" ]; then
if ! rtl_fetch_url_wget "${PKG_URL}" "${PKG_SHA256SUM}" "${PKG_FNAME}"; then
return 1;
fi;
fi;
- if [ -n "${PKG_URLS_GIT}" ]; then
+ if [ -n "${PKG_URLS_GIT:-}" ]; then
if ! rtl_fetch_urls_git "${PKG_BASE_DIR}" ${PKG_URLS_GIT}; then
return 1;
fi;
diff --git a/subr/pkg_fetch_extract.subr b/subr/pkg_fetch_extract.subr
index 8a9d8319..e91e7a6a 100644
--- a/subr/pkg_fetch_extract.subr
+++ b/subr/pkg_fetch_extract.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkgp_fetch_extract_type() {
@@ -12,7 +12,7 @@ pkgp_fetch_extract_type() {
};
pkg_fetch_extract() {
- if [ -n "${PKG_URL}" ]; then
+ if [ -n "${PKG_URL:-}" ]; then
_oldpwd="${PWD}";
if ! rtl_fileop cd "${PKG_BASE_DIR}"\
|| ! rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}"; then
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index 4cefa2d1..8a033572 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install() {
@@ -44,7 +44,7 @@ pkg_install() {
return 1;
else
_pkglist_name="${PKG_BASE_DIR##*/}"; _pkglist_name="${_pkglist_name%%-*}";
- if ! printf "%s" "${_pkglist_name}" >> "${PREFIX}/pkglist.${PKG_BUILD_TYPE}"; then
+ if ! printf "%s\n" "${_pkglist_name}" >> "${PREFIX}/pkglist.${PKG_BUILD_TYPE}"; then
return 1;
fi;
fi;
diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr
index 2c6703fb..76460da3 100644
--- a/subr/pkg_install_files.subr
+++ b/subr/pkg_install_files.subr
@@ -1,9 +1,9 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkgp_install_files() {
- if [ -n "${PKG_INSTALL_FILES}" ]; then
+ if [ -n "${PKG_INSTALL_FILES:-}" ]; then
if ! rtl_install -v "${PKG_DESTDIR}" ${PKG_INSTALL_FILES}; then
return 1;
fi;
diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr
index 76c7bfdb..a13105ab 100644
--- a/subr/pkg_install_libs.subr
+++ b/subr/pkg_install_libs.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkgp_install_libs_purge_la() {
diff --git a/subr/pkg_install_make.subr b/subr/pkg_install_make.subr
index 4babac8f..a5e58f60 100644
--- a/subr/pkg_install_make.subr
+++ b/subr/pkg_install_make.subr
@@ -1,16 +1,22 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install_make() {
- rtl_run_cmd_unsplit make \
- ${PKG_MAKEFLAGS_INSTALL} \
- ${PKG_MAKEFLAGS_INSTALL_EXTRA} \
- AR=${PKG_AR} CC=${PKG_CC} RANLIB=${PKG_RANLIB} \
- "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \
- "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \
- "${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PKG_DESTDIR}/" \
- ${PKG_INSTALL_TARGET:=install};
+ local _libtool="";
+ case "${PKG_LIBTOOL:-}" in
+ "") _libtool=""; ;;
+ none) _libtool=""; ;;
+ *) _libtool="${PKG_LIBTOOL}"; ;;
+ esac;
+ rtl_run_cmd_unsplit make \
+ ${PKG_MAKEFLAGS_INSTALL:-} \
+ ${PKG_MAKEFLAGS_INSTALL_EXTRA:-} \
+ AR="${PKG_AR}" CC="${PKG_CC}" RANLIB="${PKG_RANLIB}" \
+ "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \
+ ${_libtool:+"LIBTOOL=${_libtool}"} \
+ "${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PKG_DESTDIR}/" \
+ ${PKG_INSTALL_TARGET:-install};
};
# vim:filetype=sh
diff --git a/subr/pkg_install_rpm.subr b/subr/pkg_install_rpm.subr
index 6cc373ff..c0ba3e5e 100644
--- a/subr/pkg_install_rpm.subr
+++ b/subr/pkg_install_rpm.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install_rpm() {
@@ -7,9 +7,9 @@ pkg_install_rpm() {
if rtl_lmatch "${ARG_DIST}" "rpm" ","\
&& [ "${PKG_RPM_DISABLE:-0}" -eq 0 ]\
&& [ -x "$(which rpmbuild 2>/dev/null)" ]; then
- if [ -n "${PKG_URL}" ]; then
+ if [ -n "${PKG_URL:-}" ]; then
_pkg_url="${PKG_URL}"; _pkg_version_full="${PKG_VERSION}"; _pkg_version_rpm="${PKG_VERSION%%-*}";
- elif [ -n "${PKG_URLS_GIT}" ]; then
+ elif [ -n "${PKG_URLS_GIT:-}" ]; then
_pkg_version_rpm="$(cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && git rev-parse HEAD)";
_pkg_version_full="${_pkg_version_rpm} ($(cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && git rev-parse --abbrev-ref HEAD))";
_pkg_url="${PKG_URLS_GIT%% *}"; _pkg_url="${_pkg_url##*=}"; _pkg_url="${_pkg_url%%@*}";
diff --git a/subr/pkg_install_subdirs.subr b/subr/pkg_install_subdirs.subr
index 8e6e0429..c9e4cd39 100644
--- a/subr/pkg_install_subdirs.subr
+++ b/subr/pkg_install_subdirs.subr
@@ -1,12 +1,12 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install_subdirs() {
local _spec="";
for _spec in \
- "${PKG_INSTALL_FILES_DESTDIR}" \
- "${PKG_INSTALL_FILES_DESTDIR_EXTRA}"; do
+ "${PKG_INSTALL_FILES_DESTDIR:-}" \
+ "${PKG_INSTALL_FILES_DESTDIR_EXTRA:-}"; do
if ! rtl_install "${PKG_DESTDIR}" ${_spec}; then
return 1;
fi;
diff --git a/subr/pkgtool_init.subr b/subr/pkgtool_init.subr
index f92572fb..309dc612 100644
--- a/subr/pkgtool_init.subr
+++ b/subr/pkgtool_init.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkgtoolp_init_args() {
diff --git a/subr/rtl.subr b/subr/rtl.subr
index f029a8e1..ef9d63ea 100644
--- a/subr/rtl.subr
+++ b/subr/rtl.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_basename() { local _fname="${1##*/}"; printf "%s" "${_fname}"; };
diff --git a/subr/rtl_complex.subr b/subr/rtl_complex.subr
index 0e39178d..2ce5dd16 100644
--- a/subr/rtl_complex.subr
+++ b/subr/rtl_complex.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_check_path_vars() {
@@ -117,7 +117,7 @@ rtl_get_var_unsafe() {
else
_vname="${1}";
fi;
- eval echo \${${_vname}};
+ eval echo \${${_vname}} 2>/dev/null;
};
rtl_get_vars_fast() {
diff --git a/subr/rtl_fetch.subr b/subr/rtl_fetch.subr
index e93d69eb..1fd72e99 100644
--- a/subr/rtl_fetch.subr
+++ b/subr/rtl_fetch.subr
@@ -1,11 +1,12 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
exp_rtl_fetch_url_git() {
local _tgtdir="${1}" _subdir="${2}" _url="${3}" _branch="${4}" \
_oldpwd="";
- (set -o errexit -o noglob; trap "rm -f \"${BUILD_DLCACHEDIR}/${_subdir%%[/]}.fetching\"" EXIT;
+ (set -o errexit -o noglob -o nounset;
+ trap "rm -f \"${BUILD_DLCACHEDIR}/${_subdir%%[/]}.fetching\"" EXIT;
while true; do
if flock -E 622 -w 3600 4; then
break;
@@ -67,7 +68,8 @@ rtl_fetch_url_wget() {
_target_fname="$(rtl_basename "${_url}")";
fi;
_url_dst="${BUILD_DLCACHEDIR}/${_target_fname}";
- (set -o errexit -o noglob; trap "_rc=\"\${?}\" ;rm -f \"${_url_dst}.fetching\"; exit \"\${_rc}\";" EXIT;
+ (set -o errexit -o noglob -o nounset;
+ trap "_rc=\"\${?}\" ;rm -f \"${_url_dst}.fetching\"; exit \"\${_rc}\";" EXIT;
while true; do
if flock -E 622 -w 3600 4; then
break;
diff --git a/subr/rtl_fileop.subr b/subr/rtl_fileop.subr
index fd45f67f..64538c59 100644
--- a/subr/rtl_fileop.subr
+++ b/subr/rtl_fileop.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
#
@@ -28,28 +28,28 @@ rtl_fileop() {
case "${_op}" in
cd) if [ \( -z "${1}" \) -o ! \( -L "${1}" -o -e "${1}" \) ]; then
rtl_log_msg fatalexit "Invalid or non-existent directory \`%s'." "${1}";
- elif rtlp_fileop_check "${PREFIX}" "${1}"; then
+ elif rtlp_fileop_check "${PREFIX:-}" "${1}"; then
rtlp_fileop_log "Changing working directory to \`${1}'.";
cd -- "${1}"; _rc="${?}";
fi; ;;
chmod) if [ "${#}" -lt 2 ]; then
rtl_log_msg fatalexit "Missing parameters (in: chmod %s.)" "${*}";
elif _mode="${1}" && shift\
- && rtlp_fileop_check "${PREFIX}" "${*}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${*}"; then
rtlp_fileop_log "Changing file mode bits of \`${*}' to \`${_mode}'.";
chmod -- "${_mode}" "${@}"; _rc="${?}";
fi; ;;
chown) if [ "${#}" -lt 2 ]; then
rtl_log_msg fatalexit "Missing parameters (in: chown %s.)" "${*}";
elif _owner="${1}" && shift\
- && rtlp_fileop_check "${PREFIX}" "${*}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${*}"; then
rtlp_fileop_log "Changing file owner of \`${*}' to \`${_owner}'.";
chown -- "${_owner}" "${@}"; _rc="${?}";
fi; ;;
cp_follow)
if [ "${#}" -lt 2 ]; then
rtl_log_msg fatalexit "Missing parameters (in: cp_follow %s}.)" "${*}";
- elif rtlp_fileop_check "${PREFIX}" "${*}"; then
+ elif rtlp_fileop_check "${PREFIX:-}" "${*}"; then
_src="${*}"; _src="${_src% *}";
_dst="${*}"; _dst="${_dst##* }";
rtlp_fileop_log "Copying \`${_src}' into \`${_dst}' w/ -pLR.";
@@ -57,7 +57,7 @@ rtl_fileop() {
fi; ;;
cp) if [ "${#}" -lt 2 ]; then
rtl_log_msg fatalexit "Missing parameters (in: cp %s.)" "${*}";
- elif rtlp_fileop_check "${PREFIX}" "${*}"; then
+ elif rtlp_fileop_check "${PREFIX:-}" "${*}"; then
_src="${*}"; _src="${_src% *}";
_dst="${*}"; _dst="${_dst##* }";
rtlp_fileop_log "Copying \`${_src}' into \`${_dst}' w/ -pPR.";
@@ -69,7 +69,7 @@ rtl_fileop() {
else _dst="$(while [ ""${#}"" -gt 2 ]; do shift; done; printf "%s" "${2}")";
_install_args="$(while [ ""${#}"" -gt 2 ]; do printf "%s" "${1}"; shift; done)";
_src="$(while [ ""${#}"" -gt 2 ]; do shift; done; printf "%s" "${1}")";
- if rtlp_fileop_check "${PREFIX}" "${_dst}" "${_src}"; then
+ if rtlp_fileop_check "${PREFIX:-}" "${_dst}" "${_src}"; then
rtlp_fileop_log "Installing \`${_src}' into \`${_dst}' w/ ${_install_args}.";
install "${@}"; _rc="${?}";
fi;
@@ -77,7 +77,7 @@ rtl_fileop() {
ln_symbolic)
if [ \( -z "${1}" \) -o \( -z "${2}" \) ]; then
rtl_log_msg fatalexit "Missing parameters (in: ln_symbolic %s.)" "${*}";
- elif rtlp_fileop_check "${PREFIX}" "${2}"; then
+ elif rtlp_fileop_check "${PREFIX:-}" "${2}"; then
if rtl_fileop test "${2}"; then
rtl_fileop rm "${2}";
fi;
@@ -88,7 +88,7 @@ rtl_fileop() {
fi; ;;
mv) if [ \( -z "${1}" \) -o \( -z "${2}" \) ]; then
rtl_log_msg fatalexit "Missing parameters (in: mv %s.)" "${*}";
- elif rtlp_fileop_check "${PREFIX}" "${1}" "${2}"; then
+ elif rtlp_fileop_check "${PREFIX:-}" "${1}" "${2}"; then
rtlp_fileop_log "Moving \`${1}' to \`${2}' w/ -fs";
mv -f -- "${1}" "${2}"; _rc="${?}";
fi; ;;
@@ -98,36 +98,36 @@ rtl_fileop() {
rtl_log_msg fatalexit "Missing parameters (in: %s %s.)" "${_op}" "${*}";
elif [ "${_op}" = mkdir ]\
&& [ ! -d "${1}" ]\
- && rtlp_fileop_check "${PREFIX}" "${1}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then
if rtl_fileop test "${1}"; then
rtl_fileop rm "${1}";
fi;
rtlp_fileop_log "Making directory \`${1}'.";
mkdir -p -- "${1}"; _rc="${?}";
elif [ "${_op}" = mkfifo ]\
- && rtlp_fileop_check "${PREFIX}" "${1}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then
if rtl_fileop test "${1}"; then
rtl_fileop rm "${1}";
fi;
rtlp_fileop_log "Creating FIFO \`${1}'.";
- rtlp_fileop_check "${PREFIX}" "${1}";
+ rtlp_fileop_check "${PREFIX:-}" "${1}";
mkfifo -- "${1}"; _rc="${?}";
elif [ "${_op}" = rm ]\
&& rtl_fileop test "${1}"\
- && rtlp_fileop_check "${PREFIX}" "${1}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then
rtlp_fileop_log "Removing directory or file \`${1}'.";
rm -rf -- "${1}"; _rc="${?}";
elif [ "${_op}" = source_opt ]\
&& rtl_fileop test "${1}"\
- && rtlp_fileop_check "${PREFIX}" "${1}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then
rtlp_fileop_log "Sourcing file \`${1}'.";
. "${1}"; _rc="${?}";
elif [ "${_op}" = test ]\
- && rtlp_fileop_check "${PREFIX}" "${1}"\
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"\
&& ! [ \( -L "${1}" \) -o \( -e "${1}" \) ]; then
return 1;
elif [ "${_op}" = touch ]\
- && rtlp_fileop_check "${PREFIX}" "${1}"; then
+ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then
rtlp_fileop_log "Touching file \`${1}'.";
touch -- "${1}"; _rc="${?}";
fi; shift;
diff --git a/subr/rtl_install.subr b/subr/rtl_install.subr
index a1c70a01..b57c68f2 100644
--- a/subr/rtl_install.subr
+++ b/subr/rtl_install.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_install() {
diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr
index b1105bab..c4c563bf 100644
--- a/subr/rtl_list.subr
+++ b/subr/rtl_list.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_lconcat() {
@@ -45,7 +45,7 @@ rtl_llift() {
};
rtl_lmatch() {
- local _list="${1}" _item="${2}" _sep="${3}";
+ local _list="${1}" _item="${2}" _sep="${3:- }";
[ -n "$(rtl_lsearch "${_list}" "${_item}" "${_sep}")" ];
};
diff --git a/subr/rtl_log.subr b/subr/rtl_log.subr
index 860ccf03..b91d1374 100644
--- a/subr/rtl_log.subr
+++ b/subr/rtl_log.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
#
diff --git a/subr/rtl_state.subr b/subr/rtl_state.subr
index 1ee8258b..6d539563 100644
--- a/subr/rtl_state.subr
+++ b/subr/rtl_state.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_state_clear() {
@@ -25,8 +25,7 @@ rtl_state_set() {
};
rtl_state_test() {
- local _workdir="${1}" _pkg_name="${2}" _build_step="${3}" \
- _restart_at="${4}" _done_fname="";
+ local _workdir="${1}" _pkg_name="${2}" _build_step="${3}" _restart_at="${4:-}" _done_fname="";
_done_fname="${_workdir}/.${_pkg_name}.${_build_step}";
if [ -z "${_restart_at}" ]; then
rtl_fileop test "${_done_fname}";
diff --git a/subr/rtl_string.subr b/subr/rtl_string.subr
index 2dd9e27a..e642bebe 100644
--- a/subr/rtl_string.subr
+++ b/subr/rtl_string.subr
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
rtl_isnumber() {
diff --git a/vars/apr.vars b/vars/apr.vars
index 4ed7cbbd..42568202 100644
--- a/vars/apr.vars
+++ b/vars/apr.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_APR_CONFIG_CACHE_EXTRA:="
diff --git a/vars/bash.vars b/vars/bash.vars
index 10bc6eab..94db72a8 100644
--- a/vars/bash.vars
+++ b/vars/bash.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_BASH_CONFIG_CACHE_EXTRA:="
diff --git a/vars/binutils.vars b/vars/binutils.vars
index bc5e4b3b..a6907df4 100644
--- a/vars/binutils.vars
+++ b/vars/binutils.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_binutils_configure_patch_post() {
diff --git a/vars/bison.vars b/vars/bison.vars
index 4e0d43b5..252b781a 100644
--- a/vars/bison.vars
+++ b/vars/bison.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_BISON_CONFIG_CACHE_EXTRA:="
diff --git a/vars/busybox.vars b/vars/busybox.vars
index 7fb88cdd..e526fc00 100644
--- a/vars/busybox.vars
+++ b/vars/busybox.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_busybox_configure() {
diff --git a/vars/ca_certificates.vars b/vars/ca_certificates.vars
index 9a162dfe..cd423ff8 100644
--- a/vars/ca_certificates.vars
+++ b/vars/ca_certificates.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_ca_certificates_install_make_pre() {
diff --git a/vars/chainport_host.vars b/vars/chainport_host.vars
index a4108eb4..40dd3516 100644
--- a/vars/chainport_host.vars
+++ b/vars/chainport_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_chainport_host_install_make() {
diff --git a/vars/clang_host.vars b/vars/clang_host.vars
index 851564f1..b9909276 100644
--- a/vars/clang_host.vars
+++ b/vars/clang_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_clang_host_configure() {
diff --git a/vars/cmake.vars b/vars/cmake.vars
index 4a830a6e..df190732 100644
--- a/vars/cmake.vars
+++ b/vars/cmake.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_cmake_configure() {
diff --git a/vars/dbus_host.vars b/vars/dbus_host.vars
index 899133ea..dc22cb2b 100644
--- a/vars/dbus_host.vars
+++ b/vars/dbus_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_dbus_host_install_pre() {
diff --git a/vars/emacs.vars b/vars/emacs.vars
index 06d4d9b5..5cdfed56 100644
--- a/vars/emacs.vars
+++ b/vars/emacs.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_EMACS_CONFIG_CACHE_EXTRA:="
diff --git a/vars/gcc.vars b/vars/gcc.vars
index f2354ca1..eacb9910 100644
--- a/vars/gcc.vars
+++ b/vars/gcc.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
# Order: stage1_host, runtime_host, libstdcpp_v3_host, full_host, full
# Order: stage1_mingw32, native_mingw32
#
@@ -219,7 +219,7 @@ pkg_gcc_full_all() {
fi;
pkgp_gcc_state_set "patch" -"configure";
fi;
- pkgp_gcc_setup_env "${PKG_VERSION}";
+ pkgp_gcc_setup_vars; pkgp_gcc_setup_env;
if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
rtl_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}" || return 1;
if [ \! -d "${PKG_PREFIX}/${PKG_TARGET}/usr" ]; then
diff --git a/vars/gdb.vars b/vars/gdb.vars
index 1c8e5326..0a5e2eb4 100644
--- a/vars/gdb.vars
+++ b/vars/gdb.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_gdb_configure_patch_post() {
diff --git a/vars/gdk.vars b/vars/gdk.vars
index 0274be8c..c1449292 100644
--- a/vars/gdk.vars
+++ b/vars/gdk.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_GDB_CONFIG_CACHE_EXTRA:="
diff --git a/vars/ghostscript.vars b/vars/ghostscript.vars
index e3fef154..c604580a 100644
--- a/vars/ghostscript.vars
+++ b/vars/ghostscript.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_ghostscript_configure_patch_pre() {
diff --git a/vars/git.vars b/vars/git.vars
index 80d24c8b..b44ff74f 100644
--- a/vars/git.vars
+++ b/vars/git.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_GIT_CONFIG_CACHE_EXTRA:="
diff --git a/vars/glib.vars b/vars/glib.vars
index 23b4ca7e..8031f5bf 100644
--- a/vars/glib.vars
+++ b/vars/glib.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_GLIB_CONFIG_CACHE_EXTRA:="
diff --git a/vars/gnutls.vars b/vars/gnutls.vars
index 651d17f5..41832dea 100644
--- a/vars/gnutls.vars
+++ b/vars/gnutls.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_GNUTLS_CONFIG_CACHE_EXTRA:="
diff --git a/vars/htop.vars b/vars/htop.vars
index bb4d0829..3d6203d7 100644
--- a/vars/htop.vars
+++ b/vars/htop.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_HTOP_CONFIG_CACHE_EXTRA:="
diff --git a/vars/install_strip_host.vars b/vars/install_strip_host.vars
index 624cb749..39cd15e4 100644
--- a/vars/install_strip_host.vars
+++ b/vars/install_strip_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_install_strip_host_all() {
diff --git a/vars/libevent.vars b/vars/libevent.vars
index bfefd791..2e83eb3e 100644
--- a/vars/libevent.vars
+++ b/vars/libevent.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_LIBEVENT_CONFIG_CACHE_EXTRA:="
diff --git a/vars/libfirm.vars b/vars/libfirm.vars
index 2ec01b98..47886b8e 100644
--- a/vars/libfirm.vars
+++ b/vars/libfirm.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_cparser_configure_pre() {
diff --git a/vars/libgcrypt.vars b/vars/libgcrypt.vars
index a7f08444..847eab80 100644
--- a/vars/libgcrypt.vars
+++ b/vars/libgcrypt.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_LIBGCRYPT_CONFIG_CACHE_EXTRA:="
diff --git a/vars/libjpeg_turbo.vars b/vars/libjpeg_turbo.vars
index a8f1a8d5..e89baf78 100644
--- a/vars/libjpeg_turbo.vars
+++ b/vars/libjpeg_turbo.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libjpeg_turbo_configure() {
diff --git a/vars/libksba.vars b/vars/libksba.vars
index 1560e097..1948e3da 100644
--- a/vars/libksba.vars
+++ b/vars/libksba.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_LIBKSBA_CONFIG_CACHE_EXTRA:="
diff --git a/vars/libnettle.vars b/vars/libnettle.vars
index 863da683..86e82816 100644
--- a/vars/libnettle.vars
+++ b/vars/libnettle.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libnettle_install_make_post() {
diff --git a/vars/libpcap.vars b/vars/libpcap.vars
index 2fada3bd..2edff37b 100644
--- a/vars/libpcap.vars
+++ b/vars/libpcap.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_LIBPCAP_CONFIG_CACHE_EXTRA:="
diff --git a/vars/libressl_host.vars b/vars/libressl_host.vars
index 3a216f06..212cd0f5 100644
--- a/vars/libressl_host.vars
+++ b/vars/libressl_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libressl_host_install_pre() {
diff --git a/vars/libsolv.vars b/vars/libsolv.vars
index 494b0ade..84472c9d 100644
--- a/vars/libsolv.vars
+++ b/vars/libsolv.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libsolv_configure() {
diff --git a/vars/libtool_host.vars b/vars/libtool_host.vars
deleted file mode 100644
index 4e35a82c..00000000
--- a/vars/libtool_host.vars
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# set +o errexit -o noglob is assumed.
-#
-
-pkg_libtool_host_build() {
- local _no_autoconf="";
- if [ ! -x "${PKG_CONFIGURE}" ]; then
- _no_autoconf=1;
- fi;
- # N.B. We only specify CC= here if the current package does not use GNU
- # autoconf as it often abuses it by appending -std={gnu99,...} to it
- # instead of amending CFLAGS.
- rtl_run_cmd_unsplit make \
- ${PKG_MAKEFLAGS_BUILD} \
- ${PKG_MAKEFLAGS_BUILD_EXTRA} \
- "AR=${PKG_AR}" "${_no_autoconf:+CC=${PKG_CC}}" \
- "RANLIB=${PKG_RANLIB}" \
- "${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}" \
- "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}" \
- "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}" \
- "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"\
- "${PKG_PKG_CONFIG:+PKG_CONFIG=${PKG_PKG_CONFIG}}" \
- "${PKG_PKG_CONFIG_PATH:+PKG_CONFIG_PATH=${PKG_PKG_CONFIG_PATH}}";
-};
-
-# vim:filetype=sh textwidth=0
diff --git a/vars/libxml2.vars b/vars/libxml2.vars
index 42dbe42f..9101c048 100644
--- a/vars/libxml2.vars
+++ b/vars/libxml2.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libxml2_install_make_post() {
diff --git a/vars/libzip.vars b/vars/libzip.vars
index 57b85798..5536ee24 100644
--- a/vars/libzip.vars
+++ b/vars/libzip.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libzip_configure() {
diff --git a/vars/lighttpd.vars b/vars/lighttpd.vars
index 0c691ed2..b6386d10 100644
--- a/vars/lighttpd.vars
+++ b/vars/lighttpd.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_LIGHTTPD_CONFIG_CACHE_EXTRA:="
diff --git a/vars/llvm_host.vars b/vars/llvm_host.vars
index 6ba611bc..82903743 100644
--- a/vars/llvm_host.vars
+++ b/vars/llvm_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_llvm_host_configure() {
diff --git a/vars/lolcode.vars b/vars/lolcode.vars
index 282f9b5f..f610063c 100644
--- a/vars/lolcode.vars
+++ b/vars/lolcode.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_lolcode_configure() {
diff --git a/vars/make.vars b/vars/make.vars
index 7d44185b..adac8fcc 100644
--- a/vars/make.vars
+++ b/vars/make.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_MAKE_CONFIG_CACHE_EXTRA:="
diff --git a/vars/mc.vars b/vars/mc.vars
index 8c01d872..01dcb124 100644
--- a/vars/mc.vars
+++ b/vars/mc.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_MC_CONFIG_CACHE_EXTRA:="
diff --git a/vars/mpackage_host.vars b/vars/mpackage_host.vars
index b04cf31d..b7f8d756 100644
--- a/vars/mpackage_host.vars
+++ b/vars/mpackage_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_mpackage_host_install_make() {
diff --git a/vars/musl.vars b/vars/musl.vars
index ed7c97bd..313704d9 100644
--- a/vars/musl.vars
+++ b/vars/musl.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_musl_full_fetch_download_post() {
diff --git a/vars/mutt.vars b/vars/mutt.vars
index 733374d7..f9d27c82 100644
--- a/vars/mutt.vars
+++ b/vars/mutt.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_MUTT_CONFIG_CACHE_EXTRA:="
diff --git a/vars/nano.vars b/vars/nano.vars
index d58eb710..24933ef9 100644
--- a/vars/nano.vars
+++ b/vars/nano.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_NANO_CONFIG_CACHE_EXTRA:="
diff --git a/vars/nasm_host.vars b/vars/nasm_host.vars
index 9d697a27..922eedd0 100644
--- a/vars/nasm_host.vars
+++ b/vars/nasm_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_nasm_host_install_make_post() {
diff --git a/vars/nginx.vars b/vars/nginx.vars
index f49f26dd..3698e093 100644
--- a/vars/nginx.vars
+++ b/vars/nginx.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_nginx_configure() {
diff --git a/vars/nullmailer.vars b/vars/nullmailer.vars
index b20d725f..07138bb2 100644
--- a/vars/nullmailer.vars
+++ b/vars/nullmailer.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_NULLMAILER_CONFIG_CACHE_EXTRA:="
diff --git a/vars/openbsd_baseutils.vars b/vars/openbsd_baseutils.vars
index e8ce809f..e070c6bf 100644
--- a/vars/openbsd_baseutils.vars
+++ b/vars/openbsd_baseutils.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_openbsd_baseutils_build() {
diff --git a/vars/openjpeg.vars b/vars/openjpeg.vars
index b165f0ff..cfca5e25 100644
--- a/vars/openjpeg.vars
+++ b/vars/openjpeg.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_openjpeg_configure() {
diff --git a/vars/perl.vars b/vars/perl.vars
index b9708ec1..3ff7b94d 100644
--- a/vars/perl.vars
+++ b/vars/perl.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_perl_fetch_extract_post() {
diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars
index fe576fbe..2d2c97cf 100644
--- a/vars/pkgconf_host.vars
+++ b/vars/pkgconf_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_pkgconf_host_install_make_post() {
diff --git a/vars/procps_ng.vars b/vars/procps_ng.vars
index a945cb23..fcd2fd45 100644
--- a/vars/procps_ng.vars
+++ b/vars/procps_ng.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_PROCPS_NG_CONFIG_CACHE_EXTRA:="
diff --git a/vars/psxstub_host.vars b/vars/psxstub_host.vars
index 42282dcc..07d69305 100644
--- a/vars/psxstub_host.vars
+++ b/vars/psxstub_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_psxstub_install_make() {
diff --git a/vars/python2.vars b/vars/python2.vars
index ccb1d5b0..59691f39 100644
--- a/vars/python2.vars
+++ b/vars/python2.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_python2_fetch_download() {
diff --git a/vars/python2_host.vars b/vars/python2_host.vars
index 0338eb61..266b6663 100644
--- a/vars/python2_host.vars
+++ b/vars/python2_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_python2_host_fetch_download() {
diff --git a/vars/python3.vars b/vars/python3.vars
index b1bd7b58..d7d31c68 100644
--- a/vars/python3.vars
+++ b/vars/python3.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_python3_fetch_download() {
diff --git a/vars/python3_host.vars b/vars/python3_host.vars
index 07fe489f..014f0184 100644
--- a/vars/python3_host.vars
+++ b/vars/python3_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_python3_host_fetch_download() {
diff --git a/vars/rc.vars b/vars/rc.vars
index e6117df8..43941295 100644
--- a/vars/rc.vars
+++ b/vars/rc.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_RC_CONFIG_CACHE_EXTRA:="
diff --git a/vars/rpm_host.vars b/vars/rpm_host.vars
index 350b3717..ddb1fbd3 100644
--- a/vars/rpm_host.vars
+++ b/vars/rpm_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_rpm_host_install_pre() {
diff --git a/vars/ruby.vars b/vars/ruby.vars
index acb8757f..00491d52 100644
--- a/vars/ruby.vars
+++ b/vars/ruby.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_ruby_install_make_pre() {
diff --git a/vars/sdl1.vars b/vars/sdl1.vars
index f39019a0..b9d702a6 100644
--- a/vars/sdl1.vars
+++ b/vars/sdl1.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_sdl1_configure_autotools_pre() {
diff --git a/vars/smallbasic.vars b/vars/smallbasic.vars
index 21cf67d4..86e765cc 100644
--- a/vars/smallbasic.vars
+++ b/vars/smallbasic.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_SMALLBASIC_CONFIG_CACHE_EXTRA:="
diff --git a/vars/tcl.vars b/vars/tcl.vars
index ca6f9610..a4465917 100644
--- a/vars/tcl.vars
+++ b/vars/tcl.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_TCL_CONFIG_CACHE_EXTRA:="
diff --git a/vars/texinfo.vars b/vars/texinfo.vars
index 7e9aaa64..a23f8642 100644
--- a/vars/texinfo.vars
+++ b/vars/texinfo.vars
@@ -1,17 +1,17 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_texinfo_build_pre() {
if ! rtl_run_cmd_unsplit make \
- ${PKG_MAKEFLAGS_BUILD} \
- ${PKG_MAKEFLAGS_BUILD_EXTRA} \
- "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \
+ ${PKG_MAKEFLAGS_BUILD:-} \
+ ${PKG_MAKEFLAGS_BUILD_EXTRA:-} \
+ ${PKG_LIBTOOL:+"LIBTOOL=${PKG_LIBTOOL}"} \
-C tools \
|| ! rtl_run_cmd_unsplit make \
- ${PKG_MAKEFLAGS_BUILD} \
- ${PKG_MAKEFLAGS_BUILD_EXTRA} \
- "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \
+ ${PKG_MAKEFLAGS_BUILD:-} \
+ ${PKG_MAKEFLAGS_BUILD_EXTRA:-} \
+ ${PKG_LIBTOOL:+"LIBTOOL=${PKG_LIBTOOL}"} \
LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" LIBS="-ltinfo" \
-C "tools/info"; then
return 1;
diff --git a/vars/texinfo_host.vars b/vars/texinfo_host.vars
index def754c0..12795622 100644
--- a/vars/texinfo_host.vars
+++ b/vars/texinfo_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_texinfo_host_install_make_post() {
diff --git a/vars/tzdb_host.vars b/vars/tzdb_host.vars
index 764bc4ef..080cbf59 100644
--- a/vars/tzdb_host.vars
+++ b/vars/tzdb_host.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
pkg_tzdb_host_install_pre() {
diff --git a/vars/util_linux.vars b/vars/util_linux.vars
index f3bb7e73..ede2911d 100644
--- a/vars/util_linux.vars
+++ b/vars/util_linux.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_UTIL_LINUX_CONFIG_CACHE_EXTRA:="
diff --git a/vars/vim.vars b/vars/vim.vars
index 9f1adcef..41712ca2 100644
--- a/vars/vim.vars
+++ b/vars/vim.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_VIM_CONFIG_CACHE_EXTRA:="
diff --git a/vars/w3m.vars b/vars/w3m.vars
index 94f3bc00..dab204ab 100644
--- a/vars/w3m.vars
+++ b/vars/w3m.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_W3M_CONFIG_CACHE_EXTRA:="
diff --git a/vars/xcb.vars b/vars/xcb.vars
index b913831e..e62caa87 100644
--- a/vars/xcb.vars
+++ b/vars/xcb.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_XCB_CONFIG_CACHE_EXTRA:="
diff --git a/vars/yabasic.vars b/vars/yabasic.vars
index 5ef50608..4a32c37e 100644
--- a/vars/yabasic.vars
+++ b/vars/yabasic.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_YABASIC_CONFIG_CACHE_EXTRA:="
diff --git a/vars/zsh.vars b/vars/zsh.vars
index 12ffcbdf..45e79593 100644
--- a/vars/zsh.vars
+++ b/vars/zsh.vars
@@ -1,5 +1,5 @@
#
-# set +o errexit -o noglob is assumed.
+# set +o errexit -o noglob -o nounset is assumed.
#
: ${PKG_ZSH_CONFIG_CACHE_EXTRA:="