diff --git a/build.sh b/build.sh index 9937a56..f3e5a2b 100755 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ buildp_ast() { fi; done; if [ -n "${_pids}" ]; then - rtl_log_msg vnfo "Killed PIDs ${_pids}"; + rtl_log_msg vnfo "Killed PIDs $(rtl_uniq ${_pids})"; fi; if [ -n "${EX_PKG_DISPATCH_WAIT}" ]; then for _pkg_name in ${EX_PKG_DISPATCH_WAIT}; do diff --git a/dist/dist_digest.dist b/dist/dist_digest.dist deleted file mode 100644 index 335b63e..0000000 --- a/dist/dist_digest.dist +++ /dev/null @@ -1,23 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_dist_digest_all() { - local _fname=""; - if rtl_lmatch "${ARG_DIST}" "tbz2" "," \ - || rtl_lmatch "${ARG_DIST}" "tgz" "," \ - || rtl_lmatch "${ARG_DIST}" "txz" ","; then - rtl_log_msg info "Compiling SHA256 sums..."; - if [ -e "${PREFIX}/SHA256SUMS" ]; then - rtl_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last"; - fi; - (cd "${PREFIX}"; - for _fname in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x \ - \( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or \ - -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do - sha256sum "${_fname}"; - done > "${PREFIX}/SHA256SUMS"); - fi; -}; - -# vim:filetype=sh diff --git a/dist/dist_minipix.dist b/dist/dist_minipix.dist index 04267d3..728f14d 100644 --- a/dist/dist_minipix.dist +++ b/dist/dist_minipix.dist @@ -18,20 +18,23 @@ pkg_dist_minipix_all() { local _dname="" _fname="" _pname=""; if rtl_lmatch "${ARG_DIST}" "minipix" ","; then for _dname in "${PREFIX_MINIPIX}/bin" "${PREFIX_MINIPIX}/share"; do - if [ ! -e "${_dname}" ]; then - rtl_fileop mkdir "${_dname}"; + if [ ! -e "${_dname}" ]\ + && ! rtl_fileop mkdir "${_dname}"; then + return 1; fi; done; for _fname in clear reset tset; do if [ -e "${PREFIX_NATIVE}/bin/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; for _pname in $([ -e "${PREFIX}/minipix_dist/bin" ] && find "${PREFIX}/minipix_dist/bin" \ -maxdepth 1 -perm /a=x -type f -and \( -not -name "lib*" \)); do - if pkgp_dist_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin"; + if pkgp_dist_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; for _fname in libc.so libcrypto.so.45 libexpat.so.1 liblzma.so.5 libmagic.so.1 \ @@ -40,36 +43,42 @@ pkg_dist_minipix_all() { libu16ports.so.0 libtinfo.so.6 libtinfow.so.6 libunistring.so.2 \ libuuid.so.1; do if [ -e "${PREFIX_NATIVE}/lib/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow \ - "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; for _dname in lib/python2.7 share/gdb; do - if [ -d "${PREFIX}/minipix_dist/${_dname}" ]; then - tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -; + if [ -d "${PREFIX}/minipix_dist/${_dname}" ]\ + && ! tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -; then + return 1; fi; done; for _fname in nano vim; do if [ -e "${PREFIX}/minipix_dist/share/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then - rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; + && pkgp_dist_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"\ + && ! rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then + return 1; fi; done; - if [ ! -L "${PREFIX_MINIPIX}/share/nanorc" ]; then - rtl_fileop ln_symbolic "nano/nanorc.nanorc" "${PREFIX_MINIPIX}/share/nanorc"; + if [ ! -L "${PREFIX_MINIPIX}/share/nanorc" ]\ + && ! rtl_fileop ln_symbolic "nano/nanorc.nanorc" "${PREFIX_MINIPIX}/share/nanorc"; then + return 1; fi; - if [ ! -L "${PREFIX_MINIPIX}/share/vimrc" ]; then - rtl_fileop ln_symbolic "vim/vim74/vimrc_example.vim" "${PREFIX_MINIPIX}/share/vimrc"; + if [ ! -L "${PREFIX_MINIPIX}/share/vimrc" ]\ + && ! rtl_fileop ln_symbolic "vim/vim74/vimrc_example.vim" "${PREFIX_MINIPIX}/share/vimrc"; then + return 1; fi; for _fname in putty putty-256color screen screen-256color xterm xterm-256color; do _dname="share/terminfo/${_fname%${_fname#[a-zA-Z]}}"; - if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]; then - rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}"; + if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]\ + && ! rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}"; then + return 1; fi; if [ -e "${PREFIX_NATIVE}/${_dname}/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then - rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then + return 1; fi; done; fi; diff --git a/dist/dist_zipdist.dist b/dist/dist_zipdist.dist index 36c4589..571dc0c 100644 --- a/dist/dist_zipdist.dist +++ b/dist/dist_zipdist.dist @@ -13,35 +13,41 @@ pkg_dist_zipdist_all() { fi; done; _dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip"; - if [ -e "${BUILD_WORKDIR}/zipdist" ]; then - rtl_fileop rm "${BUILD_WORKDIR}/zipdist"; - fi; - rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist"; - "${BUILD_WORKDIR}/mpackage/mpackage.sh" \ - --defroot="${DEFAULT_ZIPDIST_DEFROOT}" \ - --flysyms \ - --minroot="${PREFIX_MINIPIX}" \ - --objroot="${BUILD_WORKDIR}" \ - --pkgroot="${BUILD_WORKDIR}/zipdist/pkgroot" \ - --product=Midipix \ - --subset="${_pkglist_fname}" \ - --symbols \ - --sysroot="${BUILD_WORKDIR}/zipdist/sysroot" \ - --target="${DEFAULT_TARGET}" \ - --tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \ - --zipfile="${PREFIX}/${_dist_fname}"; - echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3; - rtl_log_msg info "Finished building deployable distribution ZIP archive."; - if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" ]\ - && [ -x "$(which gpg 2>/dev/null)" ]\ - && gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then - echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3; - rtl_log_msg info "Signing deployable distribution ZIP archive..."; - gpg --armor --passphrase-file /dev/null \ - --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \ - --sign "${PREFIX}/${_dist_fname}"; - echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3; - rtl_log_msg info "Signed deployable distribution ZIP archive."; + if [ -e "${BUILD_WORKDIR}/zipdist" ]\ + && ! rtl_fileop rm "${BUILD_WORKDIR}/zipdist"; then + return 1; + elif ! rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist"; then + return 1; + elif ! "${BUILD_WORKDIR}/mpackage/mpackage.sh" \ + --defroot="${DEFAULT_ZIPDIST_DEFROOT}" \ + --flysyms \ + --minroot="${PREFIX_MINIPIX}" \ + --objroot="${BUILD_WORKDIR}" \ + --pkgroot="${BUILD_WORKDIR}/zipdist/pkgroot" \ + --product=Midipix \ + --subset="${_pkglist_fname}" \ + --symbols \ + --sysroot="${BUILD_WORKDIR}/zipdist/sysroot" \ + --target="${DEFAULT_TARGET}" \ + --tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \ + --zipfile="${PREFIX}/${_dist_fname}"; then + return 1; + else + echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3; + rtl_log_msg info "Finished building deployable distribution ZIP archive."; + if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" ]\ + && [ -x "$(which gpg 2>/dev/null)" ]\ + && gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then + echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3; + rtl_log_msg info "Signing deployable distribution ZIP archive..."; + if ! gpg --armor --passphrase-file /dev/null \ + --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \ + --sign "${PREFIX}/${_dist_fname}"; then + return 1; + fi; + echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3; + rtl_log_msg info "Signed deployable distribution ZIP archive."; + fi; fi; fi; }; diff --git a/etc/README.md b/etc/README.md index 16392ed..6450625 100644 --- a/etc/README.md +++ b/etc/README.md @@ -43,11 +43,60 @@ or forcibly, respectively: ./build.sh [ ... ] -r \*\*mc,zsh ``` +Restart the ``configure``, ``build``, and ``install`` steps of the ``coreutils`` package. +```shell +./build.sh -r coreutils:configure,build,install +``` + Rebuild entire build group: ```shell ./build.sh [ ... ] -r ALL native_runtime ``` +## Fault-tolerant & highly optimised 3D laser show-equipped usage screen +``` +usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] [-F ipv4|ipv6|offline] + [-h] [-p jobs] [-P] [-r [*[*]]ALL|LAST|name[,..][:step,..]] [-R] [-v[v[v[v]]]] + [--as-needed] [--debug-minipix] [[ ..]] + + -a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64. + -b debug|release Selects debug or release build; defaults to debug. + -C dir[,..] Clean build directory (build,) ${PREFIX} before processing build + scripts (prefix,) source directory (src,) and/or destination directory + (dest) after successful package builds. + -D kind[,..] Produce minimal midipix distribution directory (minipix,) RPM binary + packages (rpm,) and/or deployable distribution ZIP archive (zipdist.) + zipdist implies minipix. + -F ipv4|ipv6|offline + Force IPv4 (ipv4) or IPv6 (ipv6) when downloading package archives + and/or Git repositories or don't download either at all (offline.) + -h Show this screen. + -p jobs Enables parallelisation at group-level, whenever applicable. + -P The maximum count of jobs defaults to the number of logical + processors on the host system divided by two (2.) + If -R is not specified and at least one (1) package fails to build, + all remaining package builds will be forcibly aborted for convenience. + -r [*[*]]ALL[:step,..]|LAST|name[,..][:step,..] + Restart all packages/the specified comma-separated package(s) + completely or at optionally specified comma-separated step(s) + or restart the last failed package and resume build. + Prepend w/ `*' to automatically include dependencies and `**' to + forcibly rebuild all dependencies. + + Currently defined steps are: + fetch_wget, fetch_git, fetch_extract, + configure_patch_pre, configure_autotools, configure_patch, configure, + build, + install_subdirs, install_make, install_files, install_libs, install, and install_rpm. + -R Ignore build failures, skip printing package logs, and continue + building (relaxed mode.) + -v[v[v[v]]] Be verbose; -vv: always print package logs; -vvv: set xtrace during package builds; -vvvv: logs fileops. + --as-needed Don't build unless the midipix_build repository has received new commits. + --debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix. + [ ..] One of: host_deps, host_deps_rpm, host_toolchain, host_tools, minipix, + native_packages, native_runtime, native_toolchain, and/or native_tools. +``` + ## Non-exhaustive list of build variables The following variables are primarily defined in ``midipix.env`` and may be overriden on a per-build basis on the command-line after the last argument, if any, e.g.: @@ -109,6 +158,7 @@ and ``URLS_GIT``, respectively. | DISABLED | Disable package | | ENV_VARS_EXTRA | List of double colon-separated environment variable equality sign-separated name-value pairs to set during package build | | FNAME | Filename of package archive file | +| FORCE_AUTORECONF | Forcibly run autoreconf -fiv prior to package (GNU autotools or similar) configuration | | GITROOT | midipix packages Git URL prefix | | INHERIT_FROM | Inherit variables from named package | | INSTALL_FILES | Whitespace-separated list of files to manually install into the package installation destination directory beneath ${PKG_BASE_DIR} | diff --git a/etc/build.usage b/etc/build.usage index da58fcc..8a2fda1 100644 --- a/etc/build.usage +++ b/etc/build.usage @@ -1,23 +1,22 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] [-F ipv4|ipv6|offline] [-h] [-p jobs] [-P] [-r [*[*]]ALL|LAST|name[,..][:step,..]] [-R] [-v[v[v[v]]]] [--as-needed] [--debug-minipix] [[ ..]] + -a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64. -b debug|release Selects debug or release build; defaults to debug. -C dir[,..] Clean build directory (build,) ${PREFIX} before processing build scripts (prefix,) source directory (src,) and/or destination directory (dest) after successful package builds. - -D kind[,..] Produce minimal midipix distribution directory (minipix,) package - tarballs (pkg,) RPM binary packages (rpm,) compressed and optionally - signed binary and source tarballs containing ${PREFIX} sans ${BUILD_WORKDIR} - (t{bz2,gz,xz},) and/or deployable distribution ZIP archive (zipdist.) - {t{bz2,gz,xz},zipdist} imply minipix. + -D kind[,..] Produce minimal midipix distribution directory (minipix,) RPM binary + packages (rpm,) and/or deployable distribution ZIP archive (zipdist.) + zipdist implies minipix. -F ipv4|ipv6|offline Force IPv4 (ipv4) or IPv6 (ipv6) when downloading package archives and/or Git repositories or don't download either at all (offline.) -h Show this screen. -p jobs Enables parallelisation at group-level, whenever applicable. -P The maximum count of jobs defaults to the number of logical - processors on the host system. + processors on the host system divided by two (2.) If -R is not specified and at least one (1) package fails to build, all remaining package builds will be forcibly aborted for convenience. -r [*[*]]ALL[:step,..]|LAST|name[,..][:step,..] @@ -39,16 +38,3 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] --debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix. [ ..] One of: host_deps, host_deps_rpm, host_toolchain, host_tools, minipix, native_packages, native_runtime, native_toolchain, and/or native_tools. - - ${HOME}/midipix_build.vars, ${HOME}/.midipix_build.vars, and/or ../midipix_build.vars will be sourced if present. - If either of ${DEFAULT_GITROOT_HEAD} and/or ${DEFAULT_ZIPDIST_SIGN_GPG_KEY} are to be set, export(1) them there. - - Examples: - ./build.sh -r coreutils - Completely restart the coreutils build. - - ./build.sh -r coreutils:configure,build,install - Restart the configure, build, and install steps of the coreutils build. - - ./build.sh -C prefix -r ALL DEFAULT_GITROOT_HEAD=... - Clean ${PREFIX} and forcibly rebuild everything. diff --git a/groups/000.host_tools.group b/groups/000.host_tools.group index 09327e7..6c9318b 100644 --- a/groups/000.host_tools.group +++ b/groups/000.host_tools.group @@ -5,8 +5,32 @@ HOST_TOOLS_BUILD_TYPE="host"; HOST_TOOLS_CONFIGURE_ARGS="--disable-nls --prefix=${PREFIX}"; HOST_TOOLS_MAKEFLAGS_INSTALL="prefix= PREFIX="; HOST_TOOLS_PACKAGES=" -pkgconf_host slibtool_host"; +autoconf_host automake_host gettext_tiny_host install_strip_host +libtool_host m4_host pkgconf_host slibtool_host"; HOST_TOOLS_PREFIX="${PREFIX}"; +: ${PKG_AUTOCONF_HOST_DEPENDS:="m4_host pkgconf_host slibtool_host"}; +: ${PKG_AUTOCONF_HOST_SHA256SUM:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684}; +: ${PKG_AUTOCONF_HOST_VERSION:=2.69}; +: ${PKG_AUTOCONF_HOST_URL:=https://ftp.gnu.org/gnu/autoconf/autoconf-${PKG_AUTOCONF_HOST_VERSION}.tar.xz}; +: ${PKG_AUTOMAKE_HOST_DEPENDS:="autoconf_host pkgconf_host slibtool_host"}; +: ${PKG_AUTOMAKE_HOST_SHA256SUM:=5d05bb38a23fd3312b10aea93840feec685bdf4a41146e78882848165d3ae921}; +: ${PKG_AUTOMAKE_HOST_VERSION:=1.16.1}; +: ${PKG_AUTOMAKE_HOST_URL:=https://ftp.gnu.org/gnu/automake/automake-${PKG_AUTOMAKE_HOST_VERSION}.tar.xz}; +: ${PKG_GETTEXT_TINY_HOST_DEPENDS:="pkgconf_host slibtool_host"}; +: ${PKG_GETTEXT_TINY_HOST_SHA256SUM:=95fdc541bc7bda2f93d9768533bfa9b82a4d4cd447e059e95450150bdd690e9f}; +: ${PKG_GETTEXT_TINY_HOST_VERSION:=0.3.1}; +: ${PKG_GETTEXT_TINY_HOST_URL:=http://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-${PKG_GETTEXT_TINY_HOST_VERSION}.tar.xz}; +: ${PKG_GETTEXT_TINY_HOST_BUILD_DIR:=gettext-tiny-${PKG_GETTEXT_TINY_HOST_VERSION}}; +: ${PKG_GETTEXT_TINY_HOST_MAKEFLAGS_BUILD_EXTRA:="prefix=${PREFIX}"}; +: ${PKG_INSTALL_STRIP_HOST_NO_LOG_VARS:=1}; +: ${PKG_LIBTOOL_HOST_DEPENDS:="autoconf_host automake_host pkgconf_host slibtool_host"}: +: ${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_M4_HOST_DEPENDS:="pkgconf_host slibtool_host"}; +: ${PKG_M4_HOST_SHA256SUM:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07}; +: ${PKG_M4_HOST_VERSION:=1.4.18}; +: ${PKG_M4_HOST_URL:=https://ftp.gnu.org/gnu/m4/m4-${PKG_M4_HOST_VERSION}.tar.xz}; : ${PKG_PKGCONF_HOST_DEPENDS:="slibtool_host"}; : ${PKG_PKGCONF_HOST_SHA256SUM:=61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210}; : ${PKG_PKGCONF_HOST_VERSION:=1.6.3}; diff --git a/groups/010.host_deps.group b/groups/010.host_deps.group index 142f6c0..4bf6bd4 100644 --- a/groups/010.host_deps.group +++ b/groups/010.host_deps.group @@ -2,32 +2,21 @@ # Build group host_deps # HOST_DEPS_BUILD_TYPE="host"; -HOST_DEPS_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS_HOST:+${DEFAULT_CFLAGS_HOST} }-I${PREFIX}/include"; -HOST_DEPS_CXXFLAGS_CONFIGURE="${DEFAULT_CXXFLAGS_HOST:+${DEFAULT_CXXFLAGS_HOST} }-I${PREFIX}/include"; +HOST_DEPS_CFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CFLAGS_HOST}" "-I${PREFIX}/include")"; +HOST_DEPS_CXXFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CXXFLAGS_HOST}" "-I${PREFIX}/include")"; HOST_DEPS_CONFIGURE_ARGS="--disable-nls --prefix=${PREFIX} --program-prefix="; HOST_DEPS_GROUP_DEPENDS="host_tools"; HOST_DEPS_LDFLAGS_CONFIGURE="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib"; HOST_DEPS_MAKEFLAGS_INSTALL="prefix= PREFIX="; HOST_DEPS_PACKAGES=" -autoconf_host automake_host bison_host bmake_host bzip2_host -chainport_host clang_host clzip_host cmake_host dbus_glib_host dbus_host -expat_host file_host flex_host gdb_host gdbm_host gettext_tiny_host -glib_host gperf_host infounzip_host infozip_host install_strip_host -intltool_host libffi_host libreadline_host libressl_host libtool_host -libz_host libzip_host llvm_host m4_host mdso_host mpackage_host -musl_fts_host ncurses_host ncursestw_host ncursesw_host pcre_host -perk_host python2_host python3_host ruby_host sqlite3_host texinfo_host -tzdb_host xz_host"; +bison_host bmake_host bzip2_host chainport_host clang_host clzip_host +cmake_host dbus_glib_host dbus_host expat_host file_host flex_host +gdb_host gdbm_host glib_host gperf_host infounzip_host infozip_host +intltool_host libffi_host libreadline_host libressl_host libz_host +libzip_host llvm_host mdso_host mpackage_host musl_fts_host ncurses_host +ncursestw_host ncursesw_host pcre_host perk_host python2_host python3_host +ruby_host sqlite3_host texinfo_host tzdb_host xz_host"; HOST_DEPS_PREFIX="${PREFIX}"; -: ${PKG_AUTOCONF_HOST_DEPENDS:="m4_host"}; -: ${PKG_AUTOCONF_HOST_SHA256SUM:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684}; -: ${PKG_AUTOCONF_HOST_VERSION:=2.69}; -: ${PKG_AUTOCONF_HOST_URL:=https://ftp.gnu.org/gnu/autoconf/autoconf-${PKG_AUTOCONF_HOST_VERSION}.tar.xz}; -: ${PKG_AUTOMAKE_HOST_DEPENDS:="autoconf_host"}; -: ${PKG_AUTOMAKE_HOST_SHA256SUM:=5d05bb38a23fd3312b10aea93840feec685bdf4a41146e78882848165d3ae921}; -: ${PKG_AUTOMAKE_HOST_VERSION:=1.16.1}; -: ${PKG_AUTOMAKE_HOST_URL:=https://ftp.gnu.org/gnu/automake/automake-${PKG_AUTOMAKE_HOST_VERSION}.tar.xz}; -: ${PKG_BISON_HOST_DEPENDS:="m4_host"}; : ${PKG_BISON_HOST_SHA256SUM:=55e4a023b1b4ad19095a5f8279f0dc048fa29f970759cea83224a6d5e7a3a641}; : ${PKG_BISON_HOST_VERSION:=3.5}; : ${PKG_BISON_HOST_URL:=https://ftp.gnu.org/gnu/bison/bison-${PKG_BISON_HOST_VERSION}.tar.xz}; @@ -85,21 +74,16 @@ HOST_DEPS_PREFIX="${PREFIX}"; : ${PKG_GDB_HOST_VERSION:=7.12}; : ${PKG_GDB_HOST_URL:=ftp://sourceware.org/pub/gdb/releases/gdb-${PKG_GDB_HOST_VERSION}.tar.gz}; : ${PKG_GDB_HOST_CFLAGS_CONFIGURE_EXTRA:="-g3 -O0 -I${PREFIX}/include/python2.7"}; -: ${PKG_GDB_HOST_LDFLAGS_CONFIGURE_EXTRA:="-L${PREFIX}/lib"}; -: ${PKG_GDB_HOST_CXXFLAGS_CONFIGURE_EXTRA:="-fpermissive -g3 -O0 -I${PREFIX}/include/python2.7"}; : ${PKG_GDB_HOST_CONFIGURE_ARGS:="--disable-nls --prefix= --target=${DEFAULT_TARGET} --with-system-libiberty --with-system-readline --with-system-zlib --with-python=python2.7"}; +: ${PKG_GDB_HOST_CXXFLAGS_CONFIGURE_EXTRA:="-fpermissive -g3 -O0 -I${PREFIX}/include/python2.7"}; : ${PKG_GDB_HOST_ENV_VARS_EXTRA:="CFLAGS_FOR_TARGET=-g3 -O0 -I${PREFIX}/include/python2.7"}; +: ${PKG_GDB_HOST_LDFLAGS_CONFIGURE_EXTRA:="-L${PREFIX}/lib"}; : ${PKG_GDB_HOST_LIBTOOL:=rdlibtool}; : ${PKG_GDB_HOST_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/patches/gdb/gdb-${PKG_GDB_HOST_VERSION}.midipix.patch"}; : ${PKG_GDBM_HOST_SHA256SUM:=86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc}; : ${PKG_GDBM_HOST_VERSION:=1.18.1}; : ${PKG_GDBM_HOST_URL:=ftp://ftp.gnu.org/gnu/gdbm/gdbm-${PKG_GDBM_HOST_VERSION}.tar.gz}; : ${PKG_GDBM_HOST_CONFIGURE_ARGS_EXTRA:=--enable-libgdbm-compat}; -: ${PKG_GETTEXT_TINY_HOST_SHA256SUM:=95fdc541bc7bda2f93d9768533bfa9b82a4d4cd447e059e95450150bdd690e9f}; -: ${PKG_GETTEXT_TINY_HOST_VERSION:=0.3.1}; -: ${PKG_GETTEXT_TINY_HOST_URL:=http://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-${PKG_GETTEXT_TINY_HOST_VERSION}.tar.xz}; -: ${PKG_GETTEXT_TINY_HOST_BUILD_DIR:=gettext-tiny-${PKG_GETTEXT_TINY_HOST_VERSION}}; -: ${PKG_GETTEXT_TINY_HOST_MAKEFLAGS_BUILD_EXTRA:="prefix=${PREFIX}"}; : ${PKG_GLIB_HOST_DEPENDS:="python3_host"}; : ${PKG_GLIB_HOST_SHA256SUM:=fe22998ff0394ec31e6e5511c379b74011bee61a4421bca7fcab223dfbe0fc6a}; : ${PKG_GLIB_HOST_VERSION:=2.54.0}; @@ -116,7 +100,6 @@ HOST_DEPS_PREFIX="${PREFIX}"; : ${PKG_INFOUNZIP_HOST_IN_TREE:=1}; : ${PKG_INFOZIP_HOST_URLS_GIT:=infozip-host=https://github.com/Redfoxmoon3/infozip.git@master}; : ${PKG_INFOZIP_HOST_IN_TREE:=1}; -: ${PKG_INSTALL_STRIP_HOST_NO_LOG_VARS:=1}; : ${PKG_INTLTOOL_HOST_SHA256SUM:=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd}; : ${PKG_INTLTOOL_HOST_VERSION:=0.51.0}; : ${PKG_INTLTOOL_HOST_URL:=https://launchpad.net/intltool/trunk/${PKG_INTLTOOL_HOST_VERSION}/+download/intltool-${PKG_INTLTOOL_HOST_VERSION}.tar.gz}; @@ -134,10 +117,6 @@ HOST_DEPS_PREFIX="${PREFIX}"; : ${PKG_LIBRESSL_HOST_SHA256SUM:=df7b172bf79b957dd27ef36dcaa1fb162562c0e8999e194aa8c1a3df2f15398e}; : ${PKG_LIBRESSL_HOST_VERSION:=3.0.2}; : ${PKG_LIBRESSL_HOST_URL:=http://ftp.eu.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${PKG_LIBRESSL_HOST_VERSION}.tar.gz}; -: ${PKG_LIBTOOL_HOST_DEPENDS:="autoconf_host automake_host"}: -: ${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_LIBZ_HOST_SHA256SUM:=abcc2831b7a0e891d0875fa852e9b9510b420d843d3d20aad010f65493fe4f7b}; : ${PKG_LIBZ_HOST_VERSION:=1.2.8.2015.12.26}; : ${PKG_LIBZ_HOST_URL:=https://sortix.org/libz/release/libz-${PKG_LIBZ_HOST_VERSION}.tar.gz}; @@ -150,9 +129,6 @@ HOST_DEPS_PREFIX="${PREFIX}"; : ${PKG_LLVM_HOST_VERSION:=3.8.1}; : ${PKG_LLVM_HOST_URL:=http://releases.llvm.org/${PKG_LLVM_HOST_VERSION}/llvm-${PKG_LLVM_HOST_VERSION}.src.tar.xz}; : ${PKG_LLVM_HOST_DISABLED:=1}; -: ${PKG_M4_HOST_SHA256SUM:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07}; -: ${PKG_M4_HOST_VERSION:=1.4.18}; -: ${PKG_M4_HOST_URL:=https://ftp.gnu.org/gnu/m4/m4-${PKG_M4_HOST_VERSION}.tar.xz}; : ${PKG_MDSO_HOST_URLS_GIT:="mdso=${DEFAULT_GITROOT}/mdso"}; : ${PKG_MDSO_HOST_CONFIGURE_ARGS:="--prefix="}; : ${PKG_MDSO_HOST_INSTALL_FILES:="@mdso=bin/${DEFAULT_TARGET}-mdso /=${DEFAULT_TARGET}/bin bin/mdso=${DEFAULT_TARGET}/bin/mdso"}; diff --git a/groups/020.host_deps_rpm.group b/groups/020.host_deps_rpm.group index 7a12143..9372249 100644 --- a/groups/020.host_deps_rpm.group +++ b/groups/020.host_deps_rpm.group @@ -2,8 +2,8 @@ # Build group host_deps_rpm # HOST_DEPS_RPM_BUILD_TYPE="host"; -HOST_DEPS_RPM_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS_HOST:+${DEFAULT_CFLAGS_HOST} }-I${PREFIX}/include"; -HOST_DEPS_RPM_CXXFLAGS_CONFIGURE="${DEFAULT_CXXFLAGS_HOST:+${DEFAULT_CXXFLAGS_HOST} }-I${PREFIX}/include"; +HOST_DEPS_RPM_CFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CFLAGS_HOST}" "-I${PREFIX}/include")"; +HOST_DEPS_RPM_CXXFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CXXFLAGS_HOST}" "-I${PREFIX}/include")"; HOST_DEPS_RPM_CONFIGURE_ARGS="--disable-nls --prefix=${PREFIX}"; HOST_DEPS_RPM_GROUP_DEPENDS="host_deps host_tools"; HOST_DEPS_RPM_LDFLAGS_CONFIGURE="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib"; @@ -26,7 +26,7 @@ HOST_DEPS_RPM_PREFIX="${PREFIX}"; : ${PKG_RPM_HOST_VERSION:=4.15.1}; : ${PKG_RPM_HOST_URL:=http://ftp.rpm.org/releases/rpm-${PKG_RPM_HOST_VERSION%.*}.x/rpm-${PKG_RPM_HOST_VERSION}.tar.bz2}; : ${PKG_RPM_HOST_CFLAGS_CONFIGURE:="-I${PREFIX}/include -I${PREFIX}/include/dbus-1.0 -I${PREFIX}/lib/dbus-1.0/include"}; -: ${PKG_RPM_HOST_CONFIGURE_ARGS_EXTRA:="-without-lua --enable-ndb --enable-lmdb --enable-bdb=no --with-crypto=openssl --with-vendor=midipix"}; +: ${PKG_RPM_HOST_CONFIGURE_ARGS_EXTRA:="--enable-bdb=no --enable-ndb --enable-lmdb --with-crypto=openssl --with-vendor=midipix --without-lua"}; : ${PKG_RPM_HOST_LDFLAGS_CONFIGURE:="-L${PREFIX}/lib"}; # vim:filetype=sh textwidth=0 diff --git a/groups/200.native_packages.group b/groups/200.native_packages.group index 3e0adbf..1f677d5 100644 --- a/groups/200.native_packages.group +++ b/groups/200.native_packages.group @@ -1,8 +1,8 @@ # # Build group native_packages # -NATIVE_PACKAGES_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_CXXFLAGS_CONFIGURE="${DEFAULT_CXXFLAGS:+${DEFAULT_CXXFLAGS} }--sysroot=${PREFIX_NATIVE}"; +NATIVE_PACKAGES_CFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CFLAGS}" "--sysroot=${PREFIX_NATIVE}")"; +NATIVE_PACKAGES_CXXFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CXXFLAGS}" "--sysroot=${PREFIX_NATIVE}")"; NATIVE_PACKAGES_CONFIG_CACHE_LOCAL="${CONFIG_CACHE_GNULIB}"; NATIVE_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --program-prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_GROUP_DEPENDS="host_deps host_deps_rpm host_toolchain host_tools native_toolchain native_tools"; diff --git a/groups/211.native_packages_cmdline.group b/groups/211.native_packages_cmdline.group index 2780c4d..eb277e5 100644 --- a/groups/211.native_packages_cmdline.group +++ b/groups/211.native_packages_cmdline.group @@ -2,12 +2,11 @@ # Build group native_packages (cmdline) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " bash bc busybox calcurse coreutils dash datamash dos2unix ed figlet findutils gawk grep mc mksh moon_buggy mpg123 nano ninvaders openbsd_baseutils rc sbase screen sed sloccount tar tcsh -the_silver_searcher toilet tree terminally_tetris ubase which zsh"; +the_silver_searcher toilet tree terminally_tetris ubase which zsh")"; : ${PKG_BASH_DEPENDS:="ncurses"}; : ${PKG_BASH_SHA256SUM:=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb}; : ${PKG_BASH_VERSION:=4.4}; diff --git a/groups/221.native_packages_dev.group b/groups/221.native_packages_dev.group index 38ee197..94d1a8f 100644 --- a/groups/221.native_packages_dev.group +++ b/groups/221.native_packages_dev.group @@ -2,10 +2,9 @@ # Build group native_packages (dev) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } -bison chicken cparser diffutils flex gdb lunix m4 make mandoc nasm patch -patchutils perl python2 python3 ruby smallbasic tk"; +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " +bison chicken cparser diffutils flex gdb lua lunix m4 make mandoc nasm +patch patchutils perl python2 python3 ruby smallbasic tk")"; : ${PKG_BISON_SHA256SUM:=55e4a023b1b4ad19095a5f8279f0dc048fa29f970759cea83224a6d5e7a3a641}; : ${PKG_BISON_VERSION:=3.5}; : ${PKG_BISON_URL:=https://ftp.gnu.org/gnu/bison/bison-${PKG_BISON_VERSION}.tar.xz}; @@ -44,6 +43,13 @@ patchutils perl python2 python3 ruby smallbasic tk"; : ${PKG_GDB_LIBTOOL:=rdlibtool}; : ${PKG_GDB_MAKEFLAGS_BUILD_EXTRA:="SYSROOT_FLAGS=--sysroot=${PREFIX_NATIVE}"}; : ${PKG_GDB_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/patches/gdb/gdb-${PKG_GDB_VERSION}.midipix.patch"}; +: ${PKG_LUA_SHA256SUM:=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c}; +: ${PKG_LUA_VERSION:=5.3.4}; +: ${PKG_LUA_URL:=https://www.lua.org/ftp/lua-${PKG_LUA_VERSION}.tar.gz}; +: ${PKG_LUA_IN_TREE:=1}; +: ${PKG_LUA_CONFIGURE_ARGS_EXTRA:="--with-readline --with-compat-module"}; +: ${PKG_LUA_FORCE_AUTORECONF:=1}; +: ${PKG_LUA_INSTALL_FILES:=@liblua.so=lib/liblua.so.0}; : ${PKG_LUNIX_DEPENDS:="lua"}; : ${PKG_LUNIX_URLS_GIT:=lunix=https://github.com/Redfoxmoon3/lunix.git@master}; : ${PKG_LUNIX_IN_TREE:=1}; diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group index 9f17432..9bb658d 100644 --- a/groups/231.native_packages_etc.group +++ b/groups/231.native_packages_etc.group @@ -2,16 +2,15 @@ # Build group native_packages (etc) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " alsa_lib apr apr_util bdwgc bmake bochs bzip2 clzip cmake cron curl dante dbus debianutils emacs expat ffmpeg file gdbm geoip gettext_tiny ghostscript giflib glib gnuchess gzip hastyhex hexcurse htop icecast -imagemagick infounzip infozip john lcms2 less lmdb lolcode lua mintty -mlogin musl_compat musl_fts ncdu ncurses ncursestw ncursesw npth openjpeg -p7zip pcre popt procps_ng qemu qpdf qrencode rpm rw shared_mime_info -slang sqlite3 tcl tdnf texinfo tiff tmux tzdb utf8proc util_linux vim -w32api w32lib xorriso xz yabasic zstd"; +imagemagick infounzip infozip john lcms2 less lmdb lolcode mintty mlogin +musl_compat musl_fts ncdu ncurses ncursestw ncursesw npth openjpeg p7zip +pcre popt procps_ng qemu qpdf qrencode rpm rw shared_mime_info slang +sqlite3 tcl tdnf texinfo tiff tmux tzdb utf8proc util_linux vim w32api +w32lib xorriso xz yabasic zstd")"; : ${PKG_ALSA_LIB_SHA256SUM:=3cdc3a93a6427a26d8efab4ada2152e64dd89140d981f6ffa003e85be707aedf}; : ${PKG_ALSA_LIB_VERSION:=1.1.8}; : ${PKG_ALSA_LIB_URL:=ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PKG_ALSA_LIB_VERSION}.tar.bz2}; @@ -192,12 +191,6 @@ w32api w32lib xorriso xz yabasic zstd"; : ${PKG_LMDB_IN_TREE:=1}; : ${PKG_LOLCODE_URLS_GIT:="lci=https://github.com/justinmeza/lci.git@master"}; : ${PKG_LOLCODE_BUILD_DIR:=lci}; -: ${PKG_LUA_SHA256SUM:=f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c}; -: ${PKG_LUA_VERSION:=5.3.4}; -: ${PKG_LUA_URL:=https://www.lua.org/ftp/lua-${PKG_LUA_VERSION}.tar.gz}; -: ${PKG_LUA_IN_TREE:=1}; -: ${PKG_LUA_CONFIGURE_ARGS_EXTRA:="--with-readline --with-compat-module"}; -: ${PKG_LUA_INSTALL_FILES:=@liblua.so=lib/liblua.so.0}; : ${PKG_MINTTY_DEPENDS:="w32api w32lib"}; : ${PKG_MINTTY_URLS_GIT:="mintty=https://github.com/midipix-ports/mintty.git@midipix bmintty=https://github.com/midipix-ports/bmintty.git@main"}; : ${PKG_MINTTY_CONFIGURE:=bmintty/configure}; @@ -205,6 +198,7 @@ w32api w32lib xorriso xz yabasic zstd"; : ${PKG_MINTTY_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_NATIVE}/lib/w32lib}; : ${PKG_MLOGIN_URLS_GIT:="mlogin=https://github.com/Redfoxmoon3/mlogin.git@master"}; : ${PKG_MLOGIN_BUILD_DIR:=mlogin}; +: ${PKG_MLOGIN_FORCE_AUTORECONF:=1}; : ${PKG_MUSL_COMPAT_URLS_GIT:=musl_compat=https://github.com/Redfoxmoon3/musl-compat.git@master}; : ${PKG_MUSL_COMPAT_BUILD_DIR:=musl_compat}; : ${PKG_MUSL_FTS_SHA256SUM:=32dfe02768f1d3d91ab04df4fbdb7922cd34cd529ce7081a78c3ca8b8652d1ee}; @@ -311,6 +305,7 @@ w32api w32lib xorriso xz yabasic zstd"; : ${PKG_TDNF_VERSION:=2.0.0-alpha.1}; : ${PKG_TDNF_URL:=https://github.com/vmware/tdnf/archive/v${PKG_TDNF_VERSION}.tar.gz}; : ${PKG_TDNF_CONFIGURE_ARGS_EXTRA:="--disable-static"}; +: ${PKG_TDNF_FORCE_AUTORECONF:=1}; : ${PKG_TDNF_IN_TREE:=1}; : ${PKG_TDNF_SUBDIR:=tdnf-${PKG_TDNF_VERSION}}; : ${PKG_TEXINFO_SHA256SUM:=988403c1542d15ad044600b909997ba3079b10e03224c61188117f3676b02caa}; diff --git a/groups/241.native_packages_inet.group b/groups/241.native_packages_inet.group index 3d74f8c..dc7f21b 100644 --- a/groups/241.native_packages_inet.group +++ b/groups/241.native_packages_inet.group @@ -2,12 +2,11 @@ # Build group native_packages (inet) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " apk_tools aria2 bind ca_certificates dropbear fetchmail git gnupg gnutls httpd inetutils irssi isync ldns lighttpd lynx mailutils microsocks mtr mutt nginx nullmailer openlitespeed opensmtpd openssh pacman rsync socat -thttpd w3m weechat wget whois"; +thttpd w3m weechat wget whois")"; : ${PKG_APK_TOOLS_DEPENDS:="libfetch libressl libz"}; : ${PKG_APK_TOOLS_SHA256SUM:=def2b2c23cd12fd2a9c19be49653b0d1bf9d81a26dac5a0ee79a1351d674f93b}; : ${PKG_APK_TOOLS_VERSION:=2.6.8}; @@ -128,6 +127,7 @@ thttpd w3m weechat wget whois"; : ${PKG_NULLMAILER_VERSION:=2.2} : ${PKG_NULLMAILER_URL:=https://github.com/bruceg/nullmailer/archive/${PKG_NULLMAILER_VERSION}.tar.gz}; : ${PKG_NULLMAILER_CONFIGURE_ARGS_EXTRA:="--enable-tls"} +: ${PKG_NULLMAILER_FORCE_AUTORECONF:=1}; : ${PKG_NULLMAILER_IN_TREE:=1} : ${PKG_NULLMAILER_SUBDIR:=nullmailer-${PKG_NULLMAILER_VERSION}}; : ${PKG_OPENLITESPEED_SHA256SUM:=11cea34ebb0d72e5c620c61dce9ee4982474311dc5f35e0737a6b6d760bcf577}; diff --git a/groups/251.native_packages_lib.group b/groups/251.native_packages_lib.group index 328da3d..c7d5203 100644 --- a/groups/251.native_packages_lib.group +++ b/groups/251.native_packages_lib.group @@ -2,13 +2,12 @@ # Build group native_packages (libs) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " libarchive libasr libassuan libatomic_ops libdmtx libedit libelf libevent libfetch libffi libfirm libflac libgcrypt libgpg_error libjpeg_turbo libksba libnettle libogg libpcap libpipeline libpng libreadline libredwg libressl libsasl2 libshine libsndfile libsolv libtelnet libtheora libtirpc -libudns libunistring libuv libvorbis libxml2 libxslt libz libzip"; +libudns libunistring libuv libvorbis libxml2 libxslt libz libzip")"; : ${PKG_LIBARCHIVE_SHA256SUM:=ba7eb1781c9fbbae178c4c6bad1c6eb08edab9a1496c64833d1715d022b30e2e}; : ${PKG_LIBARCHIVE_VERSION:=3.3.3}; : ${PKG_LIBARCHIVE_URL:=http://www.libarchive.org/downloads/libarchive-${PKG_LIBARCHIVE_VERSION}.tar.gz}; @@ -16,6 +15,7 @@ libudns libunistring libuv libvorbis libxml2 libxslt libz libzip"; : ${PKG_LIBASR_SHA256SUM:=9cd88e0172e6d426438875e09229d1d473d56db546d02b630f9dd14db226d68d}; : ${PKG_LIBASR_VERSION:=1.0.3}; : ${PKG_LIBASR_URL:=https://www.opensmtpd.org/archives/libasr-${PKG_LIBASR_VERSION}.tar.gz}; +: ${PKG_LIBASR_FORCE_AUTORECONF:=1}; : ${PKG_LIBASR_IN_TREE:=1}; : ${PKG_LIBASSUAN_DEPENDS:="libgpg_error"}; : ${PKG_LIBASSUAN_SHA256SUM:=91bcb0403866b4e7c4bc1cc52ed4c364a9b5414b3994f718c70303f7f765e702}; @@ -75,6 +75,7 @@ libudns libunistring libuv libvorbis libxml2 libxslt libz libzip"; : ${PKG_LIBGPG_ERROR_SHA256SUM:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c}; : ${PKG_LIBGPG_ERROR_VERSION:=1.36}; : ${PKG_LIBGPG_ERROR_URL:=https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${PKG_LIBGPG_ERROR_VERSION}.tar.bz2}; +: ${PKG_LIBGPG_ERROR_FORCE_AUTORECONF:=1}; : ${PKG_LIBGPG_ERROR_IN_TREE:=1}; : ${PKG_LIBJPEG_TURBO_SHA256SUM:=acb8599fe5399af114287ee5907aea4456f8f2c1cc96d26c28aebfdf5ee82fed}; : ${PKG_LIBJPEG_TURBO_VERSION:=2.0.2}; diff --git a/groups/261.native_packages_x11.group b/groups/261.native_packages_x11.group index a230c3c..9e12c69 100644 --- a/groups/261.native_packages_x11.group +++ b/groups/261.native_packages_x11.group @@ -2,8 +2,7 @@ # Build group native_packages (x11) # GROUP_TARGET="native_packages"; -NATIVE_PACKAGES_PACKAGES=" -${NATIVE_PACKAGES_PACKAGES:+${NATIVE_PACKAGES_PACKAGES} } +NATIVE_PACKAGES_PACKAGES="$(rtl_lconcat "${NATIVE_PACKAGES_PACKAGES}" " atk at_spi2_atk at_spi2_core cairo dbus_glib fontconfig freetype freetype_pre fribidi gdk glew gtk2 gtk3 harfbuzz imlib2 libass libcaca libepoxy libfontenc libICE libpthread_stubs libSM libX11 libXau libXaw @@ -11,7 +10,7 @@ libXdamage libXdmcp libXext libxfce4ui libxfce4util libXfixes libXfont2 libXft libXi libxkbfile libXmu libXpm libXt libXtst mesa pango pixman rdesktop rxvt_unicode sdl1 sdl2 st util_macros xcb xcb_proto xcb_util xcb_util_image xcb_util_wm xcowsay xeyes xfconf xorgproto Xrender xterm -xtrans xwd xwin"; +xtrans xwd xwin")"; : ${PKG_ATK_DEPENDS:="glib"}; : ${PKG_ATK_VERSION:=2.26.0}; : ${PKG_ATK_SHA256SUM:=eafe49d5c4546cb723ec98053290d7e0b8d85b3fdb123938213acb7bb4178827}; @@ -294,6 +293,7 @@ xtrans xwd xwin"; : ${PKG_XTERM_URL:=ftp://ftp.invisible-island.net/xterm/xterm-${PKG_XTERM_VERSION}.tgz}; : ${PKG_XTERM_CONFIGURE_ARGS_EXTRA:="--disable-setuid --disable-setgid --disable-full-tgetent --enable-ansi-color --enable-88-color --enable-256-color --enable-broken-osc --enable-broken-st --enable-load-vt-fonts --enable-i18n --enable-doublechars --enable-warnings --enable-tcap-query --enable-logging --enable-dabbrev --enable-freetype --enable-luit --enable-mini-luit --enable-narrowproto --enable-exec-xterm --enable-sixel-graphics --with-utempter"}; : ${PKG_XTERM_ENV_VARS_EXTRA:=LIBS=-lncurses -ltinfo}; +: ${PKG_XTRANS_DEPENDS:="util_macros"}; : ${PKG_XTRANS_SHA256SUM:=adbd3b36932ce4c062cd10f57d78a156ba98d618bdb6f50664da327502bc8301}; : ${PKG_XTRANS_VERSION:=1.3.5}; : ${PKG_XTRANS_URL:=https://www.x.org/releases/individual/lib/xtrans-${PKG_XTRANS_VERSION}.tar.bz2}; diff --git a/groups/800.minipix.group b/groups/800.minipix.group index 153ebb1..8600c01 100644 --- a/groups/800.minipix.group +++ b/groups/800.minipix.group @@ -1,8 +1,8 @@ # # Build group minipix # -MINIPIX_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -MINIPIX_CXXFLAGS_CONFIGURE="${DEFAULT_CXXFLAGS:+${DEFAULT_CXXFLAGS} }--sysroot=${PREFIX_NATIVE}"; +MINIPIX_CFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CFLAGS}" "--sysroot=${PREFIX_NATIVE}")"; +MINIPIX_CXXFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CXXFLAGS}" "--sysroot=${PREFIX_NATIVE}")"; MINIPIX_CONFIG_CACHE_LOCAL="${CONFIG_CACHE_GNULIB}"; MINIPIX_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --program-prefix= --target=${DEFAULT_TARGET}"; MINIPIX_GROUP_DEPENDS="host_deps host_deps_rpm host_toolchain host_tools native_packages native_toolchain native_tools"; diff --git a/groups/999.dist.group b/groups/999.dist.group index 01af27f..c980cf4 100644 --- a/groups/999.dist.group +++ b/groups/999.dist.group @@ -3,8 +3,7 @@ # DIST_FORCE=1; DIST_NO_LOG_VARS=1; -DIST_PACKAGES="dist_digest dist_gitref dist_minipix dist_zipdist"; -: ${PKG_DIST_TARBALLS_DEPENDS:="dist_digest dist_minipix"}; +DIST_PACKAGES="dist_gitref dist_minipix dist_zipdist"; : ${PKG_DIST_ZIPDIST_DEPENDS:="dist_minipix"}; # vim:filetype=sh textwidth=0 diff --git a/groups/dev_packages.group b/groups/dev_packages.group index def4152..d0e4bb6 100644 --- a/groups/dev_packages.group +++ b/groups/dev_packages.group @@ -2,7 +2,7 @@ # Build group dev_packages # GROUP_AUTO=0; -DEV_PACKAGES_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; +DEV_PACKAGES_CFLAGS_CONFIGURE="$(rtl_lconcat "${DEFAULT_CFLAGS}" "--sysroot=${PREFIX_NATIVE}")"; DEV_PACKAGES_CONFIG_CACHE_LOCAL="${CONFIG_CACHE_GNULIB}"; DEV_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --program-prefix= --target=${DEFAULT_TARGET}"; DEV_PACKAGES_GROUP_DEPENDS="host_deps host_deps_rpm host_toolchain host_tools native_packages native_toolchain native_tools"; diff --git a/midipix.env b/midipix.env index eb39ecb..f72cb72 100644 --- a/midipix.env +++ b/midipix.env @@ -20,9 +20,9 @@ DEFAULT_BUILD_VARS=" CONFIG_CACHE CONFIG_CACHE_EXTRA CONFIG_CACHE_LOCAL CONFIGURE \ CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA CXX CXXFLAGS_CONFIGURE \ CXXFLAGS_CONFIGURE_EXTRA DEPENDS DESTDIR DISABLED ENV_VARS_EXTRA \ - FNAME GITROOT INHERIT_FROM INSTALL_FILES INSTALL_FILES_DESTDIR \ - INSTALL_FILES_DESTDIR_EXTRA INSTALL_TARGET INSTALL_TARGET_EXTRA \ - IN_TREE LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE \ + FNAME FORCE_AUTORECONF GITROOT INHERIT_FROM INSTALL_FILES \ + INSTALL_FILES_DESTDIR INSTALL_FILES_DESTDIR_EXTRA INSTALL_TARGET \ + INSTALL_TARGET_EXTRA IN_TREE LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE \ LDFLAGS_CONFIGURE_EXTRA LIBTOOL MAKE MAKE_INSTALL_VNAME \ MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL \ MAKEFLAGS_INSTALL_EXTRA NO_CLEAN NO_CLEAN_BASE_DIR NO_LOG_VARS \ @@ -134,12 +134,12 @@ ac_cv_func_calloc_0_nonnull=yes ac_cv_func_chown_works=yes ac_cv_func_getgroups_works=yes ac_cv_func_malloc_0_nonnull=yes +ac_cv_func_memcmp_working=yes ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_realloc_0_nonnull=yes ac_cv_func_strcoll_works=yes ac_cv_func_strnlen_working=yes ac_cv_func_working_mktime=yes -ac_cv_func_memcmp_working=yes gl_cv_func_gettimeofday_clobber=no gl_cv_func_tzset_clobber=no gt_cv_int_divbyzero_sigfpe=yes @@ -148,14 +148,17 @@ xorg_cv_malloc0_returns_null=yes"}; : ${CONFIG_CACHE_GNULIB:=" ac_cv_func___fseterr=yes +gl_cv_C_locale_sans_EILSEQ=yes gl_cv_func_cbrtl_ieee=yes gl_cv_func_ceilf_ieee=yes gl_cv_func_ceil_ieee=yes gl_cv_func_ceill_ieee=yes gl_cv_func_chown_ctime_works=yes +gl_cv_func_chown_follows_symlink=yes gl_cv_func_chown_slash_works=yes gl_cv_func_exp2l_ieee=yes gl_cv_func_expm1_ieee=yes +gl_cv_func_fchownat_nofollow_works=yes gl_cv_func_fcntl_f_dupfd_works=yes gl_cv_func_fdopendir_works=yes gl_cv_func_fflush_stdin=yes @@ -178,7 +181,9 @@ gl_cv_func_hypot_ieee=yes gl_cv_func_hypotl_ieee=yes gl_cv_func_isfinitel_works=yes gl_cv_func_isnanl_works=yes +gl_cv_func_linkat_nofollow=yes gl_cv_func_linkat_slash=yes +gl_cv_func_link_follows_symlink=yes gl_cv_func_link_works=yes gl_cv_func_log10f_ieee=yes gl_cv_func_log10_ieee=yes @@ -262,11 +267,6 @@ gl_cv_func_working_getdelim=yes gl_cv_func_working_mkstemp=yes gl_cv_func_working_mktime=yes gl_cv_func_working_strerror=yes -gl_cv_func_chown_follows_symlink=yes -gl_cv_func_fchownat_nofollow_works=yes -gl_cv_func_link_follows_symlink=yes -gl_cv_func_linkat_nofollow=yes -gl_cv_struct_dirent_d_ino=yes -gl_cv_C_locale_sans_EILSEQ=yes"}; +gl_cv_struct_dirent_d_ino=yes"}; # vim:filetype=sh textwidth=0 diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index ed86073..749fe7f 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -99,14 +99,14 @@ exp_pkg_dispatch_package() { if "${_dispatch_fn}" start_pkg "${_group_name}" "${_pkg_name}" "$((${EXP_PKG_DISPATCH_COUNT}+1))" "${EXP_PKG_DISPATCH_COUNT_MAX}"; then : $((EXP_PKG_DISPATCH_NJOBS+=1)); : $((EXP_PKG_DISPATCH_COUNT+=1)); EX_PKG_DISPATCH_WAIT="$(rtl_lconcat "${EX_PKG_DISPATCH_WAIT}" "${_pkg_name}")"; (set +o errexit -o noglob; BUILD_IS_PARENT=0; - if ex_pkg_env "${_build_steps_default}" "${_build_vars_default}" \ + if ex_pkg_env "${_build_steps_default}" "${_build_vars_default}" \ "${_group_name}" "${_pkg_name}" "${_restart_at}" "${_workdir}"; then ex_pkg_exec "${_dispatch_fn}" "${_group_name}" "${_pkg_name}" "${_restart_at}"; else - return "${?}"; + return 1; fi;) 1>"${_workdir}/${_pkg_name}_stderrout.log" 2>&1 3>"${_pipe_path}" & else - return "${?}"; + return 1; fi; }; diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr index dfcb0f6..7b1483b 100644 --- a/subr/ex_pkg_env.subr +++ b/subr/ex_pkg_env.subr @@ -88,7 +88,7 @@ ex_pkg_env() { rtl_fileop source_opt "vars/${_pkg_name}.vars" "${_group_name}/${_pkg_name}.${_group_name}"; if ! exp_pkg_env_set "${_build_vars_default}" "${_group_name}" "${_pkg_name}"\ || ! exp_pkg_env_defaults "${_build_steps_default}" "${_pkg_name}" "${_workdir}"; then - return "${?}"; + return 1; fi; }; diff --git a/subr/ex_pkg_exec.subr b/subr/ex_pkg_exec.subr index 6fb333b..9e4629b 100644 --- a/subr/ex_pkg_exec.subr +++ b/subr/ex_pkg_exec.subr @@ -22,11 +22,11 @@ exp_pkg_exec_pre() { if [ "${PKG_NO_CLEAN_BASE_DIR:-0}" -eq 0 ]\ && ! rtl_fileop rm "${PKG_BASE_DIR}" "${PKG_BUILD_DIR}" "${PKG_DESTDIR}"\ || ! rtl_fileop mkdir "${PKG_BASE_DIR}"; then - return "${?}"; + return 1; fi; if ! rtl_fileop mkdir "${PKG_BUILD_DIR}" "${PKG_DESTDIR}"\ || ! ex_pkg_state_set "${_pkg_name}" "start"; then - return "${?}"; + return 1; fi; fi; rtl_fileop cd "${PKG_BUILD_DIR}"; @@ -97,9 +97,11 @@ ex_pkg_exec() { fi; done; fi; - if [ "${_rc:-0}" -eq 0 ]\ - && [ -z "${_restart_at}" ]; then - ex_pkg_state_set "${_pkg_name}" finish; + if [ "${_rc:-0}" -eq 0 ]; then + if [ -z "${_restart_at}" ]\ + || [ "${_restart_at}" = "ALL" ]; then + ex_pkg_state_set "${_pkg_name}" finish; + fi; fi; fi; return "${_rc}"; diff --git a/subr/pkg_clean.subr b/subr/pkg_clean.subr index b122823..a7df792 100644 --- a/subr/pkg_clean.subr +++ b/subr/pkg_clean.subr @@ -5,13 +5,19 @@ pkg_clean() { if [ "${PKG_NO_CLEAN:-0}" -eq 0 ]; then if rtl_lmatch "${ARG_CLEAN_BUILDS}" "build" ","; then - rtl_fileop rm "${PKG_BUILD_DIR}" || return "${?}"; + if ! rtl_fileop rm "${PKG_BUILD_DIR}"; then + return 1; + fi; fi; if rtl_lmatch "${ARG_CLEAN_BUILDS}" "dest" ","; then - rtl_fileop rm "${PKG_DESTDIR}" || return "${?}"; + if ! rtl_fileop rm "${PKG_DESTDIR}"; then + return 1; + fi; fi; if rtl_lmatch "${ARG_CLEAN_BUILDS}" "src" ","; then - rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}" || return "${?}"; + if ! rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}"; then + return 1; + fi; fi; fi; }; diff --git a/subr/pkg_configure.subr b/subr/pkg_configure.subr index c681988..974e708 100644 --- a/subr/pkg_configure.subr +++ b/subr/pkg_configure.subr @@ -15,8 +15,8 @@ pkg_configure() { 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; - return "${?}"; }; # vim:filetype=sh diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr index bc3b6c2..d28cc8e 100644 --- a/subr/pkg_configure_autotools.subr +++ b/subr/pkg_configure_autotools.subr @@ -7,6 +7,10 @@ pkg_configure_autotools() { 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}"; + if [ "${PKG_FORCE_AUTORECONF:-0}" -eq 1 ]\ + && ! (cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoreconf -fiv); then + return 1; + fi; if [ -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure.ac" ]\ && [ ! -e "${PKG_BASE_DIR}/${PKG_SUBDIR}/configure" ]; then for _fname in bootstrap bootstrap.sh autogen.sh; do @@ -15,16 +19,26 @@ pkg_configure_autotools() { "${PKG_BASE_DIR}/${PKG_SUBDIR}/build-aux" \ "${PKG_BASE_DIR}/${PKG_SUBDIR}"; do if [ -e "${_subdir_tgt}" ]; then - rtl_fileop install -m 0700 \ - "${MIDIPIX_BUILD_PWD}/etc/config.sub" \ - "${_subdir_tgt}/config.sub" || return "${?}" && break; + if ! rtl_fileop install -m 0700 \ + "${MIDIPIX_BUILD_PWD}/etc/config.sub" \ + "${_subdir_tgt}/config.sub"; then + return 1; + else + break; + fi; fi; done; - (rtl_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && \ - /bin/sh "${_fname}") || return "${?}" && break; + if ! (rtl_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && \ + /bin/sh "${_fname}"); then + return 1; + else + break; + fi; fi; done; - (rtl_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoconf) || return "${?}"; + if ! (rtl_fileop cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoconf); then + return 1; + fi; fi; for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.sub); do if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\ @@ -39,10 +53,14 @@ pkg_configure_autotools() { "${PKG_CONFIG_CACHE}" \ "${PKG_CONFIG_CACHE_LOCAL}" \ "${PKG_CONFIG_CACHE_EXTRA}"; - do echo "${_config_cache}" |\ - tr " " "\n" >> "${PKG_BUILD_DIR}/config.cache" || return "${?}"; + do if ! echo "${_config_cache}" |\ + tr " " "\n" >> "${PKG_BUILD_DIR}/config.cache"; then + return 1; + fi; done; - sed -i"" "s,%PREFIX%,${PKG_PREFIX},g" "${PKG_BUILD_DIR}/config.cache" || return "${?}"; + if ! sed -i"" "s,%PREFIX%,${PKG_PREFIX},g" "${PKG_BUILD_DIR}/config.cache"; then + return 1; + fi; fi; fi; rtl_export_vars -u PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}"; diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr index 80690b6..88f3f3d 100644 --- a/subr/pkg_configure_patch.subr +++ b/subr/pkg_configure_patch.subr @@ -13,8 +13,11 @@ pkg_configure_patch() { ${PKG_PATCHES_EXTRA}; do if [ -r "${_patch_fname}" ]\ && ! rtl_lmatch "${_patches_done}" "${_patch_fname}"; then - patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}" || return "${?}"; - _patches_done="$(rtl_lconcat "${_patches_done}" "${_patch_fname}")"; + if ! patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}"; then + set -o noglob; return 1; + else + _patches_done="$(rtl_lconcat "${_patches_done}" "${_patch_fname}")"; + fi; fi; done; set -o noglob; }; diff --git a/subr/pkg_configure_patch_pre.subr b/subr/pkg_configure_patch_pre.subr index 1c572ef..434b1cf 100644 --- a/subr/pkg_configure_patch_pre.subr +++ b/subr/pkg_configure_patch_pre.subr @@ -7,8 +7,9 @@ pkgp_configure_patch_pre() { for _patch_path in \ "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local.patch" \ "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}_pre.local@${BUILD_HNAME}.patch"; do - if [ -r "${_patch_path}" ]; then - patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_path}" || return "${?}"; + if [ -r "${_patch_path}" ]\ + && ! patch -b -d "${PKG_BASE_DIR}/${PKG_SUBDIR}" -p1 < "${_patch_path}"; then + return 1; fi; done; }; @@ -17,8 +18,10 @@ 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=""; if [ -e "${_chainport_patch_fname}" ]; then - rtl_fileop mkdir "${_chainport_patch_dname}" || return "${?}"; - rtl_fileop cp "${_chainport_patch_fname}" "${_chainport_patch_dname}" || return "${?}"; + if ! rtl_fileop mkdir "${_chainport_patch_dname}"\ + || ! rtl_fileop cp "${_chainport_patch_fname}" "${_chainport_patch_dname}"; then + return 1; + fi; fi; }; diff --git a/subr/pkg_fetch_download.subr b/subr/pkg_fetch_download.subr index a23b8b9..126675a 100644 --- a/subr/pkg_fetch_download.subr +++ b/subr/pkg_fetch_download.subr @@ -4,10 +4,14 @@ pkg_fetch_download() { if [ -n "${PKG_URL}" ]; then - rtl_fetch_url_wget "${PKG_URL}" "${PKG_SHA256SUM}" "${PKG_FNAME}" || return "${?}"; + if ! rtl_fetch_url_wget "${PKG_URL}" "${PKG_SHA256SUM}" "${PKG_FNAME}"; then + return 1; + fi; fi; if [ -n "${PKG_URLS_GIT}" ]; then - rtl_fetch_urls_git "${PKG_BASE_DIR}" ${PKG_URLS_GIT} || return "${?}"; + if ! rtl_fetch_urls_git "${PKG_BASE_DIR}" ${PKG_URLS_GIT}; then + return 1; + fi; fi; }; diff --git a/subr/pkg_fetch_extract.subr b/subr/pkg_fetch_extract.subr index 8802a95..eedd84a 100644 --- a/subr/pkg_fetch_extract.subr +++ b/subr/pkg_fetch_extract.subr @@ -13,16 +13,24 @@ pkgp_fetch_extract_type() { pkg_fetch_extract() { if [ -n "${PKG_URL}" ]; then - _oldpwd="${PWD}"; rtl_fileop cd "${PKG_BASE_DIR}" || return "${?}"; - rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}" || return "${?}"; - case "$(pkgp_fetch_extract_type "${PKG_NAME}")" in - bz2) bunzip2 -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf - || return "${?}"; ;; - gz) gunzip -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf - || return "${?}"; ;; - lz) lzip -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf - || return "${?}"; ;; - xz) xz -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf - || return "${?}"; ;; - *) tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/${PKG_FNAME}" || return "${?}"; ;; - esac; - rtl_fileop cd "${_oldpwd}" || return "${?}"; + _oldpwd="${PWD}"; + if ! rtl_fileop cd "${PKG_BASE_DIR}"\ + || ! rtl_fileop rm "${PKG_BASE_DIR}/${PKG_SUBDIR}"; then + rtl_fileop cd "${_oldpwd}"; return 1; + else + case "$(pkgp_fetch_extract_type "${PKG_NAME}")" in + bz2) bunzip2 -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf -; ;; + gz) gunzip -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf -; ;; + lz) lzip -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf -; ;; + xz) xz -d < "${BUILD_DLCACHEDIR}/${PKG_FNAME}" | tar -C "${PKG_BASE_DIR}" -xf -; ;; + *) tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/${PKG_FNAME}"; ;; + esac; + if [ "${?}" -ne 0 ]; then + rtl_fileop cd "${_oldpwd}"; return 1; + else + rtl_fileop cd "${_oldpwd}"; + fi; + fi; fi; }; diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index 87182d9..4afd075 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -3,24 +3,40 @@ # pkg_install() { - local _pkglist_name=""; - if ! rtl_fileop mkdir "${PKG_PREFIX}"\ - || ! find "${PKG_DESTDIR}" -type d -exec chmod 0755 {} \;\ - || ! find "${PKG_DESTDIR}" \( -not -perm /0111 \) -type f -exec chmod 0644 {} \;\ - || ! find "${PKG_DESTDIR}" -perm /0111 -type f -exec chmod 0755 {} \;\ - || ! tar -C "${PKG_DESTDIR}" -cpf - . | tar -C "${PKG_PREFIX}" --overwrite -xpf -; then - return "${?}"; - else - if rtl_lmatch "${ARG_DIST}" "pkg" ","; then - tar -C "${PKG_DESTDIR}" -cpf - . |\ - gzip -c -9 - > "${PKG_BASE_DIR}/${PKG_NAME}.tgz" || return "${?}"; - fi; - if [ "${PKG_PKGLIST_DISABLE:-0}" -eq 0 ]; then - if [ ! -e "${PREFIX}/pkglist.${PKG_BUILD_TYPE}" ]; then - touch "${PREFIX}/pkglist.${PKG_BUILD_TYPE}" || return "${?}"; + local _fname="" _ifs_old="${IFS}" _pkglist_name="" IFS; + if ! rtl_fileop mkdir "${PKG_PREFIX}"; then + return 1; + else IFS=" +"; for _fname in $(find "${PKG_DESTDIR}" -type d); do + if ! rtl_fileop chmod 0755 "${_fname}"; then + return 1; + fi; + done; + for _fname in $(find "${PKG_DESTDIR}" \( -not -perm /0111 \) -type f); do + if ! rtl_fileop chmod 0644 "${_fname}"; then + return 1; + fi; + done; + for _fname in $(find "${PKG_DESTDIR}" -perm /0111 -type f); do + if ! rtl_fileop chmod 0755 "${_fname}"; then + return 1; + fi; + done; IFS="${_ifs_old}"; + if ! tar -C "${PKG_DESTDIR}" -cpf - . | tar -C "${PKG_PREFIX}" --overwrite -xpf -; then + return 1; + elif rtl_lmatch "${ARG_DIST}" "pkg" ","\ + && ! tar -C "${PKG_DESTDIR}" -cpf - . | gzip -c -9 - > "${PKG_BASE_DIR}/${PKG_NAME}.tgz"; then + return 1; + elif [ "${PKG_PKGLIST_DISABLE:-0}" -eq 0 ]; then + if [ ! -e "${PREFIX}/pkglist.${PKG_BUILD_TYPE}" ]\ + && ! touch "${PREFIX}/pkglist.${PKG_BUILD_TYPE}"; then + return 1; + else + _pkglist_name="${PKG_BASE_DIR##*/}"; _pkglist_name="${_pkglist_name%%-*}"; + if ! echo "${_pkglist_name}" >> "${PREFIX}/pkglist.${PKG_BUILD_TYPE}"; then + return 1; + fi; fi; - _pkglist_name="${PKG_BASE_DIR##*/}"; _pkglist_name="${_pkglist_name%%-*}"; - echo "${_pkglist_name}" >> "${PREFIX}/pkglist.${PKG_BUILD_TYPE}" || return "${?}"; fi; fi; }; diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr index 5a4d970..362f492 100644 --- a/subr/pkg_install_files.subr +++ b/subr/pkg_install_files.subr @@ -4,17 +4,20 @@ pkgp_install_files() { if [ -n "${PKG_INSTALL_FILES}" ]; then - rtl_install -v "${PKG_DESTDIR}" ${PKG_INSTALL_FILES} || return "${?}"; + if ! rtl_install -v "${PKG_DESTDIR}" ${PKG_INSTALL_FILES}; then + return 1; + fi; fi; }; pkgp_install_files_pkgconfig() { local _pc_path=""; for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do - if grep -Eq '^libdir=[^$]+$' "${_pc_path}"; then - sed -i"" -e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/' \ + if grep -Eq '^libdir=[^$]+$' "${_pc_path}"\ + && ! sed -i"" -e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/' \ -e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/' \ - "${_pc_path}" || return "${?}"; + "${_pc_path}"; then + return 1; fi; done; }; @@ -31,7 +34,9 @@ pkgp_install_files_strip() { for _bin_path in $(find "${_tree_root}" -perm /a=x -type f); do if objdump -sj .debug_info "${_bin_path}" >/dev/null 2>&1; then rtl_log_msg info "Stripping ${_bin_path}..."; - "${PKG_TARGET}-strip" "${_bin_path}" || return "${?}"; + if ! "${PKG_TARGET}-strip" "${_bin_path}"; then + return 1; + fi; fi; done; fi; @@ -41,7 +46,7 @@ pkg_install_files() { if ! pkgp_install_files\ || ! pkgp_install_files_pkgconfig\ || ! pkgp_install_files_strip; then - return "${?}"; + return 1; fi; }; diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr index a00f15b..76c7bfd 100644 --- a/subr/pkg_install_libs.subr +++ b/subr/pkg_install_libs.subr @@ -5,7 +5,9 @@ pkgp_install_libs_purge_la() { local _la_path=""; for _la_path in $(find "${PKG_DESTDIR}" -type f -name \*.la); do - rtl_fileop rm "${_la_path}" || return "${?}"; + if ! rtl_fileop rm "${_la_path}"; then + return 1; + fi; done; }; @@ -25,7 +27,7 @@ pkgp_install_libs_shared() { local _lib_dst_path="" _lib_name="" _lib_src_path="" _so_dst_dir="" _so_src_path=""; if [ "${PKG_BUILD_TYPE}" != "host" ]; then for _so_src_path in \ - $(find "${PKG_DESTDIR}" \ + $(find "${PKG_DESTDIR}" \ \( -name "*.so" -or -name "*.so.*" \) -print); do if [ "$(readlink -f "${_so_path}")" != "/dev/null" ]\ && [ -z "$(rtl_head "[0-9.]" "${_so_src_path##*.so}")" ]; then @@ -38,13 +40,17 @@ pkgp_install_libs_shared() { _lib_dst_path="${_so_dst_dir}/${_lib_name}"; if [ ! -L "${_lib_src_path}" ]\ && [ ! -e "${_lib_dst_path}" ]; then - (rtl_fileop cd "$(rtl_dirname "${_so_src_path}")" &&\ - perk -e "$(rtl_basename "${_so_src_path}")" |\ - "${PKG_TARGET}-mdso" \ - -i "$(rtl_basename "${_lib_dst_path}")" \ - -n "$(rtl_basename "${_so_src_path}")" -) || return "${?}"; + if ! (rtl_fileop cd "$(rtl_dirname "${_so_src_path}")" && \ + perk -e "$(rtl_basename "${_so_src_path}")" |\ + "${PKG_TARGET}-mdso" \ + -i "$(rtl_basename "${_lib_dst_path}")" \ + -n "$(rtl_basename "${_so_src_path}")" -); then + return 1; + fi; + fi; + if ! pkgp_install_libs_shared_link "${_lib_name}" "${_so_dst_dir}" "${_so_src_path}"; then + return 1; fi; - pkgp_install_libs_shared_link "${_lib_name}" "${_so_dst_dir}" "${_so_src_path}" || return "${?}"; fi; done; fi; diff --git a/subr/pkg_install_rpm.subr b/subr/pkg_install_rpm.subr index ae76ac7..6cc373f 100644 --- a/subr/pkg_install_rpm.subr +++ b/subr/pkg_install_rpm.subr @@ -36,14 +36,14 @@ pkg_install_rpm() { elif [ "${_rc}" -eq 141 ]; then continue; else - return "${?}"; + return "${_rc}"; fi; done; if ! find "${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}/RPMS" \ -iname \*.rpm -exec cp -pP {} "${PREFIX_RPM}/" \; \ || ! rtl_fileop rm "${PREFIX_RPM}/${PKG_NAME}-${_pkg_version_rpm}" \ || ! rtl_fileop cp "${PKG_BASE_DIR}/${PKG_NAME}-${_pkg_version_rpm}.spec" "${PREFIX_RPM}/"; then - return "${?}"; + return 1; fi; fi; fi; diff --git a/subr/pkg_install_subdirs.subr b/subr/pkg_install_subdirs.subr index 9455758..8e6e042 100644 --- a/subr/pkg_install_subdirs.subr +++ b/subr/pkg_install_subdirs.subr @@ -7,11 +7,14 @@ pkg_install_subdirs() { for _spec in \ "${PKG_INSTALL_FILES_DESTDIR}" \ "${PKG_INSTALL_FILES_DESTDIR_EXTRA}"; do - rtl_install "${PKG_DESTDIR}" ${_spec} || return "${?}"; + if ! rtl_install "${PKG_DESTDIR}" ${_spec}; then + return 1; + fi; done; if [ "${PKG_PREFIX%/}" = "${PREFIX_NATIVE%/}" ]; then - rtl_install \ - "${PKG_DESTDIR}/${DEFAULT_TARGET}" ${PKG_INSTALL_FILES_DESTDIR} || return "${?}"; + if ! rtl_install "${PKG_DESTDIR}/${DEFAULT_TARGET}" ${PKG_INSTALL_FILES_DESTDIR}; then + return 1; + fi; fi; }; diff --git a/subr/rtl_complex.subr b/subr/rtl_complex.subr index 8370a4c..e727e3c 100644 --- a/subr/rtl_complex.subr +++ b/subr/rtl_complex.subr @@ -21,7 +21,7 @@ rtl_clean_env() { for _env_var in ${_env_vars}; do if [ "${_env_var#DEFAULT_}" != "${_env_var}" ]\ || [ "${_env_var#PKG_}" != "${_env_var}" ]; then - _env_vars_except="${_env_vars_except:+${_env_vars_except} }${_env_var}"; + _env_vars_except="$(rtl_lconcat "${_env_vars_except}" "${_env_var}")"; fi; done; rtl_unset_vars $(rtl_lfilter "${_env_vars}" "${_env_vars_except}"); @@ -107,12 +107,12 @@ rtl_set_vars() { _vval_src="$(rtl_get_var_unsafe "${_vname_src}")"; if [ -n "${_vval_src}" ]; then rtl_set_var_unsafe "PKG_${_vname_dst}" "${_vval_src}"; - _vars_set_tmp="${_vars_set_tmp:+${_vars_set_tmp} }PKG_${_vname_dst}"; + _vars_set_tmp="$(rtl_lconcat "${_vars_set_tmp}" "PKG_${_vname_dst}")"; fi; done; _vars_set_old="$(rtl_get_var_unsafe "${_vars_set_vname}")"; rtl_set_var_unsafe "${_vars_set_vname}" \ - "${_vars_set_old:+${_vars_set_old} }${_vars_set_tmp}"; + "$(rtl_lconcat "${_vars_set_old}" "${_vars_set_tmp}")"; }; # vim:filetype=sh diff --git a/subr/rtl_fetch.subr b/subr/rtl_fetch.subr index d61d785..3afd30d 100644 --- a/subr/rtl_fetch.subr +++ b/subr/rtl_fetch.subr @@ -36,7 +36,7 @@ exp_rtl_fetch_url_git() { if [ "${?}" -eq 0 ]; then cd "$(pwd)"; else - return "${?}"; + return 1; fi; }; diff --git a/subr/rtl_fileop.subr b/subr/rtl_fileop.subr index cc86178..c2b403f 100644 --- a/subr/rtl_fileop.subr +++ b/subr/rtl_fileop.subr @@ -10,7 +10,7 @@ exp_rtl_fileop_check() { }; rtl_fileop() { - local _op="${1}" _dst="" _install_args="" _rc=0 _src=""; shift; + local _op="${1}" _dst="" _mode="" _install_args="" _owner="" _rc=0 _src=""; shift; case "${_op}" in cd) if [ \( -z "${1}" \) -o ! \( -L "${1}" -o -e "${1}" \) ]; then rtl_log_msg failexit "Invalid or non-existent directory \`${1}'."; @@ -18,6 +18,20 @@ rtl_fileop() { rtl_log_msg vvvv "Changing working directory to \`${1}'."; cd -- "${1}"; _rc="${?}"; fi; ;; + chmod) if [ "${#}" -lt 2 ]; then + rtl_log_msg failexit "Missing parameters (in: chmod ${*}.)"; + elif _mode="${1}" && shift\ + && exp_rtl_fileop_check "${PREFIX}" "${*}"; then + rtl_log_msg vvvv "Changing file mode bits of \`${*}' to \`${_mode}'."; + chmod -- "${_mode}" "${@}"; _rc="${?}"; + fi; ;; + chown) if [ "${#}" -lt 2 ]; then + rtl_log_msg failexit "Missing parameters (in: chown ${*}.)"; + elif _owner="${1}" && shift\ + && exp_rtl_fileop_check "${PREFIX}" "${*}"; then + rtl_log_msg vvvv "Changing file owner of \`${*}' to \`${_owner}'."; + chown -- "${_owner}" "${@}"; _rc="${?}"; + fi; ;; cp_follow) if [ "${#}" -lt 2 ]; then rtl_log_msg failexit "Missing parameters (in: cp_follow ${*}.)"; diff --git a/vars/apr.vars b/vars/apr.vars index cbc192a..4ed7cbb 100644 --- a/vars/apr.vars +++ b/vars/apr.vars @@ -11,11 +11,14 @@ apr_cv_process_shared_works=no apr_cv_tcp_nodelay_with_cork=no"}; pkg_apr_install_make_post() { - sed -e 's,echo "\$APR_BUILD_DIR/libtool",echo '"${PKG_DESTDIR}"'/bin/slibtool,' \ + if ! sed \ + -e 's,echo "\$APR_BUILD_DIR/libtool",echo '"${PKG_DESTDIR}"'/bin/slibtool,' \ -e 's,echo "\${installbuilddir}/libtool",echo '"${PKG_DESTDIR}"'/bin/slibtool,' \ -e 's,flags="\$flags -I\$includedir \$EXTRA_INCLUDES",flags="-I'"${PKG_PREFIX}"'/include/apr-1",' \ - "${PKG_DESTDIR}/bin/apr-1-config" > "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config"; - chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config"; + "${PKG_DESTDIR}/bin/apr-1-config" > "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config" \ + || ! rtl_fileop chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/bash.vars b/vars/bash.vars index 2a61c1c..10bc6ea 100644 --- a/vars/bash.vars +++ b/vars/bash.vars @@ -12,4 +12,4 @@ bash_cv_ulimit_maxfds=yes bash_cv_under_sys_siglist=yes bash_cv_unusable_rtsigs=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/binutils.vars b/vars/binutils.vars index c772731..bc5e4b3 100644 --- a/vars/binutils.vars +++ b/vars/binutils.vars @@ -4,8 +4,9 @@ pkg_binutils_configure_patch_post() { local _overlay_dname="${BUILD_WORKDIR}/chainport/overlay/m${PKG_NAME%%_*}"; - if [ -d "${_overlay_dname}" ]; then - tar -C "${_overlay_dname}" -cpf - . | tar -C "${PKG_BASE_DIR}/${PKG_SUBDIR}" -xpf -; + if [ -d "${_overlay_dname}" ]\ + && ! tar -C "${_overlay_dname}" -cpf - . | tar -C "${PKG_BASE_DIR}/${PKG_SUBDIR}" -xpf -; then + return 1; fi; }; @@ -21,4 +22,4 @@ pkg_binutils_mingw32_configure_patch_post() { pkg_binutils_configure_patch_post "${@}"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/bison.vars b/vars/bison.vars index 0f29a89..4e0d43b 100644 --- a/vars/bison.vars +++ b/vars/bison.vars @@ -6,4 +6,4 @@ ac_cv_path_M4=/bin/m4 ac_cv_prog_gnu_m4_gnu=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/busybox.vars b/vars/busybox.vars index 14b33b9..7fb88cd 100644 --- a/vars/busybox.vars +++ b/vars/busybox.vars @@ -7,10 +7,12 @@ pkg_busybox_configure() { }; pkg_busybox_install_make_post() { - set +o noglob - rtl_fileop cp "${PKG_BUILD_DIR}/_install/bin/"* "${PKG_DESTDIR}/bin/"; - set -o noglob - rtl_fileop cp "${PKG_BUILD_DIR}/_install/lib/libbusybox.so.${PKG_VERSION}" "${PKG_DESTDIR}/lib/"; + set +o noglob; + if ! rtl_fileop cp "${PKG_BUILD_DIR}/_install/bin/"* "${PKG_DESTDIR}/bin/"\ + || ! rtl_fileop cp "${PKG_BUILD_DIR}/_install/lib/libbusybox.so.${PKG_VERSION}" "${PKG_DESTDIR}/lib/"; then + set -o noglob; return 1; + fi; + set -o noglob; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/ca_certificates.vars b/vars/ca_certificates.vars index 69d7bfb..9a162df 100644 --- a/vars/ca_certificates.vars +++ b/vars/ca_certificates.vars @@ -3,14 +3,16 @@ # pkg_ca_certificates_install_make_pre() { - ${PKG_DESTDIR}/../ca-certificates/certdata2pem_host + "${PKG_DESTDIR}/../ca-certificates/certdata2pem_host"; }; pkg_ca_certificates_install_make_post() { - rtl_fileop cd "${PKG_DESTDIR}/share/ca-certificates"; set +o noglob - find . -name '*.crt' | sort | cut -b3- > ${PKG_DESTDIR}/etc/ca-certificates.conf - set -o noglob + if ! rtl_fileop cd "${PKG_DESTDIR}/share/ca-certificates"\ + || ! find . -name '*.crt' | sort | cut -b3- > ${PKG_DESTDIR}/etc/ca-certificates.conf; then + set -o noglob; return 1; + fi; + set -o noglob; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/chainport_host.vars b/vars/chainport_host.vars index aa4450f..a4108eb 100644 --- a/vars/chainport_host.vars +++ b/vars/chainport_host.vars @@ -3,8 +3,10 @@ # pkg_chainport_host_install_make() { - rtl_fileop rm "${BUILD_WORKDIR}/chainport"; - rtl_fileop cp ../chainport "${BUILD_WORKDIR}/chainport"; + if ! rtl_fileop rm "${BUILD_WORKDIR}/chainport"\ + || ! rtl_fileop cp ../chainport "${BUILD_WORKDIR}/chainport"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/check_updates.vars b/vars/check_updates.vars deleted file mode 100644 index e563dac..0000000 --- a/vars/check_updates.vars +++ /dev/null @@ -1,241 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_apk_tools_check_updates() { - case "${1}" in - get_fnames) - cu_fname="${cu_url##*/}"; - cu_fname_base="apk-tools"; - cu_fname_ext="${cu_fname#${cu_fname_base}-${cu_version}.}"; - cu_url_index="http://git.alpinelinux.org/cgit/apk-tools/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '//s/^.*The current version is 1.0.6<\/b>/s/^.*

The current version is \(.\+\)<\/b>.*$/bzip2-\1/p')"; - ;; - get_version) - cu_fname_version="${cu_fname#bzip2-}"; - ;; - esac; -}; - -pkg_infounzip_check_updates() { - case "${1}" in - get_fnames) - cu_fname="${cu_url##*/}"; - cu_fname_base="${cu_fname%%[0-9]*}"; - cu_fname_ext="${cu_fname#${cu_fname_base}${cu_version}.}"; - cu_url_index="${cu_url%/*}/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/[hH][rR][eE][fF]="[^"]\+"/s/^.*[hH][rR][eE][fF]="\([^"]\+\)".*$/\1/p' |\ - grep -Ev '/(zip232|unzip552)\..+$')"; - ;; - get_version) - if [ "${cu_fname#${cu_fname_base}}" != "${cu_fname}" ]\ - && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then - cu_fname_version="${cu_fname%.${cu_fname_ext}}"; - cu_fname_version="${cu_fname_version#*zip*}"; - fi; - ;; - esac; -}; - -pkg_infozip_check_updates() { - pkg_infounzip_check_updates "${@}"; -}; - -pkg_john_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="${cu_url%/*}/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/[hH][rR][eE][fF]="[^"]\+"/s/^.*[hH][rR][eE][fF]="\([^"]\+\)".*$/\1/p' |\ - grep -Ev 'john-.+-jumbo-.+\.')"; - ;; - esac; -}; - -pkg_less_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="http://www.greenwoodsoftware.com/less/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/The current released version is less-[0-9]\+/s/^.*The current released version is less-\([0-9]\+\).*$/less-\1/p')"; - ;; - get_version) - cu_fname_version="${cu_fname#less-}"; - ;; - esac; -}; - -pkg_libgpg_error_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="${cu_url%/*}/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/href="[^"]\+"/s/^.*href="\([^"]\+\)".*$/\1/p')"; - cu_fname_base="libgpg-error"; - ;; - esac; -}; - -pkg_lynx_check_updates() { - case "${1}" in - get_fnames) - cu_fname="${cu_url##*/}"; - cu_fname_base="lynx"; - cu_fname_ext="${cu_fname#${cu_fname_base}${cu_version}.}"; - ;; - get_version) - if [ "${cu_fname#${cu_fname_base}-cur}" = "${cu_fname}" ]\ - && [ "${cu_fname#*rel\.}" != "${cu_fname}" ]\ - && [ "${cu_fname#${cu_fname_base}}" != "${cu_fname}" ]\ - && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then - cu_fname_version="${cu_fname%.${cu_fname_ext}}"; - cu_fname_version="${cu_fname_version#lynx}"; - fi; - ;; - esac; -}; - -pkg_libpthread_stubs_check_updates() { - case "${1}" in - get_fnames) - cu_fname_base="libpthread-stubs"; - ;; - esac; -}; - -pkg_man_db_check_updates() { - case "${1}" in - get_fnames) - cu_fname="${cu_url##*/}"; - cu_fname_base="man-db"; - cu_fname_ext="${cu_fname#${cu_fname_base}-${cu_version}.}"; - ;; - esac; -}; - -pkg_mksh_check_updates() { - case "${1}" in - get_version) - if [ "${cu_fname#${cu_fname_base}-}" != "${cu_fname}" ]\ - && [ "${cu_fname%.${cu_fname_ext}}" != "${cu_fname}" ]; then - cu_fname_version="${cu_fname%.${cu_fname_ext}}"; - cu_fname_version="${cu_fname_version#*-R}"; - fi; - ;; - version_fixup) - cu_version="${cu_version#R}"; - ;; - esac; -}; - -pkg_pacman_check_updates() { - case "${1}" in - get_fnames) - cu_fname="${cu_url##*/}"; - cu_fname_base="pacman"; - cu_fname_ext="${cu_fname#${cu_fname_base}-${cu_version}.}"; - cu_url_index="https://git.archlinux.org/pacman.git/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '//s/^.* "${PREFIX}/bin/${PKG_TARGET}-install-strip" < "${PREFIX}/bin/${PKG_TARGET}-install-strip" < "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" < "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" < "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" < "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" < "${PKG_DESTDIR}/lib/rpm/elfdeps"; - chmod +x "${PKG_DESTDIR}/lib/rpm/elfdeps"; - rtl_fileop rm "${PKG_DESTDIR}/var"; + if ! echo "#!/bin/true" > "${PKG_DESTDIR}/lib/rpm/elfdeps"\ + || ! rtl_fileop chmod +x "${PKG_DESTDIR}/lib/rpm/elfdeps"\ + || ! rtl_fileop rm "${PKG_DESTDIR}/var"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/ruby.vars b/vars/ruby.vars index 00273c1..acb8757 100644 --- a/vars/ruby.vars +++ b/vars/ruby.vars @@ -3,9 +3,8 @@ # pkg_ruby_install_make_pre() { - if [ ! -e rbconfig.rb.orig ]; then - sed -i.orig '/^\s*CONFIG\["prefix"\]\s*=.*$/s/=.*$/= ""/' \ - rbconfig.rb; + if ! [ -e "rbconfig.rb.orig" ]; then + sed -i.orig '/^\s*CONFIG\["prefix"\]\s*=.*$/s/=.*$/= ""/' "rbconfig.rb"; fi; }; @@ -13,4 +12,4 @@ pkg_ruby_host_install_make_pre() { pkg_ruby_install_make_pre; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/sdl1.vars b/vars/sdl1.vars index 11cb139..f39019a 100644 --- a/vars/sdl1.vars +++ b/vars/sdl1.vars @@ -3,7 +3,7 @@ # pkg_sdl1_configure_autotools_pre() { - ${PKG_BASE_DIR}/${PKG_SUBDIR}/autogen.sh; + "${PKG_BASE_DIR}/${PKG_SUBDIR}/autogen.sh"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/smallbasic.vars b/vars/smallbasic.vars index f15da5b..21cf67d 100644 --- a/vars/smallbasic.vars +++ b/vars/smallbasic.vars @@ -6,4 +6,4 @@ ac_cv_path_PCRECONFIG=%PREFIX%/bin/pcre-config ac_cv_prog_have_pcre=%PREFIX%/bin/pcre-config"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/tcl.vars b/vars/tcl.vars index 921d447..ca6f961 100644 --- a/vars/tcl.vars +++ b/vars/tcl.vars @@ -6,4 +6,4 @@ tcl_cv_strtod_buggy=false tcl_cv_strtod_unbroken=true"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/tdnf.vars b/vars/tdnf.vars deleted file mode 100644 index 60936bb..0000000 --- a/vars/tdnf.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_tdnf_configure_autotools_pre() { - autoreconf -iv; -}; - -# vim:filetype=sh diff --git a/vars/texinfo.vars b/vars/texinfo.vars index 3a7a3d0..7e9aaa6 100644 --- a/vars/texinfo.vars +++ b/vars/texinfo.vars @@ -3,17 +3,19 @@ # pkg_texinfo_build_pre() { - rtl_run_cmd_unsplit make \ - ${PKG_MAKEFLAGS_BUILD} \ - ${PKG_MAKEFLAGS_BUILD_EXTRA} \ - "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \ - -C tools; - rtl_run_cmd_unsplit make \ - ${PKG_MAKEFLAGS_BUILD} \ - ${PKG_MAKEFLAGS_BUILD_EXTRA} \ - "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \ - LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" LIBS="-ltinfo" \ - -C tools/info; + if ! rtl_run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_BUILD} \ + ${PKG_MAKEFLAGS_BUILD_EXTRA} \ + "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \ + -C tools \ + || ! rtl_run_cmd_unsplit make \ + ${PKG_MAKEFLAGS_BUILD} \ + ${PKG_MAKEFLAGS_BUILD_EXTRA} \ + "LIBTOOL=${PKG_LIBTOOL:-slibtool}" \ + LDFLAGS="-L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" LIBS="-ltinfo" \ + -C "tools/info"; then + return 1; + fi; }; # vim:filetype=sh textwidth=0 diff --git a/vars/texinfo_host.vars b/vars/texinfo_host.vars index 2a441f2..def754c 100644 --- a/vars/texinfo_host.vars +++ b/vars/texinfo_host.vars @@ -4,14 +4,20 @@ pkg_texinfo_host_install_make_post() { if [ -e "${PKG_DESTDIR}/bin/makeinfo" ]; then - rtl_fileop mv "${PKG_DESTDIR}/bin/makeinfo" "${PKG_DESTDIR}/bin/makeinfo.dist"; + if ! rtl_fileop mv "${PKG_DESTDIR}/bin/makeinfo" "${PKG_DESTDIR}/bin/makeinfo.dist"; then + return 1; + fi; fi; - cat > "${PKG_DESTDIR}/bin/makeinfo" < "${PKG_DESTDIR}/bin/makeinfo" <