From c288dfb0f33ef4a713680190b5b2e2ca69cfb171 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: May 25 2016 21:16:29 +0000 Subject: - Followup to . - Fix pseudo-local variable leaks in build.subr. - Log $PKG_* environment variables prior to building w/ pkg.build. - Always build musl w/ -g2 -O0. - Remove obsolete export CFLAGS=${CFLAGS_LVL${BUILD_LVL}} command from build.sh. - Handle bin/libpsxscl.{last,log} in midipix.sh. - Add autoconf to $CHECK_PREREQ_CMDS. - Include `Create `Midipix mintty shell' shortcut.vbs' in the tarball. - Changes the $PKG_ENV_VARS_EXTRA variable name-value pair separator from `,' to `:'. - Link bash and coreutils statically. - Changes the level 2 package --prefix to `', installing to DESTDIR=$PREFIX_LVL2. --- diff --git a/006.musl.full.build b/006.musl.full.build index b3cc5e6..ce5855c 100644 --- a/006.musl.full.build +++ b/006.musl.full.build @@ -35,6 +35,7 @@ elif [ "${3}" = full ]; then fi; if ! is_build_script_done configure; then rm_if_exists -m -c ${PKG_BUILD_DIR}; + env lz_cflags_cmdline="${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA}"\ ../lazy/lazy \ -a ${ARCH} \ -c gcc \ diff --git a/370.python3.vars b/370.python3.vars index 0de381b..c987c79 100644 --- a/370.python3.vars +++ b/370.python3.vars @@ -2,18 +2,16 @@ # . ./build.vars and set -o errexit are assumed. # -pkg_python3_extract_post() { - cd ${PKG_SUBDIR}; - autoconf; - ./configure; +pkg_python3_configure_pre() { + (cd ../${PKG_SUBDIR} && autoconf); + (unset BLDSHARED CC CFLAGS CPPFLAGS LDFLAGS; + 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; - cd ..; -}; - -pkg_python3_configure_pre() { + make distclean); + mv ../${PKG_SUBDIR}/config.cache .; sed -i.orig '/^# autoconf/a\ ac_cv_buggy_getaddrinfo=no' config.cache; }; diff --git a/399.midipix_sh.build b/399.midipix_sh.build index 906cd24..3bd0413 100644 --- a/399.midipix_sh.build +++ b/399.midipix_sh.build @@ -33,6 +33,11 @@ if [ ! -d /cygdrive\${MIDIPIX_PATH} ]; then echo "Error: Midipix path non-existent or invalid (\\\`\${MIDIPIX_PATH}'.)"; exit 1; else + if [ -f /cygdrive\${MIDIPIX_PATH}/bin/libpsxscl.log ]; then + echo Found libpsxscl.log, copying to /cygdrive\${MIDIPIX_PATH}/bin/libpsxscl.last. + cp /cygdrive\${MIDIPIX_PATH}/bin/libpsxscl.log \\ + /cygdrive\${MIDIPIX_PATH}/bin/libpsxscl.last; + fi; echo "Midipix drive letter.....: \${MIDIPIX_DRIVE}"; echo "Midipix pathname.........: \${MIDIPIX_PNAME}"; echo "Absolute Midipix pathname: \${MIDIPIX_PATH}"; diff --git a/Python-3.5.1.local.patch b/Python-3.5.1.local.patch new file mode 100644 index 0000000..753bf86 --- /dev/null +++ b/Python-3.5.1.local.patch @@ -0,0 +1,202 @@ +--- Python-3.5.1/config.sub.orig 2015-12-07 01:39:11.000000000 +0000 ++++ Python-3.5.1/config.sub 2016-04-22 17:23:27.208488716 +0000 +@@ -795,6 +795,10 @@ + microblaze*) + basic_machine=microblaze-xilinx + ;; ++ midipix) ++ basic_machine=x86_64-pc ++ os=-midipix ++ ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 +@@ -1371,7 +1375,7 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ +--- Python-3.5.1/configure.ac.orig 2015-12-07 01:39:11.000000000 +0000 ++++ Python-3.5.1/configure.ac 2016-04-23 12:49:17.142936229 +0000 +@@ -58,6 +58,15 @@ + + if test "$cross_compiling" = yes; then + AC_MSG_CHECKING([for python interpreter for cross build]) ++ AC_MSG_CHECKING(python for build) ++ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD:-${PWD}/hostpython}" ++ AC_MSG_RESULT($PYTHON_FOR_BUILD) ++ AC_MSG_CHECKING(pgen for build) ++ PGEN_FOR_BUILD="${PGEN_FOR_BUILD:-Parser/hostpgen}" ++ AC_MSG_RESULT($PGEN_FOR_BUILD) ++ AC_MSG_CHECKING(_freeze_importlib for build) ++ _FIP_FOR_BUILD="${_FIP_FOR_BUILD:-Programs/host_freeze_importlib}" ++ AC_MSG_RESULT($_FIP_FOR_BUILD) + if test -z "$PYTHON_FOR_BUILD"; then + for interp in python$PACKAGE_VERSION python3 python; do + which $interp >/dev/null 2>&1 || continue +@@ -75,9 +84,16 @@ + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) + else +- PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' ++ PYTHON_FOR_BUILD='$(BUILDPYTHON)' ++ PGEN_FOR_BUILD='$(PGEN)' ++ _FIP_FOR_BUILD='$(_FIP)' + fi + AC_SUBST(PYTHON_FOR_BUILD) ++AC_SUBST(PGEN_FOR_BUILD) ++AC_SUBST(_FIP_FOR_BUILD) ++AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) ++AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) ++AC_ARG_VAR(_FIP_FOR_BUILD,[build system Python _freeze_importlib]) + + dnl Ensure that if prefix is specified, it does not end in a slash. If + dnl it does, we get path names containing '//' which is both ugly and +@@ -373,6 +389,9 @@ + *-*-cygwin*) + ac_sys_system=Cygwin + ;; ++ *-*-midipix*) ++ ac_sys_system=Midipix ++ ;; + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +@@ -399,6 +418,7 @@ + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + irix646) MACHDEP="irix6";; ++ midipix*) MACHDEP="midipix";; + '') MACHDEP="unknown";; + esac + fi +@@ -406,6 +426,9 @@ + AC_SUBST(_PYTHON_HOST_PLATFORM) + if test "$cross_compiling" = yes; then + case "$host" in ++ *-*-midipix*) ++ _host_cpu= ++ ;; + *-*-linux*) + case "$host_cpu" in + arm*) +--- Python-3.5.1/Makefile.pre.in.orig 2015-12-07 01:39:09.000000000 +0000 ++++ Python-3.5.1/Makefile.pre.in 2016-04-23 12:09:05.162989761 +0000 +@@ -276,6 +276,9 @@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++PGEN_FOR_BUILD= @PGEN_FOR_BUILD@ ++_FIP= Programs/_freeze_importlib$(EXE) ++_FIP_FOR_BUILD= @_FIP_FOR_BUILD@ + + PSRCS= \ + Parser/acceler.c \ +@@ -597,6 +600,7 @@ + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ ++ _PYTHON_HOST_PLATFORM='$(_PYTHON_HOST_PLATFORM)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library +@@ -708,15 +712,15 @@ + + Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile + +-Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) ++$(_FIP): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) + $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + +-Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ ++Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py $(_FIP_FOR_BUILD) ++ ./$(_FIP_FOR_BUILD) \ + $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h + +-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ ++Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py $(_FIP_FOR_BUILD) ++ ./$(_FIP_FOR_BUILD) \ + $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h + + +@@ -777,9 +781,9 @@ + + $(IO_OBJS): $(IO_H) + +-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) ++$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN_FOR_BUILD) + @$(MKDIR_P) Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_C): $(GRAMMAR_H) + touch $(GRAMMAR_C) + +@@ -1415,6 +1419,7 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods ++ _PYTHON_HOST_PLATFORM='$(_PYTHON_HOST_PLATFORM)' \ + $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ +--- Python-3.5.1/Modules/socketmodule.c.orig 2015-12-07 01:39:10.000000000 +0000 ++++ Python-3.5.1/Modules/socketmodule.c 2016-04-23 12:30:40.854961004 +0000 +@@ -1313,7 +1313,7 @@ + } + #endif + +-#ifdef AF_CAN ++#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) + case AF_CAN: + { + struct sockaddr_can *a = (struct sockaddr_can *)addr; +@@ -1810,7 +1810,7 @@ + } + #endif + +-#if defined(AF_CAN) && defined(CAN_RAW) && defined(CAN_BCM) ++#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) && defined(CAN_RAW) && defined(CAN_BCM) + case AF_CAN: + switch (s->sock_proto) { + case CAN_RAW: +@@ -2017,7 +2017,7 @@ + } + #endif + +-#ifdef AF_CAN ++#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) + case AF_CAN: + { + *len_ret = sizeof (struct sockaddr_can); +@@ -6298,7 +6298,7 @@ + PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF"); + #endif + +-#ifdef AF_CAN ++#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) + /* Controller Area Network */ + PyModule_AddIntMacro(m, AF_CAN); + #endif +--- Python-3.5.1/setup.py.orig 2015-12-07 01:39:11.000000000 +0000 ++++ Python-3.5.1/setup.py 2016-04-23 15:59:20.902683131 +0000 +@@ -1294,7 +1294,13 @@ + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') ++ cflags = sysconfig.get_config_var('CFLAGS') ++ m = re.search(r'-isysroot\s+(\S+)', cflags) ++ if m is None: ++ sysroot = '/usr' ++ else: ++ sysroot = m.group(1) ++ curses_includes.append(sysroot + '/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' diff --git a/build.sh b/build.sh index 2719cfa..09bba16 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ check_path_vars ${CHECK_PATH_VARS}; check_prereqs ${PREREQ_CMDS}; {( update_build_status build_start; build_times_init; trap "clean_build_status abort; exit 1" HUP INT TERM USR1 USR2; log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}."; -log_env_vars ${LOG_ENV_VARS}; [ ${ARG_CLEAN:-0} -eq 1 ] && clean_prefix; +log_env_vars "build (global)" ${LOG_ENV_VARS}; [ ${ARG_CLEAN:-0} -eq 1 ] && clean_prefix; mkdir -p ${PREFIX} ${PREFIX_NATIVE} ${PREFIX_TARGET} ${WORKDIR}; if [ -d ${PREFIX}/usr -o -f ${PREFIX}/usr -o -L ${PREFIX}/usr ]; then rm -rf ${PREFIX}/usr; @@ -63,7 +63,6 @@ for BUILD_LVL in 0 1 2 3; do (set -o errexit -- $(split . ${BUILD_SCRIPT_FNAME%%.build*}); \ SCRIPT_FNAME=${BUILD_SCRIPT_FNAME}; \ SCRIPT_NAME=${SCRIPT_FNAME%%.build*}; \ - export CFLAGS="$(eval echo \${CFLAGS_LVL${BUILD_LVL}})"; \ export PREFIX_LVL="$(eval echo \${PREFIX_LVL${BUILD_LVL}})"; \ _PWD=$(pwd); cd ${WORKDIR}; \ for SCRIPT_SOURCE in build.subr ${SCRIPT_NAME}.vars \ @@ -120,7 +119,8 @@ if [ $(( ${BUILD_NFINI} + ${BUILD_NSKIP} )) -ge 0 ] \ tar -cJpf ${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.xz\ $(find_with_no_paths "${TARBALL_EXCLUDE_PATHS} native/lib.bak" . \ - -mindepth 1 -maxdepth 2 -type d -not -path ./native) midipix.sh; + -mindepth 1 -maxdepth 2 -type d -not -path ./native) \ + "Create \`Midipix mintty shell' shortcut.vbs" midipix.sh; log_msg info "Finished building distribution tarball."; sha256sum ${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.xz\ > ${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.sha256sum; diff --git a/build.subr b/build.subr index 7317893..a6515fa 100644 --- a/build.subr +++ b/build.subr @@ -39,7 +39,7 @@ clean_prefix() { for _cp_pname in $(find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -not -iname \*.tar\*) \ $(find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -type f -iname .\*); do rm_if_exists ${_cp_pname}; - done; + done; unset _cp_pname; }; clean_build_status() { @@ -49,9 +49,10 @@ clean_build_status() { rm -f $(get_var_unsafe ${1}); shift; done; if [ ${_cbs_abort:-0} -eq 1 ]; then + unset _cbs_abort; touch ${PREFIX}/BUILD_ABORTED_AT_$(date %Y-%m-%d-%H-%M-%S); log_msg fail "Build aborted at $(date %Y-%m-%d-%H-%M-%S)."; - fi; + fi; unset _cbs_abort; }; export_vars_subst() { @@ -237,7 +238,7 @@ set_build_script_done() { }; log_env_vars() { - log_msg info "Variables for this build:"; + log_msg info "Variables for this ${1:-build}:"; shift; while [ ${_lev_nvar:=0} -lt ${#} ]; do _lev_arg="$(eval echo \${${_lev_nvar}})"; _lev_arg="${_lev_arg%%=*}"; @@ -286,8 +287,17 @@ parse_with_pkg_name() { [ -z "${PKG_URL}" ] && return 1; [ -z "${PKG_FNAME}" ] && PKG_FNAME=${PKG_URL##*/}; [ -z "${PKG_SUBDIR}" ] && PKG_SUBDIR=${PKG_FNAME%%.tar*}; - [ -n "${PKG_ENV_VARS_EXTRA}" ] && set_env_vars_with_sep , "${PKG_ENV_VARS_EXTRA}"; - export PKG_PREFIX=$(get_var_unsafe PREFIX_LVL${PKG_LVL}); return 0; + [ -n "${PKG_ENV_VARS_EXTRA}" ] && set_env_vars_with_sep : "${PKG_ENV_VARS_EXTRA}"; + export PKG_PREFIX=$(get_var_unsafe PREFIX_LVL${PKG_LVL}); + for _pwpn_env_var in $(export); do + if [ "${_pwpn_env_var#PKG_}" != "${_pwpn_env_var}" ]; then + _pwpn_env_vars="${_pwpn_env_vars:+${_pwpn_env_vars} }${_pwpn_env_var%%=*}"; + fi; + done; + if [ -n "${_pwpn_env_vars}" ]; then + log_env_vars "build script" ${_pwpn_env_vars}; + fi; unset _pwpn_env_var _pwpn_env_vars; + return 0; fi; shift; done; return 1; }; @@ -296,10 +306,10 @@ run_cmd_unsplit() { _rcu_cmd=${1}; shift; while [ ${#} -gt 0 ]; do [ -n "${1}" ] &&\ - _rcu_cmdline="${_rcu_cmdline:+${_rcu_cmdline},}${1}"; + _rcu_cmdline="${_rcu_cmdline:+${_rcu_cmdline}:}${1}"; shift; done; - push_IFS ,; ${_rcu_cmd} ${_rcu_cmdline}; _rcu_rc=$?; pop_IFS; + push_IFS :; ${_rcu_cmd} ${_rcu_cmdline}; _rcu_rc=$?; pop_IFS; unset _rcu_cmd _rcu_cmdline; return ${_rcu_rc}; }; diff --git a/build.vars b/build.vars index 1fe4cc2..14a2e3c 100644 --- a/build.vars +++ b/build.vars @@ -14,7 +14,7 @@ : ${BUILD_STATUS_FINISHED_AT_CURRENT_FNAME:=${PREFIX}/BUILD_FINISHED_AT}; : ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; : ${CFLAGS_DEFAULT:=-g3 -O0}; -: ${CHECK_PREREQ_CMDS:="aclocal autopoint bunzip2 flex git gunzip install libtool make mktemp openssl patch pkg-config sed sort tar tee tr sha256sum wget xz"}; +: ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint bunzip2 flex git gunzip install libtool make mktemp openssl patch pkg-config sed sort tar tee tr sha256sum wget xz"}; : ${CHECK_PATH_VARS:="PREFIX PREFIX_NATIVE WORKDIR"}; : ${CLEAR_ENV_VARS_EXCEPT:="HOME PATH SHELL TERM USER"}; : ${GITROOT:=git://midipix.org}; @@ -53,9 +53,10 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_LVL1_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_LVL1}}; : ${PKG_LVL2_BUILD_TYPE:=cross}; : ${PKG_LVL2_CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT}}; -: ${PKG_LVL2_CONFIGURE_ARGS:="--prefix=${PREFIX_LVL2} --host=${HOST_NATIVE}"}; -: ${PKG_LVL2_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_LVL2}/include,LDFLAGS_PATH=-L${PREFIX_LVL2}/lib"}; +: ${PKG_LVL2_CONFIGURE_ARGS:="--prefix= --host=${HOST_NATIVE}"}; +: ${PKG_LVL2_ENV_VARS_EXTRA:="CFLAGS_PATH=-I${PREFIX_LVL2}/include:LDFLAGS_PATH=-L${PREFIX_LVL2}/lib"}; : ${PKG_LVL2_MAKEFLAGS_BUILD:=${MAKEFLAGS_DEFAULT}}; +: ${PKG_LVL2_MAKEFLAGS_INSTALL:=DESTDIR=${PREFIX_LVL2}}; : ${PKG_LVL2_URL_TYPE:=git}; : ${PKG_LVL3_CFLAGS_CONFIGURE:=${CFLAGS_DEFAULT} --sysroot=${PREFIX_LVL3}}; : ${PKG_LVL3_LDFLAGS_CONFIGURE:=--sysroot=${PREFIX_LVL3}}; @@ -68,7 +69,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_APK_TOOLS_URL:=http://git.alpinelinux.org/cgit/apk-tools/snapshot/apk-tools-${PKG_APK_TOOLS_VERSION}.tar.bz2}; : ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk}; : ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}}; -: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3},CROSS_COMPILE=${HOST_NATIVE}-,LUAAPK=,PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig,VERBOSE=1,PREFIX=${PREFIX_LVL3},LDFLAGS_LIBS=--sysroot=${PREFIX_LVL3} -lcrypto -lssl -lz}; +: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:CROSS_COMPILE=${HOST_NATIVE}-:LUAAPK=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig:VERBOSE=1:PREFIX=${PREFIX_LVL3}:LDFLAGS_LIBS=--sysroot=${PREFIX_LVL3} -lcrypto -lssl -lz}; : ${PKG_BZIP2_VERSION:=1.0.6}; : ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd}; : ${PKG_BZIP2_URL:=http://www.bzip.org/1.0.6/bzip2-${PKG_BZIP2_VERSION}.tar.gz}; @@ -85,7 +86,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_BASH_VERSION:=4.3}; : ${PKG_BASH_SHA256SUM:=afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4}; : ${PKG_BASH_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}.tar.gz}; -: ${PKG_BASH_CONFIGURE_ARGS_EXTRA:=--without-bash-malloc --with-curses}; +: ${PKG_BASH_CONFIGURE_ARGS_EXTRA:="--enable-static-link --without-bash-malloc --with-curses"}; : ${PKG_BASH_PATCHES_EXTRA_URL:=https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}-patches/}; : ${PKG_BINUTILS_VERSION:=2.24.51}; : ${PKG_BINUTILS_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa}; @@ -99,6 +100,8 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_COREUTILS_VERSION:=8.23}; : ${PKG_COREUTILS_SHA256SUM:=ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d}; : ${PKG_COREUTILS_URL:=https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_COREUTILS_VERSION}.tar.xz}; +: ${PKG_COREUTILS_LDFLAGS_BUILD_EXTRA:=-static}; +: ${PKG_COREUTILS_MAKEFLAGS_BUILD_EXTRA:="SHARED=0 V=99"}; : ${PKG_CURL_VERSION:=7.47.1}; : ${PKG_CURL_SHA256SUM:=ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f}; : ${PKG_CURL_URL:=https://curl.haxx.se/download/curl-${PKG_CURL_VERSION}.tar.bz2}; @@ -140,7 +143,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_GLIB_SHA256SUM:=5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db}; : ${PKG_GLIB_URL:=http://ftp.gnome.org/pub/GNOME/sources/glib/${PKG_GLIB_VERSION%.[0-9]}/glib-${PKG_GLIB_VERSION}.tar.xz}; : ${PKG_GLIB_CONFIGURE_ARGS_EXTRA:=--with-pcre=internal --disable-libelf}; -: ${PKG_GLIB_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX_LVL3}/lib/libffi-3.2.1/include,LIBFFI_LIBS=-L${PREFIX_LVL3}/lib -lffi}; +: ${PKG_GLIB_ENV_VARS_EXTRA:=LIBFFI_CFLAGS=-I${PREFIX_LVL3}/lib/libffi-3.2.1/include:LIBFFI_LIBS=-L${PREFIX_LVL3}/lib -lffi}; : ${PKG_GLIB_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_GMP_VERSION:=5.1.3}; : ${PKG_GMP_SHA256SUM:=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160}; @@ -189,7 +192,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_LIBFETCH_SHA256SUM:=3226f53d5ad29cc27510db968ef0d37bf4554b8aaaeadcd56e23067213b08943}; : ${PKG_LIBFETCH_URL:=https://sources.archlinux.org/other/libfetch/libfetch-${PKG_LIBFETCH_VERSION}.tar.gz}; : ${PKG_LIBFETCH_BUILD_DIR:=libfetch-${PKG_LIBFETCH_VERSION}}; -: ${PKG_LIBFETCH_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3},LDFLAGS=--sysroot=${PREFIX_LVL3}}; +: ${PKG_LIBFETCH_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3}:LDFLAGS=--sysroot=${PREFIX_LVL3}}; : ${PKG_LIBFETCH_LIBFILES_FIX:=1}; : ${PKG_LIBFETCH_MAKEFLAGS_BUILD_EXTRA:=E=echo Q= AR=${TARGET}-ar CC=${TARGET}-gcc LD=${TARGET}-gcc}; : ${PKG_LIBFETCH_MAKEFLAGS_INSTALL_EXTRA:=E=echo Q= prefix=}; @@ -234,8 +237,9 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_MUSL_VERSION:=1.1.12}; : ${PKG_MUSL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e}; : ${PKG_MUSL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz}; +: ${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA:="-g2 -O0"}; : ${PKG_NANO_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_LVL3}/include/ncursesw}; -: ${PKG_NANO_ENV_VARS_EXTRA:="NCURSESW_LIBS=-lformw -lmenuw -lncursesw -lpanelw,PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; +: ${PKG_NANO_ENV_VARS_EXTRA:="NCURSESW_LIBS=-lformw -lmenuw -lncursesw -lpanelw:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_NANO_VERSION:=2.5.3}; : ${PKG_NANO_SHA256SUM:=b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee}; : ${PKG_NANO_URL:=http://www.nano-editor.org/dist/v${PKG_NANO_VERSION%.[0-9]}/nano-${PKG_NANO_VERSION}.tar.gz}; @@ -266,7 +270,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PACMAN_URL:=https://projects.archlinux.org/pacman.git/snapshot/pacman-${PKG_PACMAN_VERSION}.tar.gz}; : ${PKG_PACMAN_AUTOGEN:=1}; : ${PKG_PACMAN_CONFIGURE_ARGS_EXTRA:=--disable-doc}; -: ${PKG_PACMAN_ENV_VARS_EXTRA:="LIBARCHIVE_CFLAGS=,LIBARCHIVE_LIBS=,LIBSSL_CFLAGS=,LIBSSL_LIBS=,LIBCURL_CFLAGS=,LIBCURL_LIBS=,PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; +: ${PKG_PACMAN_ENV_VARS_EXTRA:="LIBARCHIVE_CFLAGS=:LIBARCHIVE_LIBS=:LIBSSL_CFLAGS=:LIBSSL_LIBS=:LIBCURL_CFLAGS=:LIBCURL_LIBS=:PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig"}; : ${PKG_PACMAN_MAKEFLAGS_BUILD_EXTRA:=V=99}; : ${PKG_PATCH_VERSION:=2.7}; : ${PKG_PATCH_SHA256SUM:=59c29f56faa0a924827e6a60c6accd6e2900eae5c6aaa922268c717f06a62048}; @@ -278,9 +282,10 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; : ${PKG_PERL_MAKEFLAGS_BUILD:=-j1}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; -: ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON_VERSION}/Python-${PKG_PYTHON_VERSION}.tgz}; -: ${PKG_PYTHON3_CONFIGURE_ARGS:="--build=x86_64 -C --enable-ipv6 --enable-shared --host=${HOST_NATIVE} --prefix=/"}; -: ${PKG_PYTHON3_ENV_VARS_EXTRA:="BLDSHARED=${HOST_NATIVE}-gcc -shared -mout-implib --sysroot=${PREFIX_LVL3},CC=${HOST_NATIVE}-gcc,CFLAGS=--sysroot=${PREFIX_LVL3},CPPFLAGS=--sysroot=${PREFIX_LVL3},LDFLAGS=-L${PREFIX_LVL3}/lib"}: +: ${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=${HOST_NATIVE} --prefix=${PREFIX_LVL3} --without-ensurepip"}; +: ${PKG_PYTHON3_ENV_VARS_EXTRA:="BLDSHARED=${HOST_NATIVE}-gcc -shared -mout-implib --sysroot=${PREFIX_LVL3}:CC=${HOST_NATIVE}-gcc:CFLAGS=--sysroot=${PREFIX_LVL3}:CPPFLAGS=--sysroot=${PREFIX_LVL3}:LDFLAGS=-L${PREFIX_LVL3}/lib"}: +: ${PKG_PYTHON3_SUBDIR:=Python-${PKG_PYTHON3_VERSION}}; : ${PKG_RSYNC_VERSION:=3.1.2}; : ${PKG_RSYNC_SHA256SUM:=ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2}; : ${PKG_RSYNC_URL:=https://download.samba.org/pub/rsync/src/rsync-${PKG_RSYNC_VERSION}.tar.gz}; diff --git a/python3-3.5.1.local.patch b/python3-3.5.1.local.patch deleted file mode 100644 index e6fbf05..0000000 --- a/python3-3.5.1.local.patch +++ /dev/null @@ -1,194 +0,0 @@ ---- Python-3.5.1/config.sub.orig 2015-12-07 01:39:11.000000000 +0000 -+++ Python-3.5.1/config.sub 2016-04-22 17:23:27.208488716 +0000 -@@ -795,6 +795,10 @@ - microblaze*) - basic_machine=microblaze-xilinx - ;; -+ midipix) -+ basic_machine=x86_64-pc -+ os=-midipix -+ ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 -@@ -1371,7 +1375,7 @@ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ ---- Python-3.5.1/configure.ac.orig 2015-12-07 01:39:11.000000000 +0000 -+++ Python-3.5.1/configure.ac 2016-04-23 12:49:17.142936229 +0000 -@@ -58,6 +58,15 @@ - - if test "$cross_compiling" = yes; then - AC_MSG_CHECKING([for python interpreter for cross build]) -+ AC_MSG_CHECKING(python for build) -+ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD:-${PWD}/hostpython}" -+ AC_MSG_RESULT($PYTHON_FOR_BUILD) -+ AC_MSG_CHECKING(pgen for build) -+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD:-Parser/hostpgen}" -+ AC_MSG_RESULT($PGEN_FOR_BUILD) -+ AC_MSG_CHECKING(_freeze_importlib for build) -+ _FIP_FOR_BUILD="${_FIP_FOR_BUILD:-Programs/host_freeze_importlib}" -+ AC_MSG_RESULT($_FIP_FOR_BUILD) - if test -z "$PYTHON_FOR_BUILD"; then - for interp in python$PACKAGE_VERSION python3 python; do - which $interp >/dev/null 2>&1 || continue -@@ -75,9 +84,16 @@ - elif test "$cross_compiling" = maybe; then - AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) - else -- PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' -+ PYTHON_FOR_BUILD='$(BUILDPYTHON)' -+ PGEN_FOR_BUILD='$(PGEN)' -+ _FIP_FOR_BUILD='$(_FIP)' - fi - AC_SUBST(PYTHON_FOR_BUILD) -+AC_SUBST(PGEN_FOR_BUILD) -+AC_SUBST(_FIP_FOR_BUILD) -+AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) -+AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) -+AC_ARG_VAR(_FIP_FOR_BUILD,[build system Python _freeze_importlib]) - - dnl Ensure that if prefix is specified, it does not end in a slash. If - dnl it does, we get path names containing '//' which is both ugly and -@@ -373,6 +389,9 @@ - *-*-cygwin*) - ac_sys_system=Cygwin - ;; -+ *-*-midipix*) -+ ac_sys_system=Midipix -+ ;; - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -@@ -399,6 +418,7 @@ - cygwin*) MACHDEP="cygwin";; - darwin*) MACHDEP="darwin";; - irix646) MACHDEP="irix6";; -+ midipix*) MACHDEP="midipix";; - '') MACHDEP="unknown";; - esac - fi -@@ -406,6 +426,9 @@ - AC_SUBST(_PYTHON_HOST_PLATFORM) - if test "$cross_compiling" = yes; then - case "$host" in -+ *-*-midipix*) -+ _host_cpu= -+ ;; - *-*-linux*) - case "$host_cpu" in - arm*) ---- Python-3.5.1/Makefile.pre.in.orig 2015-12-07 01:39:09.000000000 +0000 -+++ Python-3.5.1/Makefile.pre.in 2016-04-23 12:09:05.162989761 +0000 -@@ -276,6 +276,9 @@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+PGEN_FOR_BUILD= @PGEN_FOR_BUILD@ -+_FIP= Programs/_freeze_importlib$(EXE) -+_FIP_FOR_BUILD= @_FIP_FOR_BUILD@ - - PSRCS= \ - Parser/acceler.c \ -@@ -597,6 +600,7 @@ - esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ -+ _PYTHON_HOST_PLATFORM='$(_PYTHON_HOST_PLATFORM)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - # Build static library -@@ -708,15 +712,15 @@ - - Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile - --Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) -+$(_FIP): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) - $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - --Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib -- ./Programs/_freeze_importlib \ -+Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py $(_FIP_FOR_BUILD) -+ ./$(_FIP_FOR_BUILD) \ - $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h - --Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib -- ./Programs/_freeze_importlib \ -+Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py $(_FIP_FOR_BUILD) -+ ./$(_FIP_FOR_BUILD) \ - $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h - - -@@ -777,9 +781,9 @@ - - $(IO_OBJS): $(IO_H) - --$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) -+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN_FOR_BUILD) - @$(MKDIR_P) Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): $(GRAMMAR_H) - touch $(GRAMMAR_C) - ---- Python-3.5.1/Modules/socketmodule.c.orig 2015-12-07 01:39:10.000000000 +0000 -+++ Python-3.5.1/Modules/socketmodule.c 2016-04-23 12:30:40.854961004 +0000 -@@ -1313,7 +1313,7 @@ - } - #endif - --#ifdef AF_CAN -+#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) - case AF_CAN: - { - struct sockaddr_can *a = (struct sockaddr_can *)addr; -@@ -1810,7 +1810,7 @@ - } - #endif - --#if defined(AF_CAN) && defined(CAN_RAW) && defined(CAN_BCM) -+#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) && defined(CAN_RAW) && defined(CAN_BCM) - case AF_CAN: - switch (s->sock_proto) { - case CAN_RAW: -@@ -2017,7 +2017,7 @@ - } - #endif - --#ifdef AF_CAN -+#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) - case AF_CAN: - { - *len_ret = sizeof (struct sockaddr_can); -@@ -6298,7 +6298,7 @@ - PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF"); - #endif - --#ifdef AF_CAN -+#if defined(HAVE_LINUX_CAN_H) && defined(AF_CAN) - /* Controller Area Network */ - PyModule_AddIntMacro(m, AF_CAN); - #endif ---- Python-3.5.1/setup.py.orig 2015-12-07 01:39:11.000000000 +0000 -+++ Python-3.5.1/setup.py 2016-04-23 15:59:20.902683131 +0000 -@@ -1294,7 +1294,13 @@ - panel_library = 'panel' - if curses_library == 'ncursesw': - curses_defines.append(('HAVE_NCURSESW', '1')) -- curses_includes.append('/usr/include/ncursesw') -+ cflags = sysconfig.get_config_var('CFLAGS') -+ m = re.search(r'-isysroot\s+(\S+)', cflags) -+ if m is None: -+ sysroot = '/usr' -+ else: -+ sysroot = m.group(1) -+ curses_includes.append(sysroot + '/include/ncursesw') - # Bug 1464056: If _curses.so links with ncursesw, - # _curses_panel.so must link with panelw. - panel_library = 'panelw'