mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/4] python: prepare version bump
@ 2014-12-14  9:42 Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 2/4] python: update patches for 2.7.9 Robert Schwebel
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Robert Schwebel @ 2014-12-14  9:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

Copy old patches in preparation of version bump.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 ...-for-socketcan-to-the-python-socket-modul.patch | 224 +++++++++++++++++++++
 ...K_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch |  37 ++++
 ..._LONG_DOUBLE-to-detect-long-double-suppor.patch |  35 ++++
 patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch |  32 +++
 ...n-t-leak-host-path-into-cross-compilation.patch |  40 ++++
 .../0006-add-cross-compilation-support.patch       |  61 ++++++
 .../0007-python-don-t-add-rpaths-in-setup.py.patch |  31 +++
 .../Python-2.7.9/0008-add-more-search-paths.patch  |  28 +++
 ...sting-LD_LIBRARY_PATH-during-make-not-dur.patch |  25 +++
 patches/Python-2.7.9/autogen.sh                    |  14 ++
 patches/Python-2.7.9/series                        |  12 ++
 11 files changed, 539 insertions(+)
 create mode 100644 patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
 create mode 100644 patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
 create mode 100644 patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
 create mode 100644 patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
 create mode 100644 patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
 create mode 100644 patches/Python-2.7.9/0006-add-cross-compilation-support.patch
 create mode 100644 patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
 create mode 100644 patches/Python-2.7.9/0008-add-more-search-paths.patch
 create mode 100644 patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
 create mode 100755 patches/Python-2.7.9/autogen.sh
 create mode 100644 patches/Python-2.7.9/series

