diff options
114 files changed, 891 insertions, 980 deletions
@@ -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 335b63e7..00000000 --- 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 04267d3b..728f14df 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 36c45892..571dc0ce 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 16392edf..6450625f 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] [<group>[ ..]] + + -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. + <group>[ ..] 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 da58fcc9..8a2fda19 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] [<group>[ ..]] + -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. <group>[ ..] 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 09327e7f..6c9318b0 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 142f6c0a..4bf6bd4c 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 7a12143f..93722499 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 3e0adbf1..1f677d52 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 2780c4d4..eb277e50 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 38ee1972..94d1a8f7 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 9f17432e..9bb658d9 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 3d74f8cf..dc7f21bb 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 328da3d0..c7d52039 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 a230c3cd..9e12c691 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 153ebb17..8600c01d 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 01af27f4..c980cf47 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 def41522..d0e4bb60 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 eb39ecb4..f72cb72e 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 ed860739..749fe7f7 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 dfcb0f69..7b1483b7 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 6fb333bb..9e4629ba 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 b122823e..a7df7920 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 c6819886..974e708f 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 bc3b6c23..d28cc8e1 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 80690b67..88f3f3d1 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 1c572efd..434b1cf7 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 a23b8b9d..126675ad 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 8802a950..eedd84ab 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 87182d9c..4afd0750 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 5a4d9708..362f4926 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 a00f15bb..76c7bfdb 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 ae76ac70..6cc373ff 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 94557586..8e6e0429 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 8370a4cf..e727e3cd 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 d61d7858..3afd30dc 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 cc861787..c2b403fa 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 cbc192a5..4ed7cbbd 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 2a61c1ce..10bc6eab 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 c7727319..bc5e4b3b 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 0f29a896..4e0d43b5 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 14b33b91..7fb88cdd 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 69d7bfb7..9a162dfe 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 aa4450f4..a4108eb4 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 e563dac6..00000000 --- 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 '/<a href='\''\/cgit\/apk-tools\/tag\/?h=v[0-9.]\+'\''>/s/^.*<a href='\''\/cgit\/apk-tools\/tag\/?h=v\([0-9.]\+\).*$/apk-tools-\1/p')"; - ;; - get_version) - cu_fname_version="${cu_fname#apk-tools-}"; - ;; - esac; -}; - -pkg_bzip2_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="http://www.bzip.org/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/<p>The current version is <b>1.0.6<\/b>/s/^.*<p>The current version is <b>\(.\+\)<\/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 '/<a href='\''\/pacman.git\/tag\/?h=v[0-9.]\+'\''>/s/^.*<a href='\''\/pacman.git\/tag\/?h=v\([0-9.]\+\).*$/pacman-\1/p')"; - ;; - get_version) - cu_fname_version="${cu_fname#pacman-}"; - ;; - esac; -}; - -pkg_procps_ng_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="https://gitlab.com/procps-ng/procps/tags/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/<a href="\/procps-ng\/procps\/tags\/[^"]\+"/s/^.*<a href="\/procps-ng\/procps\/tags\/v\([^"]\+\)".*$/\1/p')"; - ;; - get_version) - cu_fname_version="${cu_fname}"; - ;; - esac; -}; - -pkg_rxvt_unicode_check_updates() { - case "${1}" in - get_fnames) - cu_fname_base="rxvt-unicode"; - ;; - esac; -}; - -pkg_the_silver_searcher_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="http://geoff.greer.fm/ag/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- ${cu_url_index} |\ - sed -n '/href="[^"]\+"/{s/^.*href="\([^"]\+\)".*$/\1/;s/\/$//;p}')"; - ;; - esac; -}; - -pkg_tmux_check_updates() { - case "${1}" in - get_fnames) - cu_url_index="https://github.com/tmux/tmux/releases/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- "${cu_url_index}" |\ - sed -n '/<a href="\/tmux\/tmux\/releases\/tag\//s/^.*<a href="\/tmux\/tmux\/releases\/tag\/\(.\+\)".*$/\1/p')"; - ;; - esac; -}; - - -pkg_util_linux_check_updates() { - case "${1}" in - get_fnames) - cu_fname_base="util-linux"; - cu_url_index="https://www.kernel.org/pub/linux/utils/util-linux/"; - cu_fnames="$(wget ${DEFAULT_WGET_ARGS} -qO- ${cu_url_index} |\ - sed -n '/href="[^"]\+"/{s/^.*href="\([^"]\+\)".*$/\1/;s/\/$//;p}')"; - ;; - 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#v}"; - fi; - ;; - esac; -}; - -pkg_xcb_proto_check_updates() { - case "${1}" in - get_fnames) - cu_fname_base="xcb-proto"; - ;; - esac; -}; - -pkg_zsh_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 -v -- "-doc")"; - ;; - esac; -}; - -# vim:filetype=sh diff --git a/vars/clang_host.vars b/vars/clang_host.vars index ada3ba33..b7ec7e97 100644 --- a/vars/clang_host.vars +++ b/vars/clang_host.vars @@ -3,23 +3,25 @@ # pkg_clang_host_configure() { - rtl_fileop rm "../cfe-${PKG_VERSION}-host"; - rtl_fileop mkdir "../cfe-${PKG_VERSION}-host"; - rtl_fileop cd "../cfe-${PKG_VERSION}-host"; - rtl_log_msg info "Bootstrapping clang_host..."; - ("${PREFIX}/bin/cmake" \ - "../cfe-${PKG_VERSION}.src" \ - -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ - -DCLANG_INCLUDE_DOCS:BOOL=OFF \ - -DCLANG_INCLUDE_TESTS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="" \ - -DCMAKE_VERBOSE_MAKEFILE=NO \ - -DLIBCLANG_BUILD_STATIC:BOOL=ON \ - -DLLVM_PREFIX="${PKG_PREFIX}" \ - -G "Unix Makefiles" \ - -Wno-dev); - rtl_log_msg info "Finished bootstrapping clang_host."; + if ! rtl_fileop rm "../cfe-${PKG_VERSION}-host" \ + || ! rtl_fileop mkdir "../cfe-${PKG_VERSION}-host" \ + || ! rtl_fileop cd "../cfe-${PKG_VERSION}-host" \ + || ! rtl_log_msg info "Bootstrapping clang_host..." \ + || ! ("${PREFIX}/bin/cmake" \ + "../cfe-${PKG_VERSION}.src" \ + -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ + -DCLANG_INCLUDE_DOCS:BOOL=OFF \ + -DCLANG_INCLUDE_TESTS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_VERBOSE_MAKEFILE=NO \ + -DLIBCLANG_BUILD_STATIC:BOOL=ON \ + -DLLVM_PREFIX="${PKG_PREFIX}" \ + -G "Unix Makefiles" \ + -Wno-dev) \ + || ! rtl_log_msg info "Finished bootstrapping clang_host."; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/cmake.vars b/vars/cmake.vars index 4417026c..4a830a6e 100644 --- a/vars/cmake.vars +++ b/vars/cmake.vars @@ -3,42 +3,43 @@ # pkg_cmake_configure() { - rtl_fileop cp "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/BSDOS.cmake" \ - "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/Midipix.cmake"; - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" \ - cmake -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.a" \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ - -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ - -DCMAKE_SYSTEM_NAME=Midipix \ - -DCMAKE_USE_SYSTEM_BZIP2=ON \ - -DCMAKE_USE_SYSTEM_CURL=ON \ - -DCMAKE_USE_SYSTEM_EXPAT=OFF \ - -DCMAKE_USE_SYSTEM_LIBUV=ON \ - -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON \ - -DCMAKE_USE_SYSTEM_ZLIB=ON \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCURL_INCLUDE_DIR="${PKG_PREFIX}/include/curl" \ - -DCURL_LIBRARY="${PKG_PREFIX}/lib/libcurl.lib.a" \ - -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.lib.a" \ - -DKWSYS_LFS_WORKS=YES \ - -DLibUV_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLibUV_LIBRARY="${PKG_PREFIX}/lib/libuv.1.0.0.lib.a" \ - -DLibArchive_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLibArchive_LIBRARY="${PKG_PREFIX}/lib/libarchive.lib.a" \ - -DLIBLZMA_HAS_AUTO_DECODER=YES \ - -DLIBLZMA_HAS_EASY_ENCODER=YES \ - -DLIBLZMA_HAS_LZMA_PRESET=YES \ - -DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ - -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ - "../cmake-${PKG_VERSION}"; + if ! rtl_fileop cp "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/BSDOS.cmake" \ + "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/Midipix.cmake" \ + || ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + || ! cmake -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.a" \ + -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_INSTALL_PREFIX= \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DCMAKE_SYSTEM_NAME=Midipix \ + -DCMAKE_USE_SYSTEM_BZIP2=ON \ + -DCMAKE_USE_SYSTEM_CURL=ON \ + -DCMAKE_USE_SYSTEM_EXPAT=OFF \ + -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON \ + -DCMAKE_USE_SYSTEM_LIBUV=ON \ + -DCMAKE_USE_SYSTEM_ZLIB=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCURL_INCLUDE_DIR="${PKG_PREFIX}/include/curl" \ + -DCURL_LIBRARY="${PKG_PREFIX}/lib/libcurl.lib.a" \ + -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.lib.a" \ + -DKWSYS_LFS_WORKS=YES \ + -DLibArchive_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLibArchive_LIBRARY="${PKG_PREFIX}/lib/libarchive.lib.a" \ + -DLIBLZMA_HAS_AUTO_DECODER=YES \ + -DLIBLZMA_HAS_EASY_ENCODER=YES \ + -DLIBLZMA_HAS_LZMA_PRESET=YES \ + -DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ + -DLibUV_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLibUV_LIBRARY="${PKG_PREFIX}/lib/libuv.1.0.0.lib.a" \ + -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ + "../cmake-${PKG_VERSION}"; then + return 1; + fi; }; pkg_cmake_install_make_pre() { @@ -49,13 +50,14 @@ pkg_cmake_install_make_pre() { }; pkg_cmake_host_configure() { - rm -f config.cache; - cmake -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.so" \ - "../cmake-${PKG_VERSION}"; + if ! rtl_fileop rm config.cache \ + || ! cmake -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.so" "../cmake-${PKG_VERSION}"; then + return 1; + fi; }; pkg_cmake_host_install_make_pre() { pkg_cmake_install_make_pre; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/dbus_host.vars b/vars/dbus_host.vars index 65b6d7eb..899133ea 100644 --- a/vars/dbus_host.vars +++ b/vars/dbus_host.vars @@ -6,4 +6,4 @@ pkg_dbus_host_install_pre() { rtl_fileop rm "${PKG_DESTDIR}/etc" "${PKG_DESTDIR}/var"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/emacs.vars b/vars/emacs.vars index 79fdd2f7..06d4d9b5 100644 --- a/vars/emacs.vars +++ b/vars/emacs.vars @@ -10,4 +10,4 @@ gl_cv_func_readlink_works=yes gl_cv_func_working_mktime=yes gl_cv_func_working_utimes=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/gcc.vars b/vars/gcc.vars index ec22fe62..bf2ab44f 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -335,4 +335,4 @@ pkg_gcc_full_all() { fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/gdb.vars b/vars/gdb.vars index 595db375..1c8e5326 100644 --- a/vars/gdb.vars +++ b/vars/gdb.vars @@ -4,8 +4,9 @@ pkg_gdb_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; }; @@ -17,4 +18,4 @@ pkg_gdb_minipix_configure_patch_post() { pkg_gdb_configure_patch_post "${@}"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/gdk.vars b/vars/gdk.vars index f29e48f3..0aac8f8a 100644 --- a/vars/gdk.vars +++ b/vars/gdk.vars @@ -8,9 +8,10 @@ enable_gio_sniffing=yes"}; pkg_gdk_install_files_post() { local _pc_path=""; for _pc_path in $(find "${PKG_DESTDIR}"/lib/pkgconfig -name \*.pc); do - sed -i"" -e '/^Requires:\s\+gobject-2.0$/s/^.*$/& gio-2.0/' \ - "${_pc_path}"; + if ! sed -i"" -e '/^Requires:\s\+gobject-2.0$/s/^.*$/& gio-2.0/' "${_pc_path}"; then + return 1; + fi; done; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/ghostscript.vars b/vars/ghostscript.vars index ee6ec5e2..e3fef154 100644 --- a/vars/ghostscript.vars +++ b/vars/ghostscript.vars @@ -3,10 +3,12 @@ # pkg_ghostscript_configure_patch_pre() { - rtl_fileop rm "${PKG_BASE_DIR}/ghostscript-9.26/zlib"; - rtl_fileop rm "${PKG_BASE_DIR}/ghostscript-9.26/libpng"; - rtl_fileop rm "${PKG_PREFIX}/freetype"; - rtl_fileop rm "${PKG_PREFIX}/lcms2mt"; + if ! rtl_fileop rm "${PKG_BASE_DIR}/ghostscript-9.26/libpng" \ + || ! rtl_fileop rm "${PKG_BASE_DIR}/ghostscript-9.26/zlib" \ + || ! rtl_fileop rm "${PKG_PREFIX}/freetype" \ + || ! rtl_fileop rm "${PKG_PREFIX}/lcms2mt"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/git.vars b/vars/git.vars index d872c7e8..89ef2121 100644 --- a/vars/git.vars +++ b/vars/git.vars @@ -7,11 +7,13 @@ ac_cv_fread_reads_directories=1 ac_cv_snprintf_returns_bogus=0"}; pkg_git_install_make_post() { - local __="" _new=""; - for __ in $(find "${PKG_DESTDIR}" -name "Git*::*" -type f); do - _new="$(echo ${__} | sed "s/::/./g")"; - rtl_fileop mv "${__}" "${_new}"; + local _fname="" _fname_new=""; + for _fname in $(find "${PKG_DESTDIR}" -name "Git*::*" -type f); do + _fname_new="$(echo ${_fname} | sed "s/::/./g")"; + if ! rtl_fileop mv "${_fname}" "${_fname_new}"; then + return 1; + fi; done; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/glib.vars b/vars/glib.vars index 77bcc894..55d97500 100644 --- a/vars/glib.vars +++ b/vars/glib.vars @@ -3,18 +3,19 @@ # : ${PKG_GLIB_CONFIG_CACHE_EXTRA:=" -glib_cv_stack_grows=yes -glib_cv_uscore=yes -ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes -glib_cv_eventfd=no"}; -: ${PKG_GLIB_HOST_CONFIG_CACHE_EXTRA:=${PKG_GLIB_CONFIG_CACHE_EXTRA}}; +ac_cv_func_posix_getpwuid_r=yes +glib_cv_eventfd=no +glib_cv_stack_grows=yes +glib_cv_uscore=yes"}; +: ${PKG_GLIB_HOST_CONFIG_CACHE_EXTRA:="${PKG_GLIB_CONFIG_CACHE_EXTRA}"}; pkg_glib_install_files_post() { local _pc_path=""; for _pc_path in $(find "${PKG_DESTDIR}"/lib/pkgconfig -name \*.pc); do - sed -i"" -e '/^Libs:/s/^\(Libs:\s\+-L\${libdir}\)\s\+\(.\+\)$/\1 \2 -lffi -lpcre -lz/' \ - "${_pc_path}"; + if ! sed -i"" -e '/^Libs:/s/^\(Libs:\s\+-L\${libdir}\)\s\+\(.\+\)$/\1 \2 -lffi -lpcre -lz/' "${_pc_path}"; then + return 1; + fi; done; }; @@ -22,4 +23,4 @@ pkg_glib_host_install_files_post() { pkg_glib_install_files_post; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/gnutls.vars b/vars/gnutls.vars index 556ac215..651d17f5 100644 --- a/vars/gnutls.vars +++ b/vars/gnutls.vars @@ -3,7 +3,7 @@ # : ${PKG_GNUTLS_CONFIG_CACHE_EXTRA:=" -gl_cv_ld_output_def=no -gl_cv_func_working_getdelim=yes"}; +gl_cv_func_working_getdelim=yes +gl_cv_ld_output_def=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/htop.vars b/vars/htop.vars index 910d7140..bb4d0829 100644 --- a/vars/htop.vars +++ b/vars/htop.vars @@ -3,7 +3,7 @@ # : ${PKG_HTOP_CONFIG_CACHE_EXTRA:=" -ac_cv_lib_ncursesw6_addnwstr=yes -ac_cv_lib_ncursesw_addnwstr=yes"}; +ac_cv_lib_ncursesw_addnwstr=yes +ac_cv_lib_ncursesw6_addnwstr=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/install_strip_host.vars b/vars/install_strip_host.vars index 1a60be72..624cb749 100644 --- a/vars/install_strip_host.vars +++ b/vars/install_strip_host.vars @@ -3,15 +3,20 @@ # pkg_install_strip_host_all() { - if [ -e "${PREFIX}/bin/${PKG_TARGET}-install-strip" ]; then - rtl_fileop rm "${PREFIX}/bin/${PKG_TARGET}-install-strip"; + if [ -e "${PREFIX}/bin/${PKG_TARGET}-install-strip" ]\ + && ! rtl_fileop rm "${PREFIX}/bin/${PKG_TARGET}-install-strip"; then + return 1; fi; - rtl_fileop mkdir "${PREFIX}/bin"; - cat > "${PREFIX}/bin/${PKG_TARGET}-install-strip" <<EOF + if ! rtl_fileop mkdir "${PREFIX}/bin" \ + || ! cat > "${PREFIX}/bin/${PKG_TARGET}-install-strip" <<EOF #!/bin/sh install -s "\${@}"; EOF - chmod +x "${PREFIX}/bin/${PKG_TARGET}-install-strip"; + then + return 1; + elif ! rtl_fileop chmod +x "${PREFIX}/bin/${PKG_TARGET}-install-strip"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/jamvm.vars b/vars/jamvm.vars deleted file mode 100644 index fbefd30b..00000000 --- a/vars/jamvm.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_jamvm_configure_autotools_pre() { - autoreconf -iv; -}; - -# vim:filetype=sh diff --git a/vars/libasr.vars b/vars/libasr.vars deleted file mode 100644 index 67737232..00000000 --- a/vars/libasr.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_libasr_configure_autotools_pre() { - autoreconf -iv; -}; - -# vim:filetype=sh diff --git a/vars/libevent.vars b/vars/libevent.vars index cda3a3cd..bfefd791 100644 --- a/vars/libevent.vars +++ b/vars/libevent.vars @@ -5,4 +5,4 @@ : ${PKG_LIBEVENT_CONFIG_CACHE_EXTRA:=" ac_pe_target=true"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libfirm.vars b/vars/libfirm.vars index 74008878..2ec01b98 100644 --- a/vars/libfirm.vars +++ b/vars/libfirm.vars @@ -3,16 +3,15 @@ # pkg_cparser_configure_pre() { - export CFLAGS_PATH="-I${PKG_DESTDIR}/include"; - export LDFLAGS_PATH="-L${PKG_DESTDIR}/lib"; + export CFLAGS_PATH="-I${PKG_DESTDIR}/include" LDFLAGS_PATH="-L${PKG_DESTDIR}/lib"; }; -pkg_libfirm_install_make() { +pkg_cparser_install_make() { make ${PKG_MAKEFLAGS_BUILD} DESTDIR="${PKG_DESTDIR}" install; }; -pkg_cparser_install_make() { +pkg_libfirm_install_make() { make ${PKG_MAKEFLAGS_BUILD} DESTDIR="${PKG_DESTDIR}" install; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libgcrypt.vars b/vars/libgcrypt.vars index 53a34f6e..a7f08444 100644 --- a/vars/libgcrypt.vars +++ b/vars/libgcrypt.vars @@ -3,7 +3,7 @@ # : ${PKG_LIBGCRYPT_CONFIG_CACHE_EXTRA:=" -gcry_cv_visibility_attribute=yes -gcry_cv_broken_visibility_attribute=no"}; +gcry_cv_broken_visibility_attribute=no +gcry_cv_visibility_attribute=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libgpg_error.vars b/vars/libgpg_error.vars deleted file mode 100644 index 588f2c05..00000000 --- a/vars/libgpg_error.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_libgpg_error_configure_autotools_pre() { - autoreconf -ivf; -}; - -# vim:filetype=sh diff --git a/vars/libjpeg_turbo.vars b/vars/libjpeg_turbo.vars index 8ede8063..a8f1a8d5 100644 --- a/vars/libjpeg_turbo.vars +++ b/vars/libjpeg_turbo.vars @@ -3,19 +3,22 @@ # pkg_libjpeg_turbo_configure() { - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" \ - cmake -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ - -DWITH_JPEG8=ON \ - -DCMAKE_ASM_NASM_COMPILER="${PREFIX}/bin/${PKG_TARGET}-nasm" \ - -DCMAKE_ASM_NASM_OBJECT_FORMAT="win64" \ - -DWITH_SIMD=OFF \ - "../libjpeg-turbo-${PKG_VERSION}"; -} + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_ASM_NASM_COMPILER="${PREFIX}/bin/${PKG_TARGET}-nasm" \ + -DCMAKE_ASM_NASM_OBJECT_FORMAT="win64" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DWITH_JPEG8="ON" \ + -DWITH_SIMD="OFF" \ + "../libjpeg-turbo-${PKG_VERSION}"; then + return 1; + fi; +}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/libksba.vars b/vars/libksba.vars index 64f491a1..1560e097 100644 --- a/vars/libksba.vars +++ b/vars/libksba.vars @@ -3,7 +3,7 @@ # : ${PKG_LIBKSBA_CONFIG_CACHE_EXTRA:=" -ksba_cv_visibility_attribute=yes -ksba_cv_broken_visibility_attribute=no"}; +ksba_cv_broken_visibility_attribute=no +ksba_cv_visibility_attribute=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libnettle.vars b/vars/libnettle.vars index 3d6b96ed..863da683 100644 --- a/vars/libnettle.vars +++ b/vars/libnettle.vars @@ -4,8 +4,10 @@ pkg_libnettle_install_make_post() { set +o noglob; - chmod +x ${PKG_DESTDIR}/lib/lib*.so*; + if ! rtl_fileop chmod +x "${PKG_DESTDIR}/lib/"lib*.so*; then + set -o noglob; return 1; + fi; set -o noglob; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libpcap.vars b/vars/libpcap.vars index bf7416c1..2fada3bd 100644 --- a/vars/libpcap.vars +++ b/vars/libpcap.vars @@ -5,4 +5,4 @@ : ${PKG_LIBPCAP_CONFIG_CACHE_EXTRA:=" ac_cv_lbl_unaligned_fail=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libressl_host.vars b/vars/libressl_host.vars index 033aa5ab..3a216f06 100644 --- a/vars/libressl_host.vars +++ b/vars/libressl_host.vars @@ -6,4 +6,4 @@ pkg_libressl_host_install_pre() { rtl_fileop rm "${PKG_DESTDIR}/etc"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libsolv.vars b/vars/libsolv.vars index e3be2cbc..494b0ade 100644 --- a/vars/libsolv.vars +++ b/vars/libsolv.vars @@ -3,37 +3,38 @@ # pkg_libsolv_configure() { - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" \ - cmake -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ - -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ - -DFEDORA=1 \ - -DWITH_LIBXML2:BOOL=ON \ - -DENABLE_COMPLEX_DEPS:BOOL=ON \ - -DENABLE_RPMDB_BYRPMHEADER:BOOL=ON \ - -DENABLE_RPMDB_LIBRPM:BOOL=ON \ - -DENABLE_RPMPKG_LIBRPM:BOOL=ON \ - -DENABLE_LZMA_COMPRESSION:BOOL=ON \ - -DENABLE_BZIP2_COMPRESSION:BOOL=ON \ - -DENABLE_COMPS:BOOL=ON \ - -DENABLE_APPDATA:BOOL=ON \ - -DENABLE_RPMDB:BOOL=ON \ - -DENABLE_RPMMD:BOOL=ON \ - -DLIBXML2_LIBRARIES="${PKG_PREFIX}/lib/libxml2.lib.a" \ - -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.lib.a" \ - -DLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ - -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ - "../libsolv-${PKG_VERSION}"; + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.lib.a" \ + -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DENABLE_APPDATA:BOOL="ON" \ + -DENABLE_BZIP2_COMPRESSION:BOOL="ON" \ + -DENABLE_COMPLEX_DEPS:BOOL="ON" \ + -DENABLE_COMPS:BOOL="ON" \ + -DENABLE_LZMA_COMPRESSION:BOOL="ON" \ + -DENABLE_RPMDB:BOOL="ON" \ + -DENABLE_RPMDB_BYRPMHEADER:BOOL="ON" \ + -DENABLE_RPMDB_LIBRPM:BOOL="ON" \ + -DENABLE_RPMMD:BOOL="ON" \ + -DENABLE_RPMPKG_LIBRPM:BOOL="ON" \ + -DFEDORA="1" \ + -DLIBXML2_LIBRARIES="${PKG_PREFIX}/lib/libxml2.lib.a" \ + -DLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ + -DWITH_LIBXML2:BOOL="ON" \ + -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ + "../libsolv-${PKG_VERSION}"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libtool_host.vars b/vars/libtool_host.vars index 2c37c031..4e35a82c 100644 --- a/vars/libtool_host.vars +++ b/vars/libtool_host.vars @@ -23,4 +23,4 @@ pkg_libtool_host_build() { "${PKG_PKG_CONFIG_PATH:+PKG_CONFIG_PATH=${PKG_PKG_CONFIG_PATH}}"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libxml2.vars b/vars/libxml2.vars index 99fecd56..a30c3c1a 100644 --- a/vars/libxml2.vars +++ b/vars/libxml2.vars @@ -3,18 +3,22 @@ # pkg_libxml2_install_make_post() { - if [ -e "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" ]; then - rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config"; + if [ -e "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" ]\ + && ! rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config"; then + return 1; fi; - cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" <<EOF + if ! cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" <<EOF #!/bin/sh case "\${1}" in --cflags) echo "-I${PREFIX_NATIVE}/include/libxml2"; ;; --libs) echo "-L${PREFIX_NATIVE}/lib" -lxml2 -lz -llzma -lpthread -lm; ;; esac; EOF - chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config"; - + then + return 1; + else + rtl_fileop chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config"; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/libzip.vars b/vars/libzip.vars index 43478f95..57b85798 100644 --- a/vars/libzip.vars +++ b/vars/libzip.vars @@ -9,33 +9,34 @@ pkg_libzip_configure() { release) _build_type="Release"; ;; *) exit 1; ;; esac; - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" LDFLAGS="-lbz2" \ - cmake -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.lib.a" \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_BUILD_TYPE="${_build_type}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lfts" \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ - -DCMAKE_SYSTEM_NAME="Midipix" \ - -DENABLE_GNUTLS=:BOOL=ON \ - -DENABLE_MBEDTLS=:BOOL=OFF \ - -DGNUTLS_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DGNUTLS_LIBRARY="${PKG_PREFIX}/lib/libgnutls.lib.a" \ - -DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ - -DNETTLE_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DNETTLE_LIBRARY="${PKG_PREFIX}/lib/libnettle.lib.a" \ - -DOPENSSL_CRYPTO_LIBRARY="${PKG_PREFIX}/lib/libcrypto.lib.a" \ - -DOPENSSL_SSL_LIBRARY="${PKG_PREFIX}/lib/libssl.lib.a" \ - -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ - "../libzip-${PKG_VERSION}"; + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" LDFLAGS="-lbz2" PREFIX="" \ + cmake -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.lib.a" \ + -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_BUILD_TYPE="${_build_type}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lfts" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_INSTALL_PREFIX= \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DCMAKE_SYSTEM_NAME="Midipix" \ + -DENABLE_GNUTLS=:BOOL=ON \ + -DENABLE_MBEDTLS=:BOOL=OFF \ + -DGNUTLS_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DGNUTLS_LIBRARY="${PKG_PREFIX}/lib/libgnutls.lib.a" \ + -DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ + -DNETTLE_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DNETTLE_LIBRARY="${PKG_PREFIX}/lib/libnettle.lib.a" \ + -DOPENSSL_CRYPTO_LIBRARY="${PKG_PREFIX}/lib/libcrypto.lib.a" \ + -DOPENSSL_SSL_LIBRARY="${PKG_PREFIX}/lib/libssl.lib.a" \ + -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ + "../libzip-${PKG_VERSION}"; then + return 1; + fi; }; pkg_libzip_host_configure() { @@ -45,16 +46,18 @@ pkg_libzip_host_configure() { release) _build_type="Release"; ;; *) exit 1; ;; esac; - rm -f config.cache; - env PREFIX="" LDFLAGS="-L${PKG_PREFIX}/lib -lbz2 -lfts -lssl" \ - cmake -DCMAKE_BUILD_TYPE="${_build_type}" \ - -DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lcrypto -lfts" \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_INSTALL_PREFIX= \ - -DENABLE_GNUTLS=:BOOL=OFF \ - -DENABLE_MBEDTLS=:BOOL=OFF \ - "../libzip-${PKG_VERSION}"; + if ! rtl_fileop rm config.cache \ + || ! env LDFLAGS="-L${PKG_PREFIX}/lib -lbz2 -lfts -lssl" PREFIX="" \ + cmake -DCMAKE_BUILD_TYPE="${_build_type}" \ + -DCMAKE_C_STANDARD_LIBRARIES="-lbz2 -lcrypto -lfts" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_INSTALL_PREFIX= \ + -DENABLE_GNUTLS=:BOOL=OFF \ + -DENABLE_MBEDTLS=:BOOL=OFF \ + "../libzip-${PKG_VERSION}"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/lighttpd.vars b/vars/lighttpd.vars index a35cbeda..0c691ed2 100644 --- a/vars/lighttpd.vars +++ b/vars/lighttpd.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/llvm_host.vars b/vars/llvm_host.vars index 7d5f7a3a..f9182609 100644 --- a/vars/llvm_host.vars +++ b/vars/llvm_host.vars @@ -3,24 +3,26 @@ # pkg_llvm_host_configure() { - rtl_fileop rm "../llvm-${PKG_VERSION}-host"; - rtl_fileop mkdir "../llvm-${PKG_VERSION}-host"; - rtl_fileop cd "../llvm-${PKG_VERSION}-host"; - rtl_log_msg info "Bootstrapping llvm_host..."; - ("${PREFIX}/bin/cmake" \ - "../llvm-${PKG_VERSION}.src" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="" \ - -DCMAKE_VERBOSE_MAKEFILE=NO \ - -DLLVM_BUILD_DOCS=NO \ - -DLLVM_BUILD_EXAMPLES=NO \ - -DLLVM_BUILD_TESTS=NO \ - -DLLVM_ENABLE_SPHINX=NO \ - -DLLVM_TARGETS_TO_BUILD=X86 \ - -DSPHINX_WARNINGS_AS_ERRORS=NO \ - -G "Unix Makefiles" \ - -Wno-dev); - rtl_log_msg info "Finished bootstrapping llvm_host."; + if ! rtl_fileop rm "../llvm-${PKG_VERSION}-host" \ + || ! rtl_fileop mkdir "../llvm-${PKG_VERSION}-host" \ + || ! rtl_fileop cd "../llvm-${PKG_VERSION}-host" \ + || ! rtl_log_msg info "Bootstrapping llvm_host..." \ + || ! ("${PREFIX}/bin/cmake" \ + "../llvm-${PKG_VERSION}.src" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_VERBOSE_MAKEFILE=NO \ + -DLLVM_BUILD_DOCS=NO \ + -DLLVM_BUILD_EXAMPLES=NO \ + -DLLVM_BUILD_TESTS=NO \ + -DLLVM_ENABLE_SPHINX=NO \ + -DLLVM_TARGETS_TO_BUILD=X86 \ + -DSPHINX_WARNINGS_AS_ERRORS=NO \ + -G "Unix Makefiles" \ + -Wno-dev) \ + || ! rtl_log_msg info "Finished bootstrapping llvm_host."; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/lolcode.vars b/vars/lolcode.vars index d41d138a..282f9b5f 100644 --- a/vars/lolcode.vars +++ b/vars/lolcode.vars @@ -3,14 +3,17 @@ # pkg_lolcode_configure() { - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" \ - cmake -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ - -DCMAKE_INSTALL_PREFIX= \ - "../lci"; -} + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_INSTALL_PREFIX="" \ + "../lci"; then + return 1; + fi; +}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/lua.vars b/vars/lua.vars deleted file mode 100644 index 13dd4d51..00000000 --- a/vars/lua.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_lua_configure_autotools_pre() { - autoreconf -iv; -}; - -# vim:filetype=sh diff --git a/vars/make.vars b/vars/make.vars index 3323eb39..7d44185b 100644 --- a/vars/make.vars +++ b/vars/make.vars @@ -3,7 +3,7 @@ # : ${PKG_MAKE_CONFIG_CACHE_EXTRA:=" -make_cv_synchronous_posix_spawn=yes -ac_cv_func_gettimeofday=yes"}; +ac_cv_func_gettimeofday=yes +make_cv_synchronous_posix_spawn=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/mc.vars b/vars/mc.vars index d739e01e..8c01d872 100644 --- a/vars/mc.vars +++ b/vars/mc.vars @@ -5,4 +5,4 @@ : ${PKG_MC_CONFIG_CACHE_EXTRA:=" ac_list_mounted_fs=found"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/mlogin.vars b/vars/mlogin.vars deleted file mode 100644 index 1aa4d293..00000000 --- a/vars/mlogin.vars +++ /dev/null @@ -1,9 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_mlogin_configure_autotools_pre() { - autoreconf -iv; -}; - -# vim:filetype=sh diff --git a/vars/mpackage_host.vars b/vars/mpackage_host.vars index f65d7e8a..b04cf31d 100644 --- a/vars/mpackage_host.vars +++ b/vars/mpackage_host.vars @@ -3,8 +3,10 @@ # pkg_mpackage_host_install_make() { - rtl_fileop rm "${BUILD_WORKDIR}/mpackage"; - rtl_fileop ln_symbolic "${PKG_BASE_DIR}/${PKG_SUBDIR}" "${BUILD_WORKDIR}/mpackage"; + if ! rtl_fileop rm "${BUILD_WORKDIR}/mpackage"\ + || ! rtl_fileop ln_symbolic "${PKG_BASE_DIR}/${PKG_SUBDIR}" "${BUILD_WORKDIR}/mpackage"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/musl.vars b/vars/musl.vars index 05a3c067..ed7c97bd 100644 --- a/vars/musl.vars +++ b/vars/musl.vars @@ -14,4 +14,4 @@ pkg_musl_no_complex_host_fetch_download_post() { rtl_fileop mv "${PKG_BASE_DIR}/mmglue" "${PKG_BASE_DIR}/build/mmglue"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/mutt.vars b/vars/mutt.vars index c94970bf..733374d7 100644 --- a/vars/mutt.vars +++ b/vars/mutt.vars @@ -7,4 +7,4 @@ mutt_cv_c99_snprintf=yes mutt_cv_c99_vsnprintf=yes mutt_cv_regex_broken=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/nano.vars b/vars/nano.vars index 4d68ae6e..d58eb710 100644 --- a/vars/nano.vars +++ b/vars/nano.vars @@ -4,24 +4,24 @@ : ${PKG_NANO_CONFIG_CACHE_EXTRA:=" am_cv_func_working_getline=yes -gl_cv_func_working_getdelim=yes -gl_cv_func_memchr_works=yes -gl_cv_func_wcwidth_works=yes -gl_cv_func_snprintf_truncation_c99=yes -gl_cv_func_vsnprintf_zerosize_c99=yes -gl_cv_func_stat_file_slash=yes -gl_cv_func_signbit=yes -gl_cv_func_signbit_gcc=yes gl_cv_C_locale_sans_EILSEQ=yes -gl_fnmatch_cache_var=yes -gl_cv_func_working_utimes=yes -gl_cv_func_snprintf_retval_c99=yes -gl_cv_func_printf_sizes_c99=yes -gl_cv_func_printf_infinite=yes +gl_cv_func_memchr_works=yes gl_cv_func_printf_directive_a=no gl_cv_func_printf_directive_f=yes gl_cv_func_printf_directive_ls=yes +gl_cv_func_printf_enomem=yes gl_cv_func_printf_flag_zero=yes -gl_cv_func_printf_enomem=yes"}; +gl_cv_func_printf_infinite=yes +gl_cv_func_printf_sizes_c99=yes +gl_cv_func_signbit_gcc=yes +gl_cv_func_signbit=yes +gl_cv_func_snprintf_retval_c99=yes +gl_cv_func_snprintf_truncation_c99=yes +gl_cv_func_stat_file_slash=yes +gl_cv_func_vsnprintf_zerosize_c99=yes +gl_cv_func_wcwidth_works=yes +gl_cv_func_working_getdelim=yes +gl_cv_func_working_utimes=yes +gl_fnmatch_cache_var=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/nasm_host.vars b/vars/nasm_host.vars index 2b67eab5..9d697a27 100644 --- a/vars/nasm_host.vars +++ b/vars/nasm_host.vars @@ -5,9 +5,10 @@ pkg_nasm_host_install_make_post() { local _fname=""; for _fname in bin/nasm bin/ndisasm share/man/man1/nasm.1 share/man/man1/ndisasm.1; do - rtl_fileop mv "${PKG_DESTDIR}/${_fname}" \ - "${PKG_DESTDIR}/${_fname%/*}/${PKG_TARGET}-${_fname##*/}"; + if ! rtl_fileop mv "${PKG_DESTDIR}/${_fname}" "${PKG_DESTDIR}/${_fname%/*}/${PKG_TARGET}-${_fname##*/}"; then + return 1; + fi; done; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/nginx.vars b/vars/nginx.vars index 478d70d5..f49f26dd 100644 --- a/vars/nginx.vars +++ b/vars/nginx.vars @@ -5,7 +5,7 @@ pkg_nginx_configure() { export CFLAGS="${PKG_CFLAGS_CONFIGURE} -I${PKG_PREFIX}/include -pipe -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror"; export LDFLAGS="${PKG_LDFLAGS_CONFIGURE} -L${PKG_PREFIX}/lib"; - rtl_fileop mkdir objs/src objs/src/core objs/src/event objs/src/event/modules objs/src/http objs/src/http/modules objs/src/os/unix; + rtl_fileop mkdir "objs/src" "objs/src/core" "objs/src/event" "objs/src/event/modules" "objs/src/http" "objs/src/http/modules" "objs/src/os/unix"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/nullmailer.vars b/vars/nullmailer.vars index e1743c04..b20d725f 100644 --- a/vars/nullmailer.vars +++ b/vars/nullmailer.vars @@ -2,12 +2,13 @@ # set +o errexit -o noglob is assumed. # -pkg_nullmailer_configure_autotools_pre() { - touch ${PKG_BUILD_DIR}/ChangeLog - autoreconf -iv; -}; - : ${PKG_NULLMAILER_CONFIG_CACHE_EXTRA:=" local_cv_flag_NAMEDPIPEBUG=no"}; -# vim:filetype=sh +pkg_nullmailer_configure_autotools_pre() { + if ! touch "${PKG_BUILD_DIR}/ChangeLog"; then + return 1; + fi; +}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/openbsd_baseutils.vars b/vars/openbsd_baseutils.vars index 3c2d7f24..e8ce809f 100644 --- a/vars/openbsd_baseutils.vars +++ b/vars/openbsd_baseutils.vars @@ -3,12 +3,14 @@ # pkg_openbsd_baseutils_build() { - make -C ${PKG_BUILD_DIR}/libopenbsd CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}" - make -C ${PKG_BUILD_DIR}/pax CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}" + if ! make -C "${PKG_BUILD_DIR}/libopenbsd" CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}"\ + || ! make -C "${PKG_BUILD_DIR}/pax" CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}"; then + return 1; + fi; }; pkg_openbsd_baseutils_install_make() { - make -C ${PKG_BUILD_DIR}/pax install PREFIX="${PKG_DESTDIR}" MANDIR="${PKG_DESTDIR}/share/man" + make -C "${PKG_BUILD_DIR}/pax" install MANDIR="${PKG_DESTDIR}/share/man" PREFIX="${PKG_DESTDIR}"; } -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/openjpeg.vars b/vars/openjpeg.vars index e05debf0..b165f0ff 100644 --- a/vars/openjpeg.vars +++ b/vars/openjpeg.vars @@ -3,28 +3,31 @@ # pkg_openjpeg_configure() { - rm -f config.cache; - env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" \ - cmake -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ - -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ - -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ - -DLCMS2_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DLCMS2_LIBRARY="${PKG_PREFIX}/lib/liblcms2.lib.a" \ - -DPNG_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libpng.lib.a" \ - -DPNG_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libpng.lib.a" \ - -DPNG_PNG_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DTIFF_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DTIFF_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libtiff.lib.a" \ - -DTIFF_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libtiff.lib.a" \ - -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ - -DZLIB_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libz.a" \ - -DZLIB_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libz.a" \ - "../openjpeg-${PKG_VERSION}"; -} + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DLCMS2_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLCMS2_LIBRARY="${PKG_PREFIX}/lib/liblcms2.lib.a" \ + -DPNG_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libpng.lib.a" \ + -DPNG_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libpng.lib.a" \ + -DPNG_PNG_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DTIFF_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DTIFF_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libtiff.lib.a" \ + -DTIFF_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libtiff.lib.a" \ + -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DZLIB_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libz.a" \ + -DZLIB_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libz.a" \ + "../openjpeg-${PKG_VERSION}"; then + return 1; + fi; +}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/perl.vars b/vars/perl.vars index 6a42a4ef..b9708ec1 100644 --- a/vars/perl.vars +++ b/vars/perl.vars @@ -3,22 +3,33 @@ # pkg_perl_fetch_extract_post() { - local _fname_src="" _fname_dst="" _cflag=""; - (rtl_fileop cd "${PKG_BASE_DIR}"; - for _fname_src in $(find perl-cross -type f \ - -not -path perl-cross/.git/\* -not -name .gitignore); do - _fname_dst="perl-${PKG_VERSION}${_fname_src#perl-cross}"; - if [ -f "${_fname_dst}" ]; then - rtl_fileop mv "${_fname_dst}" "${_fname_dst}.orig"; - fi; - if [ ! -d "$(rtl_dirname "${_fname_dst}")" ]; then - rtl_fileop mkdir "$(rtl_dirname "${_fname_dst}")"; - fi; - rtl_fileop cp "${_fname_src}" "${_fname_dst}"; - done); - for _cflag in ${PKG_CFLAGS_CONFIGURE}; do - PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_cflag}"; - done; + local _cflag="" _fname_dst="" _fname_src=""; + if ! ( if ! rtl_fileop cd "${PKG_BASE_DIR}"; then + return 1; + else + for _fname_src in $(find perl-cross -type f -not -path perl-cross/.git/\* -not -name .gitignore); do + _fname_dst="perl-${PKG_VERSION}${_fname_src#perl-cross}"; + if [ -f "${_fname_dst}" ]; then + if ! rtl_fileop mv "${_fname_dst}" "${_fname_dst}.orig"; then + return 1; + fi; + fi; + if [ ! -d "$(rtl_dirname "${_fname_dst}")" ]; then + if ! rtl_fileop mkdir "$(rtl_dirname "${_fname_dst}")"; then + return 1; + fi; + fi; + if ! rtl_fileop cp "${_fname_src}" "${_fname_dst}"; then + return 1; + fi; + done; + fi); then + return 1; + else + for _cflag in ${PKG_CFLAGS_CONFIGURE}; do + PKG_CONFIGURE_ARGS="$(rtl_lconcat "${PKG_CONFIGURE_ARGS}" "-A ccflags=${_cflag}")"; + done; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars index df63adfb..fe576fbe 100644 --- a/vars/pkgconf_host.vars +++ b/vars/pkgconf_host.vars @@ -4,9 +4,11 @@ pkg_pkgconf_host_install_make_post() { if [ -e "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" ]; then - rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config"; + if ! rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config"; then + return 1; + fi; fi; - cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" <<EOF + if ! cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" <<EOF #!/bin/sh if [ -z "\${PREFIX_NATIVE}" ]; then PREFIX_NATIVE="${PREFIX_NATIVE}"; @@ -18,15 +20,21 @@ else "\$(dirname "\${0}")"/pkgconf --define-variable=prefix="\${PREFIX_NATIVE%/}/" --keep-system-cflags "\${@}"; fi; EOF - chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config"; - rtl_fileop rm "${PKG_DESTDIR}/bin/pkg-config"; + then + return 1; + elif ! rtl_fileop chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config"\ + || ! rtl_fileop rm "${PKG_DESTDIR}/bin/pkg-config"; then + return 1; + fi; }; pkg_pkgconf_install_make_post() { if [ -e "${PREFIX_NATIVE}/bin/pkg-config" ]; then - rtl_fileop rm "${PREFIX_NATIVE}/bin/pkg-config"; + if ! rtl_fileop rm "${PREFIX_NATIVE}/bin/pkg-config"; then + return 1; + fi; fi; rtl_fileop ln_symbolic pkgconf "${PREFIX_NATIVE}/bin/pkg-config"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/procps_ng.vars b/vars/procps_ng.vars index a09852f3..a945cb23 100644 --- a/vars/procps_ng.vars +++ b/vars/procps_ng.vars @@ -5,4 +5,4 @@ : ${PKG_PROCPS_NG_CONFIG_CACHE_EXTRA:=" ac_cv_func_realloc_0_nonnull=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/psxstub_host.vars b/vars/psxstub_host.vars index 7cef39d5..42282dcc 100644 --- a/vars/psxstub_host.vars +++ b/vars/psxstub_host.vars @@ -3,14 +3,16 @@ # pkg_psxstub_install_make() { - if [ "${PKG_TARGET}" = i686-nt32-midipix ] \ - || [ "${PKG_TARGET}" = x86_64-nt64-midipix ]; then - rtl_fileop cd "${PKG_BASE_DIR}/psxstub"; - make ${PKG_MAKEFLAGS_BUILD} "DESTDIR=${PKG_PREFIX}" "TARGET=${PKG_TARGET}" install; - if [ -e "${PKG_PREFIX}/lib/libpsxscl.a" ]; then - rtl_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a"; + if [ "${PKG_TARGET}" = "i686-nt32-midipix" ]\ + || [ "${PKG_TARGET}" = "x86_64-nt64-midipix" ]; then + if ! rtl_fileop cd "${PKG_BASE_DIR}/psxstub"\ + || ! make ${PKG_MAKEFLAGS_BUILD} "DESTDIR=${PKG_PREFIX}" "TARGET=${PKG_TARGET}" install; then + return 1; + elif [ -e "${PKG_PREFIX}/lib/libpsxscl.a" ]\ + && ! rtl_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a"; then + return 1; fi; fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/python2.vars b/vars/python2.vars index 669e4626..ccb1d5b0 100644 --- a/vars/python2.vars +++ b/vars/python2.vars @@ -3,14 +3,16 @@ # pkg_python2_fetch_download() { - pkg_fetch_download; - rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"; - rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"; - ex_pkg_state_set "${PKG_NAME}" fetch_download -fetch_extract; + if ! pkg_fetch_download\ + || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ + || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then + return 1; + fi; }; pkg_python2_minipix_fetch_download() { pkg_python2_fetch_download "${@}"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/python2_host.vars b/vars/python2_host.vars index 2bb62d09..495d0b2f 100644 --- a/vars/python2_host.vars +++ b/vars/python2_host.vars @@ -3,17 +3,19 @@ # pkg_python2_host_fetch_download() { - pkg_fetch_download; - rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"; - rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"; - rtl_fileop cp ../sbpython2/project/config/cfgdefs.sh ../sbpython2/project/config/cfgdefs.sh.orig; - sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']\+\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython2/project/config/cfgdefs.sh; - sed -i"" -e'108a\ -cfgtest_ldflags_append "-L$mb_prefix/lib"' ../sbpython2/project/config/cfgdefs.sh; - sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ + if ! pkg_fetch_download\ + || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ + || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! rtl_fileop cp "../sbpython2/project/config/cfgdefs.sh" "../sbpython2/project/config/cfgdefs.sh.orig"\ + || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']\+\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython2/project/config/cfgdefs.sh\ + || ! sed -i"" -e'108a\ +cfgtest_ldflags_append "-L$mb_prefix/lib"' "../sbpython2/project/config/cfgdefs.sh"\ + || ! sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ PYCOMPILE_CFLAGS += -I'"${PREFIX}"'/include -' ../sbpython2/project/pycompile.mk - ex_pkg_state_set "${PKG_NAME}" fetch_download -fetch_extract; +' "../sbpython2/project/pycompile.mk"\ + || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/python3.vars b/vars/python3.vars index 2aeabae5..b1bd7b58 100644 --- a/vars/python3.vars +++ b/vars/python3.vars @@ -3,10 +3,12 @@ # pkg_python3_fetch_download() { - pkg_fetch_download; - rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"; - rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"; - ex_pkg_state_set "${PKG_NAME}" fetch_download -fetch_extract; + if ! pkg_fetch_download\ + || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ + || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/python3_host.vars b/vars/python3_host.vars index 020724e1..55ec443a 100644 --- a/vars/python3_host.vars +++ b/vars/python3_host.vars @@ -3,17 +3,19 @@ # pkg_python3_host_fetch_download() { - pkg_fetch_download; - rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"; - rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"; - rtl_fileop cp ../sbpython3/project/config/cfgdefs.sh ../sbpython3/project/config/cfgdefs.sh.orig; - sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']\+\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython3/project/config/cfgdefs.sh; - sed -i"" -e'108a\ -cfgtest_ldflags_append "-L$mb_prefix/lib"' ../sbpython3/project/config/cfgdefs.sh; - sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ + if ! pkg_fetch_download\ + || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ + || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! rtl_fileop cp "../sbpython3/project/config/cfgdefs.sh" "../sbpython3/project/config/cfgdefs.sh.orig"\ + || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']\+\)'/mb_ncurses_libs='\1 -ltinfow'/" "../sbpython3/project/config/cfgdefs.sh"\ + || ! sed -i"" -e'108a\ +cfgtest_ldflags_append "-L$mb_prefix/lib"' "../sbpython3/project/config/cfgdefs.sh"\ + || ! sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ PYCOMPILE_CFLAGS += -I'"${PREFIX}"'/include -' ../sbpython3/project/pycompile.mk - ex_pkg_state_set "${PKG_NAME}" fetch_download -fetch_extract; +' "../sbpython3/project/pycompile.mk"\ + || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then + return 1; + fi; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/rc.vars b/vars/rc.vars index 2b82de51..e6117df8 100644 --- a/vars/rc.vars +++ b/vars/rc.vars @@ -3,8 +3,8 @@ # : ${PKG_RC_CONFIG_CACHE_EXTRA:=" -rc_cv_sysv_sigcld=no ac_cv_func_setpgrp_void=yes -rc_cv_sys_dev_fd=yes"}; +rc_cv_sys_dev_fd=yes +rc_cv_sysv_sigcld=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/rpm_host.vars b/vars/rpm_host.vars index dd977f74..ca2e20bd 100644 --- a/vars/rpm_host.vars +++ b/vars/rpm_host.vars @@ -3,9 +3,11 @@ # pkg_rpm_host_install_pre() { - echo "#!/bin/true" > "${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 00273c1e..acb8757f 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 11cb139e..f39019a0 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 f15da5bc..21cf67d4 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 921d447a..ca6f9610 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 60936bb4..00000000 --- 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 3a7a3d07..7e9aaa64 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 2a441f28..def754c0 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" <<EOF + if ! cat > "${PKG_DESTDIR}/bin/makeinfo" <<EOF #!/bin/sh export PERL5LIB="${PREFIX}/share/texinfo:${PREFIX}/share/texinfo/lib/libintl-perl/lib:${PREFIX}/share/texinfo/lib/Text-Unidecode/lib:${PREFIX}/share/texinfo/lib/Unicode-EastAsianWidth/lib"; makeinfo.dist "\${@}"; EOF - chmod +x "${PKG_DESTDIR}/bin/makeinfo"; +then + return 1; + else + rtl_fileop chmod +x "${PKG_DESTDIR}/bin/makeinfo"; + fi; }; # vim:filetype=sh textwidth=0 diff --git a/vars/tzdb_host.vars b/vars/tzdb_host.vars index 3fa187cd..764bc4ef 100644 --- a/vars/tzdb_host.vars +++ b/vars/tzdb_host.vars @@ -6,4 +6,4 @@ pkg_tzdb_host_install_pre() { rtl_fileop rm "${PKG_DESTDIR}/etc"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/util_linux.vars b/vars/util_linux.vars index ba4d30e8..f3bb7e73 100644 --- a/vars/util_linux.vars +++ b/vars/util_linux.vars @@ -5,4 +5,4 @@ : ${PKG_UTIL_LINUX_CONFIG_CACHE_EXTRA:=" ac_cv_prog_NCURSESW6_CONFIG=%PREFIX%/bin/ncursesw6-config"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/vim.vars b/vars/vim.vars index d91af66c..9f1adcef 100644 --- a/vars/vim.vars +++ b/vars/vim.vars @@ -15,14 +15,14 @@ vim_cv_toupper_broken=no vim_cv_tty_group=tty vim_cv_tty_mode=0666"}; +: ${PKG_VIM_MINIPIX_CONFIG_CACHE_EXTRA:="${PKG_VIM_CONFIG_CACHE_EXTRA}"}; + pkg_vim_configure_autotools_post() { - rtl_fileop cp config.cache src/auto; + rtl_fileop cp "config.cache" "src/auto"; }; -: ${PKG_VIM_MINIPIX_CONFIG_CACHE_EXTRA=${PKG_VIM_CONFIG_CACHE_EXTRA}}; - pkg_vim_minipix_configure_autotools_post() { - rtl_fileop cp config.cache src/auto; + rtl_fileop cp "config.cache" "src/auto"; }; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/w3m.vars b/vars/w3m.vars index 898fb6b3..94f3bc00 100644 --- a/vars/w3m.vars +++ b/vars/w3m.vars @@ -5,4 +5,4 @@ : ${PKG_W3M_CONFIG_CACHE_EXTRA:=" ac_cv_func_setpgrp_void=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/xcb.vars b/vars/xcb.vars index bae1e2d2..b913831e 100644 --- a/vars/xcb.vars +++ b/vars/xcb.vars @@ -5,4 +5,4 @@ : ${PKG_XCB_CONFIG_CACHE_EXTRA:=" ac_cv_search_sendmsg=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/yabasic.vars b/vars/yabasic.vars index 1168342a..5ef50608 100644 --- a/vars/yabasic.vars +++ b/vars/yabasic.vars @@ -5,4 +5,4 @@ : ${PKG_YABASIC_CONFIG_CACHE_EXTRA:=" ac_cv_func_strtod=yes"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 diff --git a/vars/zsh.vars b/vars/zsh.vars index 2ebbfbe3..12ffcbdf 100644 --- a/vars/zsh.vars +++ b/vars/zsh.vars @@ -5,4 +5,4 @@ : ${PKG_ZSH_CONFIG_CACHE_EXTRA:=" zsh_cv_sys_elf=no"}; -# vim:filetype=sh +# vim:filetype=sh textwidth=0 |