diff options
l--------- | 009.pkgconf_host.build (renamed from 300.bzip2.build) | 0 | ||||
-rw-r--r-- | 009.pkgconf_host.vars | 19 | ||||
l--------- | 300.libz.build (renamed from 301.coreutils.build) | 0 | ||||
l--------- | 301.libffi.build (renamed from 302.diffutils.build) | 0 | ||||
l--------- | 302.glib.build (renamed from 303.findutils.build) | 0 | ||||
l--------- | 303.gzip.build (renamed from 304.gawk.build) | 0 | ||||
-rw-r--r-- | 303.gzip.vars (renamed from 305.gzip.vars) | 0 | ||||
l--------- | 304.libarchive.build (renamed from 305.gzip.build) | 0 | ||||
l--------- | 305.libressl.build (renamed from 306.grep.build) | 0 | ||||
l--------- | 306.libfetch.build (renamed from 307.libz.build) | 0 | ||||
-rw-r--r-- | 306.libfetch.vars (renamed from 365.libfetch.vars) | 0 | ||||
l--------- | 307.ncurses.build (renamed from 308.make.build) | 0 | ||||
l--------- | 308.ncursestw.build (renamed from 309.patch.build) | 0 | ||||
l--------- | 309.ncursesw.build (renamed from 310.tar.build) | 0 | ||||
l--------- | 310.pkgconf.build (renamed from 311.sed.build) | 0 | ||||
l--------- | 311.xz.build (renamed from 312.xz.build) | 0 | ||||
l--------- | 320.apk_tools.build (renamed from 313.which.build) | 0 | ||||
l--------- | 321.bash.build (renamed from 314.rsync.build) | 0 | ||||
-rw-r--r-- | 321.bash.vars (renamed from 353.bash.vars) | 0 | ||||
l--------- | 322.bzip2.build (renamed from 330.libressl.build) | 0 | ||||
-rw-r--r-- | 322.bzip2.vars (renamed from 300.bzip2.vars) | 0 | ||||
l--------- | 323.coreutils.build (renamed from 331.openssh.build) | 0 | ||||
l--------- | 324.curl.build (renamed from 350.ncurses.build) | 0 | ||||
l--------- | 325.dash.build (renamed from 351.ncursestw.build) | 0 | ||||
l--------- | 326.diffutils.build (renamed from 352.ncursesw.build) | 0 | ||||
l--------- | 327.findutils.build (renamed from 353.bash.build) | 0 | ||||
l--------- | 328.gawk.build (renamed from 354.dash.build) | 0 | ||||
l--------- | 329.git.build (renamed from 355.less.build) | 0 | ||||
l--------- | 330.grep.build (renamed from 356.util_linux.build) | 0 | ||||
l--------- | 331.hexcurse.build (renamed from 357.nano.build) | 0 | ||||
l--------- | 332.inetutils.build (renamed from 358.hexcurse.build) | 0 | ||||
l--------- | 333.irssi.build (renamed from 359.libffi.build) | 0 | ||||
l--------- | 334.less.build (renamed from 360.curl.build) | 0 | ||||
l--------- | 335.make.build (renamed from 361.zsh.build) | 0 | ||||
l--------- | 336.mksh.build (renamed from 362.git.build) | 0 | ||||
-rw-r--r-- | 336.mksh.vars (renamed from 371.mksh.vars) | 0 | ||||
l--------- | 337.nano.build (renamed from 363.libarchive.build) | 0 | ||||
l--------- | 338.netcat.build (renamed from 364.pacman.build) | 0 | ||||
-rw-r--r-- | 338.netcat.vars (renamed from 373.netcat.vars) | 0 | ||||
l--------- | 339.openssh.build (renamed from 365.libfetch.build) | 0 | ||||
l--------- | 340.pacman.build (renamed from 366.apk_tools.build) | 0 | ||||
l--------- | 341.patch.build (renamed from 367.perl.build) | 0 | ||||
l--------- | 342.perl.build (renamed from 368.glib.build) | 0 | ||||
-rw-r--r-- | 342.perl.vars (renamed from 367.perl.vars) | 2 | ||||
l--------- | 343.python3.build (renamed from 369.irssi.build) | 0 | ||||
-rw-r--r-- | 343.python3.vars (renamed from 370.python3.vars) | 0 | ||||
l--------- | 344.rsync.build (renamed from 370.python3.build) | 0 | ||||
l--------- | 345.sed.build (renamed from 371.mksh.build) | 0 | ||||
l--------- | 346.tar.build (renamed from 372.tcsh.build) | 0 | ||||
l--------- | 347.tcsh.build (renamed from 373.netcat.build) | 0 | ||||
l--------- | 348.util_linux.build (renamed from 374.inetutils.build) | 0 | ||||
-rw-r--r-- | 348.util_linux.vars (renamed from 356.util_linux.vars) | 0 | ||||
l--------- | 349.which.build | 1 | ||||
l--------- | 350.zsh.build | 1 | ||||
-rw-r--r-- | apk-tools-2.6.6.local.patch | 62 | ||||
-rwxr-xr-x | build.sh | 11 | ||||
-rw-r--r-- | build.subr | 81 | ||||
-rw-r--r-- | build.usage | 8 | ||||
-rw-r--r-- | build.vars | 34 | ||||
-rw-r--r-- | ncurses-6.0.local.patch | 13 | ||||
-rw-r--r-- | pkg.build | 4 |
61 files changed, 158 insertions, 78 deletions
diff --git a/300.bzip2.build b/009.pkgconf_host.build index 52bb82e5..52bb82e5 120000 --- a/300.bzip2.build +++ b/009.pkgconf_host.build diff --git a/009.pkgconf_host.vars b/009.pkgconf_host.vars new file mode 100644 index 00000000..84136498 --- /dev/null +++ b/009.pkgconf_host.vars @@ -0,0 +1,19 @@ +# +# . ./build.vars and set -o errexit are assumed. +# + +pkg_pkgconf_host_install_post() { + if [ -e ${PREFIX}/bin/${TARGET}-pkg-config ]; then + rm -f ${PREFIX}/bin/${TARGET}-pkg-config; + fi; + cat > ${PREFIX}/bin/${TARGET}-pkg-config <<EOF +#!/bin/sh +if [ -z "\${PREFIX_NATIVE}" ]; then + PREFIX_NATIVE=${PREFIX_NATIVE}; +fi; +"\$(dirname "\${0}")"/pkgconf --define-variable=prefix=\${PREFIX_NATIVE} "\$@"; +EOF + chmod +x ${PREFIX}/bin/${TARGET}-pkg-config; +}; + +# vim:filetype=sh diff --git a/301.coreutils.build b/300.libz.build index 52bb82e5..52bb82e5 120000 --- a/301.coreutils.build +++ b/300.libz.build diff --git a/302.diffutils.build b/301.libffi.build index 52bb82e5..52bb82e5 120000 --- a/302.diffutils.build +++ b/301.libffi.build diff --git a/303.findutils.build b/302.glib.build index 52bb82e5..52bb82e5 120000 --- a/303.findutils.build +++ b/302.glib.build diff --git a/304.gawk.build b/303.gzip.build index 52bb82e5..52bb82e5 120000 --- a/304.gawk.build +++ b/303.gzip.build diff --git a/305.gzip.vars b/303.gzip.vars index 0e234422..0e234422 100644 --- a/305.gzip.vars +++ b/303.gzip.vars diff --git a/305.gzip.build b/304.libarchive.build index 52bb82e5..52bb82e5 120000 --- a/305.gzip.build +++ b/304.libarchive.build diff --git a/306.grep.build b/305.libressl.build index 52bb82e5..52bb82e5 120000 --- a/306.grep.build +++ b/305.libressl.build diff --git a/307.libz.build b/306.libfetch.build index 52bb82e5..52bb82e5 120000 --- a/307.libz.build +++ b/306.libfetch.build diff --git a/365.libfetch.vars b/306.libfetch.vars index b1b9d775..b1b9d775 100644 --- a/365.libfetch.vars +++ b/306.libfetch.vars diff --git a/308.make.build b/307.ncurses.build index 52bb82e5..52bb82e5 120000 --- a/308.make.build +++ b/307.ncurses.build diff --git a/309.patch.build b/308.ncursestw.build index 52bb82e5..52bb82e5 120000 --- a/309.patch.build +++ b/308.ncursestw.build diff --git a/310.tar.build b/309.ncursesw.build index 52bb82e5..52bb82e5 120000 --- a/310.tar.build +++ b/309.ncursesw.build diff --git a/311.sed.build b/310.pkgconf.build index 52bb82e5..52bb82e5 120000 --- a/311.sed.build +++ b/310.pkgconf.build diff --git a/312.xz.build b/311.xz.build index 52bb82e5..52bb82e5 120000 --- a/312.xz.build +++ b/311.xz.build diff --git a/313.which.build b/320.apk_tools.build index 52bb82e5..52bb82e5 120000 --- a/313.which.build +++ b/320.apk_tools.build diff --git a/314.rsync.build b/321.bash.build index 52bb82e5..52bb82e5 120000 --- a/314.rsync.build +++ b/321.bash.build diff --git a/353.bash.vars b/321.bash.vars index 8ab081a0..8ab081a0 100644 --- a/353.bash.vars +++ b/321.bash.vars diff --git a/330.libressl.build b/322.bzip2.build index 52bb82e5..52bb82e5 120000 --- a/330.libressl.build +++ b/322.bzip2.build diff --git a/300.bzip2.vars b/322.bzip2.vars index 34a5b7eb..34a5b7eb 100644 --- a/300.bzip2.vars +++ b/322.bzip2.vars diff --git a/331.openssh.build b/323.coreutils.build index 52bb82e5..52bb82e5 120000 --- a/331.openssh.build +++ b/323.coreutils.build diff --git a/350.ncurses.build b/324.curl.build index 52bb82e5..52bb82e5 120000 --- a/350.ncurses.build +++ b/324.curl.build diff --git a/351.ncursestw.build b/325.dash.build index 52bb82e5..52bb82e5 120000 --- a/351.ncursestw.build +++ b/325.dash.build diff --git a/352.ncursesw.build b/326.diffutils.build index 52bb82e5..52bb82e5 120000 --- a/352.ncursesw.build +++ b/326.diffutils.build diff --git a/353.bash.build b/327.findutils.build index 52bb82e5..52bb82e5 120000 --- a/353.bash.build +++ b/327.findutils.build diff --git a/354.dash.build b/328.gawk.build index 52bb82e5..52bb82e5 120000 --- a/354.dash.build +++ b/328.gawk.build diff --git a/355.less.build b/329.git.build index 52bb82e5..52bb82e5 120000 --- a/355.less.build +++ b/329.git.build diff --git a/356.util_linux.build b/330.grep.build index 52bb82e5..52bb82e5 120000 --- a/356.util_linux.build +++ b/330.grep.build diff --git a/357.nano.build b/331.hexcurse.build index 52bb82e5..52bb82e5 120000 --- a/357.nano.build +++ b/331.hexcurse.build diff --git a/358.hexcurse.build b/332.inetutils.build index 52bb82e5..52bb82e5 120000 --- a/358.hexcurse.build +++ b/332.inetutils.build diff --git a/359.libffi.build b/333.irssi.build index 52bb82e5..52bb82e5 120000 --- a/359.libffi.build +++ b/333.irssi.build diff --git a/360.curl.build b/334.less.build index 52bb82e5..52bb82e5 120000 --- a/360.curl.build +++ b/334.less.build diff --git a/361.zsh.build b/335.make.build index 52bb82e5..52bb82e5 120000 --- a/361.zsh.build +++ b/335.make.build diff --git a/362.git.build b/336.mksh.build index 52bb82e5..52bb82e5 120000 --- a/362.git.build +++ b/336.mksh.build diff --git a/371.mksh.vars b/336.mksh.vars index b7b4582f..b7b4582f 100644 --- a/371.mksh.vars +++ b/336.mksh.vars diff --git a/363.libarchive.build b/337.nano.build index 52bb82e5..52bb82e5 120000 --- a/363.libarchive.build +++ b/337.nano.build diff --git a/364.pacman.build b/338.netcat.build index 52bb82e5..52bb82e5 120000 --- a/364.pacman.build +++ b/338.netcat.build diff --git a/373.netcat.vars b/338.netcat.vars index e9bd7e18..e9bd7e18 100644 --- a/373.netcat.vars +++ b/338.netcat.vars diff --git a/365.libfetch.build b/339.openssh.build index 52bb82e5..52bb82e5 120000 --- a/365.libfetch.build +++ b/339.openssh.build diff --git a/366.apk_tools.build b/340.pacman.build index 52bb82e5..52bb82e5 120000 --- a/366.apk_tools.build +++ b/340.pacman.build diff --git a/367.perl.build b/341.patch.build index 52bb82e5..52bb82e5 120000 --- a/367.perl.build +++ b/341.patch.build diff --git a/368.glib.build b/342.perl.build index 52bb82e5..52bb82e5 120000 --- a/368.glib.build +++ b/342.perl.build diff --git a/367.perl.vars b/342.perl.vars index 68583930..23604795 100644 --- a/367.perl.vars +++ b/342.perl.vars @@ -10,7 +10,7 @@ pkg_perl_extract_post() { if [ -f ${_ppep_fname_dst} ]; then mv ${_ppep_fname_dst} ${_ppep_fname_dst}.orig; fi; - if [ ! -d $(dirname ${_ppep_fname_dst}) ]; then + if [ ! -d "$(dirname ${_ppep_fname_dst})" ]; then mkdir -p $(dirname ${_ppep_fname_dst}); fi; cp ${_ppep_fname_src} ${_ppep_fname_dst}; diff --git a/369.irssi.build b/343.python3.build index 52bb82e5..52bb82e5 120000 --- a/369.irssi.build +++ b/343.python3.build diff --git a/370.python3.vars b/343.python3.vars index c987c798..c987c798 100644 --- a/370.python3.vars +++ b/343.python3.vars diff --git a/370.python3.build b/344.rsync.build index 52bb82e5..52bb82e5 120000 --- a/370.python3.build +++ b/344.rsync.build diff --git a/371.mksh.build b/345.sed.build index 52bb82e5..52bb82e5 120000 --- a/371.mksh.build +++ b/345.sed.build diff --git a/372.tcsh.build b/346.tar.build index 52bb82e5..52bb82e5 120000 --- a/372.tcsh.build +++ b/346.tar.build diff --git a/373.netcat.build b/347.tcsh.build index 52bb82e5..52bb82e5 120000 --- a/373.netcat.build +++ b/347.tcsh.build diff --git a/374.inetutils.build b/348.util_linux.build index 52bb82e5..52bb82e5 120000 --- a/374.inetutils.build +++ b/348.util_linux.build diff --git a/356.util_linux.vars b/348.util_linux.vars index 20f843c4..20f843c4 100644 --- a/356.util_linux.vars +++ b/348.util_linux.vars diff --git a/349.which.build b/349.which.build new file mode 120000 index 00000000..52bb82e5 --- /dev/null +++ b/349.which.build @@ -0,0 +1 @@ +pkg.build
\ No newline at end of file diff --git a/350.zsh.build b/350.zsh.build new file mode 120000 index 00000000..52bb82e5 --- /dev/null +++ b/350.zsh.build @@ -0,0 +1 @@ +pkg.build
\ No newline at end of file diff --git a/apk-tools-2.6.6.local.patch b/apk-tools-2.6.6.local.patch index ab7a6afd..df03820e 100644 --- a/apk-tools-2.6.6.local.patch +++ b/apk-tools-2.6.6.local.patch @@ -16,11 +16,23 @@ } int main(int argc, char **argv) ---- apk-tools-2.6.6/src/Makefile.orig 2016-02-09 15:57:53.000000000 +0100 -+++ apk-tools-2.6.6/src/Makefile 2016-03-09 10:28:09.862286100 +0100 -@@ -1,26 +1,20 @@ +--- apk-tools-2.6.6/Make.rules.orig 2016-02-09 15:57:53.000000000 +0100 ++++ apk-tools-2.6.6/Make.rules 2016-03-09 10:44:12.457459300 +0100 +@@ -70,7 +70,7 @@ + INSTALLDIR := $(INSTALL) -d + + CFLAGS ?= -g -O2 +-CFLAGS_ALL := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC ++CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC + CFLAGS_ALL += $(CFLAGS) + + LDFLAGS ?= -g +--- apk-tools-2.6.6/src/Makefile.orig 2016-02-09 14:57:53.000000000 +0000 ++++ apk-tools-2.6.6/src/Makefile 2016-06-23 08:14:37.843747529 +0000 +@@ -1,12 +1,12 @@ PKGDEPS := openssl zlib -PKG_CONFIG ?= pkg-config ++PKG_CONFIG ?= $(PKG_TARGET)-pkg-config LUAAPK ?= yes # lua module @@ -32,50 +44,12 @@ LIBAPK := YesPlease shlibs-y += apk.so apk.so-objs := lua-apk.o --CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" \ -- $(shell $(PKG_CONFIG) $(LUA_PC) --cflags) -+CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" - LUA_LIB-y := $(obj)/apk.so - install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \ - $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR) - endif - --ifeq ($(shell $(PKG_CONFIG) --print-errors --exists $(PKGDEPS) || echo fail),fail) --$(error Build dependencies are not met) --endif -- - progs-y += apk - apk-objs := apk.o add.o del.o fix.o update.o info.o \ - search.o upgrade.o cache.o ver.o index.o fetch.o \ -@@ -65,10 +59,8 @@ - LDFLAGS_apk += -L$(obj) +@@ -66,7 +66,7 @@ LDFLAGS_apk-test += -L$(obj) --CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS)) + CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS)) -LIBS := /usr/lib/libfetch.a \ +LIBS := $(PREFIX)/lib/libfetch.a \ -Wl,--as-needed \ -- $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \ + $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \ -Wl,--no-as-needed - - $(obj)/apk: $(LIBAPK-y) ---- apk-tools-2.6.6/Make.rules.orig 2016-02-09 15:57:53.000000000 +0100 -+++ apk-tools-2.6.6/Make.rules 2016-03-09 10:44:12.457459300 +0100 -@@ -70,7 +70,7 @@ - INSTALLDIR := $(INSTALL) -d - - CFLAGS ?= -g -O2 --CFLAGS_ALL := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC -+CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC - CFLAGS_ALL += $(CFLAGS) - - LDFLAGS ?= -g -@@ -225,7 +225,7 @@ - quiet_cmd_ld = LD $@ - cmd_ld = $(CC) $(ld_flags) -o $@ \ - $(addprefix $(obj)/,$($(@F)-objs)) \ -- $(LIBS) $(LIBS_$(@F)) -+ $(LIBS) $(LIBS_$(@F)) $(LDFLAGS_LIBS) - - $(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs)) - @@ -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*}; @@ -9,7 +9,7 @@ get_var_dyn() { ${1}; }; get_var_unsafe() { eval echo \${${1}}; }; set_var_dyn() { eval ${1}\(\) \{ echo \"${2}\"\; \}; }; set_var_unsafe() { eval ${1}=\"${2}\"; }; -get_name_without_slash() { while [ "${1%/}" != ${1} ]; do set -- ${1%/}; done; echo ${1}; }; +get_name_without_slash() { while [ "${1%/}" != "${1}" ]; do set -- ${1%/}; done; echo ${1}; }; get_postfix_lrg() { echo "${1##*${2}}"; }; get_prefix_lrg() { echo "${1%%${2}*}"; }; get_postfix() { echo "${1#*${2}}"; }; @@ -65,6 +65,7 @@ export_vars_subst() { }; fetch_git() { + [ -z "${1}" ] && return 1; [ ${ARG_NO_DOWNLOAD:-0} -eq 1 ] && return; rm_if_exists ${1}; [ -d ${1} ] && (cd ${1} && git pull origin main)\ @@ -79,9 +80,70 @@ find_with_no_paths() { unset _fwnp_args _fwnp_not_path; return ${_rc}; }; +insert_build_script_link() { + _ibsl_fname=${1}; + _ibsl_level=${_ibsl_fname%%.*}; + _ibsl_name=${_ibsl_fname#*.}; _ibsl_name=${_ibsl_name%.build}; + if [ -z "${_ibsl_fname}" -o -z "${_ibsl_level}" \ + -o -z "${_ibsl_name}" ] \ + || ! isnumber ${_ibsl_level} \ + || [ ${#_ibsl_level} != 3 ]; then + log_msg failexit "Error: invalid or empty build script filename/level/name."; + return 1; + elif [ -z "$(find -maxdepth 1 -name ${_ibsl_level}.\* -printf '%P\n' -quit)" ]; then + echo ln -s pkg.build ${_ibsl_fname}; + ln -s pkg.build ${_ibsl_fname}; + unset _ibsl_fname _ibsl_level _ibsl_name; + return 0; + else + _ibsl_levels="$(find -maxdepth 1 -name \ + ${_ibsl_level%[0-9][0-9]}\[0-9\]\[0-9\].\* \ + -printf '%P\n' | sort -nk1)"; + fi; + for _ibsl_fname_cur in ${_ibsl_levels}; do + if [ \( ${_ibsl_changed:=0} -eq 0 \) -a \ + \( "${_ibsl_fname_cur%%.*}" -eq ${_ibsl_level} \) ]; then + echo ln -s pkg.build ${_ibsl_fname}; + ln -s pkg.build ${_ibsl_fname}; + _ibsl_changed=1; + fi; + if [ ${_ibsl_changed:=0} -eq 1 ]; then + if [ -z "$(find -maxdepth 1 -name $((${_ibsl_fname_cur%%.*}+1)).\* \ + -printf '%P\n' -quit)" ]; then + _ibsl_last=1; + fi; + echo mv ${_ibsl_fname_cur} \ + $((${_ibsl_fname_cur%%.*}+1)).${_ibsl_fname_cur#*.}; + mv ${_ibsl_fname_cur} \ + $((${_ibsl_fname_cur%%.*}+1)).${_ibsl_fname_cur#*.}; + if [ ${_ibsl_last:-0} -eq 1 ]; then + break; + fi; + fi; + done; + if [ ${_ibsl_changed:=0} -eq 0 ]; then + log_msg failexit "Error: build level ${_ibsl_level} not in \`${_ibsl_levels}'."; + else + unset _ibsl_levels _ibsl_fname_cur _ibsl_changed _ibsl_last; + unset _ibsl_fname _ibsl_level _ibsl_name; + fi; +}; + +isnumber() { + [ -z "${1}" ] && return 1 || _i_num=${1}; + while [ -n "${_i_num}" ]; do + if [ "${_i_num#[0-9]}" = "${_i_num}" ]; then + return 1; + else + _i_num="${_i_num#[0-9]}"; + fi; + done; unset _i_num; return 0; +}; + rm_if_exists() { [ -z "${1#-m}" ] && { _rie_arg_m=1; shift; }; [ -z "${1#-c}" ] && { _rie_arg_c=1; shift; }; + [ -z "${1}" ] && return 1; if [ -d ${1} -o -f ${1} ]; then log_msg warn "Removing directory or file \`${1}'."; if [ ${ARG_PEDANTIC:-0} -eq 1 ]; then @@ -225,7 +287,7 @@ is_build_script_done() { else return 1; # Build fi; - elif [ -f ${WORKDIR}/.${2:-$(get_basename ${SCRIPT_FNAME%.build})}.${1} ]; then + elif [ -f "${WORKDIR}/.${2:-$(get_basename ${SCRIPT_FNAME%.build})}.${1}" ]; then return 0; # Skip else return 1; # Build @@ -287,8 +349,8 @@ match_list() { parse_with_pkg_name() { PKG_LVL=${1}; PKG_NAME=${2}; shift 2; - while [ ${#} -ge 0 ]; do - if [ "${PKG_NAME}" = ${1} ]; then + while [ ${#} -gt 0 ]; do + if [ "${PKG_NAME}" = "${1}" ]; then export_vars_subst PKG_LVL${PKG_LVL}_ PKG_ ${PKG_BUILD_VARS}; export_vars_subst PKG_$(echo ${PKG_NAME} | tr a-z A-Z)_ PKG_ ${PKG_BUILD_VARS}; [ -z "${PKG_URL}" ] && return 1; @@ -306,7 +368,8 @@ parse_with_pkg_name() { fi; unset _pwpn_env_var _pwpn_env_vars; return 0; fi; shift; - done; return 1; + done; + log_msg failexit "Error: package \`${PKG_NAME}' missing in \${PKG_BUILD_NAMES}."; }; run_cmd_unsplit() { @@ -324,7 +387,7 @@ update_build_status() { while [ ${#} -gt 0 ]; do case ${1} in build_start) - if [ -f ${BUILD_STATUS_IN_PROGRESS_FNAME} ]; then + if [ -f "${BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then log_msg failexit "Error: build already in progress."; else touch ${BUILD_STATUS_IN_PROGRESS_FNAME}; @@ -332,7 +395,7 @@ update_build_status() { fi; ;; build_finish) - if [ -f ${BUILD_STATUS_PROGRESS_FNAME} ]; then + if [ -f "${BUILD_STATUS_PROGRESS_FNAME}" ]; then _ubs_bsp_fname=${BUILD_STATUS_PROGRESS_FNAME}; unset BUILD_STATUS_PROGRESS_FNAME; rm -f ${_ubs_bsp_fname}; @@ -347,10 +410,10 @@ update_build_status() { touch ${BUILD_STATUS_TARBALL_PROGRESS_FNAME:=${PREFIX}/TARBALL_STARTED_AT_$(date ${TIMESTAMP_FMT_STATUS_FILES})}; ;; tarball_finish) - [ -f ${BUILD_STATUS_TARBALL_PROGRESS_FNAME} ] &&\ + [ -f "${BUILD_STATUS_TARBALL_PROGRESS_FNAME}" ] &&\ rm -f ${BUILD_STATUS_TARBALL_PROGRESS_FNAME}; ;; finish) - [ -f ${BUILD_STATUS_IN_PROGRESS_FNAME} ] &&\ + [ -f "${BUILD_STATUS_IN_PROGRESS_FNAME}" ] &&\ rm -f ${BUILD_STATUS_IN_PROGRESS_FNAME}; ;; esac; shift; done; diff --git a/build.usage b/build.usage index a4f8cb7d..464a8310 100644 --- a/build.usage +++ b/build.usage @@ -1,12 +1,16 @@ -usage: ./build.sh [-c] [-nd] [-r ALL|name[:step]] [-h] [-t] +usage: ./build.sh [-c] [-nd] [-r ALL|level.name.build[:step]] [-h] [-t] -c Clean $PREFIX before processing build scripts. + -i level.name.build Insert link to pkg.build for the specified build script. + All consecutive scripts with higher build levels will + be renamed automatically. -nd Don't rm(1) and re-download tarballs when not required. -h Show this screen. -pt Enable pedantic mode. In addition to the warnings emitted whenever a potentially dangerous operation is invoked by the build scripts, manual confirmation will be required. This currently only includes rm_if_exists(). - -r ALL|name[:step] Restart all or the specified build script(s) completely + -r ALL|level.name.build[:step] + Restart all or the specified build script(s) completely or at the optionally specified build step. Currently defined build steps are: fetch extract build_dir patch configure clean build install configure1 configure2 build1 build2 install1 install2. @@ -52,7 +52,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${WGET_ARGS:="--no-check-certificate"}; : ${WORKDIR:=${PREFIX}/tmp}; -: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse inetutils irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mksh mpc mpfr nano ncurses ncursestw ncursesw netcat ntapi ntcon ntctty openssh pacman patch pemagine perl popt psxscl psxstub psxtypes python3 rsync sed slibtool tar tcsh util_linux which xz zsh"}; +: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse inetutils irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mksh mpc mpfr nano ncurses ncursestw ncursesw netcat ntapi ntcon ntctty openssh pacman patch pemagine perl pkgconf pkgconf_host popt psxscl psxstub psxtypes python3 rsync sed slibtool tar tcsh util_linux which xz zsh"}; : ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE AR_INSTALL AUTOGEN BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA FNAME GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBFILES_FIX LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_BUILD RANLIB_INSTALL SHA256SUM SLIBTOOL SUBDIR SUBDIR_CREATE URL URL_FNAME URL_TYPE VERSION"}; : ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0}; : ${PKG_LVL0_CONFIGURE_ARGS:="-C --disable-nls --host=${HOST_NATIVE} --prefix= --target=${TARGET}"}; @@ -81,7 +81,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_APK_TOOLS_AR_INSTALL:=${HOST_NATIVE}-ar}; : ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk}; : ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}}; -: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:CROSS_COMPILE=${HOST_NATIVE}-:LUAAPK=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig:VERBOSE=1:PREFIX=${PREFIX_LVL3}:LDFLAGS_LIBS=--sysroot=${PREFIX_LVL3} -lcrypto -lssl -lz}; +: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:CROSS_COMPILE=${HOST_NATIVE}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_LVL3}}; : ${PKG_BZIP2_VERSION:=1.0.6}; : ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd}; : ${PKG_BZIP2_URL:=http://www.bzip.org/1.0.6/bzip2-${PKG_BZIP2_VERSION}.tar.gz}; @@ -187,9 +187,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_IRSSI_VERSION=0.8.18}; : ${PKG_IRSSI_SHA256SUM:=30043784815bb864b1bb66a82c1e659c325be0a18ddcf76fc101812e36c39c20}; : ${PKG_IRSSI_URL:=https://github.com/irssi/irssi/releases/download/0.8.18/irssi-0.8.18.tar.gz}; -: ${PKG_IRSSI_CFLAGS_CONFIGURE_EXTRA:="-I${PREFIX_LVL3}/include/glib-2.0 -I${PREFIX_LVL3}/include/glib-2.0/include -I${PREFIX_LVL3}/lib/glib-2.0/include"}; -: ${PKG_IRSSI_ENV_VARS_EXTRA:=PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig}; -: ${PKG_IRSSI_LDFLAGS_CONFIGURE_EXTRA:="-L${PREFIX_LVL3}/lib -lglib-2.0"}; : ${PKG_IRSSI_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_LESS_VERSION:=481}; : ${PKG_LESS_SHA256SUM:=3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5}; @@ -268,29 +265,27 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_MUSL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; : ${PKG_MUSL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz}; : ${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA:="-g2 -O0"}; -: ${PKG_NANO_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw}; -: ${PKG_NANO_ENV_VARS_EXTRA:="NCURSESW_LIBS=-lformw -lmenuw -lncursesw -lpanelw:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_NANO_VERSION:=2.5.3}; : ${PKG_NANO_SHA256SUM:=b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee}; : ${PKG_NANO_URL:=http://www.nano-editor.org/dist/v${PKG_NANO_VERSION%.[0-9]}/nano-${PKG_NANO_VERSION}.tar.gz}; : ${PKG_NCURSES_VERSION:=6.0}; : ${PKG_NCURSES_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; : ${PKG_NCURSES_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSES_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --disable-widec --with-shared}; +: ${PKG_NCURSES_BUILD_DIR:=ncurses-${PKG_NCURSES_VERSION}-native-${TARGET}}; +: ${PKG_NCURSES_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --disable-widec --with-shared}; : ${PKG_NCURSES_LIBFILES_FIX:=1}; -: ${PKG_NCURSES_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NCURSESTW_VERSION:=6.0}; : ${PKG_NCURSESTW_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; -: ${PKG_NCURSESTW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSESTW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared --with-pthread}; +: ${PKG_NCURSESTW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSESTW_VERSION}.tar.gz}; +: ${PKG_NCURSESTW_BUILD_DIR:=ncursestw-${PKG_NCURSESTW_VERSION}-native-${TARGET}}; +: ${PKG_NCURSESTW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared --with-pthread}; : ${PKG_NCURSESTW_LIBFILES_FIX:=1}; -: ${PKG_NCURSESTW_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NCURSESW_VERSION:=6.0}; : ${PKG_NCURSESW_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; -: ${PKG_NCURSESW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; -: ${PKG_NCURSESW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config --with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared}; +: ${PKG_NCURSESW_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSESW_VERSION}.tar.gz}; +: ${PKG_NCURSESW_BUILD_DIR:=ncursesw-${PKG_NCURSESW_VERSION}-native-${TARGET}}; +: ${PKG_NCURSESW_CONFIGURE_ARGS_EXTRA:=--with-pkg-config-libdir=${PREFIX_LVL3}/lib/pkgconfig --enable-pc-files --enable-widec --with-shared}; : ${PKG_NCURSESW_LIBFILES_FIX:=1}; -: ${PKG_NCURSESW_MAKEFLAGS_INSTALL_EXTRA:=PKG_CONFIG_LIBDIR=/lib/pkgconfig}; : ${PKG_NETCAT_VERSION:=110}; : ${PKG_NETCAT_SHA256SUM:=5b3fda14e972d908896a605293f4634a72e2968278117410e12d8b3faf9a3976}; : ${PKG_NETCAT_URL:=https://dl.packetstormsecurity.net/UNIX/netcat/nc110.tgz}; @@ -307,7 +302,6 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PACMAN_URL:=https://projects.archlinux.org/pacman.git/snapshot/pacman-${PKG_PACMAN_VERSION}.tar.gz}; : ${PKG_PACMAN_AUTOGEN:=1}; : ${PKG_PACMAN_CONFIGURE_ARGS_EXTRA:=--disable-doc}; -: ${PKG_PACMAN_ENV_VARS_EXTRA:="LIBALPM_LIBS=-lssl -lbz2 -llzma -lz:LIBARCHIVE_CFLAGS=:LIBARCHIVE_LIBS=:LIBSSL_CFLAGS=:LIBSSL_LIBS=:LIBCURL_CFLAGS=:LIBCURL_LIBS=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_PACMAN_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_PATCH_VERSION:=2.7}; : ${PKG_PATCH_SHA256SUM:=59c29f56faa0a924827e6a60c6accd6e2900eae5c6aaa922268c717f06a62048}; @@ -318,6 +312,14 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PERL_CONFIGURE_ARGS:="-A ccflags=-I${PREFIX_LVL3}/include --sysroot=${PREFIX_LVL3} --target=${TARGET}"}; : ${PKG_PERL_ENV_VARS_EXTRA:="TARGET=${TARGET}"}; : ${PKG_PERL_MAKEFLAGS_BUILD:=-j1}; +: ${PKG_PKGCONF_HOST_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; +: ${PKG_PKGCONF_HOST_VERSION:=0.9.12}; +: ${PKG_PKGCONF_HOST_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_HOST_VERSION}/pkgconf-${PKG_PKGCONF_HOST_VERSION}.tar.bz2}; +: ${PKG_PKGCONF_HOST_CONFIGURE_ARGS:="-C --prefix=${PREFIX_NATIVE}"}; +: ${PKG_PKGCONF_HOST_MAKEFLAGS_INSTALL_EXTRA:=prefix=${PREFIX}}; +: ${PKG_PKGCONF_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; +: ${PKG_PKGCONF_VERSION:=0.9.12}; +: ${PKG_PKGCONF_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_VERSION}/pkgconf-${PKG_PKGCONF_VERSION}.tar.bz2}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; : ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz}; diff --git a/ncurses-6.0.local.patch b/ncurses-6.0.local.patch index 1afa2142..03756478 100644 --- a/ncurses-6.0.local.patch +++ b/ncurses-6.0.local.patch @@ -39,3 +39,16 @@ if test "$DFT_LWR_MODEL" = "shared" ; then LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" +--- ncurses-6.0/misc/Makefile.in.orig 2015-08-05 23:15:41.000000000 +0000 ++++ ncurses-6.0/misc/Makefile.in 2016-06-23 08:40:43.767712775 +0000 +@@ -110,8 +110,8 @@ + install.libs :: $(DESTDIR)$(bindir) ncurses-config + $(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG) + +-@MAKE_PC_FILES@install.libs :: pc-files $(DESTDIR)$(PKG_CONFIG_LIBDIR) +-@MAKE_PC_FILES@ $(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done' ++@MAKE_PC_FILES@install.libs :: pc-files $(PKG_CONFIG_LIBDIR) ++@MAKE_PC_FILES@ $(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(PKG_CONFIG_LIBDIR)/$$name; done' + + @MAKE_PC_FILES@sources :: pc-files + @MAKE_PC_FILES@pc-files : @@ -47,7 +47,7 @@ if [ -z "${PKG_BUILD_DIR}" ]; then set_build_dir ${PKG_SUBDIR} ${PKG_BUILD_TYPE:-native}; fi; if ! is_build_script_done build_dir; then - [ ${PKG_SUBDIR} != ${PKG_BUILD_DIR} ] &&\ + [ "${PKG_SUBDIR}" != "${PKG_BUILD_DIR}" ] &&\ rm_if_exists -m ${PKG_BUILD_DIR}; set_build_script_done build_dir -patch; fi; @@ -62,7 +62,7 @@ if ! is_build_script_done patch; then ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \ ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local.patch \ ${MIDIPIX_BUILD_PWD}/../${PKG_SUBDIR}.local@${BUILD_HNAME}.patch; do - [ -r ${PATCH_FNAME} ] &&\ + [ -r "${PATCH_FNAME}" ] &&\ patch -b -d ${PKG_SUBDIR} -p1 < ${PATCH_FNAME}; done; unset PATCH_FNAME; if [ -n "${PKG_PATCHES_EXTRA_URL}" ]; then |