diff --git a/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
new file mode 100644
index 0000000..360df3e
--- /dev/null
+++ b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
@@ -0,0 +1,224 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 5 May 2009 15:17:20 +0200
+Subject: [PATCH] Add support for socketcan to the python socket module
+
+This patch add support for the protocol family AF_CAN. It contains all the
+necessary code to use the python socket module for socketcan.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Lib/plat-linux2/IN.py  |  2 ++
+ Modules/socketmodule.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ Modules/socketmodule.h | 11 +++++++
+ configure.ac           | 13 ++++++++
+ 4 files changed, 115 insertions(+)
+
+diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
+index ad307f6..f72ae88 100644
+--- a/Lib/plat-linux2/IN.py
++++ b/Lib/plat-linux2/IN.py
+@@ -384,6 +384,7 @@ PF_SNA = 22
+ PF_IRDA = 23
+ PF_PPPOX = 24
+ PF_WANPIPE = 25
++PF_CAN = 29
+ PF_BLUETOOTH = 31
+ PF_MAX = 32
+ AF_UNSPEC = PF_UNSPEC
+@@ -414,6 +415,7 @@ AF_SNA = PF_SNA
+ AF_IRDA = PF_IRDA
+ AF_PPPOX = PF_PPPOX
+ AF_WANPIPE = PF_WANPIPE
++AF_CAN = PF_CAN
+ AF_BLUETOOTH = PF_BLUETOOTH
+ AF_MAX = PF_MAX
+ SOL_RAW = 255
+diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
+index bdc055d..066221a 100644
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -420,6 +420,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+ 
+ #define SAS2SA(x)       ((struct sockaddr *)(x))
+ 
++#ifdef ENABLE_CAN
++#include <linux/can/raw.h>
++#endif
++
+ /*
+  * Constants for getnameinfo()
+  */
+@@ -1097,6 +1101,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
+     }
+ #endif
+ 
++#ifdef ENABLE_CAN
++    case AF_CAN:
++    {
++        struct sockaddr_can *a = (struct sockaddr_can *)addr;
++        char *ifname = "";
++        struct ifreq ifr;
++        /* need to look up interface name give index */
++        if (a->can_ifindex) {
++            ifr.ifr_ifindex = a->can_ifindex;
++            if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
++                ifname = ifr.ifr_name;
++        }
++        return Py_BuildValue("s", ifname);
++    }
++#endif
++
+ #ifdef USE_BLUETOOTH
+     case AF_BLUETOOTH:
+         switch (proto) {
+@@ -1383,6 +1403,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
+     }
+ #endif
+ 
++#ifdef ENABLE_CAN
++    case AF_CAN:
++    {
++        struct sockaddr_can* addr;
++        struct ifreq ifr;
++        char *interfaceName;
++        addr = (struct sockaddr_can*)addr_ret;
++        if (!PyArg_Parse(args, "s", &interfaceName))
++            return 0;
++        strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
++        ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
++        if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
++                s->errorhandler();
++            return 0;
++        }
++        addr->can_family = AF_CAN;
++        addr->can_ifindex = ifr.ifr_ifindex;
++        *len_ret = sizeof *addr;
++        return 1;
++    }
++#endif
++
+ #ifdef USE_BLUETOOTH
+     case AF_BLUETOOTH:
+     {
+@@ -1633,6 +1675,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
+     }
+ #endif
+ 
++#ifdef ENABLE_CAN
++    case AF_CAN:
++    {
++        *len_ret = sizeof (struct sockaddr_can);
++        return 1;
++    }
++#endif
++
+ #ifdef USE_BLUETOOTH
+     case AF_BLUETOOTH:
+     {
+@@ -4758,6 +4808,10 @@ init_socket(void)
+     PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
+ #endif
+ 
++#ifdef ENABLE_CAN
++    PyModule_AddIntConstant(m, "AF_CAN", AF_CAN);
++#endif
++
+ #ifdef USE_BLUETOOTH
+     PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
+     PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
+@@ -5114,6 +5168,41 @@ init_socket(void)
+     PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
+ #endif
+ 
++#ifdef  CAN_RAW
++    PyModule_AddIntConstant(m, "CAN_RAW", CAN_RAW);
++#endif
++#ifdef  CAN_BCM
++    PyModule_AddIntConstant(m, "CAN_BCM", CAN_BCM);
++#endif
++#ifdef  CAN_TP16
++    PyModule_AddIntConstant(m, "CAN_TP16", CAN_TP16);
++#endif
++#ifdef  CAN_TP20
++    PyModule_AddIntConstant(m, "CAN_TP20", CAN_TP20);
++#endif
++#ifdef  CAN_MCNET
++    PyModule_AddIntConstant(m, "CAN_MCNET", CAN_MCNET);
++#endif
++#ifdef  CAN_ISOTP
++    PyModule_AddIntConstant(m, "CAN_ISOTP", CAN_ISOTP);
++#endif
++#ifdef  CAN_NPROTO
++    PyModule_AddIntConstant(m, "CAN_NPROTO", CAN_NPROTO);
++#endif
++
++#ifdef  SOL_CAN_BASE
++    PyModule_AddIntConstant(m, "SOL_CAN_BASE", SOL_CAN_BASE);
++#endif
++#ifdef  SOL_CAN_RAW
++    PyModule_AddIntConstant(m, "SOL_CAN_RAW", SOL_CAN_RAW);
++#endif
++#ifdef ENABLE_CAN
++    PyModule_AddIntConstant(m, "CAN_RAW_FILTER", CAN_RAW_FILTER);
++    PyModule_AddIntConstant(m, "CAN_RAW_ERR_FILTER", CAN_RAW_ERR_FILTER);
++    PyModule_AddIntConstant(m, "CAN_RAW_LOOPBACK", CAN_RAW_LOOPBACK);
++    PyModule_AddIntConstant(m, "CAN_RAW_RECV_OWN_MSGS", CAN_RAW_RECV_OWN_MSGS);
++#endif
++
+     /* Some port configuration */
+ #ifdef  IPPORT_RESERVED
+     PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
+diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
+index 8515499..3eae3eb 100644
+--- a/Modules/socketmodule.h
++++ b/Modules/socketmodule.h
+@@ -55,6 +55,14 @@ typedef int socklen_t;
+ #include <bluetooth/hci.h>
+ #endif
+ 
++#define AF_CAN 29
++#define PF_CAN AF_CAN
++
++#ifdef HAVE_LINUX_CAN_H
++#define ENABLE_CAN 1
++#include <linux/can.h>
++#endif
++
+ #ifdef HAVE_BLUETOOTH_H
+ #include <bluetooth.h>
+ #endif
+@@ -106,6 +114,9 @@ typedef union sock_addr {
+     struct sockaddr_in6 in6;
+     struct sockaddr_storage storage;
+ #endif
++#ifdef ENABLE_CAN
++	struct sockaddr_can can;
++#endif
+ #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
+     struct sockaddr_l2 bt_l2;
+     struct sockaddr_rc bt_rc;
+diff --git a/configure.ac b/configure.ac
+index 30f5bf4..c9b78ff 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1539,6 +1539,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
+ #endif
+ ])
+ 
++AC_CHECK_HEADERS(linux/can.h,[],[],[#include <sys/socket.h>])
++# check for AF_CAN
++AC_TRY_COMPILE(
++    [[#include <sys/socket.h>
++      int domain = AF_CAN;]],
++    [[socket(domain, 0, 0);]],
++    [],
++    [
++        AC_DEFINE(AF_CAN, 29, [Define AF_CAN if not defined by sys/socket.h])
++        AC_DEFINE(PF_CAN, 29, [Define PF_CAN if not defined by sys/socket.h])
++    ]
++)
++
+ # checks for typedefs
+ was_it_defined=no
+ AC_MSG_CHECKING(for clock_t in time.h)
diff --git a/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
new file mode 100644
index 0000000..08c3dd8
--- /dev/null
+++ b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
@@ -0,0 +1,37 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 18:44:11 +0200
+Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long
+ detection
+
+AC_CHECK_SIZEOF does first detect if the type is available and detects
+its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.ac | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c9b78ff..ebc8285 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1676,15 +1676,11 @@ AC_CHECK_SIZEOF(fpos_t, 4)
+ AC_CHECK_SIZEOF(size_t, 4)
+ AC_CHECK_SIZEOF(pid_t, 4)
+ 
+-AC_MSG_CHECKING(for long long support)
+-have_long_long=no
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
+-  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
++AC_TYPE_LONG_LONG_INT
++AC_CHECK_SIZEOF(long long)
++if test "$ac_cv_type_long_long_int" = "yes" ; then
+   have_long_long=yes
+-],[])
+-AC_MSG_RESULT($have_long_long)
+-if test "$have_long_long" = yes ; then
+-AC_CHECK_SIZEOF(long long, 8)
++  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ fi
+ 
+ AC_MSG_CHECKING(for long double support)
diff --git a/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
new file mode 100644
index 0000000..9fdac2f
--- /dev/null
+++ b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
@@ -0,0 +1,35 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 18:47:19 +0200
+Subject: [PATCH] use AC_TYPE_LONG_DOUBLE to detect long double support
+
+use the correct AC_TYPE_LONG_DOUBLE function rahter than hand crafted
+test to detect long double support.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.ac | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ebc8285..764a08f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1683,16 +1683,8 @@ if test "$ac_cv_type_long_long_int" = "yes" ; then
+   AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ fi
+ 
+-AC_MSG_CHECKING(for long double support)
+-have_long_double=no
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[
+-  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
+-  have_long_double=yes
+-],[])
+-AC_MSG_RESULT($have_long_double)
+-if test "$have_long_double" = yes ; then
+-AC_CHECK_SIZEOF(long double, 12)
+-fi
++AC_TYPE_LONG_DOUBLE
++AC_CHECK_SIZEOF(long double)
+ 
+ AC_MSG_CHECKING(for _Bool support)
+ have_c99_bool=no
diff --git a/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
new file mode 100644
index 0000000..d892f97
--- /dev/null
+++ b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
@@ -0,0 +1,32 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Wed, 12 Jun 2013 13:53:15 +0200
+Subject: [PATCH] use PGEN_FOR_BUILD
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile.pre.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 9d55550..4461970 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -227,6 +227,8 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
+ ##########################################################################
+ # Parser
+ PGEN=		Parser/pgen$(EXE)
++PGEN_FOR_BUILD=	$(PGEN)
++
+ 
+ PSRCS=		\
+ 		Parser/acceler.c \
+@@ -593,7 +595,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ 		@$(MKDIR_P) Include
+ 		$(MAKE) $(PGEN)
+-		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++		$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+ 		$(MAKE) $(GRAMMAR_H)
+ 		touch $(GRAMMAR_C)
diff --git a/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
new file mode 100644
index 0000000..a9537bc
--- /dev/null
+++ b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
@@ -0,0 +1,40 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 19:07:54 +0200
+Subject: [PATCH] setup.py: don't leak host path into cross compilation
+ environment
+
+During cross compilation we don't host path (neither include nor library
+search patch) to leak into our environment.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ setup.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 716f08e..c556209 100644
+--- a/setup.py
++++ b/setup.py
+@@ -437,8 +437,10 @@ class PyBuildExt(build_ext):
+ 
+     def detect_modules(self):
+         # Ensure that /usr/local is always used
+-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++
++        if not cross_compiling:
++            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+         self.add_gcc_paths()
+         self.add_multiarch_paths()
+ 
+@@ -1203,6 +1205,9 @@ class PyBuildExt(build_ext):
+         # the more recent berkeleydb's db.h file first in the include path
+         # when attempting to compile and it will fail.
+         f = "/usr/include/db.h"
++        if cross_compiling:
++            f = ''
++
+ 
+         if host_platform == 'darwin':
+             if is_macosx_sdk_path(f):
diff --git a/patches/Python-2.7.9/0006-add-cross-compilation-support.patch b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
new file mode 100644
index 0000000..180c3eb
--- /dev/null
+++ b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
@@ -0,0 +1,61 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 4 May 2009 14:39:18 +0200
+Subject: [PATCH] add cross compilation support
+
+This patch adds preliminary cross compilation support to python.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile.pre.in | 12 ++++++++----
+ configure.ac    |  7 +++++++
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 4461970..584ed4f 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -84,6 +84,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
+ # C flags used for building the interpreter object files
+ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
+ 
++# cross compiler options
++ifndef DESTDIR
++sysroot=	@SYSROOT@
++endif
+ 
+ # Machine-dependent subdirectories
+ MACHDEP=	@MACHDEP@
+@@ -102,11 +106,11 @@ datarootdir=    @datarootdir@
+ 
+ # Expanded directories
+ BINDIR=		@bindir@
+-LIBDIR=		@libdir@
++LIBDIR=		$(sysroot)@libdir@
+ MANDIR=		@mandir@
+-INCLUDEDIR=	@includedir@
+-CONFINCLUDEDIR=	$(exec_prefix)/include
+-SCRIPTDIR=	$(prefix)/lib
++INCLUDEDIR=	$(sysroot)@includedir@
++CONFINCLUDEDIR=	$(sysroot)$(exec_prefix)/include
++SCRIPTDIR=	$(sysroot)$(prefix)/lib
+ 
+ # Detailed destination directories
+ BINLIBDEST=	$(LIBDIR)/python$(VERSION)
+diff --git a/configure.ac b/configure.ac
+index 764a08f..c05c5fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -939,6 +939,13 @@ if test "$cross_compiling" = yes; then
+ 	RUNSHARED=
+ fi
+ 
++# sysroot
++AC_SUBST(SYSROOT)
++if test "$cross_compiling" = yes; then
++    AC_MSG_CHECKING([for SYSROOT])
++    AC_MSG_RESULT([$SYSROOT])
++fi
++
+ AC_MSG_RESULT($LDLIBRARY)
+ 
+ AC_PROG_RANLIB
diff --git a/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
new file mode 100644
index 0000000..fef8858
--- /dev/null
+++ b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
@@ -0,0 +1,31 @@
+From: unknown author <unknown.author@example.com>
+Date: Tue, 8 Feb 2011 15:10:31 +0100
+Subject: [PATCH] python: don't add rpaths in setup.py
+
+We don't add rpaths.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ setup.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index c556209..66a97bd 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1077,7 +1077,6 @@ class PyBuildExt(build_ext):
+             exts.append(Extension('_bsddb', ['_bsddb.c'],
+                                   depends = ['bsddb.h'],
+                                   library_dirs=dblib_dir,
+-                                  runtime_library_dirs=dblib_dir,
+                                   include_dirs=db_incs,
+                                   libraries=dblibs))
+         else:
+@@ -1187,7 +1186,6 @@ class PyBuildExt(build_ext):
+                                   include_dirs=["Modules/_sqlite",
+                                                 sqlite_incdir],
+                                   library_dirs=sqlite_libdir,
+-                                  runtime_library_dirs=sqlite_libdir,
+                                   extra_link_args=sqlite_extra_link_args,
+                                   libraries=["sqlite3",]))
+         else:
diff --git a/patches/Python-2.7.9/0008-add-more-search-paths.patch b/patches/Python-2.7.9/0008-add-more-search-paths.patch
new file mode 100644
index 0000000..f160ac6
--- /dev/null
+++ b/patches/Python-2.7.9/0008-add-more-search-paths.patch
@@ -0,0 +1,28 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 13 Jun 2013 10:42:58 +0200
+Subject: [PATCH] add more search paths
+
+Without this setup.py won't find libs in <sysroot>/lib
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ setup.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 66a97bd..7bd9e9c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -484,8 +484,10 @@ class PyBuildExt(build_ext):
+             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+             # building a framework with different architectures than
+             # the one that is currently installed (issue #7473)
+-            add_dir_to_list(self.compiler.library_dirs,
+-                            sysconfig.get_config_var("LIBDIR"))
++            libdir = sysconfig.get_config_var("LIBDIR")
++            add_dir_to_list(self.compiler.library_dirs, libdir)
++            if libdir.endswith('/usr/lib'):
++                add_dir_to_list(self.compiler.library_dirs, libdir.replace('/usr/lib','/lib'))
+             add_dir_to_list(self.compiler.include_dirs,
+                             sysconfig.get_config_var("INCLUDEDIR"))
+ 
diff --git a/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
new file mode 100644
index 0000000..c0e7280
--- /dev/null
+++ b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
@@ -0,0 +1,25 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 5 Feb 2014 12:16:12 +0100
+Subject: [PATCH] resolve existing LD_LIBRARY_PATH during make, not during
+ configure
+
+Otherwise, calling "make install" with fakeroot may not work correctly.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c05c5fb..9274125 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -885,7 +885,7 @@ if test $enable_shared = "yes"; then
+     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+ 	  LDLIBRARY='libpython$(VERSION).so'
+ 	  BLDLIBRARY='-L. -lpython$(VERSION)'
+-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH}'
+ 	  case $ac_sys_system in
+ 	      FreeBSD*)
+ 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
diff --git a/patches/Python-2.7.9/autogen.sh b/patches/Python-2.7.9/autogen.sh
new file mode 100755
index 0000000..903ce78
--- /dev/null
+++ b/patches/Python-2.7.9/autogen.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# to add config.guess and config.sub
+automake --copy --add-missing || true
+
+autoheader --force
+
+autoconf \
+	--force \
+	--warnings=cross \
+	--warnings=syntax \
+	--warnings=obsolete \
+	--warnings=unsupported
+
diff --git a/patches/Python-2.7.9/series b/patches/Python-2.7.9/series
new file mode 100644
index 0000000..47df268
--- /dev/null
+++ b/patches/Python-2.7.9/series
@@ -0,0 +1,12 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+0004-use-PGEN_FOR_BUILD.patch
+0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+0006-add-cross-compilation-support.patch
+0007-python-don-t-add-rpaths-in-setup.py.patch
+0008-add-more-search-paths.patch
+0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
+# c22b85583b9b9fc00386bba7094689ba  - git-ptx-patches magic
-- 
2.1.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH 2/4] python: update patches for 2.7.9
  2014-12-14  9:42 [ptxdist] [PATCH 1/4] python: prepare version bump Robert Schwebel
