From c288dfb0f33ef4a713680190b5b2e2ca69cfb171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Wed, 25 May 2016 21:08:15 +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. --- Python-3.5.1.local.patch | 202 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 Python-3.5.1.local.patch (limited to 'Python-3.5.1.local.patch') diff --git a/Python-3.5.1.local.patch b/Python-3.5.1.local.patch new file mode 100644 index 00000000..753bf86f --- /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' -- cgit v1.2.3