diff --git a/build.sh b/build.sh index 130bc27..1ebd2ee 100755 --- a/build.sh +++ b/build.sh @@ -32,10 +32,12 @@ case ${1} in fi; BUILD_PACKAGES_RESTART="$(echo ${ARG_RESTART} | sed "s/,/ /g")"; shift; ;; -host_toolchain|native_toolchain|runtime|lib_packages|leaf_packages|minipix|dev|devroot|world) - BUILD_TARGETS_META="${BUILD_TARGETS_META:+${BUILD_TARGETS_META} }${1}"; ;; *=*) set_var_unsafe "${1%%=*}" "${1#*=}"; ;; -*) exec cat etc/build.usage; ;; +*) if lmatch "${1}" " " "${ALL_TARGETS}"; then + BUILD_TARGETS_META="${BUILD_TARGETS_META:+${BUILD_TARGETS_META} }${1}"; + else + exec cat etc/build.usage; + fi; ;; esac; shift; done; pre_setup_env; pre_prereqs; pre_subdirs; pre_build_files; @@ -50,7 +52,7 @@ else log_msg info "Version check run started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}."; fi; for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do - BUILD_TARGET="$(echo ${BUILD_TARGET_LC} | tr a-z A-Z)"; + BUILD_TARGET="$(toupper "${BUILD_TARGET_LC}")"; BUILD_PACKAGES="$(get_var_unsafe ${BUILD_TARGET}_PACKAGES)"; if [ "${BUILD_TARGET}" != "INVARIANTS" ]\ && [ -n "${BUILD_PACKAGES_RESTART}" ]; then @@ -74,8 +76,8 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do if [ -n "${BUILD_PACKAGES_RESTART}" ]\ || [ "${BUILD_TARGET}" = "INVARIANTS" ]\ || ! is_build_script_done "${PKG_NAME}" finish; then - PKG_BUILD_STEPS="$(get_var_unsafe PKG_$(echo ${PKG_NAME} | tr a-z A-Z)_BUILD_STEPS)"; - set -- ${PKG_BUILD_STEPS:-${BUILD_STEPS}}; + set -- $(lfilter -not "${BUILD_STEPS}" \ + "$(get_var_unsafe PKG_$(toupper "${PKG_NAME}")_BUILD_STEPS_DISABLE)"); while [ ${#} -gt 0 ]; do _pkg_step_cmds=""; _pkg_step_cmd_args=""; case "${1#*:}" in @@ -96,6 +98,7 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do if lmatch "${ARG_RESTART_AT}" "," "${1%:*}"; then _pkg_step_cmds="pkg_${PKG_NAME}_${1%:*} pkg_${1%:*}"; fi; ;; + *) continue; ;; esac; for __ in ${_pkg_step_cmds}; do if test_cmd "${__}"; then @@ -141,7 +144,7 @@ if [ ${ARG_RELAXED:-0} -eq 1 ]\ && [ -n "${BUILD_PKGS_FAILED}" ]; then log_msg info "Build script failure(s) in: ${BUILD_PKGS_FAILED}."; fi; -exit "${BUILD_SCRIPT_RC}")} 2>&1 | tee "${BUILD_LOG_FNAME}" & TEE_PID="${!}"; +exit "${BUILD_SCRIPT_RC:-0}")} 2>&1 | tee "${BUILD_LOG_FNAME}" & TEE_PID="${!}"; trap "rm -f ${BUILD_STATUS_IN_PROGRESS_FNAME}; \ log_msg fail \"Build aborted.\"; \ echo kill ${TEE_PID}; \ diff --git a/etc/build.usage b/etc/build.usage index 1b5de5e..ff07df9 100644 --- a/etc/build.usage +++ b/etc/build.usage @@ -23,8 +23,9 @@ usage: ./build.sh [-x] [-4|6] [-a nt32|nt64] [-b debug|release] [-c] [-C] [-h] -v Be verbose. --debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix. [ ...] One of: - host_toolchain, native_toolchain, runtime, lib_packages, - leaf_packages, minipix, world, or devroot. + host_toolchain, native_toolchain, runtime, host_packages, + lib_packages, dev_packages, leaf_packages, minipix, devroot, + dev, or world. ${HOME}/midipix_build.vars, ../midipix_build.vars, and build.vars are sourced if they exist. diff --git a/patches/perl-5.22.1.local.patch b/patches/perl-5.22.1.local.patch index 65fe7e6..2113c54 100644 --- a/patches/perl-5.22.1.local.patch +++ b/patches/perl-5.22.1.local.patch @@ -22,7 +22,7 @@ diff -ru perl-5.22.1.orig/Makefile perl-5.22.1/Makefile $(eval extlibs=$(shell cat ext.libs)) $(eval statars=$(shell cat static.list)) - $(CC) $(LDFLAGS) -o $@ $(filter %$o,$^) $(LIBPERL) $(statars) $(LIBS) $(extlibs) -+ $(CC) $(LDFLAGS) -o $@ $(filter %$o,$^) -lperl $(statars) $(LIBS) $(extlibs) ++ $(CC) $(LDFLAGS) -o $@ $(filter %$o,$^) -L. -lperl $(statars) $(LIBS) $(extlibs) %$o: %.c config.h $(CC) $(CFLAGS) -c -o $@ $< diff --git a/patches/smallbasic.local.patch b/patches/smallbasic.local.patch new file mode 100644 index 0000000..e92e5b0 --- /dev/null +++ b/patches/smallbasic.local.patch @@ -0,0 +1,11 @@ +--- SmallBASIC/configure.orig 2017-11-20 01:35:25.276000000 +0000 ++++ SmallBASIC/configure 2017-11-20 01:37:03.332000000 +0000 +@@ -5171,7 +5171,7 @@ + + $as_echo "#define USE_PCRE 1" >>confdefs.h + +- PACKAGE_LIBS="${PACKAGE_LIBS} `pcre-config --libs`" ++ PACKAGE_LIBS="${PACKAGE_LIBS} ${PCRE_LIBS}" + fi + } + diff --git a/subr/build.subr b/subr/build.subr index 14c932e..d6e7289 100644 --- a/subr/build.subr +++ b/subr/build.subr @@ -11,6 +11,7 @@ pop_IFS() { IFS="${_pI_IFS}"; unset _pI_IFS; }; push_IFS() { _pI_IFS="${IFS}"; IFS="${1}"; }; set_build_dir() { PKG_BUILD_DIR="${1}-${2}-${PKG_TARGET}"; }; test_cmd() { command -v "${1}" >/dev/null; }; +toupper() { echo "${1}" | tr a-z A-Z; }; build_fileop() { local _op="${1}"; shift; @@ -119,15 +120,26 @@ set_build_script_done() { }; lfilter() { - local _list="${1}" _filter="${2}" _lnew _litem _lfilter; + [ "x${1}" = "x-not" ] && { local _notfl=1; shift; } + local _list="${1}" _filter="${2}" _lnew _litem _lfilter _filterfl; + [ -z "${_filter}" ] && { echo "${_list}"; return 0; }; for _litem in ${_list}; do + _filterfl=0; for _lfilter in ${_filter}; do - if [ "${_lfilter}" = "${_litem}" ]; then + if [ "${_notfl:-0}" -eq 0 ]\ + && [ "${_lfilter}" = "${_litem}" ]; then _lnew="${_lnew:+${_lnew} }${_litem}"; break; - fi; + elif [ "${_notfl:-0}" -eq 1 ]\ + && [ "${_lfilter}" = "${_litem}" ]; then + _filterfl=1; break; + fi; done; + if [ "${_notfl:-0}" -eq 1 ]\ + && [ "${_filterfl:-0}" -eq 0 ]; then + _lnew="${_lnew:+${_lnew} }${_litem}"; + fi; done; - echo ${_lnew}; + echo "${_lnew}"; }; lmatch() { @@ -198,15 +210,14 @@ set_env_vars_with_sep() { }; subst_tgts() { + local _pkgs; while [ ${#} -ge 1 ]; do - case "${1}" in - dev) - echo "${DEV_PACKAGES}"; ;; - devroot) - echo "${DEVROOT_PACKAGES}"; ;; - world) echo "${WORLD_PACKAGES}"; ;; - *) echo "${1}"; ;; - esac; shift; + _pkgs="$(get_var_unsafe "$(toupper "${1}")_TARGET")"; + if [ -n "${_pkgs}" ]; then + echo "${_pkgs}"; + else + echo "${1}"; + fi; shift; done; }; diff --git a/subr/pkg_autoconf.subr b/subr/pkg_autoconf.subr index 810ec5a..fd20128 100644 --- a/subr/pkg_autoconf.subr +++ b/subr/pkg_autoconf.subr @@ -8,11 +8,6 @@ pkg_autoconf() { -e "${WORKDIR}/${PKG_SUBDIR}/configure.ac" -o \ -e "${WORKDIR}/${PKG_SUBDIR}/configure.in" -o \ -e "${WORKDIR}/${PKG_SUBDIR}/config.guess" ]; then - find "${WORKDIR}/${PKG_SUBDIR}" -name config.sub \ - -exec echo mv -- {} {}.orig \; \ - -exec mv -- {} {}.orig \; \ - -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ - -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; if [ -e "${WORKDIR}/${PKG_SUBDIR}/configure.ac" ]\ && [ ! -e "${WORKDIR}/${PKG_SUBDIR}/configure" ]; then for __ in bootstrap bootstrap.sh autogen.sh ""; do @@ -36,6 +31,11 @@ pkg_autoconf() { fi; done; fi; + find "${WORKDIR}/${PKG_SUBDIR}" -name config.sub \ + -exec echo mv -- {} {}.orig \; \ + -exec mv -- {} {}.orig \; \ + -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ + -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; if [ "${PKG_BUILD_TYPE}" != host ]; then for __ in ${PKG_BUILD_DIR} ${PKG_CONFIG_CACHE_EXTRA}; do build_fileop cp "${MIDIPIX_BUILD_PWD}/etc/config.cache" "${WORKDIR}/${__}/"; diff --git a/subr/pkg_build.subr b/subr/pkg_build.subr index 16ac133..4cb29d2 100644 --- a/subr/pkg_build.subr +++ b/subr/pkg_build.subr @@ -9,7 +9,7 @@ pkg_build() { fi; if [ -n "${PKG_BUILD_CMDLINE}" ]; then ${PKG_BUILD_CMDLINE}; - elif [ ${PKG_NO_MAKE_BUILD:-0} -eq 0 ]; then + else # N.B. We only specify CC= here if the current package does not use GNU # autoconf as it often abuses it by appending -std={gnu99,...} to it # instead of amending CFLAGS. @@ -21,7 +21,8 @@ pkg_build() { "${CFLAGS_FOR_BUILD:+CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD}}" \ "${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}" \ "${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}" \ - "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"; + "${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"\ + "LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; fi; }; diff --git a/subr/pkg_build_dir.subr b/subr/pkg_build_dir.subr index 7d8a95f..e9104ab 100644 --- a/subr/pkg_build_dir.subr +++ b/subr/pkg_build_dir.subr @@ -3,10 +3,15 @@ # pkg_build_dir() { - if [ ! -d "${WORKDIR}/${PKG_BUILD_DIR}" ]; then - build_fileop mkdir "${WORKDIR}/${PKG_BUILD_DIR}"; + if [ -z "${PKG_BUILD_DIR}" ]; then + if [ -e "${WORKDIR}/${PKG_SUBDIR}/configure" ]\ + || [ -e "${WORKDIR}/${PKG_SUBDIR}/configure.ac" ]\ + || [ -e "${WORKDIR}/${PKG_SUBDIR}/configure.in" ]; then + set_build_dir "${PKG_SUBDIR}" "${PKG_BUILD_TYPE:-native}"; + else + PKG_BUILD_DIR="${PKG_SUBDIR}"; + fi; fi; - build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}"; }; # vim:filetype=sh diff --git a/subr/pkg_disabled.subr b/subr/pkg_disabled.subr index 3b5a308..f9580c6 100644 --- a/subr/pkg_disabled.subr +++ b/subr/pkg_disabled.subr @@ -3,7 +3,10 @@ # pkg_disabled() { - if [ "${PKG_DISABLED:-0}" -eq 1 ]; then + local _pkg_name_uc; + _pkg_name_uc="$(toupper "${PKG_NAME}")"; + if [ "$(get_var_unsafe PKG_${_pkg_name_uc}_DISABLED)" = "1" ]; then + log_msg vnfo "Skipping disabled package \`${PKG_NAME}.'"; exit 0; fi; }; diff --git a/subr/pkg_extract.subr b/subr/pkg_extract.subr index f698293..f6ddff2 100644 --- a/subr/pkg_extract.subr +++ b/subr/pkg_extract.subr @@ -6,23 +6,20 @@ pkg_extract() { if [ -n "${PKG_URL}" ]\ && [ "${PKG_URL_TYPE:-wget}" = wget ]; then build_fileop rm "${WORKDIR}/${PKG_SUBDIR}"; - if [ "${PKG_SUBDIR_CREATE:-0}" -eq 1 ]; then - build_fileop mkdir "${WORKDIR}/${PKG_SUBDIR}"; - fi; if [ "${PKG_FNAME##*.tar.}" = "bz2" ]; then - bunzip2 -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + bunzip2 -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; elif [ "${PKG_FNAME##*.tar.}" = "gz" ]; then - gunzip -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + gunzip -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; elif [ "${PKG_FNAME##*.tar.}" = "xz" ]; then - xz -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + xz -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; elif [ "${PKG_FNAME##*.t}" = "bz2" ]; then - bunzip2 -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + bunzip2 -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; elif [ "${PKG_FNAME##*.t}" = "gz" ]; then - gunzip -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + gunzip -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; elif [ "${PKG_FNAME##*.t}" = "xz" ]; then - xz -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf -; + xz -d < "${DLCACHEDIR}/${PKG_FNAME}" | tar -C "${WORKDIR}" -xf -; else - tar -C "${WORKDIR}${PKG_SUBDIR_CREATE:+/${PKG_SUBDIR}}" -xf "${DLCACHEDIR}/${PKG_FNAME}"; + tar -C "${WORKDIR}" -xf "${DLCACHEDIR}/${PKG_FNAME}"; fi; fi; }; diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index fc76098..8e4a5b7 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -88,6 +88,7 @@ pkg_install() { "${PKG_LDFLAGS_INSTALL:+LDFLAGS=${PKG_LDFLAGS_INSTALL}}" \ "${PKG_LDFLAGS_INSTALL_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_INSTALL_EXTRA}}" \ "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \ + "LIBTOOL=${PKG_SLIBTOOL:-slibtool}" \ ${PKG_INSTALL_TARGET:=install}; if [ -n "${PKG_PREFIX_EXTRA}" ]; then run_cmd_unsplit make \ @@ -99,6 +100,7 @@ pkg_install() { "${PKG_LDFLAGS_INSTALL:+LDFLAGS=${PKG_LDFLAGS_INSTALL}}" \ "${PKG_LDFLAGS_INSTALL_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_INSTALL_EXTRA}}" \ "${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \ + "LIBTOOL=${PKG_SLIBTOOL:-slibtool}" \ ${PKG_INSTALL_TARGET_EXTRA:=install} \ DESTDIR=${PKG_PREFIX_EXTRA}; fi; @@ -107,7 +109,9 @@ pkg_install() { if [ -n "${PKG_INSTALL_FILES}" ]; then (install_files -v ${PKG_PREFIX} ${PKG_INSTALL_FILES}); fi; - pkgp_install_libs; + if [ "${PKG_NO_INSTALL_LIBS:-0}" -eq 0 ]; then + pkgp_install_libs; + fi; pkgp_install_pkgconfig; }; diff --git a/subr/pkg_setup_env.subr b/subr/pkg_setup_env.subr index 591edfd..43d1160 100644 --- a/subr/pkg_setup_env.subr +++ b/subr/pkg_setup_env.subr @@ -3,79 +3,38 @@ # pkg_setup_env() { - local _pkg_name_uc _pkg_name_parent_uc \ - _vars_fname _vname _build_uc __ _log_env_vars; - _pkg_name_uc="$(echo ${PKG_NAME} | tr a-z A-Z)"; - for _vars_fname in vars/${PKG_NAME}.vars; do - [ -e "${_vars_fname}" ] && . "${_vars_fname}"; - done; - _build_uc="$(echo ${BUILD} | tr a-z A-Z)"; - if [ -n "${PKG_NAME_PARENT}" ]; then - _pkg_name_parent_uc="$(echo ${PKG_NAME_PARENT} | tr a-z A-Z)"; - for _vname in PREFIX ${PKG_BUILD_VARS}; do - for __ in "DEFAULT_${_vname}" \ - "${BUILD_TARGET}_${_vname}" \ - "PKG_${_pkg_name_parent_uc}_${_vname}" \ - "PKG_${_pkg_name_parent_uc}_${_vname}_${_build_uc}"; do - if [ -n "$(get_var_unsafe "${__}")" ]; then - set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})"; - if ! lmatch "${_log_env_vars}" " " "${__}"; then - _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__}"; - fi; - fi; - done; - done; - fi; - for _vname in PREFIX ${PKG_BUILD_VARS}; do - for __ in "DEFAULT_${_vname}" \ - "${BUILD_TARGET}_${_vname}" \ - "PKG_${_pkg_name_uc}_${_vname}" \ - "PKG_${_pkg_name_uc}_${_vname}_${_build_uc}"; do - if [ -n "$(get_var_unsafe "${__}")" ]; then - set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})"; - if ! lmatch "${_log_env_vars}" " " "${__}"; then - _log_env_vars="${_log_env_vars:+${_log_env_vars} }${__}"; - fi; - fi; - done; - done; - if [ -z "${PKG_URL}" -a -z "${PKG_URLS_GIT}" -a -z "${PKG_VERSION}" ]; then + if [ -z "${PKG_URL}" ]\ + && [ -z "${PKG_URLS_GIT}" ]\ + && [ -z "${PKG_VERSION}" ]; then log_msg failexit "Error: package \`${PKG_NAME}' missing in build.vars."; else + [ -z "${MIDIPIX_BUILD_PWD}" ] && MIDIPIX_BUILD_PWD="$(pwd)"; [ -n "${PKG_ENV_VARS_EXTRA}" ] && set_env_vars_with_sep : "${PKG_ENV_VARS_EXTRA}"; [ -z "${PKG_FNAME}" ] && PKG_FNAME="${PKG_URL##*/}"; [ -z "${PKG_TARGET}" ] && PKG_TARGET="${TARGET}"; - [ -z "${MIDIPIX_BUILD_PWD}" ] && MIDIPIX_BUILD_PWD="$(pwd)"; - if [ -z "${PKG_SUBDIR}" ]; then - if [ -n "${PKG_URLS_GIT}" ]; then - PKG_SUBDIR="${PKG_URLS_GIT%%=*}"; - else - PKG_SUBDIR="${PKG_FNAME%%.t*}"; - fi; - fi; - if [ -z "${PKG_BUILD_DIR}" ]; then - set_build_dir "${PKG_SUBDIR}" "${PKG_BUILD_TYPE:-native}"; - fi; - - if [ "${PKG_BUILD_TYPE}" = "host" ]; then - export AR="ar"; + case "${PKG_BUILD_TYPE}" in + host) export AR="ar"; export CC="gcc"; export CXX="g++"; - export RANLIB="ranlib"; - else - export AR="${PKG_TARGET}-ar"; + export RANLIB="ranlib"; ;; + *) export AR="${PKG_TARGET}-ar"; export CC="${PKG_TARGET}-gcc"; export CXX="${PKG_TARGET}-g++"; - export RANLIB="${PKG_TARGET}-ranlib"; + export RANLIB="${PKG_TARGET}-ranlib"; ;; + esac; + case "${PKG_SUBDIR}" in + ?*) ;; + *) case "${PKG_URLS_GIT}" in + ?*) PKG_SUBDIR="${PKG_URLS_GIT%%=*}"; ;; + *) PKG_SUBDIR="${PKG_FNAME%%.t*}"; ;; + esac; ;; + esac; + export LIBTOOL="${PKG_SLIBTOOL:-slibtool}"; + export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; + if [ -n "${PKG_ENV_VARS}" ]; then + PKG_ENV_VARS="$(echo "${PKG_ENV_VARS}" | tr " " "\n" | sort | tr "\n" " ")"; + log_env_vars "build" ${PKG_ENV_VARS}; fi; - if [ "${PKG_SLIBTOOL}" != "default" ]; then - export LIBTOOL="${PKG_SLIBTOOL:-slibtool}"; - export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}"; - fi; - fi; - if [ -n "${_log_env_vars}" ]; then - _log_env_vars="$(echo "${_log_env_vars}" | tr " " "\n" | sort | tr "\n" " ")"; - log_env_vars "build" ${_log_env_vars}; fi; }; diff --git a/subr/pkg_setup_vars.subr b/subr/pkg_setup_vars.subr new file mode 100644 index 0000000..07b91fc --- /dev/null +++ b/subr/pkg_setup_vars.subr @@ -0,0 +1,36 @@ +# +# set -o errexit -o noglob are assumed. +# + +pkgp_setup_pkg_vars() { + local _pkg_name="${1}" _pkg_name_uc _build_uc _vname __; + _pkg_name_uc="$(toupper "${_pkg_name}")"; + _build_uc="$(toupper "${BUILD}")"; + for _vname in PREFIX ${PKG_BUILD_VARS}; do + for __ in "DEFAULT_${_vname}" \ + "${BUILD_TARGET}_${_vname}" \ + "PKG_${_pkg_name_uc}_${_vname}" \ + "PKG_${_pkg_name_uc}_${_vname}_${_build_uc}"; do + if [ -n "$(get_var_unsafe "${__}")" ]; then + set_var_unsafe "PKG_${_vname}" "$(get_var_unsafe ${__})"; + if ! lmatch "${PKG_ENV_VARS}" " " "${__}"; then + PKG_ENV_VARS="${PKG_ENV_VARS:+${PKG_ENV_VARS} }${__}"; + fi; + fi; + done; + done; +}; + +pkg_setup_vars() { + local __; + for __ in vars/${PKG_NAME}.vars; do + [ \( -e "${__}" \) -o \( -L "${__}" \) ]\ + && { . "${__}"; }; + done; + if [ -n "${PKG_NAME_PARENT}" ]; then + pkgp_setup_pkg_vars "${PKG_NAME_PARENT}"; + fi; + pkgp_setup_pkg_vars "${PKG_NAME}"; +}; + +# vim:filetype=sh diff --git a/subr/pkg_work_dir.subr b/subr/pkg_work_dir.subr new file mode 100644 index 0000000..20b9ce1 --- /dev/null +++ b/subr/pkg_work_dir.subr @@ -0,0 +1,12 @@ +# +# set -o errexit -o noglob are assumed. +# + +pkg_work_dir() { + if [ ! -d "${WORKDIR}/${PKG_BUILD_DIR}" ]; then + build_fileop mkdir "${WORKDIR}/${PKG_BUILD_DIR}"; + fi; + build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}"; +}; + +# vim:filetype=sh diff --git a/subr/post_tarballs.subr b/subr/post_tarballs.subr index 4769dce..2082366 100644 --- a/subr/post_tarballs.subr +++ b/subr/post_tarballs.subr @@ -25,10 +25,10 @@ postp_tarball_toolchain() { tar -cpf - bin include lib lib64 libexec share "${TARGET}" |\ "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_CROSS_FNAME}"; log_msg info "Finished building toolchain tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_CROSS_SIGN_GPG_KEY}" ] &&\ - gpg --list-keys "${TARBALL_CROSS_SIGN_GPG_KEY}" >/dev/null 2>&1; then + if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_CROSS_SIGN_GPG_KEY}" --sign "${TARBALL_CROSS_FNAME}"; + --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_CROSS_FNAME}"; log_msg info "Signed toolchain tarball."; fi; }; @@ -39,10 +39,10 @@ postp_tarball_minipix() { midipix_shortcut.vbs midipix.sh README |\ "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_MINIPIX_FNAME}"; log_msg info "Finished building binary Minipix distribution tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_MINIPIX_SIGN_GPG_KEY}" ] &&\ - gpg --list-keys "${TARBALL_MINIPIX_SIGN_GPG_KEY}" >/dev/null 2>&1; then + if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_MINIPIX_SIGN_GPG_KEY}" --sign "${TARBALL_MINIPIX_FNAME}"; + --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_MINIPIX_FNAME}"; log_msg info "Signed binary Minipix distribution tarball."; fi; }; @@ -57,10 +57,10 @@ postp_tarball_src() { -not -path tmp/ptycon/.git) |\ "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_SRC_FNAME}"; log_msg info "Finished building source tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SRC_SIGN_GPG_KEY}" ] &&\ - gpg --list-keys "${TARBALL_SRC_SIGN_GPG_KEY}" >/dev/null 2>&1; then + if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SRC_SIGN_GPG_KEY}" --sign "${TARBALL_SRC_FNAME}"; + --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_SRC_FNAME}"; log_msg info "Signed source tarball."; fi; }; diff --git a/subr/pre_setup_env.subr b/subr/pre_setup_env.subr index d5de277..8bef582 100644 --- a/subr/pre_setup_env.subr +++ b/subr/pre_setup_env.subr @@ -8,9 +8,22 @@ pre_setup_env() { && [ -e /proc/cpuinfo ]; then BUILD_CPUS=$(awk '/^processor/{cpus++} END{print cpus}' /proc/cpuinfo); fi; - for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/build.vars; do + : ${ARCH:=nt64}; : ${BUILD:=debug}; + if [ "${ARCH}" = nt32 ]; then + TARGET="i686-nt32-midipix"; + elif [ "${ARCH}" = nt64 ]; then + TARGET="x86_64-nt64-midipix"; + else + if [ "${BUILD}" != debug ]\ + && [ "${BUILD}" != release ]; then + log_msg failexit "Error: unknown build type \`${BUILD}'."; + fi; + log_msg failexit "Error: invalid architecture \`${ARCH}'."; + fi; + for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/env.vars ./vars/build.vars; do [ -e ${__} ] && . ${__}; done; + export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; if [ ${ARG_IPV4_ONLY:-0} -eq 1 ]; then WGET_ARGS="-4${WGET_ARGS:+ ${WGET_ARGS}}"; elif [ ${ARG_IPV6_ONLY:-0} -eq 1 ]; then diff --git a/vars/apr_util.vars b/vars/apr_util.vars deleted file mode 100644 index d4014b9..0000000 --- a/vars/apr_util.vars +++ /dev/null @@ -1,11 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -pkg_apr_util_install_post() { - build_fileop cp \ - "${PKG_PREFIX}/bin/apu-1-config" \ - "${PREFIX}/bin/${PKG_TARGET}-apu-1-config"; -}; - -# vim:filetype=sh diff --git a/vars/build.vars b/vars/build.vars index f26cbc5..4e7cace 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -1,94 +1,14 @@ # -# WARNING: Do _NOT_ use whitespaces (` ') or tab (` ') -# characters in any of the variables below save for MAKEFLAGS, -# PATH, and TIMESTAMP_FMT. -# -# $PREFIX_{CROSS,NATIVE} and $WORKDIR must be immediately -# beneath $PREFIX. $PREFIX must be o+rwx. The variables mentioned -# should not be forward slash-terminated. -# - -if [ "${ARCH:=nt64}" = nt32 ]; then - TARGET="i686-nt32-midipix"; -elif [ "${ARCH}" = nt64 ]; then - TARGET="x86_64-nt64-midipix"; -else - log_msg failexit "Error: invalid architecture \`${ARCH}'."; -fi; -if [ "${BUILD:=debug}" = debug ]; then - HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT="-g2 -O0"; - NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT="-g2 -O0"; - RUNTIME_CFLAGS_CONFIGURE_DEFAULT="-g3 -O0"; - HOST_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT="-g2 -O0"; - LEAF_PACKAGES_CFLAGS_CONFIGURE_DEFAULT="-g2 -O0"; - MINIPIX_CFLAGS_CONFIGURE_DEFAULT="-g2 -O0"; -elif [ "${BUILD}" = release ]; then - HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - RUNTIME_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - HOST_PACKAGES_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - LEAF_PACKAGES_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; - MINIPIX_CFLAGS_CONFIGURE_DEFAULT="-g0 -O2"; -else - log_msg failexit "Error: unknown build type \`${BUILD}'."; -fi; -: ${PREFIX_ROOT:=${HOME}/midipix}; -: ${PREFIX:=${PREFIX_ROOT}/${ARCH}/${BUILD}}; -: ${PREFIX_MINIPIX:=${PREFIX}/minipix}; -: ${PREFIX_NATIVE:=${PREFIX}/native}; -: ${PREFIX_CROSS:=${PREFIX}/${TARGET}}; -: ${DLCACHEDIR:=${PREFIX_ROOT}/dlcache}; -: ${WORKDIR:=${PREFIX}/tmp}; -: ${BUILD_LOG_FNAME:=${PREFIX}/build.log}; -: ${BUILD_LOG_LAST_FNAME:=${PREFIX}/build.log.last}; -: ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; -: ${BUILD_STEPS:="setup_env:always all:abstract disabled:always fetch:main extract:main patch_pre:main distclean:main build_dir:always autoconf:main patch:main configure:main clean:optional build:main install_pre:main install:main strip:main finish:always"}; -: ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint awk basename bunzip2 find flex gcc git groff gunzip install ld libtool lzma make makeinfo msgfmt nl nroff openssl paste patch python sed sha256sum sort tar tee tic tr uname wget xz"}; -: ${CHECK_PREREQ_FILES:="/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"}; -: ${CHECK_PREREQ_FILES_DYNAMIC:='/usr/share/groff/$(groff -v 2>/dev/null | awk '\''/^GNU groff version /{print $NF}'\'')/tmac/e.tmac'}; -: ${CHECK_PREREQ_PERL_MODULES:="autodie ExtUtils::MakeMaker"}; -: ${CHECK_PATH_VARS:="PREFIX PREFIX_NATIVE PREFIX_CROSS DLCACHEDIR WORKDIR"}; -: ${CHECK_UPDATES_SKIP:="gmp mpfr mpc binutils binutils_host install_strip_host pkgconf_host psxtypes pemagine dalist ntcon ntapi psxscl psxscl_strace ntctty ptycon pkgconf libevent libressl"}; -: ${CHECK_UPDATES_SHOW_NEW:=6}; -: ${CLEAR_ENV_VARS_EXCEPT:="ARG_VERBOSE GITROOT_HEAD HOME PATH SHELL TERM TARBALL_SIGN_GPG_KEY TARBALL_CROSS_SIGN_GPG_KEY TARBALL_MINIPIX_SIGN_GPG_KEY TARBALL_SRC_SIGN_GPG_KEY USER"}; -: ${CLEAR_PREFIX_DIRS:="bin i686-nt32-midipix include lib lib64 libexec minipix native share tmp x86_64-nt64-midipix"}; -: ${DEFAULT_MAKEFLAGS_BUILD:=-j${BUILD_CPUS:=1}}; -: ${GITROOT:=git://midipix.org}; -: ${GITROOT_HEAD:=git://midipix.org}; -: ${LOG_ENV_VARS:="HOME PATH SHELL USER GITROOT ARCH BUILD HOST_TOOLCHAIN_CFLAGS_CONFIGURE NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE RUNTIME_CFLAGS_CONFIGURE LIB_PACKAGES_CFLAGS_CONFIGURE LEAF_PACKAGES_CFLAGS_CONFIGURE MINIPIX_CFLAGS_CONFIGURE PREFIX PREFIX_NATIVE PREFIX_CROSS WORKDIR"}; -: ${LOG_MSG_FAIL_COLOUR:=91}; -: ${LOG_MSG_INFO_COLOUR:=93}; -: ${LOG_MSG_SUCC_COLOUR:=92}; -: ${LOG_MSG_WARN_COLOUR:=96}; -: ${PKG_BUILD_VARS:="BUILD_CMDLINE BUILD_DIR BUILD_STEPS BUILD_TYPE CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIG_CACHE_EXTRA CONFIGURE CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA CXXFLAGS_CONFIGURE_EXTRA DISABLED ENV_VARS_EXTRA FNAME INSTALL_FILES INSTALL_TARGET INSTALL_TARGET_EXTRA LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN NO_MAKE_BUILD NO_MAKE_INSTALL PREFIX_EXTRA SHA256SUM SLIBTOOL SUBDIR SUBDIR_CREATE TARGET URL URL_FNAME URL_TYPE URLS_GIT VERSION"}; -: ${TARBALL_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}.}; -: ${TARBALL_SIGN_GPG_KEY:=}; -: ${TARBALL_CROSS_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_cross.}; -: ${TARBALL_CROSS_SIGN_GPG_KEY:=}; -: ${TARBALL_MINIPIX_FNAME_PREFIX:=minipix-${ARCH}-${BUILD}.}; -: ${TARBALL_MINIPIX_SIGN_GPG_KEY:=}; -: ${TARBALL_SRC_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_src.}; -: ${TARBALL_SRC_SIGN_GPG_KEY:=}; -: ${TARBALL_SUFFIX:=xz}; -: ${TIMESTAMP_FMT_STATUS_FILES:=%Y-%m-%d-%H-%M-%S}; -: ${TIMESTAMP_FMT:="%Y/%m/%d %H:%M:%S"}; -: ${VALID_BUILD_LEVELS="fetch,extract,build_dir,autoconf,patch,configure,clean,build,install"}; -: ${WGET_ARGS:="--no-check-certificate"}; -export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; - -# # Build target invariants # INVARIANTS_PACKAGES="chainport"; : ${PKG_CHAINPORT_URLS_GIT:="chainport=${GITROOT}/ports/chainport"}; +: ${PKG_CHAINPORT_BUILD_STEPS_DISABLE:="build:main configure:main install:main"}; # # Build target host_toolchain # HOST_TOOLCHAIN_BUILD_TYPE="host"; -HOST_TOOLCHAIN_CFLAGS_CONFIGURE="${HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; HOST_TOOLCHAIN_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; HOST_TOOLCHAIN_PACKAGES=" slibtool_host perk_host mdso_host binutils_host binutils_host_x86_64_w64_mingw32 @@ -123,16 +43,15 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; : ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; : ${PKG_GCC_STAGE1_VERSION:=4.6.4}; : ${PKG_PSXSTUB_URLS_GIT:="psxstub=${GITROOT}/psxstub"}; -: ${PKG_PSXSTUB_BUILD_STEPS:="setup_env:always fetch:main install:main"}; +: ${PKG_PSXSTUB_BUILD_STEPS_DISABLE:=build:main}; : ${PKG_MUSL_NO_COMPLEX_VERSION:=1.1.12}; : ${PKG_GCC_RUNTIME_VERSION:=4.6.4}; : ${PKG_MUSL_FULL_VERSION:=1.1.12}; : ${PKG_GCC_LIBSTDCPP_V3_VERSION:=4.6.4}; : ${PKG_GCC_FULL_VERSION:=4.6.4}; -: ${PKG_INSTALL_STRIP_HOST_BUILD_STEPS:="setup_env:always install:main"}; +: ${PKG_INSTALL_STRIP_HOST_BUILD_STEPS_DISABLE:="fetch:main extract:main build:main"}; : ${PKG_INSTALL_STRIP_HOST_URL:=none}; : ${PKG_PSXTYPES_HOST_URLS_GIT:=psxtypes=${GITROOT}/psxtypes}; -: ${PKG_PSXTYPES_HOST_BUILD_DIR:=psxtypes}; : ${PKG_PSXTYPES_HOST_MAKEFLAGS_BUILD:="DESTDIR=${PREFIX_CROSS}"}; : ${PKG_PSXTYPES_HOST_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX_CROSS}"}; : ${PKG_LDSO_HOST_URLS_GIT:=pemagine=${GITROOT}/pemagine}; @@ -151,9 +70,8 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; # # Build target native_toolchain # -NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE="${NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; NATIVE_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix=/ --target=${TARGET}"; -NATIVE_TOOLCHAIN_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; +NATIVE_TOOLCHAIN_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}/"; NATIVE_TOOLCHAIN_PACKAGES=" slibtool perk pkgconf gmp mpfr mpc libelf binutils binutils_x86_64_w64_mingw32 musl_native gcc_native gcc_stage1_native_x86_64_w64_mingw32 mdso"; @@ -213,14 +131,13 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}"; # Build target runtime # RUNTIME_BUILD_TYPE="native"; -RUNTIME_CFLAGS_CONFIGURE="${RUNTIME_CFLAGS_CONFIGURE_DEFAULT}"; +RUNTIME_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT_RUNTIME}"; RUNTIME_CONFIGURE_ARGS="--prefix= --strict --host=${TARGET}"; RUNTIME_ENV_VARS_EXTRA="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"; -RUNTIME_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; +RUNTIME_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}/"; RUNTIME_PACKAGES="psxtypes pemagine dalist ldso ntcon ntapi psxscl psxscl_strace ntctty ptycon u16ports"; RUNTIME_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PSXTYPES_URLS_GIT:=psxtypes=${GITROOT}/psxtypes}; -: ${PKG_PSXTYPES_BUILD_DIR:=psxtypes}; : ${PKG_PSXTYPES_MAKEFLAGS_BUILD:="DESTDIR=${PREFIX_NATIVE}"}; : ${PKG_PEMAGINE_URLS_GIT:=pemagine=${GITROOT}/pemagine}; : ${PKG_PEMAGINE_CFLAGS_CONFIGURE_EXTRA:=-O0}; @@ -243,6 +160,7 @@ RUNTIME_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PSXSCL_STRACE_URLS_GIT:=psxscl=${GITROOT_HEAD}/psxscl}; : ${PKG_PSXSCL_STRACE_CFLAGS_CONFIGURE_EXTRA:="-DPSX_INTERNAL_STRACE -O0"}; : ${PKG_PSXSCL_STRACE_INSTALL_FILES:="/=lib/psxscl_strace lib/libpsxscl.so=lib/psxscl_strace/"}; +: ${PKG_PSXSCL_STRACE_NO_INSTALL_LIBS:=1}; : ${PKG_PSXSCL_STRACE_NO_MAKE_INSTALL:=1}; : ${PKG_NTCTTY_URLS_GIT:=ntctty=${GITROOT_HEAD}/ntctty}; : ${PKG_NTCTTY_CFLAGS_CONFIGURE_EXTRA:=-O0}; @@ -257,18 +175,18 @@ RUNTIME_PREFIX="${PREFIX_NATIVE}"; # Build target host_packages # HOST_PACKAGES_BUILD_TYPE="host"; -HOST_PACKAGES_CFLAGS_CONFIGURE="${HOST_PACKAGES_CFLAGS_CONFIGURE_DEFAULT:+${HOST_PACKAGES_CFLAGS_CONFIGURE_DEFAULT} }"; +HOST_PACKAGES_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT_HOST}"; HOST_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --prefix=${PREFIX} --program-prefix="; HOST_PACKAGES_LDFLAGS_CONFIGURE=""; -HOST_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX}"; +HOST_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX}/ PREFIX= prefix="; HOST_PACKAGES_PACKAGES=" -cmake_host llvm_host clang_host file_host glib_host infounzip_host infozip_host -intltool_host libffi_host ruby_host"; +cmake_host llvm_host clang_host file_host libffi_host glib_host +infounzip_host infozip_host intltool_host ruby_host"; : ${PKG_CMAKE_HOST_SHA256SUM:=7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe}; : ${PKG_CMAKE_HOST_VERSION:=3.6.3}; : ${PKG_CMAKE_HOST_URL:=https://cmake.org/files/v${PKG_CMAKE_HOST_VERSION%.*}/cmake-${PKG_CMAKE_HOST_VERSION}.tar.gz}; : ${PKG_CMAKE_HOST_CONFIGURE_ARGS:="--parallel=${BUILD_CPUS} --prefix=${PREFIX}"}; -: ${PKG_CMAKE_HOST_MAKEFLAGS_INSTALL:=}; +: ${PKG_CMAKE_HOST_MAKEFLAGS_INSTALL:="DESTDIR="}; : ${PKG_LLVM_HOST_SHA256SUM:=6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9}; : ${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}; @@ -278,46 +196,42 @@ intltool_host libffi_host ruby_host"; : ${PKG_FILE_HOST_SHA256SUM:=8639dc4d1b21e232285cd483604afc4a6ee810710e00e579dbe9591681722b50}; : ${PKG_FILE_HOST_VERSION:=5.32}; : ${PKG_FILE_HOST_URL:=ftp://ftp.astron.com/pub/file/file-${PKG_FILE_HOST_VERSION}.tar.gz}; -: ${PKG_GLIB_HOST_CONFIGURE_ARGS_EXTRA:="--disable-dtrace --disable-libelf --disable-libmount"}; -: ${PKG_GLIB_HOST_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX}/lib/libffi-${PKG_LIBFFI_HOST_VERSION}/include:LIBFFI_LIBS=-L${PREFIX}/lib -lffi}; -: ${PKG_GLIB_HOST_MAKEFLAGS_BUILD_EXTRA:=V=99}; -: ${PKG_GLIB_HOST_MAKEFLAGS_INSTALL:=DESTDIR=}; +: ${PKG_LIBFFI_HOST_SHA256SUM:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37}; +: ${PKG_LIBFFI_HOST_VERSION:=3.2.1}; +: ${PKG_LIBFFI_HOST_URL:=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_HOST_VERSION}.tar.gz}; : ${PKG_GLIB_HOST_SHA256SUM:=fe22998ff0394ec31e6e5511c379b74011bee61a4421bca7fcab223dfbe0fc6a}; : ${PKG_GLIB_HOST_VERSION:=2.54.0}; : ${PKG_GLIB_HOST_URL:=http://ftp.gnome.org/pub/GNOME/sources/glib/${PKG_GLIB_HOST_VERSION%.[0-9]}/glib-${PKG_GLIB_HOST_VERSION}.tar.xz}; +: ${PKG_GLIB_HOST_CONFIGURE_ARGS_EXTRA:="--disable-dtrace --disable-libelf --disable-libmount"}; +: ${PKG_GLIB_HOST_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX}/lib/libffi-${PKG_LIBFFI_HOST_VERSION}/include:LIBFFI_LIBS=-L${PREFIX}/lib64 -lffi}; +: ${PKG_GLIB_HOST_MAKEFLAGS_BUILD_EXTRA:=-j1}; +: ${PKG_GLIB_HOST_BUILD_STEPS_DISABLE:=patch:main}; : ${PKG_INFOUNZIP_HOST_URLS_GIT:=infounzip-host=https://github.com/Redfoxmoon3/infounzip.git@master}; : ${PKG_INFOZIP_HOST_URLS_GIT:=infozip-host=https://github.com/Redfoxmoon3/infozip.git@master}; -: ${PKG_INTLTOOL_HOST_MAKEFLAGS_BUILD_EXTRA:=V=99}; -: ${PKG_INTLTOOL_HOST_MAKEFLAGS_INSTALL:=DESTDIR=}; : ${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}; -: ${PKG_LIBFFI_HOST_MAKEFLAGS_INSTALL:=DESTDIR=}; -: ${PKG_LIBFFI_HOST_SHA256SUM:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37}; -: ${PKG_LIBFFI_HOST_VERSION:=3.2.1}; -: ${PKG_LIBFFI_HOST_URL:=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_HOST_VERSION}.tar.gz}; -: ${PKG_RUBY_HOST_BUILD_STEPS:="setup_env:always all:abstract disabled:always fetch:main extract:main patch_pre:main distclean:main build_dir:always autoconf:main configure:main clean:optional build:main install_pre:main install:main strip:main finish:always"}; -: ${PKG_RUBY_HOST_CFLAGS_CONFIGURE_DEBUG:="${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT:+${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT} }"}; -: ${PKG_RUBY_HOST_CFLAGS_CONFIGURE_RELEASE:="${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT:+${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT} }"-O1}; -: ${PKG_RUBY_HOST_CONFIGURE_ARGS_EXTRA:="--disable-install-rdoc --with-out-ext=fiddle"}; -: ${PKG_RUBY_HOST_MAKEFLAGS_INSTALL:=DESTDIR=}; : ${PKG_RUBY_HOST_SHA256SUM:=ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507}; : ${PKG_RUBY_HOST_VERSION:=2.3.0}; : ${PKG_RUBY_HOST_URL:=https://cache.ruby-lang.org/pub/ruby/${PKG_RUBY_HOST_VERSION%.*}/ruby-${PKG_RUBY_HOST_VERSION}.tar.gz}; +: ${PKG_RUBY_HOST_BUILD_STEPS_DISABLE:=patch:main}; +: ${PKG_RUBY_HOST_CFLAGS_CONFIGURE:="-g0 -O1"}; +: ${PKG_RUBY_HOST_CONFIGURE_ARGS_EXTRA:="--disable-install-rdoc --with-out-ext=fiddle"}; +: ${PKG_RUBY_HOST_MAKEFLAGS_INSTALL="DESTDIR="}; # # Build target lib_packages # -LIB_PACKAGES_CFLAGS_CONFIGURE="${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT:+${LIB_PACKAGES_CFLAGS_CONFIGURE_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; +LIB_PACKAGES_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT:+${CFLAGS_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; LIB_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --program-prefix= --target=${TARGET}"; LIB_PACKAGES_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; -LIB_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; +LIB_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}/ PREFIX= prefix="; LIB_PACKAGES_PACKAGES_LEAVES=" expat libxml2 alsa_lib apr apr_util bzip2 curl libz lmdb libpng libjpeg_turbo tiff giflib libffi gdbm geoip pcre glib gzip libarchive libatomic_ops libpipeline libressl libevent libfetch libgpg_error libassuan libfirm libgcrypt libksba libudns lua ncurses ncursestw ncursesw npth popt shared_mime_info -sqlite3 w32api w32lib xz"; +sqlite3 w32api w32lib xz cmake"; LIB_PACKAGES_PACKAGES_X11=" inputproto kbproto xcb_proto xproto fixesproto libXau libpthread_stubs xcb xextproto xtrans libX11 libXext freetype fontconfig renderproto Xrender libXft @@ -336,7 +250,6 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_ALSA_LIB_VERSION:=1.1.4.1}; : ${PKG_ALSA_LIB_URL:=ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.4.1.tar.bz2}; : ${PKG_ALSA_LIB_CONFIGURE_ARGS_EXTRA:="--disable-python --with-versioned=no"}; -: ${PKG_ALSA_LIB_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_APR_SHA256SUM:=131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172}; : ${PKG_APR_VERSION:=1.6.3}; : ${PKG_APR_URL:=http://mirror.yannic-bonenberger.com/apache/apr/apr-${PKG_APR_VERSION}.tar.bz2}; @@ -344,16 +257,14 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_APR_UTIL_VERSION:=1.6.1}; : ${PKG_APR_UTIL_URL:=http://apache.lauf-forum.at/apr/apr-util-${PKG_APR_UTIL_VERSION}.tar.bz2}; : ${PKG_APR_UTIL_CONFIGURE_ARGS_EXTRA:="--with-apr=${WORKDIR}/apr-${PKG_APR_VERSION}-native-${TARGET}"}; -: ${PKG_APR_UTIL_SUBDIR:=apr-util-${PKG_APR_UTIL_VERSION}}; -: ${PKG_APR_UTIL_BUILD_DIR:=${PKG_APR_UTIL_SUBDIR}}; +: ${PKG_APR_UTIL_INSTALL_FILES:=bin/apu-1-config=${PREFIX}/bin/${PKG_TARGET}-apu-1-config}; : ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd}; : ${PKG_BZIP2_VERSION:=1.0.6}; : ${PKG_BZIP2_URL:=http://www.bzip.org/1.0.6/bzip2-${PKG_BZIP2_VERSION}.tar.gz}; -: ${PKG_BZIP2_BUILD_DIR:=bzip2-${PKG_BZIP2_VERSION}}; : ${PKG_BZIP2_CFLAGS_BUILD_EXTRA:=${LIB_PACKAGES_CFLAGS_CONFIGURE}}; : ${PKG_BZIP2_INSTALL_FILES:="@bzdiff=bin/bzcmp @bzgrep=bin/bzegrep @bzgrep=bin/bzfgrep @bzmore=bin/bzless libbz2.so.1.0=lib/ libbz2.so.1.0.6=lib/"}; : ${PKG_BZIP2_MAKEFLAGS_BUILD_EXTRA:=-f Makefile-libbz2_so}; -: ${PKG_BZIP2_MAKEFLAGS_INSTALL_EXTRA:=PREFIX=${PREFIX_NATIVE}}; +: ${PKG_BZIP2_MAKEFLAGS_INSTALL:="PREFIX=${PREFIX_NATIVE}"}; : ${PKG_BZIP2_NO_CLEAN:=1}; : ${PKG_CURL_SHA256SUM:=7f8240048907e5030f67be0a6129bc4b333783b9cca1391026d700835a788dde}; : ${PKG_CURL_VERSION:=7.51.0}; @@ -397,20 +308,18 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_GLIB_CONFIGURE_ARGS_EXTRA:="--disable-dtrace --disable-libelf --disable-libmount"}; : ${PKG_GLIB_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX_NATIVE}/lib/libffi-${PKG_LIBFFI_VERSION}/include:LIBFFI_LIBS=-L${PREFIX_NATIVE}/lib -lffi}; : ${PKG_GLIB_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_NATIVE}/lib}; -: ${PKG_GLIB_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_GZIP_SHA256SUM:=1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e}; : ${PKG_GZIP_VERSION:=1.8}; : ${PKG_GZIP_URL:=https://ftp.gnu.org/gnu/gzip/gzip-${PKG_GZIP_VERSION}.tar.gz}; : ${PKG_GZIP_CFLAGS_CONFIGURE_EXTRA:=-DNO_ASM -UASMV}; : ${PKG_GZIP_CONFIGURE_ARGS:=--host=${TARGET} --prefix= --target=${TARGET}}; : ${PKG_GZIP_MAKEFLAGS_BUILD_EXTRA:=OBJA= prefix=}; -: ${PKG_GZIP_MAKEFLAGS_INSTALL_EXTRA:=OBJA= prefix=}; +: ${PKG_GZIP_MAKEFLAGS_INSTALL_EXTRA:="OBJA="}; : ${PKG_LIBARCHIVE_SHA256SUM:=691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f}; : ${PKG_LIBARCHIVE_VERSION:=3.2.2}; : ${PKG_LIBARCHIVE_URL:=http://www.libarchive.org/downloads/libarchive-${PKG_LIBARCHIVE_VERSION}.tar.gz}; : ${PKG_LIBARCHIVE_CONFIGURE_ARGS_EXTRA:=--without-xml2}; : ${PKG_LIBARCHIVE_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_NATIVE}/lib}; -: ${PKG_LIBARCHIVE_MAKEFLAGS_INSTALL_EXTRA:="prefix=:DESTDIR=${PREFIX_NATIVE}:LIBTOOL=slibtool"}; : ${PKG_LIBATOMIC_OPS_URLS_GIT:="libatomic_ops=https://github.com/ivmai/libatomic_ops@master"}; : ${PKG_LIBPIPELINE_SHA256SUM:=da46d7b20163aadb9db2faae483f734e9096a7550c84b94029abeab62dd1b9ee}; : ${PKG_LIBPIPELINE_VERSION:=1.4.1}; @@ -427,10 +336,9 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBFETCH_SHA256SUM:=3226f53d5ad29cc27510db968ef0d37bf4554b8aaaeadcd56e23067213b08943}; : ${PKG_LIBFETCH_VERSION:=2.33}; : ${PKG_LIBFETCH_URL:=https://sources.archlinux.org/other/libfetch/libfetch-${PKG_LIBFETCH_VERSION}.tar.gz}; -: ${PKG_LIBFETCH_BUILD_DIR:=libfetch-${PKG_LIBFETCH_VERSION}}; : ${PKG_LIBFETCH_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:LDFLAGS=--sysroot=${PREFIX_NATIVE}}; -: ${PKG_LIBFETCH_MAKEFLAGS_BUILD_EXTRA:=E=echo Q= AR=${TARGET}-ar CC=${TARGET}-gcc LD=${TARGET}-gcc}; -: ${PKG_LIBFETCH_MAKEFLAGS_INSTALL_EXTRA:=E=echo Q= prefix=}; +: ${PKG_LIBFETCH_MAKEFLAGS_BUILD_EXTRA:="E=echo Q= AR=${TARGET}-ar CC=${TARGET}-gcc LD=${TARGET}-gcc"}; +: ${PKG_LIBFETCH_MAKEFLAGS_INSTALL_EXTRA:="E=echo Q="}; : ${PKG_LIBGPG_ERROR_SHA256SUM:=f628f75843433b38b05af248121beb7db5bd54bb2106f384edac39934261320c}; : ${PKG_LIBGPG_ERROR_VERSION:=1.25}; : ${PKG_LIBGPG_ERROR_URL:=https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${PKG_LIBGPG_ERROR_VERSION}.tar.bz2}; @@ -454,7 +362,6 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LUA_SHA256SUM:=5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2}; : ${PKG_LUA_VERSION:=5.3.3}; : ${PKG_LUA_URL:=https://www.lua.org/ftp/lua-${PKG_LUA_VERSION}.tar.gz}; -: ${PKG_LUA_BUILD_DIR:=lua-5.3.3}; : ${PKG_LUA_MAKEFLAGS_BUILD_EXTRA:="CC=${TARGET}-gcc midipix"}; : ${PKG_LUA_MAKEFLAGS_INSTALL_EXTRA:=INSTALL_TOP=${PREFIX_NATIVE}}; : ${PKG_NCURSES_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; @@ -488,17 +395,19 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_SQLITE3_VERSION:=3160200}; : ${PKG_SQLITE3_URL:=https://sqlite.org/2017/sqlite-autoconf-${PKG_SQLITE3_VERSION}.tar.gz}; : ${PKG_SQLITE3_CONFIGURE_ARGS_EXTRA:=--disable-static-shell}; -: ${PKG_SQLITE3_MAKEFLAGS_BUILD_EXTRA:=LIBTOOL=slibtool}; -: ${PKG_SQLITE3_MAKEFLAGS_INSTALL_EXTRA:=LIBTOOL=slibtool}; : ${PKG_W32API_URLS_GIT:="w32api=git://github.com/midipix-ports/w32api.ports@main"}; : ${PKG_W32API_MAKEFLAGS_BUILD:="DESTDIR=${PREFIX_NATIVE}"}; -: ${PKG_W32API_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX_NATIVE}"}; : ${PKG_W32API_SUBDIR:=w32api}; : ${PKG_W32LIB_URLS_GIT:="w32lib=git://git.midipix.org/w32lib"}; : ${PKG_W32LIB_CONFIGURE_ARGS:="--host=${TARGET} --prefix= --target=${TARGET}"}; : ${PKG_XZ_SHA256SUM:=73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2}; : ${PKG_XZ_VERSION:=5.2.2}; : ${PKG_XZ_URL:=https://github.com/xz-mirror/xz/releases/download/v${PKG_XZ_VERSION}/xz-${PKG_XZ_VERSION}.tar.gz}; +: ${PKG_CMAKE_SHA256SUM:=7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe}; +: ${PKG_CMAKE_VERSION:=3.6.3}; +: ${PKG_CMAKE_URL:=https://cmake.org/files/v${PKG_CMAKE_VERSION%.*}/cmake-${PKG_CMAKE_VERSION}.tar.gz}; +: ${PKG_CMAKE_CFLAGS_CONFIGURE_EXTRA:="-g0 -O2"}; +: ${PKG_CMAKE_CONFIGURE_ARGS:="--parallel=${BUILD_CPUS} --prefix="}; : ${PKG_INPUTPROTO_SHA256SUM:=893a6af55733262058a27b38eeb1edc733669f01d404e8581b167f03c03ef31d}; : ${PKG_INPUTPROTO_VERSION:=2.3.2}; @@ -509,7 +418,6 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_XCB_PROTO_SHA256SUM:=5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c480a4906}; : ${PKG_XCB_PROTO_VERSION:=1.12}; : ${PKG_XCB_PROTO_URL:=https://www.x.org/releases/individual/xcb/xcb-proto-${PKG_XCB_PROTO_VERSION}.tar.bz2}; -: ${PKG_XCB_PROTO_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX_NATIVE}/"}; : ${PKG_XPROTO_SHA256SUM:=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747}; : ${PKG_XPROTO_VERSION:=7.0.31}; : ${PKG_XPROTO_URL:=https://www.x.org/releases/individual/proto/xproto-${PKG_XPROTO_VERSION}.tar.bz2}; @@ -526,6 +434,7 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_XCB_VERSION:=1.12}; : ${PKG_XCB_URL:=https://www.x.org/releases/individual/xcb/libxcb-${PKG_XCB_VERSION}.tar.bz2}; : ${PKG_XCB_CONFIGURE_ARGS_EXTRA:=--disable-randr}; +: ${PKG_XCB_CFLAGS_CONFIGURE_EXTRA:=-std=gnu99}; : ${PKG_XEXTPROTO_SHA256SUM:=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0}; : ${PKG_XEXTPROTO_VERSION:=7.3.0}; : ${PKG_XEXTPROTO_URL:=https://www.x.org/releases/individual/proto/xextproto-${PKG_XEXTPROTO_VERSION}.tar.bz2}; @@ -541,8 +450,6 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_FREETYPE_SHA256SUM:=a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b}; : ${PKG_FREETYPE_VERSION:=2.8}; : ${PKG_FREETYPE_URL:=http://download.savannah.gnu.org/releases/freetype/freetype-${PKG_FREETYPE_VERSION}.tar.bz2}; -: ${PKG_FREETYPE_MAKEFLAGS_BUILD_EXTRA:=LIBTOOL=slibtool}; -: ${PKG_FREETYPE_MAKEFLAGS_INSTALL_EXTRA:=LIBTOOL=slibtool}; : ${PKG_FREETYPE_ENV_VARS_EXTRA:=PKG_CONFIG=${TARGET}-pkg-config}; : ${PKG_FONTCONFIG_SHA256SUM:=7b165eee7aa22dcc1557db56f58d905b6a14b32f9701c79427452474375b4c89}; : ${PKG_FONTCONFIG_VERSION:=2.11.95}; @@ -585,7 +492,6 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBXAW_SHA256SUM:=8ef8067312571292ccc2bbe94c41109dcf022ea5a4ec71656a83d8cce9edb0cd}; : ${PKG_LIBXAW_VERSION:=1.0.13}; : ${PKG_LIBXAW_URL:=https://www.x.org/releases/individual/lib/libXaw-${PKG_LIBXAW_VERSION}.tar.bz2}; -: ${PKG_LIBXAW_INSTALL_FILES:=@libXaw7.7.lib.a=lib/libXaw.lib.a}; : ${PKG_LIBXKBFILE_SHA256SUM:=51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a}; : ${PKG_LIBXKBFILE_VERSION:=1.0.9}; : ${PKG_LIBXKBFILE_URL:=https://www.x.org/releases/individual/lib/libxkbfile-${PKG_LIBXKBFILE_VERSION}.tar.bz2}; @@ -626,7 +532,7 @@ LIB_PACKAGES_PREFIX="${PREFIX_NATIVE}"; # # Build target dev_packages # -DEV_PACKAGES_CFLAGS_CONFIGURE="${LIB_PACKAGES_CFLAGS_CONFIGURE}"; +DEV_PACKAGES_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT:+${CFLAGS_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; DEV_PACKAGES_CONFIGURE_ARGS="${LIB_PACKAGES_CONFIGURE_ARGS}"; DEV_PACKAGES_LDFLAGS_CONFIGURE="${LIB_PACKAGES_LDFLAGS_CONFIGURE}"; DEV_PACKAGES_MAKEFLAGS_INSTALL="${LIB_PACKAGES_MAKEFLAGS_INSTALL}"; @@ -638,10 +544,10 @@ DEV_PACKAGES_PREFIX="${LIB_PACKAGES_PREFIX}"; # # Build target leaf_packages # -LEAF_PACKAGES_CFLAGS_CONFIGURE="${LEAF_PACKAGES_CFLAGS_CONFIGURE_DEFAULT:+${LEAF_PACKAGES_CFLAGS_CONFIGURE_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; +LEAF_PACKAGES_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT:+${CFLAGS_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; LEAF_PACKAGES_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; LEAF_PACKAGES_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; -LEAF_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; +LEAF_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}/ PREFIX= prefix="; LEAF_PACKAGES_PACKAGES=" apk_tools aria2 bash bc bdwgc bind bison chicken coreutils cparser cron dash datamash diffutils dos2unix dropbear ed figlet file findutils gawk git gnupg @@ -654,9 +560,8 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_APK_TOOLS_SHA256SUM:=def2b2c23cd12fd2a9c19be49653b0d1bf9d81a26dac5a0ee79a1351d674f93b}; : ${PKG_APK_TOOLS_VERSION:=2.6.8}; : ${PKG_APK_TOOLS_URL:=http://git.alpinelinux.org/cgit/apk-tools/snapshot/apk-tools-${PKG_APK_TOOLS_VERSION}.tar.bz2}; -: ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}}; : ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:CROSS_COMPILE=${TARGET}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_NATIVE}:PKG_CONFIG=${TARGET}-pkg-config}; -: ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk}; +: ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:="PREFIX=${PREFIX_NATIVE} MANDIR=/share/man DOCDIR=/share/doc/apk"}; : ${PKG_ARIA2_SHA256SUM:=546e9194a9135d665fce572cb93c88f30fb5601d113bfa19951107ced682dc50}; : ${PKG_ARIA2_VERSION:=1.32.0}; : ${PKG_ARIA2_URL:=https://github.com/aria2/aria2/releases/download/release-${PKG_ARIA2_VERSION}/aria2-${PKG_ARIA2_VERSION}.tar.xz}; @@ -679,7 +584,6 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_CHICKEN_SHA256SUM:=e3dc2b8f95b6a3cd59c85b5bb6bdb2bd9cefc45b5d536a20cad74e3c63f4ad89}; : ${PKG_CHICKEN_VERSION:=4.11.0}; : ${PKG_CHICKEN_URL:=https://code.call-cc.org/releases/4.11.0/chicken-${PKG_CHICKEN_VERSION}.tar.gz}; -: ${PKG_CHICKEN_BUILD_DIR:=chicken-${PKG_CHICKEN_VERSION}}; : ${PKG_CHICKEN_MAKEFLAGS_BUILD:="PLATFORM=midipix-${ARCH} PREFIX=${PREFIX_NATIVE} TARGET_PREFIX=${PREFIX_NATIVE} C_COMPILER=${TARGET}-gcc HOSTSYSTEM=${TARGET}"}; : ${PKG_CHICKEN_MAKEFLAGS_BUILD_EXTRA_DEBUG:=DEBUGBUILD=1}; : ${PKG_CHICKEN_MAKEFLAGS_BUILD_EXTRA_RELEASE:=DEBUGBUILD=0}; @@ -688,7 +592,6 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_COREUTILS_SHA256SUM:=1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65}; : ${PKG_COREUTILS_VERSION:=8.28}; : ${PKG_COREUTILS_URL:=https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_COREUTILS_VERSION}.tar.xz}; -: ${PKG_COREUTILS_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_CPARSER_URLS_GIT:="cparser=http://pp.info.uni-karlsruhe.de/git/cparser.git@master bcparser=${GITROOT}/compilers/bcparser@main"}; : ${PKG_CPARSER_BUILD_DIR:=cparser+libfirm/build/cparser}; : ${PKG_CPARSER_CONFIGURE:=bcparser/configure}; @@ -711,7 +614,6 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_DOS2UNIX_SHA256SUM:=307e0363c19384467bd9a15e1cfea482ca3e3089d76c7a02b969022fff32583a}; : ${PKG_DOS2UNIX_VERSION:=7.3.5-beta3}; : ${PKG_DOS2UNIX_URL:=http://waterlan.home.xs4all.nl/dos2unix/dos2unix-${PKG_DOS2UNIX_VERSION}.tar.gz}; -: ${PKG_DOS2UNIX_BUILD_DIR:=dos2unix-${PKG_DOS2UNIX_VERSION}}; : ${PKG_DOS2UNIX_CFLAGS_BUILD_EXTRA:=${PACKAGES_CFLAGS_CONFIGURE}}; : ${PKG_DOS2UNIX_INSTALL_FILES:="dos2unix=bin/ dos2unix=bin/ @dos2unix=bin/mac2unix @unix2dos=bin/unix2mac"}; : ${PKG_DROPBEAR_VERSION:=2017.75}; @@ -725,9 +627,7 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_FIGLET_SHA256SUM:=bf88c40fd0f077dab2712f54f8d39ac952e4e9f2e1882f1195be9e5e4257417d}; : ${PKG_FIGLET_VERSION:=2.2.5}; : ${PKG_FIGLET_URL:=ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-${PKG_FIGLET_VERSION}.tar.gz}; -: ${PKG_FIGLET_BUILD_DIR:=figlet-${PKG_FIGLET_VERSION}}; : ${PKG_FIGLET_MAKEFLAGS_BUILD:=CC=${TARGET}-gcc LD=${TARGET}-gcc}; -: ${PKG_FIGLET_MAKEFLAGS_INSTALL_EXTRA:=prefix=}; : ${PKG_FIGLET_NO_CLEAN:=1}; : ${PKG_FILE_SHA256SUM:=8639dc4d1b21e232285cd483604afc4a6ee810710e00e579dbe9591681722b50}; : ${PKG_FILE_VERSION:=5.32}; @@ -744,7 +644,6 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_GIT_URL:=https://github.com/git/git/archive/v${PKG_GIT_VERSION}.tar.gz}; : ${PKG_GIT_BUILD_DIR:=git-${PKG_GIT_VERSION}}; : ${PKG_GIT_ENV_VARS_EXTRA:="ac_cv_fread_reads_directories=1:ac_cv_snprintf_returns_bogus=0"}; -: ${PKG_GIT_MAKEFLAGS_INSTALL_EXTRA:="prefix= SITEPREFIX="}; : ${PKG_GIT_SUBDIR:=${PKG_GIT_BUILD_DIR}}; : ${PKG_GNUPG_SHA256SUM:=49b9a6a6787ad00d4d2d69d8c7ee8905923782583f06078a064a0c80531d8844}; : ${PKG_GNUPG_VERSION:=2.1.16}; @@ -767,9 +666,7 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_INETUTILS_URL:=https://ftp.gnu.org/gnu/inetutils/inetutils-${PKG_INETUTILS_VERSION}.tar.xz}; : ${PKG_INETUTILS_CONFIGURE_ARGS_EXTRA:="--disable-ftpd --disable-inetd --disable-rexecd --disable-rlogind --disable-rshd --disable-syslogd --disable-talkd --disable-telnetd --disable-tftpd --disable-uucpd --disable-ftp --disable-dnsdomainname --disable-hostname --disable-ping --disable-ping6 --disable-rcp --disable-rexec --disable-rlogin --disable-rsh --disable-logger --disable-talk --enable-telnet --disable-tftp --disable-whois --disable-ifconfig --disable-traceroute"}; : ${PKG_INFOUNZIP_URLS_GIT:=infounzip=https://github.com/Redfoxmoon3/infounzip.git@master}; -: ${PKG_INFOUNZIP_MAKEFLAGS_INSTALL_EXTRA:=DESTDIR=${PREFIX_NATIVE}}; : ${PKG_INFOZIP_URLS_GIT:=infozip=https://github.com/Redfoxmoon3/infozip.git@master}; -: ${PKG_INFOZIP_MAKEFLAGS_INSTALL_EXTRA:=DESTDIR=${PREFIX_NATIVE}}; : ${PKG_IRSSI_SHA256SUM:=48ff359f8abb706e729cbb8bc7bd93863e4e785f9a05d993a398310ac74beea8}; : ${PKG_IRSSI_VERSION:=1.0.4}; : ${PKG_IRSSI_URL:=https://github.com/irssi/irssi/releases/download/${PKG_IRSSI_VERSION}/irssi-${PKG_IRSSI_VERSION}.tar.gz}; @@ -777,20 +674,16 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_JOHN_SHA256SUM:=952cf68369fb5b27f2d112ce7ca1eb16b975c85cbce8c658abb8bc5a20e1b266}; : ${PKG_JOHN_VERSION:=1.8.0}; : ${PKG_JOHN_URL:=http://www.openwall.com/john/j/john-${PKG_JOHN_VERSION}.tar.xz}; -: ${PKG_JOHN_BUILD_DIR:=john-${PKG_JOHN_VERSION}}; : ${PKG_JOHN_DISABLED:=$(if [ "${ARCH}" = "nt32" ]; then echo 1; fi)}; : ${PKG_JOHN_INSTALL_FILES:="run/john=bin/ run/mailer=bin/ run/makechr=bin/ run/relbench=bin/ run/unafs=bin/ run/unique=bin/ run/unshadow=bin/ /=share/john run/ascii.chr=share/john/ run/digits.chr=share/john/ run/john.conf=share/john/ run/lm_ascii.chr=share/john/ run/password.lst=share/john/"}; : ${PKG_JOHN_MAKEFLAGS_BUILD_EXTRA_DEBUG:="-C src midipix-x86-64"}; : ${PKG_JOHN_MAKEFLAGS_BUILD_EXTRA_RELEASE:="-C src midipix-x86-64 LDFLAGS_DEBUG=-s"}; -: ${PKG_JOHN_MAKEFLAGS_INSTALL_EXTRA:="-C src"}; : ${PKG_JOHN_NO_MAKE_INSTALL:=1}; : ${PKG_JOHN_SUBDIR:=john-${PKG_JOHN_VERSION}}; : ${PKG_LDNS_SHA256SUM:=c19f5b1b4fb374cfe34f4845ea11b1e0551ddc67803bd6ddd5d2a20f0997a6cc}; : ${PKG_LDNS_VERSION:=1.7.0}; : ${PKG_LDNS_URL:=https://www.nlnetlabs.nl/downloads/ldns/ldns-${PKG_LDNS_VERSION}.tar.gz}; : ${PKG_LDNS_CONFIGURE_ARGS_EXTRA:="--with-ssl=${PREFIX_NATIVE} --disable-dane-ta-usage --with-drill --with-examples"}; -: ${PKG_LDNS_MAKEFLAGS_BUILD_EXTRA:=libtool=slibtool}; -: ${PKG_LDNS_MAKEFLAGS_INSTALL_EXTRA:=libtool=slibtool}; : ${PKG_LESS_SHA256SUM:=f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706}; : ${PKG_LESS_VERSION:=487}; : ${PKG_LESS_URL:=http://www.greenwoodsoftware.com/less/less-${PKG_LESS_VERSION}.tar.gz}; @@ -803,8 +696,8 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_FLEX_URL:=https://github.com/westes/flex/releases/download/v${PKG_FLEX_VERSION}/flex-${PKG_FLEX_VERSION}.tar.gz}; : ${PKG_FLEX_CONFIGURE_ARGS_EXTRA:=--disable-libfl}; : ${PKG_LUNIX_URLS_GIT:=lunix=https://github.com/Redfoxmoon3/lunix.git@master}; +: ${PKG_LUNIX_BUILD_DIR:=lunix}; : ${PKG_LUNIX_MAKEFLAGS_BUILD:="all5.3"}; -: ${PKG_LUNIX_MAKEFLAGS_INSTALL:=DESTDIR=""}; : ${PKG_LUNIX_ENV_VARS_EXTRA:="libdir=${PREFIX_NATIVE}/lib"}; : ${PKG_LYNX_SHA256SUM:=6980e75cf0d677fd52c116e2e0dfd3884e360970c88c8356a114338500d5bee7}; : ${PKG_LYNX_VERSION:=2.8.8rel.2}; @@ -819,7 +712,6 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_MAN_DB_VERSION:=2.7.6.1}; : ${PKG_MAN_DB_URL:=http://download.savannah.gnu.org/releases/man-db/man-db-${PKG_MAN_DB_VERSION}.tar.xz}; : ${PKG_MAN_DB_CFLAGS_BUILD_EXTRA:="-Dprogram_name=program_invocation_name -I${PREFIX_NATIVE}/include"}; -: ${PKG_MAN_DB_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_MC_SHA256SUM:=eb9e56bbb5b2893601d100d0e0293983049b302c5ab61bfb544ad0ee2cc1f2df}; : ${PKG_MC_VERSION:=4.8.19}; : ${PKG_MC_URL:=http://ftp.midnight-commander.org/mc-${PKG_MC_VERSION}.tar.xz}; @@ -832,15 +724,13 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_MKSH_VERSION:=R54}; : ${PKG_MKSH_URL:=http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-${PKG_MKSH_VERSION}.tgz}; : ${PKG_MKSH_BUILD_CMDLINE:="sh Build.sh"}; -: ${PKG_MKSH_BUILD_DIR:=mksh}; : ${PKG_MKSH_ENV_VARS_EXTRA:="CC=${TARGET}-gcc:CFLAGS=${PACKAGES_CFLAGS_CONFIGURE:+${PACKAGES_CFLAGS_CONFIGURE} }-DMKSH_NOPROSPECTOFWORK"}; : ${PKG_MKSH_INSTALL_FILES:="mksh=bin/ /=share/doc/mksh/examples dot.mkshrc=share/doc/mksh/examples/ mksh.1=share/man/man1/"}; : ${PKG_MKSH_NO_MAKE_INSTALL:=1}; -: ${PKG_MKSH_SUBDIR:=${PKG_MKSH_BUILD_DIR}}; +: ${PKG_MKSH_SUBDIR:=mksh}; : ${PKG_MTR_SHA256SUM:=f2979db9e2f41aa8e6574e7771767c9afe111d9213814eb47f5e1e71876e4382}; : ${PKG_MTR_VERSION:=0.92}; : ${PKG_MTR_URL:=ftp://ftp.bitwizard.nl/mtr/mtr-${PKG_MTR_VERSION}.tar.gz}; -: ${PKG_MTR_DISABLED:=1}; : ${PKG_M4_SHA256SUM:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07}; : ${PKG_M4_VERSION:=1.4.18}; : ${PKG_M4_URL:=https://ftp.gnu.org/gnu/m4/m4-${PKG_M4_VERSION}.tar.xz}; @@ -853,17 +743,16 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_NGINX_SHA256SUM:=4a667f40f9f3917069db1dea1f2d5baa612f1fa19378aadf71502e846a424610}; : ${PKG_NGINX_VERSION:=1.11.3}; : ${PKG_NGINX_URL:=http://nginx.org/download/nginx-${PKG_NGINX_VERSION}.tar.gz}; -: ${PKG_NGINX_SUBDIR:=nginx-${PKG_NGINX_VERSION}}; -: ${PKG_NGINX_BUILD_DIR:=${PKG_NGINX_SUBDIR}}; +: ${PKG_NGINX_BUILD_DIR:=nginx-${PKG_NGINX_VERSION}}; : ${PKG_NGINX_CONFIGURE_ARGS:="--prefix="}; : ${PKG_OPENLITESPEED_SHA256SUM:=11cea34ebb0d72e5c620c61dce9ee4982474311dc5f35e0737a6b6d760bcf577}; : ${PKG_OPENLITESPEED_VERSION:=1.4.27}; : ${PKG_OPENLITESPEED_URL:=http://open.litespeedtech.com/packages/openlitespeed-${PKG_OPENLITESPEED_VERSION}.tgz}; : ${PKG_OPENLITESPEED_BUILD_DIR:=openlitespeed-${PKG_OPENLITESPEED_VERSION}}; -: ${PKG_OPENLITESPEED_SUBDIR:=${PKG_OPENLITESPEED_BUILD_DIR}}; : ${PKG_OPENLITESPEED_CONFIGURE_ARGS:="-C --host=${TARGET} --prefix=/usr/lsws --target=${TARGET} --with-expat=${PREFIX_NATIVE} --with-openssl=${PREFIX_NATIVE} --with-zlib=${PREFIX_NATIVE}" --enable-spdy=no}; : ${PKG_OPENLITESPEED_CXXFLAGS_CONFIGURE_EXTRA:="-D_GNU_SOURCE"}; : ${PKG_OPENLITESPEED_MAKEFLAGS_BUILD:=-j1}; +: ${PKG_OPENLITESPEED_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_NATIVE}/lsws}}; : ${PKG_OPENSSH_SHA256SUM:=3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc}; : ${PKG_OPENSSH_VERSION:=7.3p1}; : ${PKG_OPENSSH_URL:=http://artfiles.org/openbsd/OpenSSH/portable/openssh-${PKG_OPENSSH_VERSION}.tar.gz}; @@ -900,13 +789,11 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz}; : ${PKG_PYTHON3_CONFIGURE_ARGS:="--build=x86_64 -C --enable-ipv6 --enable-shared --host=${TARGET} --prefix=${PREFIX_NATIVE} --without-ensurepip"}; : ${PKG_PYTHON3_ENV_VARS_EXTRA:="BLDSHARED=${TARGET}-gcc -shared -mout-dsolib --sysroot=${PREFIX_NATIVE}:CC=${TARGET}-gcc:CFLAGS=--sysroot=${PREFIX_NATIVE}:CPPFLAGS=--sysroot=${PREFIX_NATIVE}:LDFLAGS=-L${PREFIX_NATIVE}/lib"}: -: ${PKG_PYTHON3_MAKEFLAGS_INSTALL_EXTRA:=prefix=}; : ${PKG_PYTHON3_SUBDIR:=Python-${PKG_PYTHON3_VERSION}}; : ${PKG_QPDF_SHA256SUM:=a9fdc7e94d38fcd3831f37b6e0fe36492bf79aa6d54f8f66062cf7f9c4155233}; : ${PKG_QPDF_VERSION:=6.0.0}; : ${PKG_QPDF_URL:=http://sourceforge.mirrorservice.org/q/qp/qpdf/qpdf/${PKG_QPDF_VERSION}/qpdf-${PKG_QPDF_VERSION}.tar.gz}; -: ${PKG_QPDF_SUBDIR:=qpdf-${PKG_QPDF_VERSION}}; -: ${PKG_QPDF_BUILD_DIR:=${PKG_QPDF_SUBDIR}}; +: ${PKG_QPDF_BUILD_DIR:=qpdf-${PKG_QPDF_VERSION}}; : ${PKG_QPDF_CONFIGURE_ARGS_EXTRA:=--with-random=/dev/urandom}; : ${PKG_RSYNC_SHA256SUM:=ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2}; : ${PKG_RSYNC_VERSION:=3.1.2}; @@ -927,14 +814,15 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_SED_VERSION:=4.4}; : ${PKG_SED_URL:=https://ftp.gnu.org/gnu/sed/sed-${PKG_SED_VERSION}.tar.xz}; : ${PKG_SMALLBASIC_URLS_GIT:="SmallBASIC=https://github.com/smallbasic/SmallBASIC@master"}; +: ${PKG_SMALLBASIC_BUILD_DIR:=SmallBASIC}; : ${PKG_SMALLBASIC_CFLAGS_CONFIGURE_EXTRA:=-std=gnu99}; +: ${PKG_SMALLBASIC_ENV_VARS_EXTRA:=PCRE_LIBS=-lpcre}; : ${PKG_SOCAT_SHA256SUM:=ce3efc17e3e544876ebce7cd6c85b3c279fda057b2857fcaaf67b9ab8bdaf034}; : ${PKG_SOCAT_VERSION:=1.7.3.2}; : ${PKG_SOCAT_URL:=http://www.dest-unreach.org/socat/download/socat-1.7.3.2.tar.gz}; : ${PKG_ST_SHA256SUM:=f7870d906ccc988926eef2cc98950a99cc78725b685e934c422c03c1234e6000}; : ${PKG_ST_VERSION:=0.7}; : ${PKG_ST_URL:=https://dl.suckless.org/st/st-${PKG_ST_VERSION}.tar.gz}; -: ${PKG_ST_BUILD_DIR:=st-0.7}; : ${PKG_ST_CFLAGS_BUILD_EXTRA:=${LEAF_PACKAGES_CFLAGS_CONFIGURE} -I${PREFIX_NATIVE}/include/freetype2}; : ${PKG_ST_INSTALL_FILES:=st=bin/ st.1=share/man/man1/ st.info=bin/}; : ${PKG_ST_LDFLAGS_BUILD_EXTRA:=-L${PREFIX_NATIVE}/lib -lX11 -lXft -lfreetype -lfontconfig}; @@ -951,10 +839,9 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_THTTPD_SHA256SUM:=b1c4bc37ada7c39cc2bcfbf86b3bc05be91be49f8bb4f55379eaff1f66516d7a}; : ${PKG_THTTPD_VERSION:=2.27}; : ${PKG_THTTPD_URL:=https://acme.com/software/thttpd/thttpd-${PKG_THTTPD_VERSION}.tar.gz}; -: ${PKG_THTTPD_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix= --target=${TARGET}"}; : ${PKG_THTTPD_BUILD_DIR:=thttpd-${PKG_THTTPD_VERSION}}; -: ${PKG_THTTPD_MAKEFLAGS_INSTALL_EXTRA:="DESTDIR="" prefix=${PREFIX_NATIVE}"}; -: ${PKG_THTTPD_SUBDIR:=${PKG_THTTPD_BUILD_DIR}}; +: ${PKG_THTTPD_MAKEFLAGS_INSTALL:="prefix=${PREFIX_NATIVE}"}; +: ${PKG_THTTPD_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix= --target=${TARGET}"}; : ${PKG_TMUX_SHA256SUM:=55313e132f0f42de7e020bf6323a1939ee02ab79c48634aa07475db41573852b}; : ${PKG_TMUX_VERSION:=2.3}; : ${PKG_TMUX_URL:=https://github.com/tmux/tmux/releases/download/${PKG_TMUX_VERSION}/tmux-${PKG_TMUX_VERSION}.tar.gz}; @@ -971,13 +858,13 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_VIM_SHA256SUM:=8de19b12cabde17b87f915a05e1855f6ff8404962947c5cf2204cf51f1ce5d67}; : ${PKG_VIM_VERSION:=7.4.1952}; : ${PKG_VIM_URL:=https://github.com/vim/vim/archive/v${PKG_VIM_VERSION}.tar.gz}; +: ${PKG_VIM_BUILD_DIR:=vim-${PKG_VIM_VERSION}}; +: ${PKG_VIM_CONFIG_CACHE_EXTRA:=${PKG_VIM_BUILD_DIR}/src/auto}; : ${PKG_VIM_CONFIGURE_ARGS_EXTRA:=--with-tlib=ncursesw}; : ${PKG_VIM_ENV_VARS_EXTRA:=PKG_CONFIG=${PREFIX}/bin/${TARGET}-pkg-config}; : ${PKG_VIM_INSTALL_FILES:=@vim=bin/vi}; : ${PKG_VIM_MAKEFLAGS_INSTALL_EXTRA:=STRIP=/bin/true}; -: ${PKG_VIM_SUBDIR:=vim-${PKG_VIM_VERSION}}; -: ${PKG_VIM_BUILD_DIR:=${PKG_VIM_SUBDIR}}; -: ${PKG_VIM_CONFIG_CACHE_EXTRA:=${PKG_VIM_BUILD_DIR}/src/auto}; +: ${PKG_VIM_SUBDIR:=${PKG_VIM_BUILD_DIR}}; : ${PKG_WEECHAT_SHA256SUM:=3061e57460e0e3e4533551c45ced53b222fe0933848250d0fb7337d9aacfd853}; : ${PKG_WEECHAT_VERSION:=1.6}; : ${PKG_WEECHAT_URL:=https://weechat.org/files/src/weechat-${PKG_WEECHAT_VERSION}.tar.gz}; @@ -994,10 +881,9 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_WHOIS_SHA256SUM:=048c3b0fd731e5c777c9cf1e01e0ed7aca387891743a97c5b57b3daa8df524a4}; : ${PKG_WHOIS_VERSION:=5.2.18}; : ${PKG_WHOIS_URL:=https://github.com/rfc1036/whois/archive/v${PKG_WHOIS_VERSION}.tar.gz}; -: ${PKG_WHOIS_BUILD_DIR:=whois-${PKG_WHOIS_VERSION}}; : ${PKG_WHOIS_ENV_VARS_EXTRA:=PKG_CONFIG=${TARGET}-pkg-config}; : ${PKG_WHOIS_MAKEFLAGS_INSTALL:=BASEDIR=${PREFIX_NATIVE}}; -: ${PKG_WHOIS_SUBDIR:=${PKG_WHOIS_BUILD_DIR}}; +: ${PKG_WHOIS_SUBDIR:=whois-${PKG_WHOIS_VERSION}}; : ${PKG_XEYES_SHA256SUM:=975e98680cd59e1f9439016386609546ed08c284d0f05a95276f96aca6e8a521}; : ${PKG_XEYES_VERSION:=1.1.1}; : ${PKG_XEYES_URL:=https://www.x.org/releases/individual/app/xeyes-${PKG_XEYES_VERSION}.tar.bz2}; @@ -1006,16 +892,15 @@ LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}"; : ${PKG_XWD_URL:=https://www.x.org/releases/individual/app/xwd-${PKG_XWD_VERSION}.tar.bz2}; : ${PKG_ZSH_SHA256SUM:=76f82cfd5ce373cf799a03b6f395283f128430db49202e3e3f512fb5a19d6f8a}; : ${PKG_ZSH_VERSION:=5.3}; -: ${PKG_ZSH_FNAME:=zsh-${PKG_ZSH_VERSION}.tar.xz}; -: ${PKG_ZSH_URL:="https://ftp.osuosl.org/pub/blfs/conglomeration/zsh/zsh-${PKG_ZSH_VERSION}.tar.xz"}; +: ${PKG_ZSH_URL:=https://ftp.osuosl.org/pub/blfs/conglomeration/zsh/zsh-${PKG_ZSH_VERSION}.tar.xz}; # # Build target minipix # -MINIPIX_CFLAGS_CONFIGURE="${MINIPIX_CFLAGS_CONFIGURE_DEFAULT:+${MINIPIX_CFLAGS_CONFIGURE_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; +MINIPIX_CFLAGS_CONFIGURE="${CFLAGS_DEFAULT:+${CFLAGS_DEFAULT} }--sysroot=${PREFIX_NATIVE}"; MINIPIX_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; MINIPIX_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; -MINIPIX_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_MINIPIX}"; +MINIPIX_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_MINIPIX}/ PREFIX= prefix="; MINIPIX_PACKAGES=" ntctty_flavour_minipix ptycon_flavour_minipix gzip_flavour_minipix bzip2_flavour_minipix xz_flavour_minipix @@ -1034,10 +919,9 @@ MINIPIX_PREFIX="${PREFIX_MINIPIX}"; : ${PKG_BZIP2_FLAVOUR_MINIPIX_PREFIX:=${PREFIX_MINIPIX}}; : ${PKG_GZIP_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="-static"}; : ${PKG_GZIP_FLAVOUR_MINIPIX_LDFLAGS_INSTALL_EXTRA:="-static"}; -: ${PKG_GZIP_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX_MINIPIX} OBJA= prefix="}; +: ${PKG_GZIP_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:="OBJA="}; : ${PKG_GZIP_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS}; : ${PKG_XZ_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD:="LIBTOOLFLAGS=-all-static"}; -: ${PKG_XZ_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX_MINIPIX}"}; : ${PKG_XZ_FLAVOUR_MINIPIX_PREFIX:=${PREFIX_MINIPIX}}; : ${PKG_BASH_CONFIGURE_ARGS_EXTRA:="--without-bash-malloc --with-curses"}; : ${PKG_BASH_FLAVOUR_MINIPIX_CONFIGURE_ARGS_EXTRA:="--enable-static-link --without-bash-malloc --with-curses"}; @@ -1054,9 +938,9 @@ MINIPIX_PREFIX="${PREFIX_MINIPIX}"; # # Build meta-targets # -DEVROOT_PACKAGES="host_toolchain native_toolchain runtime"; -DEV_PACKAGES="host_toolchain native_toolchain runtime dev_packages"; -WORLD_PACKAGES="host_toolchain native_toolchain runtime host_packages lib_packages leaf_packages minipix"; -ALL_TARGETS="host_toolchain native_toolchain runtime host_packages lib_packages leaf_packages minipix devroot dev world"; +DEVROOT_TARGET="host_toolchain native_toolchain runtime"; +DEV_TARGET="${DEVROOT_TARGET} dev_packages"; +WORLD_TARGET="${DEVROOT_TARGET} host_packages lib_packages leaf_packages minipix"; +ALL_TARGETS="${WORLD_TARGET} devroot dev world"; # vim:filetype=sh textwidth=0 diff --git a/vars/chainport.vars b/vars/chainport.vars deleted file mode 100644 index aa82e22..0000000 --- a/vars/chainport.vars +++ /dev/null @@ -1,13 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -pkg_chainport_build() { - :; -}; - -pkg_chainport_install() { - :; -}; - -# vim:filetype=sh diff --git a/vars/cmake.vars b/vars/cmake.vars index ceee815..bb03ae7 100644 --- a/vars/cmake.vars +++ b/vars/cmake.vars @@ -3,36 +3,18 @@ # pkg_cmake_configure() { - build_fileop cp "../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake" \ - "../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake"; - build_fileop rm "../cmake-${PKG_VERSION}-host"; - build_fileop mkdir "../cmake-${PKG_VERSION}-host"; - build_fileop cd "../cmake-${PKG_VERSION}-host"; - log_msg info "Bootstrapping cmake..."; - (unset AR CC CXX RANLIB; - "../cmake-${PKG_VERSION}/configure" ${PKG_CONFIGURE_ARGS}; - make ${DEFAULT_MAKEFLAGS_BUILD} "DESTDIR=${PREFIX}" install); - log_msg info "Finished bootstrapping cmake."; - stat "../cmake-${PKG_VERSION}"; -}; - -pkg_cmake_build() { - local _prefix; - build_fileop rm "../cmake-${PKG_VERSION}-native-${PKG_TARGET}"; - build_fileop mkdir "../cmake-${PKG_VERSION}-native-${PKG_TARGET}"; - build_fileop cd "${WORKDIR}/cmake-${PKG_VERSION}-native-${PKG_TARGET}"; + build_fileop cp "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/BSDOS.cmake" \ + "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/Midipix.cmake"; rm -f config.cache; - log_msg info "Calling cmake..."; - _prefix="${PREFIX}"; env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ - PREFIX="" cmake \ - -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ + PREFIX="" \ + cmake -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.a" \ - -DCMAKE_AR="${_prefix}/bin/${AR}" \ - -DCMAKE_C_COMPILER="${_prefix}/bin/${CC}" \ - -DCMAKE_CXX_COMPILER="${_prefix}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_AR="${PREFIX}/bin/${AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB="${_prefix}/bin/${RANLIB}" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${RANLIB}" \ -DCMAKE_SYSTEM_NAME=Midipix \ -DCMAKE_USE_SYSTEM_BZIP2=ON \ -DCMAKE_USE_SYSTEM_CURL=ON \ @@ -53,9 +35,7 @@ pkg_cmake_build() { -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ - "../cmake-${PKG_VERSION}"; - log_msg info "Calling make..."; - make ${DEFAULT_MAKEFLAGS_BUILD}; + "../cmake-${PKG_VERSION}"; }; # vim:filetype=sh diff --git a/vars/env.vars b/vars/env.vars new file mode 100644 index 0000000..48ffa22 --- /dev/null +++ b/vars/env.vars @@ -0,0 +1,81 @@ +# +# WARNING: Do _NOT_ use whitespaces (` ') or tab (` ') +# characters in any of the variables below save for MAKEFLAGS, +# PATH, and TIMESTAMP_FMT. +# +# $PREFIX_{CROSS,NATIVE} and $WORKDIR must be immediately +# beneath $PREFIX. $PREFIX must be o+rwx. The variables mentioned +# should not be forward slash-terminated. +# + +# Path names & variables +: ${PREFIX_ROOT:=${HOME}/midipix}; +: ${PREFIX:=${PREFIX_ROOT}/${ARCH}/${BUILD}}; +: ${PREFIX_MINIPIX:=${PREFIX}/minipix}; +: ${PREFIX_NATIVE:=${PREFIX}/native}; +: ${PREFIX_CROSS:=${PREFIX}/${TARGET}}; +: ${DLCACHEDIR:=${PREFIX_ROOT}/dlcache}; +: ${WORKDIR:=${PREFIX}/tmp}; +: ${BUILD_STEPS:="disabled:always setup_vars:always setup_env:always + all:abstract fetch:main extract:main clone:main patch_pre:main + build_dir:always distclean:main work_dir:always autoconf:main patch:main + configure:main clean:optional build:main install_pre:main install:main + strip:main finish:always"}; +: ${PKG_BUILD_VARS:="BUILD_CMDLINE BUILD_DIR BUILD_STEPS_DISABLE + BUILD_TYPE CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA + CFLAGS_INSTALL_EXTRA CONFIG_CACHE_EXTRA CONFIGURE CONFIGURE_ARGS + CONFIGURE_ARGS_EXTRA CXXFLAGS_CONFIGURE_EXTRA DISABLED + ENV_VARS_EXTRA INSTALL_FILES INSTALL_TARGET INSTALL_TARGET_EXTRA + LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA + LDFLAGS_INSTALL_EXTRA MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA + MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN NO_INSTALL_LIBS + NO_MAKE_INSTALL PREFIX_EXTRA SHA256SUM SLIBTOOL SUBDIR TARGET URL + URL_TYPE URLS_GIT VERSION"}; +: ${CLEAR_ENV_VARS_EXCEPT:="ARG_VERBOSE GITROOT_HEAD HOME PATH SHELL TERM TARBALL_SIGN_GPG_KEY USER"}; +: ${CLEAR_PREFIX_DIRS:="bin i686-nt32-midipix include lib lib64 libexec minipix native share tmp x86_64-nt64-midipix"}; + +# Default flags +: ${BUILD_CPUS:=1}; +: ${CFLAGS_DEBUG:="-g2 -O0"}; +: ${CFLAGS_DEBUG_HOST:="-g0 -O2"}; +: ${CFLAGS_DEBUG_RUNTIME:="-g3 -O0"}; +: ${CFLAGS_RELEASE:="-g0 -O2"}; +: ${CFLAGS_RELEASE_HOST:="-g0 -O2"}; +: ${CFLAGS_RELEASE_RUNTIME:="-g0 -O2"}; +: ${CFLAGS_DEFAULT:=$(get_var_unsafe "CFLAGS_$(toupper "${BUILD}")")}; +: ${CFLAGS_DEFAULT_HOST:=$(get_var_unsafe "CFLAGS_$(toupper "${BUILD}")_HOST")}; +: ${CFLAGS_DEFAULT_RUNTIME:=$(get_var_unsafe "CFLAGS_$(toupper "${BUILD}")_RUNTIME")}; +: ${CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT}}; +: ${DEFAULT_MAKEFLAGS_BUILD:=-j${BUILD_CPUS}}; +: ${GITROOT:=git://midipix.org}; +: ${GITROOT_HEAD:=git://midipix.org}; +: ${WGET_ARGS:="--no-check-certificate"}; + +# Build {log,status} & tarball names +: ${BUILD_LOG_FNAME:=${PREFIX}/build.log}; +: ${BUILD_LOG_LAST_FNAME:=${PREFIX}/build.log.last}; +: ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; +: ${LOG_ENV_VARS:="HOME PATH SHELL USER GITROOT ARCH BUILD HOST_TOOLCHAIN_CFLAGS_CONFIGURE NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE RUNTIME_CFLAGS_CONFIGURE LIB_PACKAGES_CFLAGS_CONFIGURE LEAF_PACKAGES_CFLAGS_CONFIGURE MINIPIX_CFLAGS_CONFIGURE PREFIX PREFIX_NATIVE PREFIX_CROSS WORKDIR"}; +: ${LOG_MSG_FAIL_COLOUR:=91}; +: ${LOG_MSG_INFO_COLOUR:=93}; +: ${LOG_MSG_SUCC_COLOUR:=92}; +: ${LOG_MSG_WARN_COLOUR:=96}; +: ${TARBALL_CROSS_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_cross.}; +: ${TARBALL_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}.}; +: ${TARBALL_MINIPIX_FNAME_PREFIX:=minipix-${ARCH}-${BUILD}.}; +: ${TARBALL_SIGN_GPG_KEY:=}; +: ${TARBALL_SRC_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_src.}; +: ${TARBALL_SUFFIX:=xz}; +: ${TIMESTAMP_FMT:="%Y/%m/%d %H:%M:%S"}; +: ${TIMESTAMP_FMT_STATUS_FILES:=%Y-%m-%d-%H-%M-%S}; + +# Check predicates +: ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint awk basename bunzip2 find flex gcc git groff gunzip install ld libtool lzma make makeinfo msgfmt nl nroff openssl paste patch python sed sha256sum sort tar tee tic tr uname wget xz"}; +: ${CHECK_PREREQ_FILES:="/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"}; +: ${CHECK_PREREQ_FILES_DYNAMIC:='/usr/share/groff/$(groff -v 2>/dev/null | awk '\''/^GNU groff version /{print $NF}'\'')/tmac/e.tmac'}; +: ${CHECK_PREREQ_PERL_MODULES:="autodie ExtUtils::MakeMaker"}; +: ${CHECK_PATH_VARS:="PREFIX PREFIX_NATIVE PREFIX_CROSS DLCACHEDIR WORKDIR"}; +: ${CHECK_UPDATES_SKIP:="gmp mpfr mpc binutils binutils_host install_strip_host pkgconf_host psxtypes pemagine dalist ntcon ntapi psxscl psxscl_strace ntctty ptycon pkgconf libevent libressl"}; +: ${CHECK_UPDATES_SHOW_NEW:=6}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/libcaca.vars b/vars/libcaca.vars deleted file mode 100644 index b9d77ac..0000000 --- a/vars/libcaca.vars +++ /dev/null @@ -1,21 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -pkg_libcaca_configure_pre() { - find "${WORKDIR}/${PKG_SUBDIR}" -name config.sub \ - -exec echo mv -- {} {}.orig \; \ - -exec mv -- {} {}.orig \; \ - -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ - -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; -}; - -pkg_toilet_configure_pre() { - find "${WORKDIR}/${PKG_SUBDIR}" -name config.sub \ - -exec echo mv -- {} {}.orig \; \ - -exec mv -- {} {}.orig \; \ - -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ - -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; -}; - -# vim:filetype=sh diff --git a/vars/libudns.vars b/vars/libudns.vars deleted file mode 100644 index 7d31f05..0000000 --- a/vars/libudns.vars +++ /dev/null @@ -1,13 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -pkg_libudns_configure_pre() { - find "${WORKDIR}/${PKG_SUBDIR}" -name config.sub \ - -exec echo mv -- {} {}.orig \; \ - -exec mv -- {} {}.orig \; \ - -exec echo install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \; \ - -exec install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" {} \;; -}; - -# vim:filetype=sh diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars index cced793..8f77adf 100644 --- a/vars/pkgconf_host.vars +++ b/vars/pkgconf_host.vars @@ -14,10 +14,7 @@ fi; "\$(dirname "\${0}")"/pkgconf --define-variable=prefix="\${PREFIX_NATIVE%/}/" "\${@}"; EOF chmod +x "${PREFIX}/bin/${TARGET}-pkg-config"; - if [ -e "${PREFIX}/bin/pkg-config" ]; then - build_fileop rm "${PREFIX}/bin/pkg-config"; - fi; - build_fileop ln_symbolic pkgconf "${PREFIX}/bin/pkg-config"; + build_fileop rm "${PREFIX}/bin/pkg-config"; }; pkg_pkgconf_install_post() { diff --git a/vars/toilet.vars b/vars/toilet.vars deleted file mode 120000 index 758040c..0000000 --- a/vars/toilet.vars +++ /dev/null @@ -1 +0,0 @@ -libcaca.vars \ No newline at end of file