@ 2014-12-14  9:42 ` Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 3/4] python: version bump 2.7.5 -> 2.7.9 Robert Schwebel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2014-12-14  9:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

Rework patch stack for python-2.7.9. Two hunks have been found in
mainline meanwhile and can be removed here.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 ...-for-socketcan-to-the-python-socket-modul.patch | 22 +++++++++++-----------
 ...K_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch |  4 ++--
 ..._LONG_DOUBLE-to-detect-long-double-suppor.patch |  4 ++--
 patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch |  6 +++---
 ...n-t-leak-host-path-into-cross-compilation.patch | 21 ++++-----------------
 .../0006-add-cross-compilation-support.patch       |  6 +++---
 .../0007-python-don-t-add-rpaths-in-setup.py.patch | 16 ++++------------
 .../Python-2.7.9/0008-add-more-search-paths.patch  |  4 ++--
 ...sting-LD_LIBRARY_PATH-during-make-not-dur.patch |  8 ++++----
 9 files changed, 35 insertions(+), 56 deletions(-)

diff --git a/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
index 360df3e..0994ad2 100644
--- a/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+++ b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
@@ -15,7 +15,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  4 files changed, 115 insertions(+)
 
 diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
-index ad307f6..f72ae88 100644
+index ad307f65398b..f72ae886cad8 100644
 --- a/Lib/plat-linux2/IN.py
 +++ b/Lib/plat-linux2/IN.py
 @@ -384,6 +384,7 @@ PF_SNA = 22
@@ -35,10 +35,10 @@ index ad307f6..f72ae88 100644
  AF_MAX = PF_MAX
  SOL_RAW = 255
 diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
-index bdc055d..066221a 100644
+index e9e4479a6678..bddf4ba7782e 100644
 --- a/Modules/socketmodule.c
 +++ b/Modules/socketmodule.c
-@@ -420,6 +420,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+@@ -424,6 +424,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
  
  #define SAS2SA(x)       ((struct sockaddr *)(x))
  
@@ -49,7 +49,7 @@ index bdc055d..066221a 100644
  /*
   * Constants for getnameinfo()
   */
-@@ -1097,6 +1101,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
+@@ -1101,6 +1105,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
      }
  #endif
  
@@ -72,7 +72,7 @@ index bdc055d..066221a 100644
  #ifdef USE_BLUETOOTH
      case AF_BLUETOOTH:
          switch (proto) {
-@@ -1383,6 +1403,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
+@@ -1387,6 +1407,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
      }
  #endif
  
@@ -101,7 +101,7 @@ index bdc055d..066221a 100644
  #ifdef USE_BLUETOOTH
      case AF_BLUETOOTH:
      {
-@@ -1633,6 +1675,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
+@@ -1637,6 +1679,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
      }
  #endif
  
@@ -116,7 +116,7 @@ index bdc055d..066221a 100644
  #ifdef USE_BLUETOOTH
      case AF_BLUETOOTH:
      {
-@@ -4758,6 +4808,10 @@ init_socket(void)
+@@ -4771,6 +4821,10 @@ init_socket(void)
      PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
  #endif
  
@@ -127,7 +127,7 @@ index bdc055d..066221a 100644
  #ifdef USE_BLUETOOTH
      PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
      PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
-@@ -5114,6 +5168,41 @@ init_socket(void)
+@@ -5127,6 +5181,41 @@ init_socket(void)
      PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
  #endif
  
@@ -170,7 +170,7 @@ index bdc055d..066221a 100644
  #ifdef  IPPORT_RESERVED
      PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
 diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
-index 8515499..3eae3eb 100644
+index d98e00e88d27..3b6e22e29d3a 100644
 --- a/Modules/socketmodule.h
 +++ b/Modules/socketmodule.h
 @@ -55,6 +55,14 @@ typedef int socklen_t;
@@ -199,10 +199,10 @@ index 8515499..3eae3eb 100644
      struct sockaddr_l2 bt_l2;
      struct sockaddr_rc bt_rc;
 diff --git a/configure.ac b/configure.ac
-index 30f5bf4..c9b78ff 100644
+index 94a215e0cf07..3e9186c84cb6 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1539,6 +1539,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
+@@ -1542,6 +1542,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
  #endif
  ])
  
diff --git a/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
index 08c3dd8..97781a5 100644
--- a/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+++ b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
@@ -12,10 +12,10 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  1 file changed, 4 insertions(+), 8 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index c9b78ff..ebc8285 100644
+index 3e9186c84cb6..34949fe34037 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1676,15 +1676,11 @@ AC_CHECK_SIZEOF(fpos_t, 4)
+@@ -1679,15 +1679,11 @@ AC_CHECK_SIZEOF(fpos_t, 4)
  AC_CHECK_SIZEOF(size_t, 4)
  AC_CHECK_SIZEOF(pid_t, 4)
  
diff --git a/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
index 9fdac2f..57d2c2f 100644
--- a/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+++ b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
@@ -11,10 +11,10 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  1 file changed, 2 insertions(+), 10 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index ebc8285..764a08f 100644
+index 34949fe34037..9f9153fd8f75 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1683,16 +1683,8 @@ if test "$ac_cv_type_long_long_int" = "yes" ; then
+@@ -1686,16 +1686,8 @@ if test "$ac_cv_type_long_long_int" = "yes" ; then
    AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
  fi
  
diff --git a/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
index d892f97..1194e88 100644
--- a/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
+++ b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
@@ -9,10 +9,10 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 9d55550..4461970 100644
+index 7f4ec2f55e7f..df38eb5158d1 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -227,6 +227,8 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
+@@ -234,6 +234,8 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
  ##########################################################################
  # Parser
  PGEN=		Parser/pgen$(EXE)
@@ -21,7 +21,7 @@ index 9d55550..4461970 100644
  
  PSRCS=		\
  		Parser/acceler.c \
-@@ -593,7 +595,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
+@@ -611,7 +613,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
  $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
  		@$(MKDIR_P) Include
  		$(MAKE) $(PGEN)
diff --git a/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
index a9537bc..c29acee 100644
--- a/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+++ b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
@@ -8,27 +8,14 @@ search patch) to leak into our environment.
 
 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
 ---
- setup.py | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
+ setup.py | 3 +++
+ 1 file changed, 3 insertions(+)
 
 diff --git a/setup.py b/setup.py
-index 716f08e..c556209 100644
+index 7868b7b241cc..542254496552 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -437,8 +437,10 @@ class PyBuildExt(build_ext):
- 
-     def detect_modules(self):
-         # Ensure that /usr/local is always used
--        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+
-+        if not cross_compiling:
-+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         self.add_gcc_paths()
-         self.add_multiarch_paths()
- 
-@@ -1203,6 +1205,9 @@ class PyBuildExt(build_ext):
+@@ -1208,6 +1208,9 @@ class PyBuildExt(build_ext):
          # the more recent berkeleydb's db.h file first in the include path
          # when attempting to compile and it will fail.
          f = "/usr/include/db.h"
diff --git a/patches/Python-2.7.9/0006-add-cross-compilation-support.patch b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
index 180c3eb..9e54fe5 100644
--- a/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
+++ b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
@@ -11,7 +11,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  2 files changed, 15 insertions(+), 4 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 4461970..584ed4f 100644
+index df38eb5158d1..becc7182cfe6 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
 @@ -84,6 +84,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
@@ -42,10 +42,10 @@ index 4461970..584ed4f 100644
  # Detailed destination directories
  BINLIBDEST=	$(LIBDIR)/python$(VERSION)
 diff --git a/configure.ac b/configure.ac
-index 764a08f..c05c5fb 100644
+index 9f9153fd8f75..9ad2468ed32c 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -939,6 +939,13 @@ if test "$cross_compiling" = yes; then
+@@ -943,6 +943,13 @@ if test "$cross_compiling" = yes; then
  	RUNSHARED=
  fi
  
diff --git a/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
index fef8858..18c14c7 100644
--- a/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
+++ b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
@@ -6,14 +6,14 @@ We don't add rpaths.
 
 Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
 ---
- setup.py | 2 --
- 1 file changed, 2 deletions(-)
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index c556209..66a97bd 100644
+index 542254496552..f59ad7acd5cc 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -1077,7 +1077,6 @@ class PyBuildExt(build_ext):
+@@ -1081,7 +1081,6 @@ class PyBuildExt(build_ext):
              exts.append(Extension('_bsddb', ['_bsddb.c'],
                                    depends = ['bsddb.h'],
                                    library_dirs=dblib_dir,
@@ -21,11 +21,3 @@ index c556209..66a97bd 100644
                                    include_dirs=db_incs,
                                    libraries=dblibs))
          else:
-@@ -1187,7 +1186,6 @@ class PyBuildExt(build_ext):
-                                   include_dirs=["Modules/_sqlite",
-                                                 sqlite_incdir],
-                                   library_dirs=sqlite_libdir,
--                                  runtime_library_dirs=sqlite_libdir,
-                                   extra_link_args=sqlite_extra_link_args,
-                                   libraries=["sqlite3",]))
-         else:
diff --git a/patches/Python-2.7.9/0008-add-more-search-paths.patch b/patches/Python-2.7.9/0008-add-more-search-paths.patch
index f160ac6..fdf2217 100644
--- a/patches/Python-2.7.9/0008-add-more-search-paths.patch
+++ b/patches/Python-2.7.9/0008-add-more-search-paths.patch
@@ -10,10 +10,10 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index 66a97bd..7bd9e9c 100644
+index f59ad7acd5cc..7f6702be3151 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -484,8 +484,10 @@ class PyBuildExt(build_ext):
+@@ -486,8 +486,10 @@ class PyBuildExt(build_ext):
              # (PYTHONFRAMEWORK is set) to avoid # linking problems when
              # building a framework with different architectures than
              # the one that is currently installed (issue #7473)
diff --git a/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
index c0e7280..a90370e 100644
--- a/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
+++ b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
@@ -11,15 +11,15 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index c05c5fb..9274125 100644
+index 9ad2468ed32c..6b8f436bb34b 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -885,7 +885,7 @@ if test $enable_shared = "yes"; then
+@@ -889,7 +889,7 @@ if test $enable_shared = "yes"; then
      Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
  	  LDLIBRARY='libpython$(VERSION).so'
  	  BLDLIBRARY='-L. -lpython$(VERSION)'
--	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-+	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH}'
+-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
++	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}'
  	  case $ac_sys_system in
  	      FreeBSD*)
  		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
-- 
2.1.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH 3/4] python: version bump 2.7.5 -> 2.7.9
  2014-12-14  9:42 [ptxdist] [PATCH 1/4] python: prepare version bump Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 2/4] python: update patches for 2.7.9 Robert Schwebel
@ 2014-12-14  9:42 ` Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 4/4] python: remove old patches Robert Schwebel
  2015-01-12 15:35 ` [ptxdist] [PATCH 1/4] python: prepare version bump Michael Olbrich
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2014-12-14  9:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

One additional option is in configure, add it to prepare stage.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 rules/python.make | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/rules/python.make b/rules/python.make
index 15cac21..5f5f464 100644
--- a/rules/python.make
+++ b/rules/python.make
@@ -16,12 +16,12 @@ PACKAGES-$(PTXCONF_PYTHON) += python
 #
 # Paths and names
 #
-PYTHON_VERSION		:= 2.7.5
-PYTHON_MD5		:= 6334b666b7ff2038c761d7b27ba699c1
+PYTHON_VERSION		:= 2.7.9
+PYTHON_MD5		:= 38d530f7efc373d64a8fb1637e3baaa7
 PYTHON_MAJORMINOR	:= $(basename $(PYTHON_VERSION))
 PYTHON_SITEPACKAGES	:= /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages
 PYTHON			:= Python-$(PYTHON_VERSION)
-PYTHON_SUFFIX		:= tar.bz2
+PYTHON_SUFFIX		:= tar.xz
 PYTHON_SOURCE		:= $(SRCDIR)/$(PYTHON).$(PYTHON_SUFFIX)
 PYTHON_DIR		:= $(BUILDDIR)/$(PYTHON)
 
@@ -64,7 +64,8 @@ PYTHON_AUTOCONF := \
 	--with-signal-module \
 	--with-threads \
 	--with-wctype-functions \
-	--without-doc-strings
+	--without-doc-strings \
+	--without-ensurepip
 
 PYTHON_BUILD_PYTHONPATH := \
 	$(PTXCONF_SYSROOT_HOST)/lib/python$(PYTHON_MAJORMINOR)/lib-dynload \
-- 
2.1.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH 4/4] python: remove old patches
  2014-12-14  9:42 [ptxdist] [PATCH 1/4] python: prepare version bump Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 2/4] python: update patches for 2.7.9 Robert Schwebel
  2014-12-14  9:42 ` [ptxdist] [PATCH 3/4] python: version bump 2.7.5 -> 2.7.9 Robert Schwebel
