diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-03 16:10:05 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-12-03 16:20:07 +0000 |
commit | ec19f02f81c206f54a89ef7e1f49715e90470c31 (patch) | |
tree | a4f6a307e70bad5c4a836a18cbf92b6b0afa0b83 /vars | |
parent | 16c9cd223ae1809124a163d13e820f19e18e7edc (diff) | |
download | midipix_build-ec19f02f81c206f54a89ef7e1f49715e90470c31.tar.bz2 midipix_build-ec19f02f81c206f54a89ef7e1f49715e90470c31.tar.xz |
Separate front end (build.sh, subr/build_*) from dispatcher.
Diffstat (limited to 'vars')
-rw-r--r-- | vars/build.vars | 458 | ||||
-rw-r--r-- | vars/chainport_host.vars | 10 | ||||
-rw-r--r-- | vars/clang_host.vars | 10 | ||||
-rw-r--r-- | vars/cmake.vars | 8 | ||||
-rw-r--r-- | vars/dist_digest.vars | 20 | ||||
-rw-r--r-- | vars/dist_tarballs.vars | 102 | ||||
-rw-r--r-- | vars/env.vars | 110 | ||||
-rw-r--r-- | vars/gcc.vars | 228 | ||||
l--------- | vars/gcc_full_host.vars (renamed from vars/gcc_native.vars) | 0 | ||||
l--------- | vars/gcc_libstdcpp_v3_host.vars (renamed from vars/gcc_stage1.vars) | 0 | ||||
l--------- | vars/gcc_runtime_host.vars (renamed from vars/gcc_stage1_cross_x86_64_w64_mingw32.vars) | 0 | ||||
l--------- | vars/gcc_stage1_cross_mingw32.vars (renamed from vars/gcc_stage1_native_x86_64_w64_mingw32.vars) | 0 | ||||
l--------- | vars/gcc_stage1_host.vars | 1 | ||||
l--------- | vars/gcc_stage1_native_mingw32.vars | 1 | ||||
-rw-r--r-- | vars/git.vars | 2 | ||||
-rw-r--r-- | vars/install_strip_host.vars | 8 | ||||
-rw-r--r-- | vars/libxml2.vars | 8 | ||||
-rw-r--r-- | vars/llvm_host.vars | 10 | ||||
-rw-r--r-- | vars/midipix.vars | 108 | ||||
-rw-r--r-- | vars/musl.vars | 117 | ||||
l--------- | vars/musl_full_host.vars (renamed from vars/musl_native.vars) | 0 | ||||
l--------- | vars/musl_no_complex_host.vars (renamed from vars/musl_no_complex.vars) | 0 | ||||
-rw-r--r-- | vars/nginx.vars | 2 | ||||
-rw-r--r-- | vars/perl.vars | 10 | ||||
-rw-r--r-- | vars/pkgconf_host.vars | 14 | ||||
-rw-r--r-- | vars/psxstub_host.vars (renamed from vars/psxstub.vars) | 10 | ||||
-rw-r--r-- | vars/python3.vars | 6 | ||||
-rw-r--r-- | vars/vim.vars | 2 |
28 files changed, 727 insertions, 518 deletions
diff --git a/vars/build.vars b/vars/build.vars index 2548a577..559e9b0e 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -15,165 +15,225 @@ gt_cv_int_divbyzero_sigfpe=yes xorg_cv_malloc0_returns_null=yes"}; # -# Build target invariants +# Build target host_tools # -INVARIANTS_BUILD_TYPE="host"; -INVARIANTS_PACKAGES="chainport"; -: ${PKG_CHAINPORT_URLS_GIT:="chainport=${DEFAULT_GITROOT}/ports/chainport"}; -: ${PKG_CHAINPORT_BUILD_STEPS_DISABLE:="configure:dynamic build:dynamic install_make:dynamic install:dynamic"}; -: ${PKG_CHAINPORT_NO_LOG_VARS:=1}; - -# -# Build target host_toolchain_deps -# -HOST_TOOLCHAIN_DEPS_BUILD_TYPE="host"; -HOST_TOOLCHAIN_DEPS_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; -HOST_TOOLCHAIN_DEPS_PACKAGES=" -slibtool_host perk_host mdso_host install_strip_host pkgconf_host binutils_host binutils_host_x86_64_w64_mingw32"; -HOST_TOOLCHAIN_DEPS_PREFIX="${PREFIX}"; +HOST_TOOLS_BUILD_TYPE="host"; +HOST_TOOLS_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; +HOST_TOOLS_PACKAGES=" +chainport_host slibtool_host perk_host +mdso_host install_strip_host pkgconf_host"; +HOST_TOOLS_PREFIX="${PREFIX}"; +: ${PKG_CHAINPORT_HOST_URLS_GIT:="chainport=${DEFAULT_GITROOT}/ports/chainport"}; +: ${PKG_CHAINPORT_HOST_BUILD_STEPS_DISABLE:=build}; +: ${PKG_CHAINPORT_HOST_NO_LOG_VARS:=1}; : ${PKG_SLIBTOOL_HOST_URLS_GIT:="slibtool=${DEFAULT_GITROOT}/slibtool"}; : ${PKG_SLIBTOOL_HOST_CONFIGURE_ARGS:=--host= --prefix=}; : ${PKG_PERK_HOST_URLS_GIT:="perk=${DEFAULT_GITROOT}/perk"}; : ${PKG_PERK_HOST_CONFIGURE_ARGS:="--prefix=/usr"}; -: ${PKG_PERK_HOST_INSTALL_FILES:="@perk=bin/${TARGET}-perk"}; +: ${PKG_PERK_HOST_INSTALL_FILES:="@perk=bin/${DEFAULT_TARGET}-perk"}; : ${PKG_MDSO_HOST_URLS_GIT:="mdso=${DEFAULT_GITROOT}/mdso"}; : ${PKG_MDSO_HOST_CONFIGURE_ARGS:="--prefix=/usr"}; -: ${PKG_MDSO_HOST_INSTALL_FILES:="@mdso=bin/${TARGET}-mdso /=${TARGET}/bin bin/mdso=${TARGET}/bin/mdso"}; +: ${PKG_MDSO_HOST_INSTALL_FILES:="@mdso=bin/${DEFAULT_TARGET}-mdso /=${DEFAULT_TARGET}/bin bin/mdso=${DEFAULT_TARGET}/bin/mdso"}; : ${PKG_INSTALL_STRIP_HOST_NO_LOG_VARS:=1}; : ${PKG_PKGCONF_HOST_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; : ${PKG_PKGCONF_HOST_VERSION:=0.9.12}; : ${PKG_PKGCONF_HOST_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_HOST_VERSION}/pkgconf-${PKG_PKGCONF_HOST_VERSION}.tar.bz2}; : ${PKG_PKGCONF_HOST_CONFIGURE_ARGS:="--prefix=${PREFIX_NATIVE}"}; : ${PKG_PKGCONF_HOST_MAKEFLAGS_INSTALL_EXTRA:=prefix=}; -: ${PKG_BINUTILS_HOST_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; -: ${PKG_BINUTILS_HOST_VERSION:=2.24.51}; -: ${PKG_BINUTILS_HOST_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_VERSION}.tar.bz2}; -: ${PKG_BINUTILS_HOST_CONFIGURE_ARGS:="--disable-werror --enable-deterministic-archives --prefix=${PREFIX} --target=${TARGET} --with-sysroot=${PREFIX_CROSS}"}; -: ${PKG_BINUTILS_HOST_INSTALL_FILES:="@${TARGET}-windmc=bin/windmc @${TARGET}-windres=bin/windres"}; -: ${PKG_BINUTILS_HOST_MAKEFLAGS_INSTALL_EXTRA:="PREFIX= prefix="}; -: ${PKG_BINUTILS_HOST_SLIBTOOL:=slibtool-static}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_VERSION:=2.24.51}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_VERSION}.tar.bz2}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_CONFIGURE_ARGS:="--disable-werror --enable-deterministic-archives --prefix=${PREFIX} --target=x86_64-w64-mingw32 --with-sysroot=${PREFIX_CROSS}"}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_MAKEFLAGS_INSTALL_EXTRA:="PREFIX= prefix="}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_SLIBTOOL:=slibtool-static}; -: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; + +# +# Build target host_toolchain_deps +# +HOST_TOOLCHAIN_DEPS_BUILD_TYPE="host"; +HOST_TOOLCHAIN_DEPS_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; +HOST_TOOLCHAIN_DEPS_PACKAGES=" +gmp_host mpfr_host mpc_host psxtypes_host"; +HOST_TOOLCHAIN_DEPS_PREFIX="${PREFIX_CROSS}"; +: ${PKG_GMP_HOST_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160}; +: ${PKG_GMP_HOST_VERSION:=5.1.3}; +: ${PKG_GMP_HOST_URL:=https://gmplib.org/download/gmp/gmp-${PKG_GMP_HOST_VERSION}.tar.bz2}; +: ${PKG_GMP_HOST_CONFIGURE_ARGS_EXTRA:=--disable-assembly}; +: ${PKG_GMP_HOST_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/gmp-${PKG_GMP_HOST_VERSION}.midipix.patch"}; +: ${PKG_MPFR_HOST_SHA256SUM:=79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b}; +: ${PKG_MPFR_HOST_VERSION:=3.1.2}; +: ${PKG_MPFR_HOST_URL:=ftp://ftp.gnu.org/gnu/mpfr/mpfr-${PKG_MPFR_HOST_VERSION}.tar.bz2}; +: ${PKG_MPFR_HOST_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE}}; +: ${PKG_MPC_HOST_SHA256SUM:=ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff}; +: ${PKG_MPC_HOST_VERSION:=1.0.1}; +: ${PKG_MPC_HOST_URL:=ftp://ftp.gnu.org/gnu/mpc/mpc-${PKG_MPC_HOST_VERSION}.tar.gz}; +: ${PKG_MPC_HOST_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE}}; +: ${PKG_PSXTYPES_HOST_URLS_GIT:=psxtypes=${DEFAULT_GITROOT}/psxtypes}; +: ${PKG_PSXTYPES_HOST_BUILD_STEPS_DISABLE:=build}; +: ${PKG_PSXTYPES_HOST_IN_TREE:=1}; # # Build target host_toolchain # HOST_TOOLCHAIN_BUILD_TYPE="host"; -HOST_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +HOST_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; HOST_TOOLCHAIN_PACKAGES=" -gcc_stage1_cross_x86_64_w64_mingw32 gcc_stage1 psxstub musl_no_complex -gcc_runtime musl_full gcc_libstdcpp_v3 gcc_full psxtypes_host ldso_host"; +binutils_host gcc_stage1_host psxstub_host musl_no_complex_host gcc_runtime_host +musl_full_host gcc_libstdcpp_v3_host gcc_full_host ldso_host"; HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; -: ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_VERSION:=4.6.4}; -: ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; -: ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_GCC_STAGE1_VERSION:=4.6.4}; -: ${PKG_GCC_STAGE1_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_PSXSTUB_URLS_GIT:="psxstub=${DEFAULT_GITROOT}/psxstub"}; -: ${PKG_PSXSTUB_BUILD_DIR:=psxstub}; -: ${PKG_PSXSTUB_BUILD_STEPS_DISABLE:=build:dynamic}; -: ${PKG_MUSL_NO_COMPLEX_VERSION:=1.1.12}; -: ${PKG_MUSL_NO_COMPLEX_BASE_DIR:=${WORKDIR}/musl-build}; -: ${PKG_GCC_RUNTIME_VERSION:=4.6.4}; -: ${PKG_GCC_RUNTIME_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_MUSL_FULL_VERSION:=1.1.12}; -: ${PKG_MUSL_FULL_BASE_DIR:=${WORKDIR}/musl-build}; -: ${PKG_GCC_LIBSTDCPP_V3_VERSION:=4.6.4}; -: ${PKG_GCC_LIBSTDCPP_V3_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_GCC_FULL_VERSION:=4.6.4}; -: ${PKG_GCC_FULL_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_PSXTYPES_HOST_URLS_GIT:=psxtypes=${DEFAULT_GITROOT}/psxtypes}; -: ${PKG_PSXTYPES_HOST_BUILD_STEPS_DISABLE:=build:dynamic}; +: ${PKG_BINUTILS_HOST_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; +: ${PKG_BINUTILS_HOST_VERSION:=2.24.51}; +: ${PKG_BINUTILS_HOST_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_VERSION}.tar.bz2}; +: ${PKG_BINUTILS_HOST_CONFIGURE_ARGS:="--disable-werror --enable-deterministic-archives --prefix=${PREFIX} --target=${DEFAULT_TARGET} --with-sysroot=${PREFIX_CROSS}"}; +: ${PKG_BINUTILS_HOST_INSTALL_FILES:="@${DEFAULT_TARGET}-windmc=bin/windmc @${DEFAULT_TARGET}-windres=bin/windres"}; +: ${PKG_BINUTILS_HOST_MAKEFLAGS_INSTALL_EXTRA:="PREFIX= prefix="}; +: ${PKG_BINUTILS_HOST_LIBTOOL:=slibtool-static}; +: ${PKG_BINUTILS_HOST_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/binutils-${PKG_BINUTILS_HOST_VERSION}.midipix.patch"}; +: ${PKG_BINUTILS_HOST_PREFIX:=${PREFIX}}; +: ${PKG_GCC_STAGE1_HOST_VERSION:=4.6.4}; +: ${PKG_GCC_STAGE1_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-build}; +: ${PKG_GCC_STAGE1_HOST_PREFIX:=${PREFIX}}; +: ${PKG_PSXSTUB_HOST_URLS_GIT:="psxstub=${DEFAULT_GITROOT}/psxstub"}; +: ${PKG_PSXSTUB_HOST_IN_TREE:=1}; +: ${PKG_PSXSTUB_HOST_BUILD_STEPS_DISABLE:=build}; +: ${PKG_PSXSTUB_HOST_ENV_VARS_EXTRA:=TARGET=${DEFAULT_TARGET}}; +: ${PKG_MUSL_NO_COMPLEX_HOST_VERSION:=1.1.12}; +: ${PKG_MUSL_NO_COMPLEX_HOST_BASE_DIR:=${BUILD_WORKDIR}/musl-build}; +: ${PKG_GCC_RUNTIME_HOST_VERSION:=4.6.4}; +: ${PKG_GCC_RUNTIME_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-build}; +: ${PKG_GCC_RUNTIME_HOST_NO_CLEAN_BASE_DIR:=1}; +: ${PKG_GCC_RUNTIME_HOST_PREFIX:=${PREFIX}}; +: ${PKG_MUSL_FULL_HOST_VERSION:=1.1.12}; +: ${PKG_MUSL_FULL_HOST_BASE_DIR:=${BUILD_WORKDIR}/musl-build}; +: ${PKG_MUSL_FULL_HOST_NO_CLEAN_BASE_DIR:=1}; +: ${PKG_GCC_LIBSTDCPP_V3_HOST_VERSION:=4.6.4}; +: ${PKG_GCC_LIBSTDCPP_V3_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-build}; +: ${PKG_GCC_LIBSTDCPP_V3_HOST_NO_CLEAN_BASE_DIR:=1}; +: ${PKG_GCC_LIBSTDCPP_V3_HOST_PREFIX:=${PREFIX}}; +: ${PKG_GCC_FULL_HOST_VERSION:=4.6.4}; +: ${PKG_GCC_FULL_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-build}; +: ${PKG_GCC_FULL_HOST_NO_CLEAN_BASE_DIR:=1}; +: ${PKG_GCC_FULL_HOST_PREFIX:=${PREFIX}}; : ${PKG_LDSO_HOST_URLS_GIT:=pemagine=${DEFAULT_GITROOT}/pemagine}; : ${PKG_LDSO_HOST_BUILD_TYPE:=cross}; : ${PKG_LDSO_HOST_CFLAGS_CONFIGURE_EXTRA:="-O0 -DPE_LDSO -I${PREFIX_CROSS}/include"}; -: ${PKG_LDSO_HOST_CONFIGURE_ARGS:="--host=${TARGET} --prefix= --target=${TARGET} --disable-shared"}; -: ${PKG_LDSO_HOST_INSTALL_FILES:="@../${TARGET}/lib/libldso.a=${PREFIX}/lib/libldso.a"}; +: ${PKG_LDSO_HOST_CONFIGURE_ARGS:="--host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET} --disable-shared"}; +: ${PKG_LDSO_HOST_INSTALL_FILES:="@../${DEFAULT_TARGET}/lib/libldso.a=${PREFIX}/lib/libldso.a"}; : ${PKG_LDSO_HOST_MAKEFLAGS_BUILD_EXTRA:=STATIC_LIB_NAME=libldso.a}; : ${PKG_LDSO_HOST_MAKEFLAGS_INSTALL_EXTRA:=STATIC_LIB_NAME=libldso.a}; # +# Build target host_toolchain_mingw32 +# +HOST_TOOLCHAIN_MINGW32_BUILD_TYPE="host"; +HOST_TOOLCHAIN_MINGW32_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix=${PREFIX} --target=x86_64-w64-mingw32"; +HOST_TOOLCHAIN_MINGW32_PACKAGES=" +binutils_host_mingw32 gcc_stage1_cross_mingw32"; +HOST_TOOLCHAIN_MINGW32_TARGET="x86_64-w64-mingw32"; +: ${PKG_BINUTILS_HOST_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; +: ${PKG_BINUTILS_HOST_MINGW32_VERSION:=2.24.51}; +: ${PKG_BINUTILS_HOST_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_MINGW32_VERSION}.tar.bz2}; +: ${PKG_BINUTILS_HOST_MINGW32_CONFIGURE_ARGS_EXTRA:="--disable-werror --enable-deterministic-archives --with-sysroot=${PREFIX_MINGW32}"}; +: ${PKG_BINUTILS_HOST_MINGW32_MAKEFLAGS_INSTALL:="PREFIX= prefix="}; +: ${PKG_BINUTILS_HOST_MINGW32_LIBTOOL:=slibtool-static}; +: ${PKG_BINUTILS_HOST_MINGW32_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/binutils-${PKG_BINUTILS_HOST_MINGW32_VERSION}.midipix.patch"}; +: ${PKG_BINUTILS_HOST_MINGW32_PREFIX:=${PREFIX}}; +: ${PKG_GCC_STAGE1_CROSS_MINGW32_VERSION:=4.6.4}; +: ${PKG_GCC_STAGE1_CROSS_MINGW32_BASE_DIR:=${BUILD_WORKDIR}/gcc-build-mingw32}; +: ${PKG_GCC_STAGE1_CROSS_MINGW32_PREFIX:=${PREFIX}}; + +# +# Build target native_tools +# +NATIVE_TOOLS_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix=/ --target=${DEFAULT_TARGET}"; +NATIVE_TOOLS_PACKAGES=" +slibtool perk pkgconf"; +NATIVE_TOOLS_PREFIX="${PREFIX_NATIVE}"; +: ${PKG_SLIBTOOL_URLS_GIT:="slibtool=git://midipix.org/slibtool"}; +: ${PKG_SLIBTOOL_CONFIGURE_ARGS:="--host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"}; +: ${PKG_PERK_URLS_GIT:="perk=${DEFAULT_GITROOT}/perk"}; +: ${PKG_PERK_CONFIGURE_ARGS:="--prefix=/usr --target=${DEFAULT_TARGET}"}; +: ${PKG_PERK_INSTALL_FILES:="@perk=bin/${DEFAULT_TARGET}-perk"}; +: ${PKG_PKGCONF_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; +: ${PKG_PKGCONF_VERSION:=0.9.12}; +: ${PKG_PKGCONF_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_VERSION}/pkgconf-${PKG_PKGCONF_VERSION}.tar.bz2}; +: ${PKG_PKGCONF_INSTALL_FILES:=/=lib/pkgconfig}; + +# # Build target native_toolchain_deps # -NATIVE_TOOLCHAIN_DEPS_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix=/ --target=${TARGET}"; +NATIVE_TOOLCHAIN_DEPS_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix=/ --target=${DEFAULT_TARGET}"; NATIVE_TOOLCHAIN_DEPS_PACKAGES=" -gmp_host libelf mpfr_host mpc_host perk pkgconf slibtool"; +gmp libelf mpfr mpc"; NATIVE_TOOLCHAIN_DEPS_PREFIX="${PREFIX_NATIVE}"; -: ${PKG_GMP_HOST_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160}; -: ${PKG_GMP_HOST_VERSION:=5.1.3}; -: ${PKG_GMP_HOST_URL:=https://gmplib.org/download/gmp/gmp-${PKG_GMP_HOST_VERSION}.tar.bz2}; -: ${PKG_GMP_HOST_CONFIGURE_ARGS_EXTRA:=--disable-assembly}; -: ${PKG_GMP_HOST_PREFIX:=${PREFIX_CROSS}}; +: ${PKG_GMP_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160}; +: ${PKG_GMP_VERSION:=5.1.3}; +: ${PKG_GMP_URL:=https://gmplib.org/download/gmp/gmp-${PKG_GMP_VERSION}.tar.bz2}; +: ${PKG_GMP_CONFIGURE_ARGS_EXTRA:=--disable-assembly}; +: ${PKG_GMP_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/gmp-${PKG_GMP_VERSION}.midipix.patch"}; : ${PKG_LIBELF_SHA256SUM:=591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d}; : ${PKG_LIBELF_VERSION:=0.8.13}; : ${PKG_LIBELF_URL:=http://www.mr511.de/software/libelf-${PKG_LIBELF_VERSION}.tar.gz}; -: ${PKG_LIBELF_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix=${PREFIX_NATIVE} --target=${TARGET}"}; -: ${PKG_MPFR_HOST_SHA256SUM:=79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b}; -: ${PKG_MPFR_HOST_VERSION:=3.1.2}; -: ${PKG_MPFR_HOST_URL:=ftp://ftp.gnu.org/gnu/mpfr/mpfr-${PKG_MPFR_HOST_VERSION}.tar.bz2}; -: ${PKG_MPFR_HOST_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE}}; -: ${PKG_MPFR_HOST_PREFIX:=${PREFIX_CROSS}}; -: ${PKG_MPC_HOST_SHA256SUM:=ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff}; -: ${PKG_MPC_HOST_VERSION:=1.0.1}; -: ${PKG_MPC_HOST_URL:=ftp://ftp.gnu.org/gnu/mpc/mpc-${PKG_MPC_HOST_VERSION}.tar.gz}; -: ${PKG_MPC_HOST_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE}}; -: ${PKG_MPC_HOST_PREFIX:=${PREFIX_CROSS}}; -: ${PKG_PERK_URLS_GIT:="perk=${DEFAULT_GITROOT}/perk"}; -: ${PKG_PERK_CONFIGURE_ARGS:="--prefix=/usr --target=${TARGET}"}; -: ${PKG_PERK_INSTALL_FILES:="@perk=bin/${TARGET}-perk"}; -: ${PKG_PKGCONF_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f}; -: ${PKG_PKGCONF_VERSION:=0.9.12}; -: ${PKG_PKGCONF_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_VERSION}/pkgconf-${PKG_PKGCONF_VERSION}.tar.bz2}; -: ${PKG_PKGCONF_INSTALL_FILES:=/=lib/pkgconfig}; -: ${PKG_SLIBTOOL_URLS_GIT:="slibtool=git://midipix.org/slibtool"}; -: ${PKG_SLIBTOOL_CONFIGURE_ARGS:="--host=${TARGET} --prefix= --target=${TARGET}"}; +: ${PKG_LIBELF_MAKE_INSTALL_VNAME:=prefix}; +: ${PKG_LIBELF_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/libelf-${PKG_LIBELF_VERSION}.midipix.patch"}; +: ${PKG_MPFR_SHA256SUM:=79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b}; +: ${PKG_MPFR_VERSION:=3.1.2}; +: ${PKG_MPFR_URL:=ftp://ftp.gnu.org/gnu/mpfr/mpfr-${PKG_MPFR_VERSION}.tar.bz2}; +: ${PKG_MPFR_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE}}; +: ${PKG_MPC_SHA256SUM:=ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff}; +: ${PKG_MPC_VERSION:=1.0.1}; +: ${PKG_MPC_URL:=ftp://ftp.gnu.org/gnu/mpc/mpc-${PKG_MPC_VERSION}.tar.gz}; +: ${PKG_MPC_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE}}; # # Build target native_toolchain # -NATIVE_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix=/ --target=${TARGET}"; +NATIVE_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix=/ --target=${DEFAULT_TARGET}"; NATIVE_TOOLCHAIN_PACKAGES=" -binutils binutils_x86_64_w64_mingw32 musl_native gcc_native gcc_stage1_native_x86_64_w64_mingw32 mdso"; +binutils musl_full gcc_full mdso"; NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}"; : ${PKG_BINUTILS_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; : ${PKG_BINUTILS_VERSION:=2.24.51}; : ${PKG_BINUTILS_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2}; : ${PKG_BINUTILS_CONFIGURE_ARGS_EXTRA:="--enable-deterministic-archives --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"}; -: ${PKG_BINUTILS_SLIBTOOL:=slibtool-static}; -: ${PKG_BINUTILS_X86_64_W64_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; -: ${PKG_BINUTILS_X86_64_W64_MINGW32_VERSION:=2.24.51}; -: ${PKG_BINUTILS_X86_64_W64_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_X86_64_W64_MINGW32_VERSION}.tar.bz2}; -: ${PKG_BINUTILS_X86_64_W64_MINGW32_CONFIGURE_ARGS:="--disable-nls --enable-deterministic-archives --host=${TARGET} --prefix=/ --target=x86_64-w64-mingw32 --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"}; -: ${PKG_BINUTILS_X86_64_W64_MINGW32_SLIBTOOL:=slibtool-static}; -: ${PKG_MUSL_NATIVE_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; -: ${PKG_MUSL_NATIVE_VERSION:=1.1.12}; -: ${PKG_MUSL_NATIVE_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_NATIVE_VERSION}.tar.gz}; -: ${PKG_MUSL_NATIVE_BASE_DIR:=${WORKDIR}/musl-build}; -: ${PKG_GCC_NATIVE_VERSION:=4.6.4}; -: ${PKG_GCC_NATIVE_BASE_DIR:=${WORKDIR}/gcc-build}; -: ${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_VERSION:=4.6.4}; -: ${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; -: ${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_BASE_DIR:=${WORKDIR}/gcc-build}; +: ${PKG_BINUTILS_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/binutils-${PKG_BINUTILS_VERSION}.midipix.patch"}; +: ${PKG_BINUTILS_LIBTOOL:=slibtool-static}; +: ${PKG_MUSL_FULL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; +: ${PKG_MUSL_FULL_VERSION:=1.1.12}; +: ${PKG_MUSL_FULL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_NATIVE_VERSION}.tar.gz}; +: ${PKG_MUSL_FULL_BASE_DIR:=${BUILD_WORKDIR}/musl-build}; +: ${PKG_MUSL_FULL_NO_CLEAN_BASE_DIR:=1}; +: ${PKG_GCC_FULL_VERSION:=4.6.4}; +: ${PKG_GCC_FULL_BASE_DIR:=${BUILD_WORKDIR}/gcc-build}; +: ${PKG_GCC_FULL_NO_CLEAN_BASE_DIR:=1}; : ${PKG_MDSO_URLS_GIT:="mdso=${DEFAULT_GITROOT}/mdso"}; -: ${PKG_MDSO_CONFIGURE_ARGS:="--prefix=/usr --target=${TARGET}"}; -: ${PKG_MDSO_INSTALL_FILES:="@mdso=bin/${TARGET}-mdso /=${TARGET}/bin @../../bin/mdso=${TARGET}/bin/mdso"}; +: ${PKG_MDSO_CONFIGURE_ARGS:="--prefix=/usr --target=${DEFAULT_TARGET}"}; +: ${PKG_MDSO_INSTALL_FILES:="@mdso=bin/${DEFAULT_TARGET}-mdso /=${DEFAULT_TARGET}/bin @../../bin/mdso=${DEFAULT_TARGET}/bin/mdso"}; + +# +# Build target native_toolchain_mingw32 +# +NATIVE_TOOLCHAIN_MINGW32_CONFIGURE_ARGS="--disable-nls --host=${DEFAULT_TARGET} --prefix=/ --target=x86_64-w64-mingw32"; +NATIVE_TOOLCHAIN_MINGW32_PACKAGES=" +binutils_mingw32 gcc_stage1_native_mingw32"; +NATIVE_TOOLCHAIN_MINGW32_PREFIX="${PREFIX_NATIVE}"; +: ${PKG_BINUTILS_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; +: ${PKG_BINUTILS_MINGW32_VERSION:=2.24.51}; +: ${PKG_BINUTILS_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_MINGW32_VERSION}.tar.bz2}; +: ${PKG_BINUTILS_MINGW32_CONFIGURE_ARGS_EXTRA:="--enable-deterministic-archives --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"}; +: ${PKG_BINUTILS_MINGW32_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/binutils-${PKG_BINUTILS_MINGW32_VERSION}.midipix.patch"}; +: ${PKG_BINUTILS_MINGW32_LIBTOOL:=slibtool-static}; +: ${PKG_GCC_STAGE1_NATIVE_MINGW32_VERSION:=4.6.4}; +: ${PKG_GCC_STAGE1_NATIVE_MINGW32_TARGET:=x86_64-w64-mingw32}; +: ${PKG_GCC_STAGE1_NATIVE_MINGW32_BASE_DIR:=${BUILD_WORKDIR}/gcc-build-mingw32}; +: ${PKG_GCC_STAGE1_NATIVE_MINGW32_NO_CLEAN_BASE_DIR:=1}; # # Build target native_runtime # NATIVE_RUNTIME_BUILD_TYPE="native"; NATIVE_RUNTIME_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS_RUNTIME}"; -NATIVE_RUNTIME_CONFIGURE_ARGS="--prefix= --strict --host=${TARGET}"; +NATIVE_RUNTIME_CONFIGURE_ARGS="--prefix= --strict --host=${DEFAULT_TARGET}"; NATIVE_RUNTIME_ENV_VARS_EXTRA="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"; NATIVE_RUNTIME_PACKAGES="psxtypes pemagine dalist ldso ntcon ntapi psxscl psxscl_strace ntctty ptycon u16ports"; NATIVE_RUNTIME_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PSXTYPES_URLS_GIT:=psxtypes=${DEFAULT_GITROOT}/psxtypes}; : ${PKG_PSXTYPES_MAKEFLAGS_BUILD:="DESTDIR=${PREFIX_NATIVE}"}; +: ${PKG_PSXTYPES_IN_TREE:=1}; : ${PKG_PEMAGINE_URLS_GIT:=pemagine=${DEFAULT_GITROOT}/pemagine}; : ${PKG_PEMAGINE_CFLAGS_CONFIGURE_EXTRA:=-O0}; : ${PKG_PEMAGINE_INSTALL_TARGET_EXTRA:=install-lib}; @@ -182,7 +242,7 @@ NATIVE_RUNTIME_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LDSO_URLS_GIT:=pemagine=${DEFAULT_GITROOT}/pemagine}; : ${PKG_LDSO_CFLAGS_CONFIGURE_EXTRA:="-O0 -DPE_LDSO"}; : ${PKG_LDSO_CONFIGURE_ARGS_EXTRA:=--disable-shared}; -: ${PKG_LDSO_INSTALL_FILES:="/=${TARGET}/lib @../../lib/libldso.a=${TARGET}/lib/libldso.a"}; +: ${PKG_LDSO_INSTALL_FILES:="/=${DEFAULT_TARGET}/lib @../../lib/libldso.a=${DEFAULT_TARGET}/lib/libldso.a"}; : ${PKG_LDSO_MAKEFLAGS_BUILD_EXTRA:=STATIC_LIB_NAME=libldso.a}; : ${PKG_LDSO_MAKEFLAGS_INSTALL_EXTRA:=STATIC_LIB_NAME=libldso.a}; : ${PKG_NTCON_URLS_GIT:=ntcon=${DEFAULT_GITROOT}/ntcon}; @@ -193,7 +253,7 @@ NATIVE_RUNTIME_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PSXSCL_CFLAGS_CONFIGURE_EXTRA:=-O0}; : ${PKG_PSXSCL_INSTALL_TARGET_EXTRA:=install-lib}; : ${PKG_PSXSCL_STRACE_URLS_GIT:=psxscl=${DEFAULT_GITROOT_HEAD}/psxscl}; -: ${PKG_PSXSCL_STRACE_BUILD_STEPS_DISABLE:=install_make:dynamic}; +: ${PKG_PSXSCL_STRACE_BUILD_STEPS_DISABLE:=install_make}; : ${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_NTCTTY_URLS_GIT:=ntctty=${DEFAULT_GITROOT_HEAD}/ntctty}; @@ -233,22 +293,25 @@ HOST_PACKAGES_DEPS_PREFIX="${PREFIX}"; : ${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_LIBFFI_HOST_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/libffi-${PKG_LIBFFI_HOST_VERSION}.midipix.patch"}; : ${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_BUILD_STEPS_DISABLE:=configure_patch:dynamic}; +: ${PKG_GLIB_HOST_BUILD_STEPS_DISABLE:=configure_patch}; : ${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_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX}/lib}; : ${PKG_INFOUNZIP_HOST_URLS_GIT:=infounzip-host=https://github.com/Redfoxmoon3/infounzip.git@master}; +: ${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_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_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:=configure_patch:dynamic}; +: ${PKG_RUBY_HOST_BUILD_STEPS_DISABLE:=configure_patch}; : ${PKG_RUBY_HOST_CFLAGS_CONFIGURE:="-g0 -O1"}; : ${PKG_RUBY_HOST_CONFIGURE_ARGS_EXTRA:="--disable-install-rdoc --with-out-ext=fiddle"}; @@ -256,7 +319,7 @@ HOST_PACKAGES_DEPS_PREFIX="${PREFIX}"; # Build target native_packages_deps # NATIVE_PACKAGES_DEPS_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_DEPS_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --program-prefix= --target=${TARGET}"; +NATIVE_PACKAGES_DEPS_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --program-prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_DEPS_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_DEPS_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_DEPS_PACKAGES=" @@ -264,7 +327,7 @@ 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 cmake gmp mpfr mpc"; +sqlite3 w32api w32lib xz cmake"; NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_EXPAT_SHA256SUM:=d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff}; : ${PKG_EXPAT_VERSION:=2.2.0}; @@ -283,13 +346,13 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_APR_UTIL_SHA256SUM:=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b}; : ${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-native-${TARGET}/obj"}; -: ${PKG_APR_UTIL_INSTALL_FILES:=apu-1-config=${PREFIX}/bin/${TARGET}-apu-1-config}; +: ${PKG_APR_UTIL_CONFIGURE_ARGS_EXTRA:="--with-apr=${BUILD_WORKDIR}/apr-native-${DEFAULT_TARGET}/obj"}; +: ${PKG_APR_UTIL_INSTALL_FILES:=apu-1-config=${PREFIX}/bin/${DEFAULT_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_STEPS_DISABLE:=build_clean:variant}; : ${PKG_BZIP2_CFLAGS_BUILD_EXTRA:=${LIB_PACKAGES_CFLAGS_CONFIGURE}}; +: ${PKG_BZIP2_IN_TREE:=1}; : ${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_MAKE_INSTALL_VNAME:=PREFIX}; @@ -301,8 +364,9 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBZ_SHA256SUM:=abcc2831b7a0e891d0875fa852e9b9510b420d843d3d20aad010f65493fe4f7b}; : ${PKG_LIBZ_VERSION:=1.2.8.2015.12.26}; : ${PKG_LIBZ_URL:=https://sortix.org/libz/release/libz-${PKG_LIBZ_VERSION}.tar.gz}; -: ${PKG_LIBZ_CONFIGURE_ARGS:=--host=${TARGET} --prefix= --target=${TARGET}}; +: ${PKG_LIBZ_CONFIGURE_ARGS:=--host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}}; : ${PKG_LMDB_URLS_GIT:="lmdb=https://github.com/Redfoxmoon3/lmdb.git@mdb.master"}; +: ${PKG_LMDB_IN_TREE:=1}; : ${PKG_LIBPNG_SHA256SUM:=2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6}; : ${PKG_LIBPNG_VERSION:=1.6.34}; : ${PKG_LIBPNG_URL:=https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/${PKG_LIBPNG_VERSION}/libpng-${PKG_LIBPNG_VERSION}.tar.xz}; @@ -322,6 +386,7 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBFFI_VERSION:=3.2.1}; : ${PKG_LIBFFI_URL:=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_VERSION}.tar.gz}; : ${PKG_LIBFFI_CFLAGS_CONFIGURE_EXTRA:=-D_WIN64}; +: ${PKG_LIBFFI_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/libffi-${PKG_LIBFFI_VERSION}.midipix.patch"}; : ${PKG_GDBM_SHA256SUM:=9d252cbd7d793f7b12bcceaddda98d257c14f4d1890d851c386c37207000a253}; : ${PKG_GDBM_VERSION:=1.13}; : ${PKG_GDBM_URL:=ftp://ftp.gnu.org/gnu/gdbm/gdbm-${PKG_GDBM_VERSION}.tar.gz}; @@ -337,7 +402,7 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${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_CONFIGURE_ARGS:=--host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}}; : ${PKG_GZIP_MAKEFLAGS_BUILD_EXTRA:=OBJA= prefix=}; : ${PKG_GZIP_MAKEFLAGS_INSTALL_EXTRA:="OBJA="}; : ${PKG_LIBARCHIVE_SHA256SUM:=691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f}; @@ -362,7 +427,8 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBFETCH_VERSION:=2.33}; : ${PKG_LIBFETCH_URL:=https://sources.archlinux.org/other/libfetch/libfetch-${PKG_LIBFETCH_VERSION}.tar.gz}; : ${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_IN_TREE:=1}; +: ${PKG_LIBFETCH_MAKEFLAGS_BUILD_EXTRA:="E=echo Q= AR=${DEFAULT_TARGET}-ar CC=${DEFAULT_TARGET}-gcc LD=${DEFAULT_TARGET}-gcc"}; : ${PKG_LIBFETCH_MAKEFLAGS_INSTALL_EXTRA:="E=echo Q="}; : ${PKG_LIBGPG_ERROR_SHA256SUM:=f628f75843433b38b05af248121beb7db5bd54bb2106f384edac39934261320c}; : ${PKG_LIBGPG_ERROR_VERSION:=1.25}; @@ -371,7 +437,7 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_LIBASSUAN_VERSION:=2.4.3}; : ${PKG_LIBASSUAN_URL:=https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-${PKG_LIBASSUAN_VERSION}.tar.bz2}; : ${PKG_LIBFIRM_URLS_GIT:="libfirm=http://pp.info.uni-karlsruhe.de/git/libfirm.git@master bfirm=${DEFAULT_GITROOT}/compilers/bfirm@main"}; -: ${PKG_LIBFIRM_BASE_DIR:=${WORKDIR}/cparser+libfirm-build}; +: ${PKG_LIBFIRM_BASE_DIR:=${BUILD_WORKDIR}/cparser+libfirm-build}; : ${PKG_LIBFIRM_BUILD_DIR:=build/libfirm}; : ${PKG_LIBFIRM_CONFIGURE:=bfirm/configure}; : ${PKG_LIBFIRM_CONFIGURE_ARGS:="--source-dir=../../libfirm --prefix="}; @@ -387,8 +453,9 @@ NATIVE_PACKAGES_DEPS_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_IN_TREE:=1}; : ${PKG_LUA_MAKE_INSTALL_VNAME:=INSTALL_TOP}; -: ${PKG_LUA_MAKEFLAGS_BUILD_EXTRA:="CC=${TARGET}-gcc midipix"}; +: ${PKG_LUA_MAKEFLAGS_BUILD_EXTRA:="CC=${DEFAULT_TARGET}-gcc midipix"}; : ${PKG_NCURSES_SHA256SUM:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260}; : ${PKG_NCURSES_VERSION:=6.0}; : ${PKG_NCURSES_URL:=https://ftp.gnu.org/gnu/ncurses/ncurses-${PKG_NCURSES_VERSION}.tar.gz}; @@ -418,10 +485,10 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${PKG_SQLITE3_URL:=https://sqlite.org/2017/sqlite-autoconf-${PKG_SQLITE3_VERSION}.tar.gz}; : ${PKG_SQLITE3_CONFIGURE_ARGS_EXTRA:=--disable-static-shell}; : ${PKG_W32API_URLS_GIT:="w32api=git://github.com/midipix-ports/w32api.ports@main"}; +: ${PKG_W32API_IN_TREE:=1}; : ${PKG_W32API_MAKEFLAGS_BUILD:="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_W32LIB_CONFIGURE_ARGS:="--host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_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}; @@ -430,24 +497,12 @@ NATIVE_PACKAGES_DEPS_PREFIX="${PREFIX_NATIVE}"; : ${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=${DEFAULT_BUILD_CPUS} --prefix="}; -: ${PKG_GMP_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160}; -: ${PKG_GMP_VERSION:=5.1.3}; -: ${PKG_GMP_URL:=https://gmplib.org/download/gmp/gmp-${PKG_GMP_VERSION}.tar.bz2}; -: ${PKG_GMP_CONFIGURE_ARGS_EXTRA:=--disable-assembly}; -: ${PKG_MPFR_SHA256SUM:=79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b}; -: ${PKG_MPFR_VERSION:=3.1.2}; -: ${PKG_MPFR_URL:=ftp://ftp.gnu.org/gnu/mpfr/mpfr-${PKG_MPFR_VERSION}.tar.bz2}; -: ${PKG_MPFR_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE}}; -: ${PKG_MPC_SHA256SUM:=ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff}; -: ${PKG_MPC_VERSION:=1.0.1}; -: ${PKG_MPC_URL:=ftp://ftp.gnu.org/gnu/mpc/mpc-${PKG_MPC_VERSION}.tar.gz}; -: ${PKG_MPC_CONFIGURE_ARGS_EXTRA:=--with-gmp=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE}}; # # Build target native_packages_deps_x11 # NATIVE_PACKAGES_DEPS_X11_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_DEPS_X11_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --program-prefix= --target=${TARGET}"; +NATIVE_PACKAGES_DEPS_X11_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --program-prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_DEPS_X11_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_DEPS_X11_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_DEPS_X11_PACKAGES=" @@ -589,7 +644,7 @@ DEV_PACKAGES_PREFIX="${NATIVE_PACKAGES_DEPS_PREFIX}"; # Build target native_packages_cmdline # NATIVE_PACKAGES_CMDLINE_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_CMDLINE_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +NATIVE_PACKAGES_CMDLINE_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_CMDLINE_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_CMDLINE_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_CMDLINE_PACKAGES=" @@ -609,8 +664,8 @@ NATIVE_PACKAGES_CMDLINE_PREFIX="${PREFIX_NATIVE}"; : ${PKG_DASH_SHA256SUM:=5ecd5bea72a93ed10eb15a1be9951dd51b52e5da1d4a7ae020efd9826b49e659}; : ${PKG_DASH_VERSION:=0.5.9.1}; : ${PKG_DASH_URL:=https://bintray.com/termux/upstream/download_file?file_path=dash-${PKG_DASH_VERSION}.tar.gz}; +: ${PKG_DASH_FNAME:=dash-${PKG_DASH_VERSION}.tar.gz}; : ${PKG_DASH_INSTALL_FILES:=@dash=bin/sh}; -: ${PKG_DASH_SUBDIR:=dash-${PKG_DASH_VERSION}}; : ${PKG_DATAMASH_SHA256SUM:=e8d46fb22ccc77e5380f26cde622a733f363d388b04a2c22e7fb6de0e9d85996}; : ${PKG_DATAMASH_VERSION:=1.2}; : ${PKG_DATAMASH_URL:=https://ftp.gnu.org/gnu/datamash/datamash-${PKG_DATAMASH_VERSION}.tar.gz}; @@ -618,16 +673,17 @@ NATIVE_PACKAGES_CMDLINE_PREFIX="${PREFIX_NATIVE}"; : ${PKG_DOS2UNIX_VERSION:=7.3.5-beta3}; : ${PKG_DOS2UNIX_URL:=http://waterlan.home.xs4all.nl/dos2unix/dos2unix-${PKG_DOS2UNIX_VERSION}.tar.gz}; : ${PKG_DOS2UNIX_CFLAGS_BUILD_EXTRA:=${PACKAGES_CFLAGS_CONFIGURE}}; +: ${PKG_DOS2UNIX_IN_TREE:=1}; : ${PKG_DOS2UNIX_INSTALL_FILES:="dos2unix=bin/ dos2unix=bin/ @dos2unix=bin/mac2unix @unix2dos=bin/unix2mac"}; : ${PKG_ED_SHA256SUM:=c3521a607b3dfd5d2a087d53a72cdf71970763059c369cb0b330881b8491cd50}; : ${PKG_ED_VERSION:=1.14.2}; : ${PKG_ED_URL:=https://fossies.org/linux/privat/ed-${PKG_ED_VERSION}.tar.gz}; -: ${PKG_ED_CONFIGURE_ARGS:="--prefix= CC=${TARGET}-gcc"}; +: ${PKG_ED_CONFIGURE_ARGS:="--prefix= CC=${DEFAULT_TARGET}-gcc"}; : ${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_STEPS_DISABLE:=build_clean:variant}; -: ${PKG_FIGLET_MAKEFLAGS_BUILD:=CC=${TARGET}-gcc LD=${TARGET}-gcc}; +: ${PKG_FIGLET_IN_TREE:=1}; +: ${PKG_FIGLET_MAKEFLAGS_BUILD:=CC=${DEFAULT_TARGET}-gcc LD=${DEFAULT_TARGET}-gcc}; : ${PKG_FILE_SHA256SUM:=8639dc4d1b21e232285cd483604afc4a6ee810710e00e579dbe9591681722b50}; : ${PKG_FILE_VERSION:=5.32}; : ${PKG_FILE_URL:=ftp://ftp.astron.com/pub/file/file-${PKG_FILE_VERSION}.tar.gz}; @@ -644,19 +700,18 @@ NATIVE_PACKAGES_CMDLINE_PREFIX="${PREFIX_NATIVE}"; : ${PKG_MKSH_SHA256SUM:=8bce3837c386684aa7780f085f1a4dbd5e3e26fb5c528ee0d41ae29af7f39013}; : ${PKG_MKSH_VERSION:=R54}; : ${PKG_MKSH_URL:=http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-${PKG_MKSH_VERSION}.tgz}; -: ${PKG_MKSH_BUILD_STEPS_DISABLE:=install_make:dynamic}; -: ${PKG_MKSH_ENV_VARS_EXTRA:="CC=${TARGET}-gcc:CFLAGS=${PACKAGES_CFLAGS_CONFIGURE:+${PACKAGES_CFLAGS_CONFIGURE} }-DMKSH_NOPROSPECTOFWORK"}; +: ${PKG_MKSH_BUILD_STEPS_DISABLE:=install_make}; +: ${PKG_MKSH_ENV_VARS_EXTRA:="CC=${DEFAULT_TARGET}-gcc:CFLAGS=${PACKAGES_CFLAGS_CONFIGURE:+${PACKAGES_CFLAGS_CONFIGURE} }-DMKSH_NOPROSPECTOFWORK"}; +: ${PKG_MKSH_IN_TREE:=1}; : ${PKG_MKSH_INSTALL_FILES:="mksh=bin/ /=share/doc/mksh/examples dot.mkshrc=share/doc/mksh/examples/ mksh.1=share/man/man1/"}; : ${PKG_MKSH_SUBDIR:=mksh}; : ${PKG_SBASE_URLS_GIT:="sbase=http://git.suckless.org/sbase@master"}; +: ${PKG_SBASE_IN_TREE:=1}; : ${PKG_SBASE_MAKE_INSTALL_VNAME:=PREFIX}; : ${PKG_SBASE_PREFIX:=${PREFIX_NATIVE}/suckless}; : ${PKG_SED_SHA256SUM:=cbd6ebc5aaf080ed60d0162d7f6aeae58211a1ee9ba9bb25623daa6cd942683b}; : ${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_TAR_SHA256SUM:=cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0}; : ${PKG_TAR_VERSION:=1.29}; : ${PKG_TAR_URL:=https://ftp.gnu.org/gnu/tar/tar-${PKG_TAR_VERSION}.tar.gz}; @@ -667,7 +722,9 @@ NATIVE_PACKAGES_CMDLINE_PREFIX="${PREFIX_NATIVE}"; : ${PKG_THE_SILVER_SEARCHER_VERSION:=2.1.0}; : ${PKG_THE_SILVER_SEARCHER_URL:=http://geoff.greer.fm/ag/releases/the_silver_searcher-${PKG_THE_SILVER_SEARCHER_VERSION}.tar.gz}; : ${PKG_TOILET_URLS_GIT:=toilet=https://github.com/cacalabs/toilet@master}; +: ${PKG_TOILET_ENV_VARS_EXTRA:="CACA_CFLAGS=-I${PREFIX_NATIVE}/include:CACA_LIBS=-L${PREFIX_NATIVE} -lcaca"}; : ${PKG_UBASE_URLS_GIT:="ubase=http://git.suckless.org/ubase@master"}; +: ${PKG_UBASE_IN_TREE:=1}; : ${PKG_UBASE_MAKE_INSTALL_VNAME:=PREFIX}; : ${PKG_UBASE_PREFIX:=${PREFIX_NATIVE}/suckless}; : ${PKG_UTIL_LINUX_SHA256SUM:=d5950e4b2839d00aa3781f439bfada8091bc6ed8180d8262c53b4e4304e2d299}; @@ -685,7 +742,7 @@ NATIVE_PACKAGES_CMDLINE_PREFIX="${PREFIX_NATIVE}"; # Build target native_packages_dev # NATIVE_PACKAGES_DEV_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_DEV_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +NATIVE_PACKAGES_DEV_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_DEV_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_DEV_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_DEV_PACKAGES=" @@ -698,14 +755,15 @@ NATIVE_PACKAGES_DEV_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_STEPS_DISABLE:=build_clean:variant}; -: ${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}; -: ${PKG_CHICKEN_MAKE_INSTALL_VNAME:=TARGET_PREFIX}; -: ${PKG_CHICKEN_MAKEFLAGS_INSTALL:="PLATFORM=midipix-${ARCH} PREFIX=${PREFIX_NATIVE} C_COMPILER=${TARGET}-gcc HOSTSYSTEM=${TARGET} CROSS_CHICKEN=1"}; +: ${PKG_CHICKEN_MAKEFLAGS_BUILD:="PLATFORM=midipix-${ARCH} PREFIX=${PREFIX_NATIVE} TARGET_PREFIX=${PREFIX_NATIVE} C_COMPILER=${DEFAULT_TARGET}-gcc HOSTSYSTEM=${DEFAULT_TARGET}"}; +: ${PKG_CHICKEN_DEBUG_MAKEFLAGS_BUILD_EXTRA:=DEBUGBUILD=1}; +: ${PKG_CHICKEN_RELEASE_MAKEFLAGS_BUILD_EXTRA:=DEBUGBUILD=0}; +: ${PKG_CHICKEN_MAKEFLAGS_INSTALL_EXTRA:="PREFIX= TARGET_PREFIX="}; +: ${PKG_CHICKEN_IN_TREE:=1}; +: ${PKG_CHICKEN_MAKE_INSTALL_VNAME:=DESTDIR}; +: ${PKG_CHICKEN_MAKEFLAGS_INSTALL:="PLATFORM=midipix-${ARCH} PREFIX=${PREFIX_NATIVE} C_COMPILER=${DEFAULT_TARGET}-gcc HOSTSYSTEM=${DEFAULT_TARGET} CROSS_CHICKEN=1"}; : ${PKG_CPARSER_URLS_GIT:="cparser=http://pp.info.uni-karlsruhe.de/git/cparser.git@master bcparser=${DEFAULT_GITROOT}/compilers/bcparser@main"}; -: ${PKG_CPARSER_BASE_DIR:=${WORKDIR}/cparser+libfirm-build}; +: ${PKG_CPARSER_BASE_DIR:=${BUILD_WORKDIR}/cparser+libfirm-build}; : ${PKG_CPARSER_BUILD_DIR:=build/cparser}; : ${PKG_CPARSER_CONFIGURE:=bcparser/configure}; : ${PKG_CPARSER_CONFIGURE_ARGS:="--source-dir=../../cparser --prefix="}; @@ -718,7 +776,7 @@ NATIVE_PACKAGES_DEV_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_IN_TREE:=1}; : ${PKG_LUNIX_MAKEFLAGS_BUILD:="all5.3 libdir=${PREFIX_NATIVE}/lib"}; : ${PKG_LUNIX_MAKEFLAGS_INSTALL_EXTRA:="libdir=lib"}; : ${PKG_MAKE_SHA256SUM:=d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589}; @@ -741,16 +799,16 @@ NATIVE_PACKAGES_DEV_PREFIX="${PREFIX_NATIVE}"; : ${PKG_PERL_VERSION:=5.22.1}; : ${PKG_PERL_URL:=http://www.cpan.org/src/5.0/perl-${PKG_PERL_VERSION}.tar.gz}; : ${PKG_PERL_URLS_GIT:="perl-cross=https://github.com/lalbornoz/perl-cross@master"}; -: ${PKG_PERL_BASE_DIR:=${WORKDIR}/perl-build}; -: ${PKG_PERL_CONFIGURE_ARGS:="-A ccflags=-I${PREFIX_NATIVE}/include --sysroot=${PREFIX_NATIVE} --target=${TARGET}"}; -: ${PKG_PERL_ENV_VARS_EXTRA:="TARGET=${TARGET}"}; +: ${PKG_PERL_BASE_DIR:=${BUILD_WORKDIR}/perl-build}; +: ${PKG_PERL_CONFIGURE_ARGS:="-A ccflags=-I${PREFIX_NATIVE}/include --sysroot=${PREFIX_NATIVE} --target=${DEFAULT_TARGET}"}; +: ${PKG_PERL_ENV_VARS_EXTRA:="TARGET=${DEFAULT_TARGET}"}; : ${PKG_PERL_MAKEFLAGS_BUILD:=-j1}; : ${PKG_PERL_SUBDIR:=perl-${PKG_PERL_VERSION}}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${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_CONFIGURE_ARGS:="--build=x86_64 -C --enable-ipv6 --enable-shared --host=${DEFAULT_TARGET} --prefix=${PREFIX_NATIVE} --without-ensurepip"}; +: ${PKG_PYTHON3_ENV_VARS_EXTRA:="BLDSHARED=${DEFAULT_TARGET}-gcc -shared -mout-dsolib --sysroot=${PREFIX_NATIVE}:CC=${DEFAULT_TARGET}-gcc:CFLAGS=--sysroot=${PREFIX_NATIVE}:CPPFLAGS=--sysroot=${PREFIX_NATIVE}:LDFLAGS=-L${PREFIX_NATIVE}/lib"}: : ${PKG_PYTHON3_SUBDIR:=Python-${PKG_PYTHON3_VERSION}}; : ${PKG_RUBY_SHA256SUM:=ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507}; : ${PKG_RUBY_VERSION:=2.3.0}; @@ -758,38 +816,40 @@ NATIVE_PACKAGES_DEV_PREFIX="${PREFIX_NATIVE}"; : ${PKG_RUBY_CONFIGURE_ARGS_EXTRA:="--disable-install-rdoc --with-baseruby=${PREFIX}/bin/ruby --with-out-ext=fiddle"}; : ${PKG_RUBY_MAKEFLAGS_BUILD:=-j1}; : ${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_IN_TREE:=1}; # # Build target native_packages_etc # NATIVE_PACKAGES_ETC_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_ETC_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +NATIVE_PACKAGES_ETC_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_ETC_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_ETC_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_ETC_PACKAGES=" -cron hexcurse htop infounzip infozip john less mc nano ncdu mintty p7zip procps_ng qpdf -rxvt_unicode st tmux vim xeyes xwd"; +cron hexcurse htop infounzip infozip john less mc mintty nano ncdu +p7zip procps_ng qpdf rxvt_unicode st tmux vim xeyes xwd"; NATIVE_PACKAGES_ETC_PREFIX="${PREFIX_NATIVE}"; : ${PKG_CRON_URLS_GIT:="pkg-cron.git=git://anonscm.debian.org/pkg-cron/pkg-cron.git@debian/3.0pl1-128"}; -: ${PKG_CRON_ENV_VARS_EXTRA:="CC=${TARGET}-gcc:CFLAGS=${PACKAGES_CFLAGS_CONFIGURE} -D__GNU__"}; +: ${PKG_CRON_ENV_VARS_EXTRA:="CC=${DEFAULT_TARGET}-gcc:CFLAGS=${NATIVE_PACKAGES_ETC_CFLAGS_CONFIGURE} -D__GNU__"}; +: ${PKG_CRON_IN_TREE:=1}; : ${PKG_HEXCURSE_URLS_GIT:="hexcurse=https://github.com/LonnyGomes/hexcurse@master"}; : ${PKG_HEXCURSE_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_NATIVE}/include/ncursesw}; : ${PKG_HTOP_SHA256SUM:=f410626dfaf6b70fdf73cd7bb33cae768869707028d847fed94a978e974f5666}; : ${PKG_HTOP_VERSION:=2.0.1}; : ${PKG_HTOP_URL:=http://hisham.hm/htop/releases/${PKG_HTOP_VERSION}/htop-${PKG_HTOP_VERSION}.tar.gz}; : ${PKG_INFOUNZIP_URLS_GIT:=infounzip=https://github.com/Redfoxmoon3/infounzip.git@master}; +: ${PKG_INFOUNZIP_IN_TREE:=1}; : ${PKG_INFOZIP_URLS_GIT:=infozip=https://github.com/Redfoxmoon3/infozip.git@master}; +: ${PKG_INFOZIP_IN_TREE:=1}; : ${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_STEPS_DISABLE:=install_make:dynamic}; -: ${PKG_JOHN_DISABLED:=$(if [ "${ARCH}" = "nt32" ]; then echo 1; fi)}; +: ${PKG_JOHN_BUILD_STEPS_DISABLE:=install_make}; +: ${PKG_JOHN_DISABLED_NT32:=1}; +: ${PKG_JOHN_IN_TREE:=1}; : ${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_SUBDIR:=john-${PKG_JOHN_VERSION}}; +: ${PKG_JOHN_MAKEFLAGS_BUILD_EXTRA:="-C src midipix-x86-64"}; : ${PKG_LESS_SHA256SUM:=f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706}; : ${PKG_LESS_VERSION:=487}; : ${PKG_LESS_URL:=http://www.greenwoodsoftware.com/less/less-${PKG_LESS_VERSION}.tar.gz}; @@ -804,23 +864,27 @@ NATIVE_PACKAGES_ETC_PREFIX="${PREFIX_NATIVE}"; : ${PKG_NCDU_SHA256SUM:=820e4e4747a2a2ec7a2e9f06d2f5a353516362c22496a10a9834f871b877499a}; : ${PKG_NCDU_VERSION:=1.12}; : ${PKG_NCDU_URL:=https://dev.yorhel.nl/download/ncdu-${PKG_NCDU_VERSION}.tar.gz}; -: ${PKG_MINTTY_URLS_GIT:="bmintty=https://github.com/midipix-ports/bmintty.git@main mintty=https://github.com/midipix-ports/mintty.git@midipix"}; -: ${PKG_MINTTY_BASE_DIR:=${WORKDIR}/mintty-build}; -: ${PKG_MINTTY_CONFIGURE_ARGS:="--debug --strict --target=${TARGET} --source-dir=../mintty --prefix="}; +: ${PKG_MINTTY_URLS_GIT:="mintty=https://github.com/midipix-ports/mintty.git@midipix bmintty=https://github.com/midipix-ports/bmintty.git@main"}; +: ${PKG_MINTTY_BASE_DIR:=${BUILD_WORKDIR}/mintty-build}; +: ${PKG_MINTTY_BUILD_DIR:=build/mintty}; +: ${PKG_MINTTY_CONFIGURE:=bmintty/configure}; +: ${PKG_MINTTY_CONFIGURE_ARGS:="--debug --strict --target=${DEFAULT_TARGET} --source-dir=../../mintty --prefix="}; : ${PKG_MINTTY_LDFLAGS_CONFIGURE_EXTRA:=-L${PREFIX_NATIVE}/lib/w32lib}; : ${PKG_P7ZIP_URLS_GIT:="p7zip-midipix.git=https://github.com/lalbornoz/p7zip-midipix.git@master"}; -: ${PKG_P7ZIP_BUILD_STEPS_DISABLE:=install_make:dynamic}; +: ${PKG_P7ZIP_BUILD_STEPS_DISABLE:=install_make}; +: ${PKG_P7ZIP_IN_TREE:=1}; : ${PKG_P7ZIP_INSTALL_FILES:="bin/7za=bin/"}; : ${PKG_PROCPS_NG_SHA256SUM:=b1036c109f271c7c50325b11a748236f8e58aa1dbafefb30c995ff1d05b4a1a8}; : ${PKG_PROCPS_NG_VERSION:=3.3.12}; : ${PKG_PROCPS_NG_URL:=https://gitlab.com/procps-ng/procps/repository/archive.tar.gz?ref=v${PKG_PROCPS_NG_VERSION}}; : ${PKG_PROCPS_NG_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_NATIVE}/include/ncursesw}; +: ${PKG_PROCPS_NG_FNAME:=procps_ng-${PKG_PROCPS_NG_VERSION}.tar.gz}; : ${PKG_PROCPS_NG_SUBDIR:=procps-v${PKG_PROCPS_NG_VERSION}-e0784ddaed30d095bb1d9a8ad6b5a23d10a212c4}; : ${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_BUILD_DIR:=qpdf-${PKG_QPDF_VERSION}}; : ${PKG_QPDF_CONFIGURE_ARGS_EXTRA:=--with-random=/dev/urandom}; +: ${PKG_QPDF_IN_TREE:=1}; : ${PKG_RXVT_UNICODE_SHA256SUM:=e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd}; : ${PKG_RXVT_UNICODE_VERSION:=9.22}; : ${PKG_RXVT_UNICODE_URL:=http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-${PKG_RXVT_UNICODE_VERSION}.tar.bz2}; @@ -828,8 +892,9 @@ NATIVE_PACKAGES_ETC_PREFIX="${PREFIX_NATIVE}"; : ${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_STEPS_DISABLE:=install_make:dynamic}; +: ${PKG_ST_BUILD_STEPS_DISABLE:=install_make}; : ${PKG_ST_CFLAGS_BUILD_EXTRA:=${LEAF_PACKAGES_CFLAGS_CONFIGURE} -I${PREFIX_NATIVE}/include/freetype2 -I${PREFIX_NATIVE}/include}; +: ${PKG_ST_IN_TREE:=1}; : ${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}; : ${PKG_TMUX_SHA256SUM:=55313e132f0f42de7e020bf6323a1939ee02ab79c48634aa07475db41573852b}; @@ -838,11 +903,11 @@ NATIVE_PACKAGES_ETC_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_CONFIGURE_ARGS_EXTRA:=--with-tlib=ncursesw}; +: ${PKG_VIM_IN_TREE:=1}; : ${PKG_VIM_INSTALL_FILES:=@vim=bin/vi}; : ${PKG_VIM_MAKEFLAGS_INSTALL_EXTRA:=STRIP=/bin/true}; -: ${PKG_VIM_SUBDIR:=${PKG_VIM_BUILD_DIR}}; +: ${PKG_VIM_SUBDIR:=vim-${PKG_VIM_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}; @@ -854,7 +919,7 @@ NATIVE_PACKAGES_ETC_PREFIX="${PREFIX_NATIVE}"; # Build target native_packages_inet # NATIVE_PACKAGES_INET_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -NATIVE_PACKAGES_INET_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +NATIVE_PACKAGES_INET_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; NATIVE_PACKAGES_INET_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; NATIVE_PACKAGES_INET_MAKEFLAGS_INSTALL="PREFIX= prefix="; NATIVE_PACKAGES_INET_PACKAGES=" @@ -864,7 +929,8 @@ NATIVE_PACKAGES_INET_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_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:CROSS_COMPILE=${TARGET}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_NATIVE}}; +: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_NATIVE}:CROSS_COMPILE=${DEFAULT_TARGET}-:LUAAPK=:VERBOSE=1:PREFIX=${PREFIX_NATIVE}:OPENSSL_LIBS=-L${PREFIX_NATIVE}/lib -lssl -lcrypto:ZLIB_LIBS=-L${PREFIX_NATIVE}/lib -lz}; +: ${PKG_APK_TOOLS_IN_TREE:=1}; : ${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}; @@ -873,7 +939,7 @@ NATIVE_PACKAGES_INET_PREFIX="${PREFIX_NATIVE}"; : ${PKG_BIND_SHA256SUM:=7f46ad8620f7c3b0ac375d7a5211b15677708fda84ce25d7aeb7222fe2e3c77a}; : ${PKG_BIND_VERSION:=9.11.2}; : ${PKG_BIND_URL:=https://ftp.isc.org/isc/bind9/cur/${PKG_BIND_VERSION%.*}/bind-${PKG_BIND_VERSION}.tar.gz}; -: ${PKG_BIND_CONFIGURE_ARGS_EXTRA:="--with-ecdsa=yes --with-gost=no --with-gssapi=no --with-libtool --with-libxml2=${PREFIX}/bin/${TARGET}-xml2-config --with-libjson=no --with-openssl=${PREFIX_NATIVE} --with-randomdev=/dev/urandom BUILD_CC=gcc"}; +: ${PKG_BIND_CONFIGURE_ARGS_EXTRA:="--with-ecdsa=yes --with-gost=no --with-gssapi=no --with-libtool --with-libxml2=${PREFIX}/bin/${DEFAULT_TARGET}-xml2-config --with-libjson=no --with-openssl=${PREFIX_NATIVE} --with-randomdev=/dev/urandom BUILD_CC=gcc"}; : ${PKG_DROPBEAR_VERSION:=2017.75}; : ${PKG_DROPBEAR_URL:=https://matt.ucc.asn.au/dropbear/releases/dropbear-${PKG_DROPBEAR_VERSION}.tar.bz2}; : ${PKG_DROPBEAR_SHA256SUM:=6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c}; @@ -881,8 +947,8 @@ NATIVE_PACKAGES_INET_PREFIX="${PREFIX_NATIVE}"; : ${PKG_GIT_SHA256SUM:=ccc366d5d674fb755fd98d219c23f2b4e5da8a49d8582a6314813b280d75536b}; : ${PKG_GIT_VERSION:=2.14.1}; : ${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_SUBDIR:=${PKG_GIT_BUILD_DIR}}; +: ${PKG_GIT_IN_TREE:=1}; +: ${PKG_GIT_SUBDIR:=git-${PKG_GIT_VERSION}}; : ${PKG_GNUPG_SHA256SUM:=49b9a6a6787ad00d4d2d69d8c7ee8905923782583f06078a064a0c80531d8844}; : ${PKG_GNUPG_VERSION:=2.1.16}; : ${PKG_GNUPG_URL:=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${PKG_GNUPG_VERSION}.tar.bz2}; @@ -890,7 +956,7 @@ NATIVE_PACKAGES_INET_PREFIX="${PREFIX_NATIVE}"; : ${PKG_HTTPD_SHA256SUM:=f87ec2df1c9fee3e6bfde3c8b855a3ddb7ca1ab20ca877bd0e2b6bf3f05c80b2}; : ${PKG_HTTPD_VERSION:=2.4.25}; : ${PKG_HTTPD_URL:=https://xyinn.org/gentoo/distfiles/httpd-${PKG_HTTPD_VERSION}.tar.bz2}; -: ${PKG_HTTPD_CONFIGURE_ARGS_EXTRA:="--with-apr=${PREFIX}/bin/${TARGET}-apr-1-config --with-apr-util=${PREFIX}/bin/${TARGET}-apu-1-config"}; +: ${PKG_HTTPD_CONFIGURE_ARGS_EXTRA:="--with-apr=${PREFIX}/bin/${DEFAULT_TARGET}-apr-1-config --with-apr-util=${PREFIX}/bin/${DEFAULT_TARGET}-apu-1-config"}; : ${PKG_HTTPD_DISABLED:=1}; : ${PKG_INETUTILS_SHA256SUM:=849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37}; : ${PKG_INETUTILS_VERSION:=1.9.4}; @@ -920,20 +986,21 @@ NATIVE_PACKAGES_INET_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_BUILD_DIR:=nginx-${PKG_NGINX_VERSION}}; : ${PKG_NGINX_CONFIGURE_ARGS:="--prefix="}; +: ${PKG_NGINX_ENV_VARS_EXTRA:=CC=${DEFAULT_TARGET}-gcc}; +: ${PKG_NGINX_IN_TREE:=1}; : ${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_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_CONFIGURE_ARGS:="-C --host=${DEFAULT_TARGET} --prefix=/usr/lsws --target=${DEFAULT_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_IN_TREE:=1}; : ${PKG_OPENLITESPEED_MAKEFLAGS_BUILD:=-j1}; : ${PKG_OPENLITESPEED_PREFIX:=${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}; -: ${PKG_OPENSSH_CONFIGURE_ARGS_EXTRA_DEBUG:=--disable-strip}; +: ${PKG_OPENSSH_DEBUG_CONFIGURE_ARGS_EXTRA:=--disable-strip}; : ${PKG_OPENSSH_INSTALL_TARGET:=install-nokeys}; : ${PKG_PACMAN_SHA256SUM:=84599e2ee2158134fd704f1cd681ea46e021165bed4df5f002aa1748caef9e7b}; : ${PKG_PACMAN_VERSION:=5.0.1}; @@ -949,8 +1016,8 @@ NATIVE_PACKAGES_INET_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_BUILD_DIR:=thttpd-${PKG_THTTPD_VERSION}}; -: ${PKG_THTTPD_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix= --target=${TARGET}"}; +: ${PKG_THTTPD_CONFIGURE_ARGS:="--disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"}; +: ${PKG_THTTPD_IN_TREE:=1}; : ${PKG_THTTPD_MAKE_INSTALL_VNAME:=prefix}; : ${PKG_THTTPD_MAKEFLAGS_BUILD_EXTRA:=-j1}; : ${PKG_WEECHAT_SHA256SUM:=3061e57460e0e3e4533551c45ced53b222fe0933848250d0fb7337d9aacfd853}; @@ -965,6 +1032,7 @@ NATIVE_PACKAGES_INET_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_IN_TREE:=1}; : ${PKG_WHOIS_MAKE_INSTALL_VNAME:=BASEDIR}; : ${PKG_WHOIS_SUBDIR:=whois-${PKG_WHOIS_VERSION}}; @@ -972,7 +1040,8 @@ NATIVE_PACKAGES_INET_PREFIX="${PREFIX_NATIVE}"; # Build target dist_minipix # DIST_MINIPIX_CFLAGS_CONFIGURE="${DEFAULT_CFLAGS:+${DEFAULT_CFLAGS} }--sysroot=${PREFIX_NATIVE}"; -DIST_MINIPIX_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; +DIST_MINIPIX_CONFIGURE_ARGS="-C --disable-nls --host=${DEFAULT_TARGET} --prefix= --target=${DEFAULT_TARGET}"; +DIST_MINIPIX_INSTALL_FILES_DESTDIR_EXTRA="@bin=lib @bin=libexec @bin=share"; DIST_MINIPIX_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}"; DIST_MINIPIX_MAKEFLAGS_INSTALL="PREFIX= prefix="; DIST_MINIPIX_PACKAGES=" @@ -980,7 +1049,7 @@ bzip2_flavour_minipix gzip_flavour_minipix xz_flavour_minipix bash_flavour_minipix coreutils_flavour_minipix tar_flavour_minipix ntctty_flavour_minipix ptycon_flavour_minipix"; DIST_MINIPIX_PREFIX="${PREFIX_MINIPIX}"; -: ${PKG_BZIP2_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:="${PKG_BZIP2_BUILD_STEPS_DISABLE:+${PKG_BZIP2_BUILD_STEPS_DISABLE} }install_make:dynamic"}; +: ${PKG_BZIP2_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:="${PKG_BZIP2_BUILD_STEPS_DISABLE:+${PKG_BZIP2_BUILD_STEPS_DISABLE} }install_make"}; : ${PKG_BZIP2_FLAVOUR_MINIPIX_INSTALL_FILES:="bzip2=bin/ @bzip2=bin/bunzip2 @bzip2=bin/bzcat @bzip2=bin/bzip2recover @bzip2=bin/bzgrep @bzip2=bin/bzmore @bzip2=bin/bzdiff"}; : ${PKG_BZIP2_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="--sysroot=${PREFIX_NATIVE} -static"}; : ${PKG_BZIP2_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="-f Makefile"}; @@ -993,19 +1062,19 @@ DIST_MINIPIX_PREFIX="${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"}; -: ${PKG_BASH_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:=install_make:dynamic}; +: ${PKG_BASH_FLAVOUR_MINIPIX_BUILD_STEPS_DISABLE:=install_make}; : ${PKG_BASH_FLAVOUR_MINIPIX_INSTALL_FILES:="bash=bin/ bashbug=bin/"}; : ${PKG_COREUTILS_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="-static"}; : ${PKG_COREUTILS_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"}; : ${PKG_COREUTILS_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-binPROGRAMS}; -: ${PKG_COREUTILS_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:=INSTALL_PROGRAM=${TARGET}-install-strip}; +: ${PKG_COREUTILS_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL_EXTRA:=INSTALL_PROGRAM=${DEFAULT_TARGET}-install-strip}; : ${PKG_TAR_FLAVOUR_MINIPIX_LDFLAGS_BUILD_EXTRA:="-static"}; : ${PKG_TAR_FLAVOUR_MINIPIX_MAKEFLAGS_BUILD_EXTRA:="SHARED=0"}; : ${PKG_TAR_FLAVOUR_MINIPIX_MAKEFLAGS_INSTALL:="-C src install-binPROGRAMS"}; -: ${PKG_NTCTTY_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${TARGET}"}; +: ${PKG_NTCTTY_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"}; : ${PKG_NTCTTY_FLAVOUR_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"}; : ${PKG_NTCTTY_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-static-app}; -: ${PKG_PTYCON_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${TARGET}"}; +: ${PKG_PTYCON_FLAVOUR_MINIPIX_CONFIGURE_ARGS:="--prefix= --strict --host=${DEFAULT_TARGET}"}; : ${PKG_PTYCON_FLAVOUR_MINIPIX_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_NATIVE}/include:LDFLAGS_PATH=-L${PREFIX_NATIVE}/lib"}; : ${PKG_PTYCON_FLAVOUR_MINIPIX_INSTALL_TARGET:=install-static-app}; @@ -1020,9 +1089,8 @@ DIST_TARGET_PACKAGES="dist_etc dist_digest dist_tarballs"; # DEV_TARGET="dev_packages"; DIST_TARGET="dist_minipix dist_target"; -HOST_TARGET="host_toolchain_deps host_toolchain" -INVARIANTS_TARGET="invariants"; -NATIVE_TARGET="native_toolchain_deps native_toolchain native_runtime"; +HOST_TARGET="host_tools host_toolchain_deps host_toolchain host_toolchain_mingw32"; +NATIVE_TARGET="native_tools native_toolchain_deps native_toolchain native_toolchain_mingw32 native_runtime"; PACKAGES_DEPS_TARGET="host_packages_deps native_packages_deps native_packages_deps_x11"; PACKAGES_TARGET="native_packages_cmdline native_packages_dev native_packages_etc native_packages_inet"; diff --git a/vars/chainport_host.vars b/vars/chainport_host.vars new file mode 100644 index 00000000..94b56b18 --- /dev/null +++ b/vars/chainport_host.vars @@ -0,0 +1,10 @@ +# +# set -o errexit -o noglob are assumed. +# + +pkg_chainport_host_install_make() { + ex_rtl_fileop rm "${BUILD_WORKDIR}/chainport"; + ex_rtl_fileop cp ../chainport "${BUILD_WORKDIR}/chainport"; +}; + +# vim:filetype=sh diff --git a/vars/clang_host.vars b/vars/clang_host.vars index 01413bee..4f779800 100644 --- a/vars/clang_host.vars +++ b/vars/clang_host.vars @@ -3,10 +3,10 @@ # pkg_clang_host_configure() { - ex_build_fileop rm "../cfe-${PKG_VERSION}-host"; - ex_build_fileop mkdir "../cfe-${PKG_VERSION}-host"; - ex_build_fileop cd "../cfe-${PKG_VERSION}-host"; - ex_log_msg info "Bootstrapping clang_host..."; + ex_rtl_fileop rm "../cfe-${PKG_VERSION}-host"; + ex_rtl_fileop mkdir "../cfe-${PKG_VERSION}-host"; + ex_rtl_fileop cd "../cfe-${PKG_VERSION}-host"; + ex_rtl_log_msg info "Bootstrapping clang_host..."; ("${PREFIX}/bin/cmake" \ "../cfe-${PKG_VERSION}.src" \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ @@ -19,7 +19,7 @@ pkg_clang_host_configure() { -DLLVM_PREFIX="${PKG_PREFIX}" \ -G "Unix Makefiles" \ -Wno-dev); - ex_log_msg info "Finished bootstrapping clang_host."; + ex_rtl_log_msg info "Finished bootstrapping clang_host."; }; # vim:filetype=sh diff --git a/vars/cmake.vars b/vars/cmake.vars index 2c8d19dc..c8f5b2a4 100644 --- a/vars/cmake.vars +++ b/vars/cmake.vars @@ -3,18 +3,18 @@ # pkg_cmake_configure() { - ex_build_fileop cp "${PREFIX}/share/cmake-${PKG_VERSION%.*}/Modules/Platform/BSDOS.cmake" \ + ex_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/${AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${CC}" \ + -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/${RANLIB}" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ -DCMAKE_SYSTEM_NAME=Midipix \ -DCMAKE_USE_SYSTEM_BZIP2=ON \ -DCMAKE_USE_SYSTEM_CURL=ON \ diff --git a/vars/dist_digest.vars b/vars/dist_digest.vars index de94df72..d831beb9 100644 --- a/vars/dist_digest.vars +++ b/vars/dist_digest.vars @@ -4,18 +4,16 @@ pkg_dist_digest_all() { local __; - if [ -n "${ARG_TARBALL}" ]; then - ex_log_msg info "Compiling SHA256 sums..."; - if [ -e "${PREFIX}/SHA256SUMS" ]; then - ex_build_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last"; - fi; - (cd "${PREFIX}"; - for __ in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x \ - \( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or \ - -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do - sha256sum "${__}"; - done > "${PREFIX}/SHA256SUMS"); + ex_rtl_log_msg info "Compiling SHA256 sums..."; + if [ -e "${PREFIX}/SHA256SUMS" ]; then + ex_rtl_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last"; fi; + (cd "${PREFIX}"; + for __ in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x \ + \( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or \ + -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do + sha256sum "${__}"; + done > "${PREFIX}/SHA256SUMS"); }; # vim:filetype=sh diff --git a/vars/dist_tarballs.vars b/vars/dist_tarballs.vars index dd06c71b..b035e78a 100644 --- a/vars/dist_tarballs.vars +++ b/vars/dist_tarballs.vars @@ -3,91 +3,89 @@ # pkgp_dist_tarball_dist() { - TARBALL_FNAME="${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; + TARBALL_FNAME="${DEFAULT_TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${DEFAULT_TARBALL_SUFFIX}"; tar -cpf - $(find . -maxdepth 2 -mindepth 1 -type d \ -not -path ./${PREFIX_BASENAME} \ -not -path ./${PREFIX_BASENAME}.bak \ -not -path ./${PREFIX_BASENAME}.bak/\* \ -not -path ./tmp -not -path ./tmp/\*) \ midipix_shortcut.vbs midipix.sh README SHA256SUMS |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_FNAME}"; - ex_log_msg info "Finished building binary distribution tarball."; - 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 + "${DEFAULT_TARBALL_COMPRESS_CMD}" ${DEFAULT_TARBALL_COMPRESS_ARGS} -c > "${DEFAULT_TARBALL_FNAME}"; + ex_rtl_log_msg info "Finished building binary distribution tarball."; + if [ -x "$(which gpg 2>/dev/null)" -a -n "${DEFAULT_TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${DEFAULT_TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_FNAME}"; - ex_log_msg info "Signed binary distribution tarball."; + --local-user "${DEFAULT_TARBALL_SIGN_GPG_KEY}" --sign "${DEFAULT_TARBALL_FNAME}"; + ex_rtl_log_msg info "Signed binary distribution tarball."; fi; }; pkgp_dist_tarball_toolchain() { - TARBALL_CROSS_FNAME="${TARBALL_CROSS_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - tar -cpf - bin include lib lib64 libexec share "${TARGET}" |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_CROSS_FNAME}"; - ex_log_msg info "Finished building toolchain tarball."; - 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 + TARBALL_CROSS_FNAME="${DEFAULT_TARBALL_CROSS_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${DEFAULT_TARBALL_SUFFIX}"; + tar -cpf - bin include lib lib64 libexec share "${PKG_TARGET}" |\ + "${DEFAULT_TARBALL_COMPRESS_CMD}" ${DEFAULT_TARBALL_COMPRESS_ARGS} -c > "${DEFAULT_TARBALL_CROSS_FNAME}"; + ex_rtl_log_msg info "Finished building toolchain tarball."; + if [ -x "$(which gpg 2>/dev/null)" -a -n "${DEFAULT_TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${DEFAULT_TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_CROSS_FNAME}"; - ex_log_msg info "Signed toolchain tarball."; + --local-user "${DEFAULT_TARBALL_SIGN_GPG_KEY}" --sign "${DEFAULT_TARBALL_CROSS_FNAME}"; + ex_rtl_log_msg info "Signed toolchain tarball."; fi; }; pkgp_dist_tarball_minipix() { - TARBALL_MINIPIX_FNAME="${TARBALL_MINIPIX_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; + TARBALL_MINIPIX_FNAME="${DEFAULT_TARBALL_MINIPIX_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${DEFAULT_TARBALL_SUFFIX}"; tar -cpf - minipix \ midipix_shortcut.vbs midipix.sh README |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_MINIPIX_FNAME}"; - ex_log_msg info "Finished building binary Minipix distribution tarball."; - 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 + "${DEFAULT_TARBALL_COMPRESS_CMD}" ${DEFAULT_TARBALL_COMPRESS_ARGS} -c > "${DEFAULT_TARBALL_MINIPIX_FNAME}"; + ex_rtl_log_msg info "Finished building binary Minipix distribution tarball."; + if [ -x "$(which gpg 2>/dev/null)" -a -n "${DEFAULT_TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${DEFAULT_TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_MINIPIX_FNAME}"; - ex_log_msg info "Signed binary Minipix distribution tarball."; + --local-user "${DEFAULT_TARBALL_SIGN_GPG_KEY}" --sign "${DEFAULT_TARBALL_MINIPIX_FNAME}"; + ex_rtl_log_msg info "Signed binary Minipix distribution tarball."; fi; }; pkgp_dist_tarball_src() { - TARBALL_SRC_FNAME="${TARBALL_SRC_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - ex_log_msg info "Building source tarball..."; + TARBALL_SRC_FNAME="${DEFAULT_TARBALL_SRC_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${DEFAULT_TARBALL_SUFFIX}"; + ex_rtl_log_msg info "Building source tarball..."; tar -cpf - $(find tmp -mindepth 2 -maxdepth 2 \ -not -path tmp/.\* \ -not -path tmp/ntctty\* \ -not -path tmp/psxscl\* \ -not -path tmp/ptycon\*) |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_SRC_FNAME}"; - ex_log_msg info "Finished building source tarball."; - 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 + "${DEFAULT_TARBALL_COMPRESS_CMD}" ${DEFAULT_TARBALL_COMPRESS_ARGS} -c > "${DEFAULT_TARBALL_SRC_FNAME}"; + ex_rtl_log_msg info "Finished building source tarball."; + if [ -x "$(which gpg 2>/dev/null)" -a -n "${DEFAULT_TARBALL_SIGN_GPG_KEY}" ] && \ + gpg --list-keys "${DEFAULT_TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_SRC_FNAME}"; - ex_log_msg info "Signed source tarball."; + --local-user "${DEFAULT_TARBALL_SIGN_GPG_KEY}" --sign "${DEFAULT_TARBALL_SRC_FNAME}"; + ex_rtl_log_msg info "Signed source tarball."; fi; }; pkg_dist_tarballs_all() { - if [ -n "${ARG_TARBALL}" ]; then - ex_log_msg info "Building distribution tarballs..."; - case "${TARBALL_SUFFIX}" in - bz2) if [ -n "$(which pbzip2 2>/dev/null)" ]; then - TARBALL_COMPRESS_CMD="pbzip2"; - else - TARBALL_COMPRESS_CMD="bzip2"; - fi; ;; - gz) if [ -n "$(which pigz 2>/dev/null)" ]; then - TARBALL_COMPRESS_CMD="pigz"; - else - TARBALL_COMPRESS_CMD="gzip"; - fi; ;; - xz) TARBALL_COMPRESS_CMD="xz"; - TARBALL_COMPRESS_ARGS="-T0"; ;; - *) ex_log_msg failexit "Unknown tarball suffix \`.${TARBALL_SUFFIX}'."; - esac; - ex_build_fileop cd "${PREFIX}"; PREFIX_BASENAME="${PREFIX_NATIVE##*/}"; - pkgp_dist_tarball_dist; pkgp_dist_tarball_toolchain; pkgp_dist_tarball_minipix; - if [ "${BUILD}" = "debug" ]; then - pkgp_dist_tarball_src; - fi; + ex_rtl_log_msg info "Building distribution tarballs..."; + case "${DEFAULT_TARBALL_SUFFIX}" in + bz2) if [ -n "$(which pbzip2 2>/dev/null)" ]; then + TARBALL_COMPRESS_CMD="pbzip2"; + else + TARBALL_COMPRESS_CMD="bzip2"; + fi; ;; + gz) if [ -n "$(which pigz 2>/dev/null)" ]; then + TARBALL_COMPRESS_CMD="pigz"; + else + TARBALL_COMPRESS_CMD="gzip"; + fi; ;; + xz) TARBALL_COMPRESS_CMD="xz"; + TARBALL_COMPRESS_ARGS="-T0"; ;; + *) ex_rtl_log_msg failexit "Unknown tarball suffix \`.${DEFAULT_TARBALL_SUFFIX}'."; + esac; + ex_rtl_fileop cd "${PREFIX}"; PREFIX_BASENAME="${PREFIX_NATIVE##*/}"; + pkgp_dist_tarball_dist; pkgp_dist_tarball_toolchain; pkgp_dist_tarball_minipix; + if [ "${BUILD}" = "debug" ]; then + pkgp_dist_tarball_src; fi; }; diff --git a/vars/env.vars b/vars/env.vars index 2546f067..8d76b810 100644 --- a/vars/env.vars +++ b/vars/env.vars @@ -1,85 +1,29 @@ -# -# 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:="all:all - fetch_distclean:variant fetch_wget:dynamic fetch_git:dynamic fetch_extract:dynamic fetch_subdirs:invariant fetch:virtual - configure_patch_pre:dynamic configure_autotools:dynamic configure_patch:dynamic configure:dynamic - build_clean:variant build:dynamic - install_subdirs:dynamic install_make:dynamic install_files:dynamic install_libs:dynamic - install_pkgconfig:dynamic install_purge_la:dynamic install_strip:dynamic install:dynamic - finish:finish"}; -: ${PKG_BUILD_VARS:="BASE_DIR BUILD_DIR BUILD_STEPS_DISABLE BUILD_TYPE - CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA - CFLAGS_INSTALL_EXTRA CONFIG_CACHE 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 MAKE_INSTALL_VNAME MAKEFLAGS_BUILD - MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA - NO_LOG_VARS SHA256SUM SLIBTOOL SUBDIR TARGET URL URL_TYPE URLS_GIT VERSION"}; -: ${CLEAR_ENV_VARS_EXCEPT:="ARG_VERBOSE ARG_VERBOSE2 ARG_VERBOSE3 DEFAULT_GITROOT_HEAD HOME PATH SHELL TERM TARBALL_SIGN_GPG_KEY USER"}; -: ${CLEAR_PREFIX_PATHS:="bin i686-nt32-midipix doc include info lib lib64 libexec man minipix native sbin share tmp usr x86_64-nt64-midipix x86_64-w64-mingw32 midipix.sh midipix_shortcut.vbs README"}; - -# Default flags -: ${DEFAULT_BUILD_CPUS:=1}; -: ${DEFAULT_CFLAGS_DEBUG:="-g2 -O0"}; -: ${DEFAULT_CFLAGS_DEBUG_HOST:="-g0 -O2"}; -: ${DEFAULT_CFLAGS_DEBUG_RUNTIME:="-g3 -O0"}; -: ${DEFAULT_CFLAGS_RELEASE:="-g0 -O2"}; -: ${DEFAULT_CFLAGS_RELEASE_HOST:="-g0 -O2"}; -: ${DEFAULT_CFLAGS_RELEASE_RUNTIME:="-g0 -O2"}; -: ${DEFAULT_CFLAGS:=$(ex_get_var_unsafe "DEFAULT_CFLAGS_$(ex_toupper "${BUILD}")")}; -: ${DEFAULT_CFLAGS_CONFIGURE:=${DEFAULT_CFLAGS}}; -: ${DEFAULT_CFLAGS_HOST:=$(ex_get_var_unsafe "DEFAULT_CFLAGS_$(ex_toupper "${BUILD}")_HOST")}; -: ${DEFAULT_CFLAGS_RUNTIME:=$(ex_get_var_unsafe "DEFAULT_CFLAGS_$(ex_toupper "${BUILD}")_RUNTIME")}; -: ${DEFAULT_GITROOT:=git://midipix.org}; -: ${DEFAULT_GITROOT_HEAD:=git://midipix.org}; -: ${DEFAULT_MAKE_INSTALL_VNAME:=DESTDIR}; -: ${DEFAULT_MAKEFLAGS_BUILD:=-j${DEFAULT_BUILD_CPUS}}; -: ${DEFAULT_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:="ARCH BUILD DEFAULT_GITROOT HOME PATH PREFIX PREFIX_CROSS PREFIX_NATIVE SHELL USER WORKDIR"}; -: ${LOG_MSG_FAIL_COLOUR:=91}; -: ${LOG_MSG_INFO_COLOUR:=93}; -: ${LOG_MSG_VNFO_COLOUR:=96}; -: ${LOG_MSG_VVFO_COLOUR:=96}; -: ${LOG_MSG_VVVO_COLOUR:=96}; -: ${LOG_MSG_SUCC_COLOUR:=92}; -: ${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}; +DEFAULT_BUILD_STEPS=" + fetch_wget fetch_git fetch_extract fetch \ + configure_patch_pre configure_autotools configure_patch configure \ + build \ + install_subdirs install_make install_files install_libs \ + install_pkgconfig install_purge_la install_strip install"; +DEFAULT_BUILD_VARS=" + AR BASE_DIR BUILD_DIR BUILD_STEPS_DISABLE BUILD_TYPE CC \ + CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA \ + CFLAGS_INSTALL_EXTRA CONFIG_CACHE CONFIG_CACHE_EXTRA CONFIGURE \ + CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA CXX CXXFLAGS_CONFIGURE_EXTRA \ + DISABLED ENV_VARS_EXTRA FNAME INSTALL_FILES INSTALL_FILES_DESTDIR \ + INSTALL_FILES_DESTDIR_EXTRA INSTALL_TARGET INSTALL_TARGET_EXTRA \ + IN_TREE LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA \ + LDFLAGS_INSTALL_EXTRA LIBTOOL MAKE MAKE_INSTALL_VNAME MAKEFLAGS_BUILD \ + MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA \ + NO_CLEAN_BASE_DIR NO_LOG_VARS PATCHES_EXTRA PKG_CONFIG PKG_CONFIG_LIBDIR \ + PKGCONFIG PREFIX RANLIB SHA256SUM SUBDIR TARGET URL URL_TYPE URLS_GIT VERSION"; +DEFAULT_LOG_MSG_FAIL_COLOUR=91; +DEFAULT_LOG_MSG_INFO_COLOUR=93; +DEFAULT_LOG_MSG_INF2_COLOUR=33; +DEFAULT_LOG_MSG_SUCC_COLOUR=92; +DEFAULT_LOG_MSG_SUC2_COLOUR=32; +DEFAULT_LOG_MSG_VNFO_COLOUR=96; +DEFAULT_LOG_MSG_VVFO_COLOUR=96; +DEFAULT_LOG_MSG_VVVO_COLOUR=96; +DEFAULT_TIMESTAMP_FMT="%Y/%m/%d %H:%M:%S"; # vim:filetype=sh textwidth=0 diff --git a/vars/gcc.vars b/vars/gcc.vars index f3b192b8..c5e1f22a 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -1,31 +1,44 @@ # # set -o errexit -o noglob are assumed. -# Order: stage1, runtime, libstdcpp_v3, full, native -# Order: stage1_x86_64_w64_mingw32, native_x86_64_w64_mingw32 +# Order: stage1_host, runtime_host, libstdcpp_v3_host, full_host, full +# Order: stage1_mingw32, native_mingw32 # +pkgp_gcc_build_dir() { + PKG_BUILD_DIR="${1}-${2}-${PKG_TARGET}"; +}; + pkgp_gcc_setup_env() { local __; export MAKE="make LIBTOOL=slibtool"; - export cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \ - cbb_sysroot_for_libgcc="${PKG_PREFIX}" \ - cbb_target="${PKG_TARGET}"; + export cbb_target="${PKG_TARGET}"; case "${PKG_NAME}" in - gcc_stage1) - export cbb_neutral_libiberty=no \ + gcc_stage1_host) + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_CROSS} -midata"; + export cbb_neutral_libiberty=no \ + cbb_ldflags_for_target=--sysroot="${PREFIX_CROSS}" \ + cbb_sysroot_for_libgcc="${PREFIX_CROSS}" \ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;; - gcc_stage1_cross_x86_64_w64_mingw32) - export cbb_neutral_libiberty=no \ + gcc_stage1_cross_mingw32) + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_MINGW32} -midata"; + export cbb_neutral_libiberty=no \ + cbb_ldflags_for_target=--sysroot="${PREFIX_MINGW32}" \ + cbb_sysroot_for_libgcc="${PREFIX_MINGW32}" \ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;; - gcc_stage1_native_x86_64_w64_mingw32) - export cbb_neutral_libiberty=no \ + gcc_stage1_native_mingw32) + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX} -midata"; + export cbb_neutral_libiberty=no \ + cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \ + cbb_sysroot_for_libgcc="${PKG_PREFIX}" \ cbb_xgcc_for_specs="${PKG_TARGET}-gcc"; ;; - gcc_native) - export cbb_xgcc_for_specs="${PKG_TARGET}-gcc" \ + gcc_full) + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX} -midata"; + export cbb_xgcc_for_specs="${PKG_TARGET}-gcc" \ + cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \ + cbb_sysroot_for_libgcc="${PKG_PREFIX}" \ sysroot_headers_suffix="${PKG_PREFIX}"; ;; esac; - GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX} -midata"; - GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h")"; + GCCFLAGS="${PKG_CFLAGS_CONFIGURE} --include $(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h")"; for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do export "${__}=${GCCFLAGS}"; done; @@ -39,10 +52,10 @@ pkgp_gcc_setup_env() { }; pkgp_gcc_configure() { - ex_build_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - ex_build_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - "../cbb-gcc-${PKG_GCC_VERSION}/configure" "${@}"\ + ex_rtl_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + "../cbb-gcc-${PKG_VERSION}/configure" "${@}"\ --disable-bootstrap \ --disable-libmudflap \ --disable-multilib \ @@ -64,66 +77,68 @@ pkgp_gcc_configure() { --enable-threads=posix \ --target="${PKG_TARGET}" \ --with-fpmath=sse; - ex_pkg_state_push "${PKG_NAME}" configure -build; + ex_pkg_state_set "${PKG_NAME}" configure -build; +}; + +pkg_gcc_stage1_host_all() { + pkg_gcc_stage1_all "${@}"; }; -pkg_gcc_stage1_cross_x86_64_w64_mingw32_all() { +pkg_gcc_stage1_cross_mingw32_all() { + ex_rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw"; + ex_rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32"; + ex_rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw"; + mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include"; pkg_gcc_stage1_all "${@}"; }; -pkg_gcc_stage1_native_x86_64_w64_mingw32_all() { - export AR="${TARGET}-ar"; - export CC="${TARGET}-gcc"; - export CXX="${TARGET}-g++"; - export RANLIB="${TARGET}-ranlib"; +pkg_gcc_stage1_native_mingw32_all() { + ex_rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw"; + ex_rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32"; + ex_rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw"; + mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include"; pkg_gcc_stage1_all "${@}"; }; pkg_gcc_stage1_all() { local __ _restart_at="${1}"; case "${PKG_NAME}" in - gcc_stage1) - PKG_GCC_VERSION="${PKG_GCC_STAGE1_VERSION}"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_VERSION}" cross; + gcc_stage1_host) + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross; ;; - gcc_stage1_cross_x86_64_w64_mingw32) - PKG_GCC_VERSION="${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_VERSION}"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_VERSION}" cross; + gcc_stage1_cross_mingw32) + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" mingw32; ;; - gcc_stage1_native_x86_64_w64_mingw32) - PKG_GCC_VERSION="${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_VERSION}"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_VERSION}" native; + gcc_stage1_native_mingw32) + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native; ;; esac; # GCC, stage1. if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - pkg_fetch_git "cbb-gcc-${PKG_GCC_VERSION}=${DEFAULT_GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}"; - ex_pkg_state_push "${PKG_NAME}" fetch -patch; + ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${DEFAULT_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}"; + ex_pkg_state_set "${PKG_NAME}" fetch -patch; fi; if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then if [ -e "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch" ]; then patch -b -d "${PKG_BASE_DIR}" -p0 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch"; fi; - ex_pkg_state_push "${PKG_NAME}" patch -configure; + ex_pkg_state_set "${PKG_NAME}" patch -configure; fi; - pkgp_gcc_setup_env "${PKG_GCC_VERSION}"; + pkgp_gcc_setup_env "${PKG_VERSION}"; if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then - ex_build_fileop mkdir "${PKG_PREFIX}/include"; - [ \! -d "${PKG_PREFIX}/usr" ] && \ - ex_build_fileop ln_symbolic . "${PKG_PREFIX}/usr"; case "${PKG_NAME}" in - gcc_stage1) + gcc_stage1_host) pkgp_gcc_configure \ --disable-sjlj-exceptions \ --prefix="${PREFIX}" \ - --with-sysroot="${PREFIX}/${PKG_TARGET}"; ;; - gcc_stage1_cross_x86_64_w64_mingw32) + --with-sysroot="${PREFIX_CROSS}"; ;; + gcc_stage1_cross_mingw32) pkgp_gcc_configure \ --enable-sjlj-exceptions \ --prefix="${PREFIX}" \ - --with-sysroot="${PREFIX}/${PKG_TARGET}"\ + --with-sysroot="${PREFIX_MINGW32}" \ --without-headers; ;; - gcc_stage1_native_x86_64_w64_mingw32) + gcc_stage1_native_mingw32) pkgp_gcc_configure \ --build=x86_64-unknown-linux-gnu \ --enable-sjlj-exceptions \ @@ -137,89 +152,120 @@ pkg_gcc_stage1_all() { --without-headers; ;; esac; else - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; fi; if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then make ${PKG_MAKEFLAGS_BUILD} all-gcc; - ex_pkg_state_push "${PKG_NAME}" build -install; + ex_pkg_state_set "${PKG_NAME}" build -install; fi; - if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -install_make; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then case "${PKG_NAME}" in - gcc_stage1) - make ${PKG_MAKEFLAGS_BUILD} install-gcc; ;; - gcc_stage1_cross_x86_64_w64_mingw32) - make ${PKG_MAKEFLAGS_BUILD} install-gcc; ;; - gcc_stage1_native_x86_64_w64_mingw32) - make ${PKG_MAKEFLAGS_BUILD} "DESTDIR=${PKG_PREFIX}" install-gcc; ;; + gcc_stage1_host) + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;; + gcc_stage1_cross_mingw32) + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;; + gcc_stage1_native_mingw32) + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;; esac; __="$(uname -s)"; if [ "${__#*CYGWIN*}" != "${__}" ]; then - ex_build_fileop ln_symbolic "${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a" \ - ex_build_fileop ln_symbolic "${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so"; + ex_rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.dll.a" \ + ex_rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.so"; fi; - ex_pkg_state_push "${PKG_NAME}" install finish; + ex_pkg_state_set "${PKG_NAME}" install_make -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; -pkg_gcc_runtime_all() { +pkg_gcc_runtime_host_all() { local _restart_at="${1}"; export MAKE="make LIBTOOL=slibtool"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_RUNTIME_VERSION}" cross; - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; # GCC, compiler runtime. if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then make ${PKG_MAKEFLAGS_BUILD} all-target-libgcc; - ex_pkg_state_push "${PKG_NAME}" build -install; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -install_make; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-target-libgcc; + ex_pkg_state_set "${PKG_NAME}" install_make -install; fi; if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then - make ${PKG_MAKEFLAGS_BUILD} install-target-libgcc; - ex_pkg_state_push "${PKG_NAME}" install finish; + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; -pkg_gcc_libstdcpp_v3_all() { +pkg_gcc_libstdcpp_v3_host_all() { local _restart_at="${1}"; export MAKE="make LIBTOOL=slibtool"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_LIBSTDCPP_V3_VERSION}" cross; - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; # GCC, libstdc++-v3. if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then make ${PKG_MAKEFLAGS_BUILD} all-target-libstdc++-v3; - ex_pkg_state_push "${PKG_NAME}" build -install; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -install_make; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-target-libstdc++-v3; + ex_pkg_state_set "${PKG_NAME}" install_make -install; fi; if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then - make ${PKG_MAKEFLAGS_BUILD} install-target-libstdc++-v3; - ex_pkg_state_push "${PKG_NAME}" install finish; + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; -pkg_gcc_full_all() { +pkg_gcc_full_host_all() { local _restart_at="${1}"; export MAKE="make LIBTOOL=slibtool"; - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_FULL_VERSION}" cross; - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; # GCC, everything else. if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then make ${PKG_MAKEFLAGS_BUILD}; - ex_pkg_state_push "${PKG_NAME}" build -install; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -install_make; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install; + ex_pkg_state_set "${PKG_NAME}" install_make -install; fi; if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then - make ${PKG_MAKEFLAGS_BUILD} install; - ex_pkg_state_push "${PKG_NAME}" install finish; + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; -pkg_gcc_native_all() { +pkg_gcc_full_all() { local _restart_at="${1}" _configure_host; - PKG_GCC_VERSION="${PKG_GCC_NATIVE_VERSION}"; export MAKE="make LIBTOOL=slibtool"; # GCC, native. - ex_pkg_state_build_dir "cbb-gcc-${PKG_GCC_VERSION}" native; - pkgp_gcc_setup_env "${PKG_GCC_VERSION}"; + pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native; + pkgp_gcc_setup_env "${PKG_VERSION}"; if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then - ex_build_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}"; + ex_rtl_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}"; if [ \! -d "${PKG_PREFIX}/${PKG_TARGET}/usr" ]; then - ex_build_fileop ln_symbolic . "${PKG_PREFIX}/${PKG_TARGET}/usr"; + ex_rtl_fileop ln_symbolic . "${PKG_PREFIX}/${PKG_TARGET}/usr"; fi; if [ "${ARCH}" = nt32 ]; then _configure_host="i686-nt32-midipix"; @@ -236,18 +282,26 @@ pkg_gcc_native_all() { --with-mpfr="${PKG_PREFIX}" \ --with-sysroot=; else - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; fi; if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then make ${PKG_MAKEFLAGS_BUILD} all-gcc; make ${PKG_MAKEFLAGS_BUILD} all-target-libgcc; make ${PKG_MAKEFLAGS_BUILD} all-target-libstdc++-v3; make ${PKG_MAKEFLAGS_BUILD} all; - ex_pkg_state_push "${PKG_NAME}" build -install; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -install_make; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then + make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install; + ex_pkg_state_set "${PKG_NAME}" install_make -install; fi; if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then - make ${PKG_MAKEFLAGS_BUILD} "DESTDIR=${PKG_PREFIX}" install; - ex_pkg_state_push "${PKG_NAME}" install finish; + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; diff --git a/vars/gcc_native.vars b/vars/gcc_full_host.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_native.vars +++ b/vars/gcc_full_host.vars diff --git a/vars/gcc_stage1.vars b/vars/gcc_libstdcpp_v3_host.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_stage1.vars +++ b/vars/gcc_libstdcpp_v3_host.vars diff --git a/vars/gcc_stage1_cross_x86_64_w64_mingw32.vars b/vars/gcc_runtime_host.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_stage1_cross_x86_64_w64_mingw32.vars +++ b/vars/gcc_runtime_host.vars diff --git a/vars/gcc_stage1_native_x86_64_w64_mingw32.vars b/vars/gcc_stage1_cross_mingw32.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_stage1_native_x86_64_w64_mingw32.vars +++ b/vars/gcc_stage1_cross_mingw32.vars diff --git a/vars/gcc_stage1_host.vars b/vars/gcc_stage1_host.vars new file mode 120000 index 00000000..55c0ef10 --- /dev/null +++ b/vars/gcc_stage1_host.vars @@ -0,0 +1 @@ +gcc.vars
\ No newline at end of file diff --git a/vars/gcc_stage1_native_mingw32.vars b/vars/gcc_stage1_native_mingw32.vars new file mode 120000 index 00000000..55c0ef10 --- /dev/null +++ b/vars/gcc_stage1_native_mingw32.vars @@ -0,0 +1 @@ +gcc.vars
\ No newline at end of file diff --git a/vars/git.vars b/vars/git.vars index 52037a65..4496d529 100644 --- a/vars/git.vars +++ b/vars/git.vars @@ -10,7 +10,7 @@ pkg_git_install_post() { local __ _new; for __ in $(find "${PKG_DESTDIR}" -name "Git*::*" -type f); do _new="$(echo ${__} | sed "s/::/./g")"; - ex_build_fileop mv "${__}" "${_new}"; + ex_rtl_fileop mv "${__}" "${_new}"; done; }; diff --git a/vars/install_strip_host.vars b/vars/install_strip_host.vars index 5e8524a8..e897420e 100644 --- a/vars/install_strip_host.vars +++ b/vars/install_strip_host.vars @@ -3,14 +3,14 @@ # pkg_install_strip_host_all() { - if [ -e "${PREFIX}/bin/${TARGET}-install-strip" ]; then - ex_build_fileop rm "${PREFIX}/bin/${TARGET}-install-strip"; + if [ -e "${PREFIX}/bin/${PKG_TARGET}-install-strip" ]; then + ex_rtl_fileop rm "${PREFIX}/bin/${PKG_TARGET}-install-strip"; fi; - cat > "${PREFIX}/bin/${TARGET}-install-strip" <<EOF + cat > "${PREFIX}/bin/${PKG_TARGET}-install-strip" <<EOF #!/bin/sh install -s "\${@}"; EOF - chmod +x "${PREFIX}/bin/${TARGET}-install-strip"; + chmod +x "${PREFIX}/bin/${PKG_TARGET}-install-strip"; }; # vim:filetype=sh diff --git a/vars/libxml2.vars b/vars/libxml2.vars index 0a59f8da..36d9f860 100644 --- a/vars/libxml2.vars +++ b/vars/libxml2.vars @@ -3,17 +3,17 @@ # pkg_libxml2_install_make_post() { - if [ -e "${PREFIX}/bin/${TARGET}-xml2-config" ]; then - ex_build_fileop rm "${PREFIX}/bin/${TARGET}-xml2-config"; + if [ -e "${PREFIX}/bin/${PKG_TARGET}-xml2-config" ]; then + ex_rtl_fileop rm "${PREFIX}/bin/${PKG_TARGET}-xml2-config"; fi; - cat > "${PREFIX}/bin/${TARGET}-xml2-config" <<EOF + cat > "${PREFIX}/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 "${PREFIX}/bin/${TARGET}-xml2-config"; + chmod +x "${PREFIX}/bin/${PKG_TARGET}-xml2-config"; }; diff --git a/vars/llvm_host.vars b/vars/llvm_host.vars index b84a339a..18c15827 100644 --- a/vars/llvm_host.vars +++ b/vars/llvm_host.vars @@ -3,10 +3,10 @@ # pkg_llvm_host_configure() { - ex_build_fileop rm "../llvm-${PKG_VERSION}-host"; - ex_build_fileop mkdir "../llvm-${PKG_VERSION}-host"; - ex_build_fileop cd "../llvm-${PKG_VERSION}-host"; - ex_log_msg info "Bootstrapping llvm_host..."; + ex_rtl_fileop rm "../llvm-${PKG_VERSION}-host"; + ex_rtl_fileop mkdir "../llvm-${PKG_VERSION}-host"; + ex_rtl_fileop cd "../llvm-${PKG_VERSION}-host"; + ex_rtl_log_msg info "Bootstrapping llvm_host..."; ("${PREFIX}/bin/cmake" \ "../llvm-${PKG_VERSION}.src" \ -DCMAKE_BUILD_TYPE=Release \ @@ -20,7 +20,7 @@ pkg_llvm_host_configure() { -DSPHINX_WARNINGS_AS_ERRORS=NO \ -G "Unix Makefiles" \ -Wno-dev); - ex_log_msg info "Finished bootstrapping llvm_host."; + ex_rtl_log_msg info "Finished bootstrapping llvm_host."; }; # vim:filetype=sh diff --git a/vars/midipix.vars b/vars/midipix.vars new file mode 100644 index 00000000..ca3e7647 --- /dev/null +++ b/vars/midipix.vars @@ -0,0 +1,108 @@ +# +# 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 +: ${PREFIX_ROOT:=${HOME}/midipix}; +: ${PREFIX:=${PREFIX_ROOT}/${ARCH}/${BUILD}}; +: ${PREFIX_CROSS:=${PREFIX}/${DEFAULT_TARGET}}; +: ${PREFIX_MINGW32:=${PREFIX}/x86_64-w64-mingw32}; +: ${PREFIX_MINIPIX:=${PREFIX}/minipix}; +: ${PREFIX_NATIVE:=${PREFIX}/native}; +: ${BUILD_DLCACHEDIR:=${PREFIX_ROOT}/dlcache}; +: ${BUILD_WORKDIR:=${PREFIX}/tmp}; +: ${DEFAULT_LOG_ENV_VARS:=" + ARCH BUILD BUILD_DLCACHEDIR BUILD_WORKDIR DEFAULT_GITROOT + HOME PATH PREFIX PREFIX_CROSS PREFIX_MINGW32 PREFIX_MINIPIX + PREFIX_NATIVE SHELL USER"}; +: ${DEFAULT_INSTALL_FILES_DESTDIR:=" + /=bin /=include /=lib /=lib/pkgconfig /=sbin + /=share /=share/doc /=share/info /=share/man + /=share/man/man1 /=share/man/man2 /=share/man/man3 /=share/man/man4 /=share/man/man5 + /=share/man/man6 /=share/man/man7 /=share/man/man8 /=share/man/man9 + @share/doc=doc + @share/info=info + @lib=lib64 + @share/man=man + @../lib/pkgconfig=share/pkgconfig + @.=usr"}; + +# Default flags & variables +: ${DEFAULT_BUILD_CPUS:=1}; +: ${DEFAULT_BUILD_TYPE:=native}; +: ${DEFAULT_CFLAGS_DEBUG:="-g2 -O0"}; +: ${DEFAULT_CFLAGS_DEBUG_HOST:="-g0 -O2"}; +: ${DEFAULT_CFLAGS_DEBUG_RUNTIME:="-g3 -O0"}; +: ${DEFAULT_CFLAGS_RELEASE:="-g0 -O2"}; +: ${DEFAULT_CFLAGS_RELEASE_HOST:="-g0 -O2"}; +: ${DEFAULT_CFLAGS_RELEASE_RUNTIME:="-g0 -O2"}; +: ${DEFAULT_CFLAGS:=$(ex_rtl_get_var_unsafe "DEFAULT_CFLAGS_$(ex_rtl_toupper "${BUILD}")")}; +: ${DEFAULT_CFLAGS_CONFIGURE:=${DEFAULT_CFLAGS}}; +: ${DEFAULT_CFLAGS_HOST:=$(ex_rtl_get_var_unsafe "DEFAULT_CFLAGS_$(ex_rtl_toupper "${BUILD}")_HOST")}; +: ${DEFAULT_CFLAGS_RUNTIME:=$(ex_rtl_get_var_unsafe "DEFAULT_CFLAGS_$(ex_rtl_toupper "${BUILD}")_RUNTIME")}; +: ${DEFAULT_GITROOT:=git://midipix.org}; +: ${DEFAULT_GITROOT_HEAD:=git://midipix.org}; +: ${DEFAULT_MAKE_INSTALL_VNAME:=DESTDIR}; +: ${DEFAULT_MAKEFLAGS_BUILD:=-j${DEFAULT_BUILD_CPUS}}; +: ${DEFAULT_WGET_ARGS:="--no-check-certificate"}; + +# Target-relative defaults +: ${DEFAULT_CROSS_AR:=${DEFAULT_TARGET}-ar}; +: ${DEFAULT_CROSS_CC:=${DEFAULT_TARGET}-gcc}; +: ${DEFAULT_CROSS_CXX:=${DEFAULT_TARGET}-g++}; +: ${DEFAULT_CROSS_LIBTOOL:=slibtool}; +: ${DEFAULT_CROSS_MAKE:=make LIBTOOL=slibtool}; +: ${DEFAULT_CROSS_RANLIB:=${DEFAULT_TARGET}-ranlib}; +: ${DEFAULT_HOST_AR:=ar}; +: ${DEFAULT_HOST_CC:=gcc}; +: ${DEFAULT_HOST_CXX:=g++}; +: ${DEFAULT_HOST_LIBTOOL:=slibtool}; +: ${DEFAULT_HOST_MAKE:=make LIBTOOL=slibtool}; +: ${DEFAULT_HOST_RANLIB:=ranlib}; +: ${DEFAULT_NATIVE_AR:=${DEFAULT_TARGET}-ar}; +: ${DEFAULT_NATIVE_CC:=${DEFAULT_TARGET}-gcc}; +: ${DEFAULT_NATIVE_CXX:=${DEFAULT_TARGET}-g++}; +: ${DEFAULT_NATIVE_LIBTOOL:=slibtool}; +: ${DEFAULT_NATIVE_MAKE:=make LIBTOOL=slibtool}; +: ${DEFAULT_NATIVE_PKGCONFIG:=${PREFIX}/bin/${DEFAULT_TARGET}-pkg-config}; +: ${DEFAULT_NATIVE_PKG_CONFIG:=${PREFIX}/bin/${DEFAULT_TARGET}-pkg-config}; +: ${DEFAULT_NATIVE_PKG_CONFIG_LIBDIR:=${PREFIX_NATIVE}/lib/pkgconfig}; +: ${DEFAULT_NATIVE_RANLIB:=${DEFAULT_TARGET}-ranlib}; + +# Build {log,status} & tarball names +: ${DEFAULT_BUILD_LOG_FNAME:=${PREFIX}/build.log}; +: ${DEFAULT_BUILD_LOG_LAST_FNAME:=${PREFIX}/build.log.last}; +: ${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; +: ${DEFAULT_TARBALL_CROSS_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_cross.}; +: ${DEFAULT_TARBALL_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}.}; +: ${DEFAULT_TARBALL_MINIPIX_FNAME_PREFIX:=minipix-${ARCH}-${BUILD}.}; +: ${DEFAULT_TARBALL_SIGN_GPG_KEY:=}; +: ${DEFAULT_TARBALL_SRC_FNAME_PREFIX:=midipix-${ARCH}-${BUILD}_src.}; +: ${DEFAULT_TARBALL_SUFFIX:=xz}; + +# Check & clear predicates +: ${DEFAULT_CHECK_PATH_VARS:=" + PREFIX PREFIX_NATIVE PREFIX_CROSS DLCACHEDIR WORKDIR"}; +: ${DEFAULT_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"}; +: ${DEFAULT_CHECK_PREREQ_FILES_DYNAMIC:=' + /usr/share/groff/$(groff -v 2>/dev/null | awk '\''/^GNU groff version /{print $NF}'\'')/tmac/e.tmac'}; +: ${DEFAULT_CHECK_PREREQ_FILES:=" + /usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"}; +: ${DEFAULT_CHECK_PREREQ_PERL_MODULES:=" + autodie ExtUtils::MakeMaker"}; +: ${DEFAULT_CLEAR_ENV_VARS_EXCEPT:=" + DEFAULT_GITROOT DEFAULT_GITROOT_HEAD HOME PATH SHELL TERM TARBALL_SIGN_GPG_KEY USER"}; +: ${DEFAULT_CLEAR_PREFIX_PATHS:=" + bin i686-nt32-midipix doc include info lib lib64 libexec man minipix native + sbin share tmp usr x86_64-nt64-midipix x86_64-w64-mingw32 midipix.sh midipix_shortcut.vbs README"}; + +# vim:filetype=sh textwidth=0 diff --git a/vars/musl.vars b/vars/musl.vars index d2dfd54c..147e6766 100644 --- a/vars/musl.vars +++ b/vars/musl.vars @@ -1,100 +1,127 @@ # # set -o errexit -o noglob are assumed. -# Order: no_complex, native, full +# Order: no_complex_host, full_host, full # +pkgp_musl_build_dir() { + PKG_BUILD_DIR="${1}-${2}-${PKG_TARGET}"; +}; + pkgp_musl_configure() { - ex_build_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - ex_build_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - ex_build_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; - env lz_cflags_cmdline="" \ - lz_debug="yes" \ - ../lazy/lazy \ - -a "${ARCH}" \ - -c gcc \ - -f "${PKG_PREFIX}" \ - -n musl \ - -p "../musl-${PKG_MUSL_VERSION}" \ - -t "${lz_target}" \ + ex_rtl_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; + env lz_cflags_cmdline="" \ + lz_debug="yes" \ + ../lazy/lazy \ + -a "${ARCH}" \ + -c gcc \ + -f "${PKG_DESTDIR}" \ + -n musl \ + -p "../musl-${PKG_VERSION}" \ + -t "${lz_target}" \ -x config; }; -pkg_musl_no_complex_all() { +pkg_musl_no_complex_host_all() { local _install _restart_at="${1}"; - PKG_MUSL_VERSION="${PKG_MUSL_NO_COMPLEX_VERSION}"; + PKG_MUSL_VERSION="${PKG_VERSION}"; # Git clone what we need. - pkg_fetch_git "lazy=${DEFAULT_GITROOT}/lazy"; - export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}"; + ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy"; + export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}"; # Musl: build (no-complex) _install=install_no_complex; - ex_pkg_state_build_dir "musl-${PKG_MUSL_VERSION}" cross; + pkgp_musl_build_dir "musl-${PKG_VERSION}" cross; if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - pkg_fetch_wget "http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz" \ + ex_rtl_fetch_url_wget \ + "http://www.musl-libc.org/releases/musl-${PKG_VERSION}.tar.gz" \ "${PKG_MUSL_NO_COMPLEX_SHA256SUM}"; - ex_build_fileop rm "${PKG_BASE_DIR}/mmglue"; - pkg_fetch_git "mmglue=${DEFAULT_GITROOT}/mmglue"; - ex_pkg_state_push "${PKG_NAME}" fetch -extract; + ex_rtl_fileop rm "${PKG_BASE_DIR}/mmglue"; + ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "mmglue=${DEFAULT_GITROOT}/mmglue"; + ex_pkg_state_set "${PKG_NAME}" fetch -extract; fi; if ! ex_pkg_state_test "${PKG_NAME}" extract "${_restart_at}"; then - ex_build_fileop rm "musl-${PKG_MUSL_VERSION}"; - tar -C "${PKG_BASE_DIR}" -xf "${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz"; + ex_rtl_fileop rm "musl-${PKG_VERSION}"; + tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/musl-${PKG_VERSION}.tar.gz"; set +o noglob; - ex_build_fileop cp ${PKG_BASE_DIR}/mmglue/* "${PKG_BASE_DIR}/musl-${PKG_MUSL_VERSION}/"; + ex_rtl_fileop cp ${PKG_BASE_DIR}/mmglue/* "${PKG_BASE_DIR}/musl-${PKG_VERSION}/"; set -o noglob; - ex_pkg_state_push "${PKG_NAME}" extract -configure; + ex_pkg_state_set "${PKG_NAME}" extract -configure; fi; if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then pkgp_musl_configure; - ex_pkg_state_push "${PKG_NAME}" configure -build; + ex_pkg_state_set "${PKG_NAME}" configure -build; else - ex_build_fileop cd "${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BUILD_DIR}"; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -build; fi; if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then ./lazy -e "${_install}" -x build; - ex_pkg_state_push "${PKG_NAME}" build finish; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; -pkg_musl_native_all() { +pkg_musl_full_host_all() { local _install _restart_at="${1}"; - PKG_MUSL_VERSION="${PKG_MUSL_NATIVE_VERSION}"; # Git clone what we need. - pkg_fetch_git "lazy=${DEFAULT_GITROOT}/lazy"; - export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}"; + ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy"; + export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}"; # Musl: build (full) _install=install; - ex_pkg_state_build_dir "musl-${PKG_MUSL_VERSION}" native; + pkgp_musl_build_dir "musl-${PKG_VERSION}" cross; if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then pkgp_musl_configure; - ex_pkg_state_push "${PKG_NAME}" configure -build; + ex_pkg_state_set "${PKG_NAME}" configure -build; else - ex_build_fileop cd "${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BUILD_DIR}"; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -build; fi; if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then ./lazy -e "${_install}" -x build; - ex_build_fileop ln_symbolic ../lib/libc.so "${PKG_PREFIX}/bin/ldd"; - ex_pkg_state_push "${PKG_NAME}" build finish; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; pkg_musl_full_all() { local _install _restart_at="${1}"; - PKG_MUSL_VERSION="${PKG_MUSL_FULL_VERSION}"; # Git clone what we need. - pkg_fetch_git "lazy=${DEFAULT_GITROOT}/lazy"; - export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}"; + ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy"; + export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}"; # Musl: build (full) _install=install; - ex_pkg_state_build_dir "musl-${PKG_MUSL_VERSION}" cross; + pkgp_musl_build_dir "musl-${PKG_VERSION}" native; if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then pkgp_musl_configure; - ex_pkg_state_push "${PKG_NAME}" configure -build; + ex_pkg_state_set "${PKG_NAME}" configure -build; else - ex_build_fileop cd "${PKG_BUILD_DIR}"; + ex_rtl_fileop cd "${PKG_BUILD_DIR}"; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then + pkg_install_subdirs; + ex_pkg_state_set "${PKG_NAME}" install_subdirs -build; fi; if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then ./lazy -e "${_install}" -x build; - ex_pkg_state_push "${PKG_NAME}" build finish; + ex_rtl_fileop ln_symbolic ../lib/libc.so "${PKG_DESTDIR}/bin/ldd"; + ex_pkg_state_set "${PKG_NAME}" build -install; + fi; + if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then + pkg_install; + ex_pkg_state_set "${PKG_NAME}" install finish; fi; }; diff --git a/vars/musl_native.vars b/vars/musl_full_host.vars index aed756b9..aed756b9 120000 --- a/vars/musl_native.vars +++ b/vars/musl_full_host.vars diff --git a/vars/musl_no_complex.vars b/vars/musl_no_complex_host.vars index aed756b9..aed756b9 120000 --- a/vars/musl_no_complex.vars +++ b/vars/musl_no_complex_host.vars diff --git a/vars/nginx.vars b/vars/nginx.vars index 9a5096bb..0fbb5a34 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"; - ex_build_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; + ex_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 diff --git a/vars/perl.vars b/vars/perl.vars index 95068258..1606a7aa 100644 --- a/vars/perl.vars +++ b/vars/perl.vars @@ -4,17 +4,17 @@ pkg_perl_fetch_extract_post() { local _fname_src _fname_dst _cflag; - (ex_build_fileop cd "${PKG_BASE_DIR}"; + (ex_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 - ex_build_fileop mv "${_fname_dst}" "${_fname_dst}.orig"; + ex_rtl_fileop mv "${_fname_dst}" "${_fname_dst}.orig"; fi; - if [ ! -d "$(ex_dirname "${_fname_dst}")" ]; then - ex_build_fileop mkdir "$(ex_dirname "${_fname_dst}")"; + if [ ! -d "$(ex_rtl_dirname "${_fname_dst}")" ]; then + ex_rtl_fileop mkdir "$(ex_rtl_dirname "${_fname_dst}")"; fi; - ex_build_fileop cp "${_fname_src}" "${_fname_dst}"; + ex_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}"; diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars index 7262697f..ffc13acb 100644 --- a/vars/pkgconf_host.vars +++ b/vars/pkgconf_host.vars @@ -3,25 +3,25 @@ # pkg_pkgconf_host_install_make_post() { - if [ -e "${PREFIX}/bin/${TARGET}-pkg-config" ]; then - ex_build_fileop rm "${PREFIX}/bin/${TARGET}-pkg-config"; + if [ -e "${PREFIX}/bin/${PKG_TARGET}-pkg-config" ]; then + ex_rtl_fileop rm "${PREFIX}/bin/${PKG_TARGET}-pkg-config"; fi; - cat > "${PREFIX}/bin/${TARGET}-pkg-config" <<EOF + cat > "${PREFIX}/bin/${PKG_TARGET}-pkg-config" <<EOF #!/bin/sh if [ -z "\${PREFIX_NATIVE}" ]; then PREFIX_NATIVE="${PREFIX_NATIVE}"; fi; "\$(dirname "\${0}")"/pkgconf --define-variable=prefix="\${PREFIX_NATIVE%/}/" "\${@}"; EOF - chmod +x "${PREFIX}/bin/${TARGET}-pkg-config"; - ex_build_fileop rm "${PREFIX}/bin/pkg-config"; + chmod +x "${PREFIX}/bin/${PKG_TARGET}-pkg-config"; + ex_rtl_fileop rm "${PREFIX}/bin/pkg-config"; }; pkg_pkgconf_install_make_post() { if [ -e "${PREFIX_NATIVE}/bin/pkg-config" ]; then - ex_build_fileop rm "${PREFIX_NATIVE}/bin/pkg-config"; + ex_rtl_fileop rm "${PREFIX_NATIVE}/bin/pkg-config"; fi; - ex_build_fileop ln_symbolic pkgconf "${PREFIX_NATIVE}/bin/pkg-config"; + ex_rtl_fileop ln_symbolic pkgconf "${PREFIX_NATIVE}/bin/pkg-config"; }; # vim:filetype=sh diff --git a/vars/psxstub.vars b/vars/psxstub_host.vars index 1664b51a..d41fde58 100644 --- a/vars/psxstub.vars +++ b/vars/psxstub_host.vars @@ -3,12 +3,12 @@ # pkg_psxstub_install_make() { - if [ "${TARGET}" = i686-nt32-midipix ] \ - || [ "${TARGET}" = x86_64-nt64-midipix ]; then - ex_build_fileop cd "${PKG_BASE_DIR}/psxstub"; - make ${PKG_MAKEFLAGS_BUILD} "DESTDIR=${PKG_PREFIX}" "TARGET=${TARGET}" install; + if [ "${PKG_TARGET}" = i686-nt32-midipix ] \ + || [ "${PKG_TARGET}" = x86_64-nt64-midipix ]; then + ex_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 - ex_build_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a"; + ex_rtl_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a"; fi; fi; }; diff --git a/vars/python3.vars b/vars/python3.vars index d0edb8e3..b193fa5e 100644 --- a/vars/python3.vars +++ b/vars/python3.vars @@ -3,15 +3,15 @@ # pkg_python3_configure_pre() { - (ex_build_fileop cd "../${PKG_SUBDIR}" && autoconf); + (ex_rtl_fileop cd "../${PKG_SUBDIR}" && autoconf); (unset AR BLDSHARED CC CFLAGS CPPFLAGS CXX LDFLAGS RANLIB; - ex_build_fileop mv config.cache "../${PKG_SUBDIR}/config.cache"; + ex_rtl_fileop mv config.cache "../${PKG_SUBDIR}/config.cache"; "../${PKG_SUBDIR}/configure"; make _FIP=Programs/host_freeze_importlib Programs/host_freeze_importlib \ BUILDPYTHON=hostpython hostpython \ PGEN=Parser/hostpgen Parser/hostpgen; make distclean); - ex_build_fileop mv "../${PKG_SUBDIR}/config.cache" .; + ex_rtl_fileop mv "../${PKG_SUBDIR}/config.cache" .; }; # vim:filetype=sh diff --git a/vars/vim.vars b/vars/vim.vars index d1e6078a..eb5d3fde 100644 --- a/vars/vim.vars +++ b/vars/vim.vars @@ -16,7 +16,7 @@ vim_cv_tty_group=tty vim_cv_tty_mode=0666"}; pkg_vim_configure_autotools_post() { - ex_build_fileop cp config.cache src/auto; + ex_rtl_fileop cp config.cache src/auto; }; # vim:filetype=sh |