summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/python3-3.5.1.local.patch180
-rw-r--r--vars/build.vars13
-rw-r--r--vars/python3.vars15
3 files changed, 12 insertions, 196 deletions
diff --git a/patches/python3-3.5.1.local.patch b/patches/python3-3.5.1.local.patch
deleted file mode 100644
index b96f19e7..00000000
--- a/patches/python3-3.5.1.local.patch
+++ /dev/null
@@ -1,180 +0,0 @@
---- 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/vars/build.vars b/vars/build.vars
index bfbcf9f9..730152d8 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -1140,11 +1140,14 @@ bdwgc bison chicken cparser diffutils flex lunix m4 make mandoc patch patchutils
: ${PKG_PYTHON2_BUILD_DIR:=build/python2};
: ${PKG_PYTHON2_CONFIGURE:=build/sbpython2/configure};
: ${PKG_PYTHON2_CONFIGURE_ARGS:="--source-dir=../../Python-${PKG_PYTHON2_VERSION} --sysroot=${PREFIX_NATIVE} --prefix= --target=${DEFAULT_TARGET}"};
-: ${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=${DEFAULT_TARGET} --prefix=${PREFIX_NATIVE} --with-system-expat --with-system-ffi --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_SHA256SUM:=ab6193af1921b30f587b302fe385268510e80187ca83ca82d2bfe7ab544c6f91};
+: ${PKG_PYTHON3_VERSION:=3.6.3};
+: ${PKG_PYTHON3_URL:="https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz"};
+: ${PKG_PYTHON3_URLS_GIT:="sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"};
+: ${PKG_PYTHON3_BASE_DIR:=${BUILD_WORKDIR}/python3-native-${DEFAULT_TARGET}};
+: ${PKG_PYTHON3_BUILD_DIR:=build/python3};
+: ${PKG_PYTHON3_CONFIGURE:=build/sbpython3/configure};
+: ${PKG_PYTHON3_CONFIGURE_ARGS:="--source-dir=../../Python-${PKG_PYTHON3_VERSION} --sysroot=${PREFIX_NATIVE} --prefix= --target=${DEFAULT_TARGET}"};
: ${PKG_PYTHON3_INSTALL_FILES:="@python3=bin/python"};
: ${PKG_PYTHON3_SUBDIR:=Python-${PKG_PYTHON3_VERSION}};
: ${PKG_RUBY_SHA256SUM:=ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507};
diff --git a/vars/python3.vars b/vars/python3.vars
index 3c3fb58f..da82bfcd 100644
--- a/vars/python3.vars
+++ b/vars/python3.vars
@@ -2,17 +2,10 @@
# set -o errexit -o noglob are assumed.
#
-pkg_python3_configure_pre() {
- (ex_rtl_fileop cd "../${PKG_SUBDIR}" && autoconf);
- (unset AR BLDSHARED CC CFLAGS CPPFLAGS CXX LDFLAGS RANLIB;
- 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_rtl_fileop mv "../${PKG_SUBDIR}/config.cache" .;
- ex_rtl_fileop rm "../${PKG_SUBDIR}/Modules/zlib";
+pkg_python3_fetch_git() {
+ ex_rtl_fileop rm "${PKG_BASE_DIR}/sbpython3";
+ ex_rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main";
+ ex_pkg_state_set "${PKG_NAME}" fetch -extract;
};
# vim:filetype=sh