@ 2014-12-14  9:42 ` Robert Schwebel
  2015-01-12 15:35 ` [ptxdist] [PATCH 1/4] python: prepare version bump Michael Olbrich
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2014-12-14  9:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

After moving to 2.7.9, we can remove the patches for 2.7.5.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 ...-for-socketcan-to-the-python-socket-modul.patch | 224 ---------------------
 ...K_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch |  37 ----
 ..._LONG_DOUBLE-to-detect-long-double-suppor.patch |  35 ----
 patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch |  32 ---
 ...n-t-leak-host-path-into-cross-compilation.patch |  40 ----
 .../0006-add-cross-compilation-support.patch       |  61 ------
 .../0007-python-don-t-add-rpaths-in-setup.py.patch |  31 ---
 .../Python-2.7.5/0008-add-more-search-paths.patch  |  28 ---
 ...sting-LD_LIBRARY_PATH-during-make-not-dur.patch |  25 ---
 patches/Python-2.7.5/autogen.sh                    |  14 --
 patches/Python-2.7.5/series                        |  12 --
 11 files changed, 539 deletions(-)
 delete mode 100644 patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
 delete mode 100644 patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
 delete mode 100644 patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
 delete mode 100644 patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch
 delete mode 100644 patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
 delete mode 100644 patches/Python-2.7.5/0006-add-cross-compilation-support.patch
 delete mode 100644 patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch
 delete mode 100644 patches/Python-2.7.5/0008-add-more-search-paths.patch
 delete mode 100644 patches/Python-2.7.5/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
 delete mode 100755 patches/Python-2.7.5/autogen.sh
 delete mode 100644 patches/Python-2.7.5/series

