aboutsummaryrefslogtreecommitdiff
path: root/lang/python34/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python34/files')
-rw-r--r--lang/python34/files/patch-Lib__distutils__unixccompiler.py15
-rw-r--r--lang/python34/files/patch-Makefile.pre.in44
-rw-r--r--lang/python34/files/patch-Modules-_ctypes-libffi-configure11
-rw-r--r--lang/python34/files/patch-Modules___ctypes__libffi__src__arm__ffi.c36
-rw-r--r--lang/python34/files/patch-Modules__fcntlmodule.c53
-rw-r--r--lang/python34/files/patch-issue2021058
6 files changed, 217 insertions, 0 deletions
diff --git a/lang/python34/files/patch-Lib__distutils__unixccompiler.py b/lang/python34/files/patch-Lib__distutils__unixccompiler.py
new file mode 100644
index 000000000000..3012c52a85cd
--- /dev/null
+++ b/lang/python34/files/patch-Lib__distutils__unixccompiler.py
@@ -0,0 +1,15 @@
+# Description: Some python extensions can't be compiled with clang 3.4
+# Issue ID: http://bugs.python.org/issue20767
+# Submitted by: antoine
+
+--- ./Lib/distutils/unixccompiler.py.orig 2014-03-09 15:25:15.921204441 +1100
++++ ./Lib/distutils/unixccompiler.py 2014-03-09 15:25:50.643809649 +1100
+@@ -225,6 +225,8 @@
+ if sys.platform[:6] == "darwin":
+ # MacOSX's linker doesn't understand the -R flag at all
+ return "-L" + dir
++ elif sys.platform[:7] == "freebsd":
++ return "-Wl,-rpath=" + dir
+ elif sys.platform[:5] == "hp-ux":
+ if self._is_gcc(compiler):
+ return ["-Wl,+s", "-L" + dir]
diff --git a/lang/python34/files/patch-Makefile.pre.in b/lang/python34/files/patch-Makefile.pre.in
new file mode 100644
index 000000000000..66c65e8407c9
--- /dev/null
+++ b/lang/python34/files/patch-Makefile.pre.in
@@ -0,0 +1,44 @@
+# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
+# Changeset: https://svnweb.freebsd.org/ports?view=revision&revision=326729
+# Submitted by: koobs@
+# TODO: Upstream
+
+# Description: Run ranlib before installing the library read-only
+# Changeset: https://svnweb.freebsd.org/ports?view=revision&revision=350207
+# Submitted by: antoine@
+# TODO: Upstream
+
+--- ./Makefile.pre.in.orig 2014-03-17 13:31:30.000000000 +1100
++++ ./Makefile.pre.in 2014-04-06 18:21:28.147616242 +1000
+@@ -70,18 +70,15 @@
+ OPT= @OPT@
+ BASECFLAGS= @BASECFLAGS@
+ BASECPPFLAGS= @BASECPPFLAGS@
+-CONFIGURE_CFLAGS= @CFLAGS@
+-CONFIGURE_CPPFLAGS= @CPPFLAGS@
+-CONFIGURE_LDFLAGS= @LDFLAGS@
+ # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
+ # command line to append to these values without stomping the pre-set
+ # values.
+-PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
++PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CFLAGS) $(EXTRA_CFLAGS)
+ # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
+ # be able to build extension modules using the directories specified in the
+ # environment variables
+-PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
+-PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
++PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS)
++PY_LDFLAGS= $(LDFLAGS)
+ NO_AS_NEEDED= @NO_AS_NEEDED@
+ LDLAST= @LDLAST@
+ SGI_ABI= @SGI_ABI@
+@@ -1314,8 +1311,8 @@
+ if test "$(SHLIB_SUFFIX)" = .dll; then \
+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+ else \
++ $(RANLIB) $(LIBRARY) ; \
+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+ fi; \
+ else \
+ echo Skip install of $(LIBRARY) - use make frameworkinstall; \
diff --git a/lang/python34/files/patch-Modules-_ctypes-libffi-configure b/lang/python34/files/patch-Modules-_ctypes-libffi-configure
new file mode 100644
index 000000000000..8228ccc55eb0
--- /dev/null
+++ b/lang/python34/files/patch-Modules-_ctypes-libffi-configure
@@ -0,0 +1,11 @@
+--- ./Modules/_ctypes/libffi/configure.orig 2013-05-15 20:32:57.000000000 +0400
++++ ./Modules/_ctypes/libffi/configure 2013-05-18 10:56:03.000000000 +0400
+@@ -6889,7 +6889,7 @@
+ rm -rf conftest*
+ ;;
+
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
diff --git a/lang/python34/files/patch-Modules___ctypes__libffi__src__arm__ffi.c b/lang/python34/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
new file mode 100644
index 000000000000..56e434277fe8
--- /dev/null
+++ b/lang/python34/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
@@ -0,0 +1,36 @@
+# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
+# for anything !apple that is using the libcompiler_rt provided by clang on arm
+# PR: ports/149167 ports/184517
+# Patch by: cognet@ (to be upstreamed @ LLVM)
+
+--- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-11-17 18:22:57.000000000 +1100
++++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-03 19:23:24.521993369 +1100
+@@ -33,6 +33,11 @@
+
+ #include <stdlib.h>
+
++#if defined(__FreeBSD__) && defined(__arm__)
++#include <sys/types.h>
++#include <machine/sysarch.h>
++#endif
++
+ /* Forward declares. */
+ static int vfp_type_p (ffi_type *);
+ static void layout_vfp_args (ffi_cif *);
+@@ -582,6 +587,16 @@
+
+ #else
+
++#if defined(__FreeBSD__) && defined(__arm__)
++#define __clear_cache(start, end) do { \
++ struct arm_sync_icache_args ua; \
++ \
++ ua.addr = (uintptr_t)(start); \
++ ua.len = (char *)(end) - (char *)start; \
++ sysarch(ARM_SYNC_ICACHE, &ua); \
++ } while (0);
++#endif
++
+ #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
+ ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
+ unsigned int __fun = (unsigned int)(FUN); \
diff --git a/lang/python34/files/patch-Modules__fcntlmodule.c b/lang/python34/files/patch-Modules__fcntlmodule.c
new file mode 100644
index 000000000000..39fdb250730e
--- /dev/null
+++ b/lang/python34/files/patch-Modules__fcntlmodule.c
@@ -0,0 +1,53 @@
+--- ./Modules/fcntlmodule.c.orig 2014-03-04 20:15:17.641117835 +1100
++++ ./Modules/fcntlmodule.c 2014-03-04 20:19:36.141145958 +1100
+@@ -98,20 +98,15 @@
+ {
+ #define IOCTL_BUFSZ 1024
+ int fd;
+- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
++ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
+ format for the 'code' parameter because Python turns 0x8000000
+ into either a large positive number (PyLong or PyInt on 64-bit
+ platforms) or a negative number on others (32-bit PyInt)
+ whereas the system expects it to be a 32bit bit field value
+ regardless of it being passed as an int or unsigned long on
+- various platforms. See the termios.TIOCSWINSZ constant across
+- platforms for an example of this.
+-
+- If any of the 64bit platforms ever decide to use more than 32bits
+- in their unsigned long ioctl codes this will break and need
+- special casing based on the platform being built on.
++ various platforms.
+ */
+- unsigned int code;
++ unsigned long code;
+ int arg;
+ int ret;
+ Py_buffer pstr;
+@@ -120,7 +115,7 @@
+ int mutate_arg = 1;
+ char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
+
+- if (PyArg_ParseTuple(args, "O&Iw*|i:ioctl",
++ if (PyArg_ParseTuple(args, "O&kw*|i:ioctl",
+ conv_descriptor, &fd, &code,
+ &pstr, &mutate_arg)) {
+ char *arg;
+@@ -175,7 +170,7 @@
+ }
+
+ PyErr_Clear();
+- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
++ if (PyArg_ParseTuple(args, "O&ks*:ioctl",
+ conv_descriptor, &fd, &code, &pstr)) {
+ str = pstr.buf;
+ len = pstr.len;
+@@ -202,7 +197,7 @@
+ PyErr_Clear();
+ arg = 0;
+ if (!PyArg_ParseTuple(args,
+- "O&I|i;ioctl requires a file or file descriptor,"
++ "O&k|i;ioctl requires a file or file descriptor,"
+ " an integer and optionally an integer or buffer argument",
+ conv_descriptor, &fd, &code, &arg)) {
+ return NULL;
diff --git a/lang/python34/files/patch-issue20210 b/lang/python34/files/patch-issue20210
new file mode 100644
index 000000000000..2f8bdda8ca35
--- /dev/null
+++ b/lang/python34/files/patch-issue20210
@@ -0,0 +1,58 @@
+# Backport patch 0001 from Issue #20210
+# Issue: http://bugs.python.org/issue20210
+# By: Thomas Petazzoni
+
+--- ./Makefile.pre.in.orig 2014-03-24 22:45:17.908886504 +1100
++++ ./Makefile.pre.in 2014-03-24 22:47:55.503779805 +1100
+@@ -172,6 +172,8 @@
+ # configure script arguments
+ CONFIG_ARGS= @CONFIG_ARGS@
+
++# disabled extensions
++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
+
+ # Subdirectories with code
+ SRCDIRS= @SRCDIRS@
+@@ -555,6 +557,7 @@
+ esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+ # Build static library
+@@ -1352,7 +1355,8 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+--- ./configure.ac.orig 2014-03-24 22:48:10.442551831 +1100
++++ ./configure.ac 2014-03-24 22:48:42.059827384 +1100
+@@ -2331,6 +2331,8 @@
+
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+
++AC_SUBST(DISABLED_EXTENSIONS)
++
+ # Check for use of the system expat library
+ AC_MSG_CHECKING(for --with-system-expat)
+ AC_ARG_WITH(system_expat,
+--- ./setup.py.orig 2014-03-24 22:48:48.495472513 +1100
++++ ./setup.py 2014-03-24 22:49:20.076122201 +1100
+@@ -33,7 +33,10 @@
+ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
+
+ # This global variable is used to hold the list of modules to be disabled.
+-disabled_module_list = []
++try:
++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
++except KeyError:
++ disabled_module_list = list()
+
+ def add_dir_to_list(dirlist, dir):
+ """Add the directory 'dir' to the list 'dirlist' (after any relative