diff --git a/patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
deleted file mode 100644
index 360df3e..0000000
--- a/patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 5 May 2009 15:17:20 +0200
-Subject: [PATCH] Add support for socketcan to the python socket module
-
-This patch add support for the protocol family AF_CAN. It contains all the
-necessary code to use the python socket module for socketcan.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Lib/plat-linux2/IN.py  |  2 ++
- Modules/socketmodule.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
- Modules/socketmodule.h | 11 +++++++
- configure.ac           | 13 ++++++++
- 4 files changed, 115 insertions(+)
-
-diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
-index ad307f6..f72ae88 100644
---- a/Lib/plat-linux2/IN.py
-+++ b/Lib/plat-linux2/IN.py
-@@ -384,6 +384,7 @@ PF_SNA = 22
- PF_IRDA = 23
- PF_PPPOX = 24
- PF_WANPIPE = 25
-+PF_CAN = 29
- PF_BLUETOOTH = 31
- PF_MAX = 32
- AF_UNSPEC = PF_UNSPEC
-@@ -414,6 +415,7 @@ AF_SNA = PF_SNA
- AF_IRDA = PF_IRDA
- AF_PPPOX = PF_PPPOX
- AF_WANPIPE = PF_WANPIPE
-+AF_CAN = PF_CAN
- AF_BLUETOOTH = PF_BLUETOOTH
- AF_MAX = PF_MAX
- SOL_RAW = 255
-diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
-index bdc055d..066221a 100644
---- a/Modules/socketmodule.c
-+++ b/Modules/socketmodule.c
-@@ -420,6 +420,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
- 
- #define SAS2SA(x)       ((struct sockaddr *)(x))
- 
-+#ifdef ENABLE_CAN
-+#include <linux/can/raw.h>
-+#endif
-+
- /*
-  * Constants for getnameinfo()
-  */
-@@ -1097,6 +1101,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        struct sockaddr_can *a = (struct sockaddr_can *)addr;
-+        char *ifname = "";
-+        struct ifreq ifr;
-+        /* need to look up interface name give index */
-+        if (a->can_ifindex) {
-+            ifr.ifr_ifindex = a->can_ifindex;
-+            if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
-+                ifname = ifr.ifr_name;
-+        }
-+        return Py_BuildValue("s", ifname);
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-         switch (proto) {
-@@ -1383,6 +1403,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        struct sockaddr_can* addr;
-+        struct ifreq ifr;
-+        char *interfaceName;
-+        addr = (struct sockaddr_can*)addr_ret;
-+        if (!PyArg_Parse(args, "s", &interfaceName))
-+            return 0;
-+        strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
-+        ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
-+        if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
-+                s->errorhandler();
-+            return 0;
-+        }
-+        addr->can_family = AF_CAN;
-+        addr->can_ifindex = ifr.ifr_ifindex;
-+        *len_ret = sizeof *addr;
-+        return 1;
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-     {
-@@ -1633,6 +1675,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        *len_ret = sizeof (struct sockaddr_can);
-+        return 1;
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-     {
-@@ -4758,6 +4808,10 @@ init_socket(void)
-     PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
- #endif
- 
-+#ifdef ENABLE_CAN
-+    PyModule_AddIntConstant(m, "AF_CAN", AF_CAN);
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
-     PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
-@@ -5114,6 +5168,41 @@ init_socket(void)
-     PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
- #endif
- 
-+#ifdef  CAN_RAW
-+    PyModule_AddIntConstant(m, "CAN_RAW", CAN_RAW);
-+#endif
-+#ifdef  CAN_BCM
-+    PyModule_AddIntConstant(m, "CAN_BCM", CAN_BCM);
-+#endif
-+#ifdef  CAN_TP16
-+    PyModule_AddIntConstant(m, "CAN_TP16", CAN_TP16);
-+#endif
-+#ifdef  CAN_TP20
-+    PyModule_AddIntConstant(m, "CAN_TP20", CAN_TP20);
-+#endif
-+#ifdef  CAN_MCNET
-+    PyModule_AddIntConstant(m, "CAN_MCNET", CAN_MCNET);
-+#endif
-+#ifdef  CAN_ISOTP
-+    PyModule_AddIntConstant(m, "CAN_ISOTP", CAN_ISOTP);
-+#endif
-+#ifdef  CAN_NPROTO
-+    PyModule_AddIntConstant(m, "CAN_NPROTO", CAN_NPROTO);
-+#endif
-+
-+#ifdef  SOL_CAN_BASE
-+    PyModule_AddIntConstant(m, "SOL_CAN_BASE", SOL_CAN_BASE);
-+#endif
-+#ifdef  SOL_CAN_RAW
-+    PyModule_AddIntConstant(m, "SOL_CAN_RAW", SOL_CAN_RAW);
-+#endif
-+#ifdef ENABLE_CAN
-+    PyModule_AddIntConstant(m, "CAN_RAW_FILTER", CAN_RAW_FILTER);
-+    PyModule_AddIntConstant(m, "CAN_RAW_ERR_FILTER", CAN_RAW_ERR_FILTER);
-+    PyModule_AddIntConstant(m, "CAN_RAW_LOOPBACK", CAN_RAW_LOOPBACK);
-+    PyModule_AddIntConstant(m, "CAN_RAW_RECV_OWN_MSGS", CAN_RAW_RECV_OWN_MSGS);
-+#endif
-+
-     /* Some port configuration */
- #ifdef  IPPORT_RESERVED
-     PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
-diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
-index 8515499..3eae3eb 100644
---- a/Modules/socketmodule.h
-+++ b/Modules/socketmodule.h
-@@ -55,6 +55,14 @@ typedef int socklen_t;
- #include <bluetooth/hci.h>
- #endif
- 
-+#define AF_CAN 29
-+#define PF_CAN AF_CAN
-+
-+#ifdef HAVE_LINUX_CAN_H
-+#define ENABLE_CAN 1
-+#include <linux/can.h>
-+#endif
-+
- #ifdef HAVE_BLUETOOTH_H
- #include <bluetooth.h>
- #endif
-@@ -106,6 +114,9 @@ typedef union sock_addr {
-     struct sockaddr_in6 in6;
-     struct sockaddr_storage storage;
- #endif
-+#ifdef ENABLE_CAN
-+	struct sockaddr_can can;
-+#endif
- #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
-     struct sockaddr_l2 bt_l2;
-     struct sockaddr_rc bt_rc;
-diff --git a/configure.ac b/configure.ac
-index 30f5bf4..c9b78ff 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1539,6 +1539,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
- #endif
- ])
- 
-+AC_CHECK_HEADERS(linux/can.h,[],[],[#include <sys/socket.h>])
-+# check for AF_CAN
-+AC_TRY_COMPILE(
-+    [[#include <sys/socket.h>
-+      int domain = AF_CAN;]],
-+    [[socket(domain, 0, 0);]],
-+    [],
-+    [
-+        AC_DEFINE(AF_CAN, 29, [Define AF_CAN if not defined by sys/socket.h])
-+        AC_DEFINE(PF_CAN, 29, [Define PF_CAN if not defined by sys/socket.h])
-+    ]
-+)
-+
- # checks for typedefs
- was_it_defined=no
- AC_MSG_CHECKING(for clock_t in time.h)
diff --git a/patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
deleted file mode 100644
index 08c3dd8..0000000
--- a/patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 18:44:11 +0200
-Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long
- detection
-
-AC_CHECK_SIZEOF does first detect if the type is available and detects
-its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.ac | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c9b78ff..ebc8285 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1676,15 +1676,11 @@ AC_CHECK_SIZEOF(fpos_t, 4)
- AC_CHECK_SIZEOF(size_t, 4)
- AC_CHECK_SIZEOF(pid_t, 4)
- 
--AC_MSG_CHECKING(for long long support)
--have_long_long=no
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
--  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
-+AC_TYPE_LONG_LONG_INT
-+AC_CHECK_SIZEOF(long long)
-+if test "$ac_cv_type_long_long_int" = "yes" ; then
-   have_long_long=yes
--],[])
--AC_MSG_RESULT($have_long_long)
--if test "$have_long_long" = yes ; then
--AC_CHECK_SIZEOF(long long, 8)
-+  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
- fi
- 
- AC_MSG_CHECKING(for long double support)
diff --git a/patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
deleted file mode 100644
index 9fdac2f..0000000
--- a/patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 18:47:19 +0200
-Subject: [PATCH] use AC_TYPE_LONG_DOUBLE to detect long double support
-
-use the correct AC_TYPE_LONG_DOUBLE function rahter than hand crafted
-test to detect long double support.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.ac | 12 ++----------
- 1 file changed, 2 insertions(+), 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ebc8285..764a08f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1683,16 +1683,8 @@ if test "$ac_cv_type_long_long_int" = "yes" ; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
- fi
- 
--AC_MSG_CHECKING(for long double support)
--have_long_double=no
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[
--  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
--  have_long_double=yes
--],[])
--AC_MSG_RESULT($have_long_double)
--if test "$have_long_double" = yes ; then
--AC_CHECK_SIZEOF(long double, 12)
--fi
-+AC_TYPE_LONG_DOUBLE
-+AC_CHECK_SIZEOF(long double)
- 
- AC_MSG_CHECKING(for _Bool support)
- have_c99_bool=no
diff --git a/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch b/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch
deleted file mode 100644
index d892f97..0000000
--- a/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Wed, 12 Jun 2013 13:53:15 +0200
-Subject: [PATCH] use PGEN_FOR_BUILD
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makefile.pre.in | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 9d55550..4461970 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -227,6 +227,8 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
- ##########################################################################
- # Parser
- PGEN=		Parser/pgen$(EXE)
-+PGEN_FOR_BUILD=	$(PGEN)
-+
- 
- PSRCS=		\
- 		Parser/acceler.c \
-@@ -593,7 +595,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- 		@$(MKDIR_P) Include
- 		$(MAKE) $(PGEN)
--		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+		$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- 		$(MAKE) $(GRAMMAR_H)
- 		touch $(GRAMMAR_C)
diff --git a/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
deleted file mode 100644
index a9537bc..0000000
--- a/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 19:07:54 +0200
-Subject: [PATCH] setup.py: don't leak host path into cross compilation
- environment
-
-During cross compilation we don't host path (neither include nor library
-search patch) to leak into our environment.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- setup.py | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 716f08e..c556209 100644
---- a/setup.py
-+++ b/setup.py
-@@ -437,8 +437,10 @@ class PyBuildExt(build_ext):
- 
-     def detect_modules(self):
-         # Ensure that /usr/local is always used
--        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+
-+        if not cross_compiling:
-+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         self.add_gcc_paths()
-         self.add_multiarch_paths()
- 
-@@ -1203,6 +1205,9 @@ class PyBuildExt(build_ext):
-         # the more recent berkeleydb's db.h file first in the include path
-         # when attempting to compile and it will fail.
-         f = "/usr/include/db.h"
-+        if cross_compiling:
-+            f = ''
-+
- 
-         if host_platform == 'darwin':
-             if is_macosx_sdk_path(f):
diff --git a/patches/Python-2.7.5/0006-add-cross-compilation-support.patch b/patches/Python-2.7.5/0006-add-cross-compilation-support.patch
deleted file mode 100644
index 180c3eb..0000000
--- a/patches/Python-2.7.5/0006-add-cross-compilation-support.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 4 May 2009 14:39:18 +0200
-Subject: [PATCH] add cross compilation support
-
-This patch adds preliminary cross compilation support to python.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.pre.in | 12 ++++++++----
- configure.ac    |  7 +++++++
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 4461970..584ed4f 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -84,6 +84,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
- # C flags used for building the interpreter object files
- PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
- 
-+# cross compiler options
-+ifndef DESTDIR
-+sysroot=	@SYSROOT@
-+endif
- 
- # Machine-dependent subdirectories
- MACHDEP=	@MACHDEP@
-@@ -102,11 +106,11 @@ datarootdir=    @datarootdir@
- 
- # Expanded directories
- BINDIR=		@bindir@
--LIBDIR=		@libdir@
-+LIBDIR=		$(sysroot)@libdir@
- MANDIR=		@mandir@
--INCLUDEDIR=	@includedir@
--CONFINCLUDEDIR=	$(exec_prefix)/include
--SCRIPTDIR=	$(prefix)/lib
-+INCLUDEDIR=	$(sysroot)@includedir@
-+CONFINCLUDEDIR=	$(sysroot)$(exec_prefix)/include
-+SCRIPTDIR=	$(sysroot)$(prefix)/lib
- 
- # Detailed destination directories
- BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-diff --git a/configure.ac b/configure.ac
-index 764a08f..c05c5fb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -939,6 +939,13 @@ if test "$cross_compiling" = yes; then
- 	RUNSHARED=
- fi
- 
-+# sysroot
-+AC_SUBST(SYSROOT)
-+if test "$cross_compiling" = yes; then
-+    AC_MSG_CHECKING([for SYSROOT])
-+    AC_MSG_RESULT([$SYSROOT])
-+fi
-+
- AC_MSG_RESULT($LDLIBRARY)
- 
- AC_PROG_RANLIB
diff --git a/patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch b/patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch
deleted file mode 100644
index fef8858..0000000
--- a/patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 8 Feb 2011 15:10:31 +0100
-Subject: [PATCH] python: don't add rpaths in setup.py
-
-We don't add rpaths.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- setup.py | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index c556209..66a97bd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1077,7 +1077,6 @@ class PyBuildExt(build_ext):
-             exts.append(Extension('_bsddb', ['_bsddb.c'],
-                                   depends = ['bsddb.h'],
-                                   library_dirs=dblib_dir,
--                                  runtime_library_dirs=dblib_dir,
-                                   include_dirs=db_incs,
-                                   libraries=dblibs))
-         else:
-@@ -1187,7 +1186,6 @@ class PyBuildExt(build_ext):
-                                   include_dirs=["Modules/_sqlite",
-                                                 sqlite_incdir],
-                                   library_dirs=sqlite_libdir,
--                                  runtime_library_dirs=sqlite_libdir,
-                                   extra_link_args=sqlite_extra_link_args,
-                                   libraries=["sqlite3",]))
-         else:
diff --git a/patches/Python-2.7.5/0008-add-more-search-paths.patch b/patches/Python-2.7.5/0008-add-more-search-paths.patch
deleted file mode 100644
index f160ac6..0000000
--- a/patches/Python-2.7.5/0008-add-more-search-paths.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 13 Jun 2013 10:42:58 +0200
-Subject: [PATCH] add more search paths
-
-Without this setup.py won't find libs in <sysroot>/lib
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- setup.py | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 66a97bd..7bd9e9c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -484,8 +484,10 @@ class PyBuildExt(build_ext):
-             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-             # building a framework with different architectures than
-             # the one that is currently installed (issue #7473)
--            add_dir_to_list(self.compiler.library_dirs,
--                            sysconfig.get_config_var("LIBDIR"))
-+            libdir = sysconfig.get_config_var("LIBDIR")
-+            add_dir_to_list(self.compiler.library_dirs, libdir)
-+            if libdir.endswith('/usr/lib'):
-+                add_dir_to_list(self.compiler.library_dirs, libdir.replace('/usr/lib','/lib'))
-             add_dir_to_list(self.compiler.include_dirs,
-                             sysconfig.get_config_var("INCLUDEDIR"))
- 
diff --git a/patches/Python-2.7.5/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch b/patches/Python-2.7.5/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
deleted file mode 100644
index c0e7280..0000000
--- a/patches/Python-2.7.5/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 5 Feb 2014 12:16:12 +0100
-Subject: [PATCH] resolve existing LD_LIBRARY_PATH during make, not during
- configure
-
-Otherwise, calling "make install" with fakeroot may not work correctly.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c05c5fb..9274125 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -885,7 +885,7 @@ if test $enable_shared = "yes"; then
-     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
- 	  LDLIBRARY='libpython$(VERSION).so'
- 	  BLDLIBRARY='-L. -lpython$(VERSION)'
--	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-+	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH}'
- 	  case $ac_sys_system in
- 	      FreeBSD*)
- 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
diff --git a/patches/Python-2.7.5/autogen.sh b/patches/Python-2.7.5/autogen.sh
deleted file mode 100755
index 903ce78..0000000
--- a/patches/Python-2.7.5/autogen.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-# to add config.guess and config.sub
-automake --copy --add-missing || true
-
-autoheader --force
-
-autoconf \
-	--force \
-	--warnings=cross \
-	--warnings=syntax \
-	--warnings=obsolete \
-	--warnings=unsupported
-
diff --git a/patches/Python-2.7.5/series b/patches/Python-2.7.5/series
deleted file mode 100644
index 47df268..0000000
--- a/patches/Python-2.7.5/series
+++ /dev/null
@@ -1,12 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
-0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
-0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
-0004-use-PGEN_FOR_BUILD.patch
-0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
-0006-add-cross-compilation-support.patch
-0007-python-don-t-add-rpaths-in-setup.py.patch
-0008-add-more-search-paths.patch
-0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
-# c22b85583b9b9fc00386bba7094689ba  - git-ptx-patches magic
-- 
2.1.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH 1/4] python: prepare version bump
  2014-12-14  9:42 [ptxdist] [PATCH 1/4] python: prepare version bump Robert Schwebel
                   ` (2 preceding siblings ...)
  2014-12-14  9:42 ` [ptxdist] [PATCH 4/4] python: remove old patches Robert Schwebel
@ 2015-01-12 15:35 ` Michael Olbrich
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2015-01-12 15:35 UTC (permalink / raw)
  To: ptxdist

On Sun, Dec 14, 2014 at 10:42:07AM +0100, Robert Schwebel wrote:
> Copy old patches in preparation of version bump.
> 

Thanks, all applied.

Michael

> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
>  ...-for-socketcan-to-the-python-socket-modul.patch | 224 +++++++++++++++++++++
>  ...K_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch |  37 ++++
>  ..._LONG_DOUBLE-to-detect-long-double-suppor.patch |  35 ++++
>  patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch |  32 +++
>  ...n-t-leak-host-path-into-cross-compilation.patch |  40 ++++
>  .../0006-add-cross-compilation-support.patch       |  61 ++++++
>  .../0007-python-don-t-add-rpaths-in-setup.py.patch |  31 +++
>  .../Python-2.7.9/0008-add-more-search-paths.patch  |  28 +++
>  ...sting-LD_LIBRARY_PATH-during-make-not-dur.patch |  25 +++
>  patches/Python-2.7.9/autogen.sh                    |  14 ++
>  patches/Python-2.7.9/series                        |  12 ++
>  11 files changed, 539 insertions(+)
>  create mode 100644 patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
>  create mode 100644 patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
>  create mode 100644 patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
>  create mode 100644 patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
>  create mode 100644 patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
>  create mode 100644 patches/Python-2.7.9/0006-add-cross-compilation-support.patch
>  create mode 100644 patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
>  create mode 100644 patches/Python-2.7.9/0008-add-more-search-paths.patch
>  create mode 100644 patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
>  create mode 100755 patches/Python-2.7.9/autogen.sh
>  create mode 100644 patches/Python-2.7.9/series
> 
> diff --git a/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
> new file mode 100644
> index 0000000..360df3e
> --- /dev/null
> +++ b/patches/Python-2.7.9/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
> @@ -0,0 +1,224 @@
> +From: Michael Olbrich <m.olbrich@pengutronix.de>
> +Date: Tue, 5 May 2009 15:17:20 +0200
> +Subject: [PATCH] Add support for socketcan to the python socket module
> +
> +This patch add support for the protocol family AF_CAN. It contains all the
> +necessary code to use the python socket module for socketcan.
> +
> +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + Lib/plat-linux2/IN.py  |  2 ++
> + Modules/socketmodule.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
> + Modules/socketmodule.h | 11 +++++++
> + configure.ac           | 13 ++++++++
> + 4 files changed, 115 insertions(+)
> +
> +diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
> +index ad307f6..f72ae88 100644
> +--- a/Lib/plat-linux2/IN.py
> ++++ b/Lib/plat-linux2/IN.py
> +@@ -384,6 +384,7 @@ PF_SNA = 22
> + PF_IRDA = 23
> + PF_PPPOX = 24
> + PF_WANPIPE = 25
> ++PF_CAN = 29
> + PF_BLUETOOTH = 31
> + PF_MAX = 32
> + AF_UNSPEC = PF_UNSPEC
> +@@ -414,6 +415,7 @@ AF_SNA = PF_SNA
> + AF_IRDA = PF_IRDA
> + AF_PPPOX = PF_PPPOX
> + AF_WANPIPE = PF_WANPIPE
> ++AF_CAN = PF_CAN
> + AF_BLUETOOTH = PF_BLUETOOTH
> + AF_MAX = PF_MAX
> + SOL_RAW = 255
> +diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
> +index bdc055d..066221a 100644
> +--- a/Modules/socketmodule.c
> ++++ b/Modules/socketmodule.c
> +@@ -420,6 +420,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
> + 
> + #define SAS2SA(x)       ((struct sockaddr *)(x))
> + 
> ++#ifdef ENABLE_CAN
> ++#include <linux/can/raw.h>
> ++#endif
> ++
> + /*
> +  * Constants for getnameinfo()
> +  */
> +@@ -1097,6 +1101,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
> +     }
> + #endif
> + 
> ++#ifdef ENABLE_CAN
> ++    case AF_CAN:
> ++    {
> ++        struct sockaddr_can *a = (struct sockaddr_can *)addr;
> ++        char *ifname = "";
> ++        struct ifreq ifr;
> ++        /* need to look up interface name give index */
> ++        if (a->can_ifindex) {
> ++            ifr.ifr_ifindex = a->can_ifindex;
> ++            if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
> ++                ifname = ifr.ifr_name;
> ++        }
> ++        return Py_BuildValue("s", ifname);
> ++    }
> ++#endif
> ++
> + #ifdef USE_BLUETOOTH
> +     case AF_BLUETOOTH:
> +         switch (proto) {
> +@@ -1383,6 +1403,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
> +     }
> + #endif
> + 
> ++#ifdef ENABLE_CAN
> ++    case AF_CAN:
> ++    {
> ++        struct sockaddr_can* addr;
> ++        struct ifreq ifr;
> ++        char *interfaceName;
> ++        addr = (struct sockaddr_can*)addr_ret;
> ++        if (!PyArg_Parse(args, "s", &interfaceName))
> ++            return 0;
> ++        strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
> ++        ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
> ++        if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
> ++                s->errorhandler();
> ++            return 0;
> ++        }
> ++        addr->can_family = AF_CAN;
> ++        addr->can_ifindex = ifr.ifr_ifindex;
> ++        *len_ret = sizeof *addr;
> ++        return 1;
> ++    }
> ++#endif
> ++
> + #ifdef USE_BLUETOOTH
> +     case AF_BLUETOOTH:
> +     {
> +@@ -1633,6 +1675,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
> +     }
> + #endif
> + 
> ++#ifdef ENABLE_CAN
> ++    case AF_CAN:
> ++    {
> ++        *len_ret = sizeof (struct sockaddr_can);
> ++        return 1;
> ++    }
> ++#endif
> ++
> + #ifdef USE_BLUETOOTH
> +     case AF_BLUETOOTH:
> +     {
> +@@ -4758,6 +4808,10 @@ init_socket(void)
> +     PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
> + #endif
> + 
> ++#ifdef ENABLE_CAN
> ++    PyModule_AddIntConstant(m, "AF_CAN", AF_CAN);
> ++#endif
> ++
> + #ifdef USE_BLUETOOTH
> +     PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
> +     PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
> +@@ -5114,6 +5168,41 @@ init_socket(void)
> +     PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
> + #endif
> + 
> ++#ifdef  CAN_RAW
> ++    PyModule_AddIntConstant(m, "CAN_RAW", CAN_RAW);
> ++#endif
> ++#ifdef  CAN_BCM
> ++    PyModule_AddIntConstant(m, "CAN_BCM", CAN_BCM);
> ++#endif
> ++#ifdef  CAN_TP16
> ++    PyModule_AddIntConstant(m, "CAN_TP16", CAN_TP16);
> ++#endif
> ++#ifdef  CAN_TP20
> ++    PyModule_AddIntConstant(m, "CAN_TP20", CAN_TP20);
> ++#endif
> ++#ifdef  CAN_MCNET
> ++    PyModule_AddIntConstant(m, "CAN_MCNET", CAN_MCNET);
> ++#endif
> ++#ifdef  CAN_ISOTP
> ++    PyModule_AddIntConstant(m, "CAN_ISOTP", CAN_ISOTP);
> ++#endif
> ++#ifdef  CAN_NPROTO
> ++    PyModule_AddIntConstant(m, "CAN_NPROTO", CAN_NPROTO);
> ++#endif
> ++
> ++#ifdef  SOL_CAN_BASE
> ++    PyModule_AddIntConstant(m, "SOL_CAN_BASE", SOL_CAN_BASE);
> ++#endif
> ++#ifdef  SOL_CAN_RAW
> ++    PyModule_AddIntConstant(m, "SOL_CAN_RAW", SOL_CAN_RAW);
> ++#endif
> ++#ifdef ENABLE_CAN
> ++    PyModule_AddIntConstant(m, "CAN_RAW_FILTER", CAN_RAW_FILTER);
> ++    PyModule_AddIntConstant(m, "CAN_RAW_ERR_FILTER", CAN_RAW_ERR_FILTER);
> ++    PyModule_AddIntConstant(m, "CAN_RAW_LOOPBACK", CAN_RAW_LOOPBACK);
> ++    PyModule_AddIntConstant(m, "CAN_RAW_RECV_OWN_MSGS", CAN_RAW_RECV_OWN_MSGS);
> ++#endif
> ++
> +     /* Some port configuration */
> + #ifdef  IPPORT_RESERVED
> +     PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
> +diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
> +index 8515499..3eae3eb 100644
> +--- a/Modules/socketmodule.h
> ++++ b/Modules/socketmodule.h
> +@@ -55,6 +55,14 @@ typedef int socklen_t;
> + #include <bluetooth/hci.h>
> + #endif
> + 
> ++#define AF_CAN 29
> ++#define PF_CAN AF_CAN
> ++
> ++#ifdef HAVE_LINUX_CAN_H
> ++#define ENABLE_CAN 1
> ++#include <linux/can.h>
> ++#endif
> ++
> + #ifdef HAVE_BLUETOOTH_H
> + #include <bluetooth.h>
> + #endif
> +@@ -106,6 +114,9 @@ typedef union sock_addr {
> +     struct sockaddr_in6 in6;
> +     struct sockaddr_storage storage;
> + #endif
> ++#ifdef ENABLE_CAN
> ++	struct sockaddr_can can;
> ++#endif
> + #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
> +     struct sockaddr_l2 bt_l2;
> +     struct sockaddr_rc bt_rc;
> +diff --git a/configure.ac b/configure.ac
> +index 30f5bf4..c9b78ff 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -1539,6 +1539,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
> + #endif
> + ])
> + 
> ++AC_CHECK_HEADERS(linux/can.h,[],[],[#include <sys/socket.h>])
> ++# check for AF_CAN
> ++AC_TRY_COMPILE(
> ++    [[#include <sys/socket.h>
> ++      int domain = AF_CAN;]],
> ++    [[socket(domain, 0, 0);]],
> ++    [],
> ++    [
> ++        AC_DEFINE(AF_CAN, 29, [Define AF_CAN if not defined by sys/socket.h])
> ++        AC_DEFINE(PF_CAN, 29, [Define PF_CAN if not defined by sys/socket.h])
> ++    ]
> ++)
> ++
> + # checks for typedefs
> + was_it_defined=no
> + AC_MSG_CHECKING(for clock_t in time.h)
> diff --git a/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
> new file mode 100644
> index 0000000..08c3dd8
> --- /dev/null
> +++ b/patches/Python-2.7.9/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
> @@ -0,0 +1,37 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Fri, 24 Apr 2009 18:44:11 +0200
> +Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long
> + detection
> +
> +AC_CHECK_SIZEOF does first detect if the type is available and detects
> +its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + configure.ac | 12 ++++--------
> + 1 file changed, 4 insertions(+), 8 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index c9b78ff..ebc8285 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -1676,15 +1676,11 @@ AC_CHECK_SIZEOF(fpos_t, 4)
> + AC_CHECK_SIZEOF(size_t, 4)
> + AC_CHECK_SIZEOF(pid_t, 4)
> + 
> +-AC_MSG_CHECKING(for long long support)
> +-have_long_long=no
> +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
> +-  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
> ++AC_TYPE_LONG_LONG_INT
> ++AC_CHECK_SIZEOF(long long)
> ++if test "$ac_cv_type_long_long_int" = "yes" ; then
> +   have_long_long=yes
> +-],[])
> +-AC_MSG_RESULT($have_long_long)
> +-if test "$have_long_long" = yes ; then
> +-AC_CHECK_SIZEOF(long long, 8)
> ++  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
> + fi
> + 
> + AC_MSG_CHECKING(for long double support)
> diff --git a/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
> new file mode 100644
> index 0000000..9fdac2f
> --- /dev/null
> +++ b/patches/Python-2.7.9/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
> @@ -0,0 +1,35 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Fri, 24 Apr 2009 18:47:19 +0200
> +Subject: [PATCH] use AC_TYPE_LONG_DOUBLE to detect long double support
> +
> +use the correct AC_TYPE_LONG_DOUBLE function rahter than hand crafted
> +test to detect long double support.
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + configure.ac | 12 ++----------
> + 1 file changed, 2 insertions(+), 10 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index ebc8285..764a08f 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -1683,16 +1683,8 @@ if test "$ac_cv_type_long_long_int" = "yes" ; then
> +   AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
> + fi
> + 
> +-AC_MSG_CHECKING(for long double support)
> +-have_long_double=no
> +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[
> +-  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
> +-  have_long_double=yes
> +-],[])
> +-AC_MSG_RESULT($have_long_double)
> +-if test "$have_long_double" = yes ; then
> +-AC_CHECK_SIZEOF(long double, 12)
> +-fi
> ++AC_TYPE_LONG_DOUBLE
> ++AC_CHECK_SIZEOF(long double)
> + 
> + AC_MSG_CHECKING(for _Bool support)
> + have_c99_bool=no
> diff --git a/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
> new file mode 100644
> index 0000000..d892f97
> --- /dev/null
> +++ b/patches/Python-2.7.9/0004-use-PGEN_FOR_BUILD.patch
> @@ -0,0 +1,32 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Wed, 12 Jun 2013 13:53:15 +0200
> +Subject: [PATCH] use PGEN_FOR_BUILD
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> +---
> + Makefile.pre.in | 4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile.pre.in b/Makefile.pre.in
> +index 9d55550..4461970 100644
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -227,6 +227,8 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
> + ##########################################################################
> + # Parser
> + PGEN=		Parser/pgen$(EXE)
> ++PGEN_FOR_BUILD=	$(PGEN)
> ++
> + 
> + PSRCS=		\
> + 		Parser/acceler.c \
> +@@ -593,7 +595,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
> + $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
> + 		@$(MKDIR_P) Include
> + 		$(MAKE) $(PGEN)
> +-		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
> ++		$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
> + $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
> + 		$(MAKE) $(GRAMMAR_H)
> + 		touch $(GRAMMAR_C)
> diff --git a/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
> new file mode 100644
> index 0000000..a9537bc
> --- /dev/null
> +++ b/patches/Python-2.7.9/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
> @@ -0,0 +1,40 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Tue, 28 Apr 2009 19:07:54 +0200
> +Subject: [PATCH] setup.py: don't leak host path into cross compilation
> + environment
> +
> +During cross compilation we don't host path (neither include nor library
> +search patch) to leak into our environment.
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + setup.py | 9 +++++++--
> + 1 file changed, 7 insertions(+), 2 deletions(-)
> +
> +diff --git a/setup.py b/setup.py
> +index 716f08e..c556209 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -437,8 +437,10 @@ class PyBuildExt(build_ext):
> + 
> +     def detect_modules(self):
> +         # Ensure that /usr/local is always used
> +-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> +-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
> ++
> ++        if not cross_compiling:
> ++            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> ++            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
> +         self.add_gcc_paths()
> +         self.add_multiarch_paths()
> + 
> +@@ -1203,6 +1205,9 @@ class PyBuildExt(build_ext):
> +         # the more recent berkeleydb's db.h file first in the include path
> +         # when attempting to compile and it will fail.
> +         f = "/usr/include/db.h"
> ++        if cross_compiling:
> ++            f = ''
> ++
> + 
> +         if host_platform == 'darwin':
> +             if is_macosx_sdk_path(f):
> diff --git a/patches/Python-2.7.9/0006-add-cross-compilation-support.patch b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
> new file mode 100644
> index 0000000..180c3eb
> --- /dev/null
> +++ b/patches/Python-2.7.9/0006-add-cross-compilation-support.patch
> @@ -0,0 +1,61 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Mon, 4 May 2009 14:39:18 +0200
> +Subject: [PATCH] add cross compilation support
> +
> +This patch adds preliminary cross compilation support to python.
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + Makefile.pre.in | 12 ++++++++----
> + configure.ac    |  7 +++++++
> + 2 files changed, 15 insertions(+), 4 deletions(-)
> +
> +diff --git a/Makefile.pre.in b/Makefile.pre.in
> +index 4461970..584ed4f 100644
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -84,6 +84,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
> + # C flags used for building the interpreter object files
> + PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
> + 
> ++# cross compiler options
> ++ifndef DESTDIR
> ++sysroot=	@SYSROOT@
> ++endif
> + 
> + # Machine-dependent subdirectories
> + MACHDEP=	@MACHDEP@
> +@@ -102,11 +106,11 @@ datarootdir=    @datarootdir@
> + 
> + # Expanded directories
> + BINDIR=		@bindir@
> +-LIBDIR=		@libdir@
> ++LIBDIR=		$(sysroot)@libdir@
> + MANDIR=		@mandir@
> +-INCLUDEDIR=	@includedir@
> +-CONFINCLUDEDIR=	$(exec_prefix)/include
> +-SCRIPTDIR=	$(prefix)/lib
> ++INCLUDEDIR=	$(sysroot)@includedir@
> ++CONFINCLUDEDIR=	$(sysroot)$(exec_prefix)/include
> ++SCRIPTDIR=	$(sysroot)$(prefix)/lib
> + 
> + # Detailed destination directories
> + BINLIBDEST=	$(LIBDIR)/python$(VERSION)
> +diff --git a/configure.ac b/configure.ac
> +index 764a08f..c05c5fb 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -939,6 +939,13 @@ if test "$cross_compiling" = yes; then
> + 	RUNSHARED=
> + fi
> + 
> ++# sysroot
> ++AC_SUBST(SYSROOT)
> ++if test "$cross_compiling" = yes; then
> ++    AC_MSG_CHECKING([for SYSROOT])
> ++    AC_MSG_RESULT([$SYSROOT])
> ++fi
> ++
> + AC_MSG_RESULT($LDLIBRARY)
> + 
> + AC_PROG_RANLIB
> diff --git a/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
> new file mode 100644
> index 0000000..fef8858
> --- /dev/null
> +++ b/patches/Python-2.7.9/0007-python-don-t-add-rpaths-in-setup.py.patch
> @@ -0,0 +1,31 @@
> +From: unknown author <unknown.author@example.com>
> +Date: Tue, 8 Feb 2011 15:10:31 +0100
> +Subject: [PATCH] python: don't add rpaths in setup.py
> +
> +We don't add rpaths.
> +
> +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> +---
> + setup.py | 2 --
> + 1 file changed, 2 deletions(-)
> +
> +diff --git a/setup.py b/setup.py
> +index c556209..66a97bd 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -1077,7 +1077,6 @@ class PyBuildExt(build_ext):
> +             exts.append(Extension('_bsddb', ['_bsddb.c'],
> +                                   depends = ['bsddb.h'],
> +                                   library_dirs=dblib_dir,
> +-                                  runtime_library_dirs=dblib_dir,
> +                                   include_dirs=db_incs,
> +                                   libraries=dblibs))
> +         else:
> +@@ -1187,7 +1186,6 @@ class PyBuildExt(build_ext):
> +                                   include_dirs=["Modules/_sqlite",
> +                                                 sqlite_incdir],
> +                                   library_dirs=sqlite_libdir,
> +-                                  runtime_library_dirs=sqlite_libdir,
> +                                   extra_link_args=sqlite_extra_link_args,
> +                                   libraries=["sqlite3",]))
> +         else:
> diff --git a/patches/Python-2.7.9/0008-add-more-search-paths.patch b/patches/Python-2.7.9/0008-add-more-search-paths.patch
> new file mode 100644
> index 0000000..f160ac6
> --- /dev/null
> +++ b/patches/Python-2.7.9/0008-add-more-search-paths.patch
> @@ -0,0 +1,28 @@
> +From: Michael Olbrich <m.olbrich@pengutronix.de>
> +Date: Thu, 13 Jun 2013 10:42:58 +0200
> +Subject: [PATCH] add more search paths
> +
> +Without this setup.py won't find libs in <sysroot>/lib
> +
> +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> +---
> + setup.py | 6 ++++--
> + 1 file changed, 4 insertions(+), 2 deletions(-)
> +
> +diff --git a/setup.py b/setup.py
> +index 66a97bd..7bd9e9c 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -484,8 +484,10 @@ class PyBuildExt(build_ext):
> +             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
> +             # building a framework with different architectures than
> +             # the one that is currently installed (issue #7473)
> +-            add_dir_to_list(self.compiler.library_dirs,
> +-                            sysconfig.get_config_var("LIBDIR"))
> ++            libdir = sysconfig.get_config_var("LIBDIR")
> ++            add_dir_to_list(self.compiler.library_dirs, libdir)
> ++            if libdir.endswith('/usr/lib'):
> ++                add_dir_to_list(self.compiler.library_dirs, libdir.replace('/usr/lib','/lib'))
> +             add_dir_to_list(self.compiler.include_dirs,
> +                             sysconfig.get_config_var("INCLUDEDIR"))
> + 
> diff --git a/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
> new file mode 100644
> index 0000000..c0e7280
> --- /dev/null
> +++ b/patches/Python-2.7.9/0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
> @@ -0,0 +1,25 @@
> +From: Michael Olbrich <m.olbrich@pengutronix.de>
> +Date: Wed, 5 Feb 2014 12:16:12 +0100
> +Subject: [PATCH] resolve existing LD_LIBRARY_PATH during make, not during
> + configure
> +
> +Otherwise, calling "make install" with fakeroot may not work correctly.
> +
> +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> +---
> + configure.ac | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index c05c5fb..9274125 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -885,7 +885,7 @@ if test $enable_shared = "yes"; then
> +     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
> + 	  LDLIBRARY='libpython$(VERSION).so'
> + 	  BLDLIBRARY='-L. -lpython$(VERSION)'
> +-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
> ++	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH}'
> + 	  case $ac_sys_system in
> + 	      FreeBSD*)
> + 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
> diff --git a/patches/Python-2.7.9/autogen.sh b/patches/Python-2.7.9/autogen.sh
> new file mode 100755
> index 0000000..903ce78
> --- /dev/null
> +++ b/patches/Python-2.7.9/autogen.sh
> @@ -0,0 +1,14 @@
> +#!/bin/bash
> +
> +# to add config.guess and config.sub
> +automake --copy --add-missing || true
> +
> +autoheader --force
> +
> +autoconf \
> +	--force \
> +	--warnings=cross \
> +	--warnings=syntax \
> +	--warnings=obsolete \
> +	--warnings=unsupported
> +
> diff --git a/patches/Python-2.7.9/series b/patches/Python-2.7.9/series
> new file mode 100644
> index 0000000..47df268
> --- /dev/null
> +++ b/patches/Python-2.7.9/series
> @@ -0,0 +1,12 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
> +0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
> +0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
> +0004-use-PGEN_FOR_BUILD.patch
> +0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
> +0006-add-cross-compilation-support.patch
> +0007-python-don-t-add-rpaths-in-setup.py.patch
> +0008-add-more-search-paths.patch
> +0009-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
> +# c22b85583b9b9fc00386bba7094689ba  - git-ptx-patches magic
> -- 
> 2.1.3
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-12 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-14  9:42 [ptxdist] [PATCH 1/4] python: prepare version bump Robert Schwebel
2014-12-14  9:42 ` [ptxdist] [PATCH 2/4] python: update patches for 2.7.9 Robert Schwebel
2014-12-14  9:42 ` [ptxdist] [PATCH 3/4] python: version bump 2.7.5 -> 2.7.9 Robert Schwebel
2014-12-14  9:42 ` [ptxdist] [PATCH 4/4] python: remove old patches Robert Schwebel
2015-01-12 15:35 ` [ptxdist] [PATCH 1/4] python: prepare version bump Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox