diff options
author | obache <obache@pkgsrc.org> | 2013-04-17 13:21:05 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-04-17 13:21:05 +0000 |
commit | d3b91ed4edcdd235f4575fbf21066addf9b19ef6 (patch) | |
tree | 3c453b3ae94e13565cb8fae8c745e6c7b54b93c1 /lang/python27 | |
parent | 96cd8e6f0aa75c058cbfc9a7bd3eb106f80b376e (diff) | |
download | pkgsrc-d3b91ed4edcdd235f4575fbf21066addf9b19ef6.tar.gz |
Improve Cygwin support.
Diffstat (limited to 'lang/python27')
-rw-r--r-- | lang/python27/PLIST.Cygwin | 2 | ||||
-rw-r--r-- | lang/python27/distinfo | 9 | ||||
-rw-r--r-- | lang/python27/patches/patch-Include_node.h | 15 | ||||
-rw-r--r-- | lang/python27/patches/patch-Include_pyerrors.h | 15 | ||||
-rw-r--r-- | lang/python27/patches/patch-Lib_distutils_unixccompiler.py | 14 | ||||
-rw-r--r-- | lang/python27/patches/patch-Modules___ssl.c | 17 | ||||
-rw-r--r-- | lang/python27/patches/patch-Modules_getpath.c | 35 | ||||
-rw-r--r-- | lang/python27/patches/patch-am | 13 |
8 files changed, 117 insertions, 3 deletions
diff --git a/lang/python27/PLIST.Cygwin b/lang/python27/PLIST.Cygwin new file mode 100644 index 00000000000..eec77bc56c9 --- /dev/null +++ b/lang/python27/PLIST.Cygwin @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST.Cygwin,v 1.1 2013/04/17 13:21:05 obache Exp $ +bin/libpython${PY_VER_SUFFIX}.dll diff --git a/lang/python27/distinfo b/lang/python27/distinfo index fb794c96d59..727b1abc8fc 100644 --- a/lang/python27/distinfo +++ b/lang/python27/distinfo @@ -1,15 +1,20 @@ -$NetBSD: distinfo,v 1.22 2013/04/12 09:03:41 adam Exp $ +$NetBSD: distinfo,v 1.23 2013/04/17 13:21:05 obache Exp $ SHA1 (Python-2.7.4.tar.xz) = 08e78ebeb6d9c799644f6d787ca424291c0fe03e RMD160 (Python-2.7.4.tar.xz) = 9d1a6db9a5373599afd509e1abb675a3dc5bdf58 Size (Python-2.7.4.tar.xz) = 10250644 bytes +SHA1 (patch-Include_node.h) = 673d148b625711ac47e4bfeb0f5b0d5b31f94d7e +SHA1 (patch-Include_pyerrors.h) = 3eba043c83b1d1df4918524f7b53047a6ed372ae +SHA1 (patch-Lib_distutils_unixccompiler.py) = 3964e0c6bd2b3899b24b31892d5ad830ae04d308 +SHA1 (patch-Modules___ssl.c) = a635ffc52becf2f78c4f1ebae17587cfdf3dffc6 +SHA1 (patch-Modules_getpath.c) = f68b38eb90f974b67ceab3922ce7f92eb77f25c3 SHA1 (patch-aa) = 990e4025bb6a37715e1f5df1831499f0ab08acfa SHA1 (patch-ab) = 0d0ae9802dfe3b85659adb16793affd8c4ffce43 SHA1 (patch-ad) = de730b9f5a5efb56afa8bed05824b5f6579242ec SHA1 (patch-ae) = ff6d8c6164fe3c6dc4fb33d88eb8a49d5c5442f6 SHA1 (patch-ah) = ae3ce0656d890ca34292920bf0185f94ba847139 SHA1 (patch-al) = bb492863afae88d1627b3caba13b73759adb2d15 -SHA1 (patch-am) = d1950d0b85e16d60b6a60e823884427e6e8d0984 +SHA1 (patch-am) = 4deb1a07b3b7ff97a3a9ee468f066bd4143879cb SHA1 (patch-an) = 6098fbf0fc31422196cc40d3a227934523db11ca SHA1 (patch-ao) = 3a1cd2b255340fd23fc1fce8680e692581ffcec1 SHA1 (patch-au) = 2a2a988ac92553d17eb898870d1adb3c30a59b66 diff --git a/lang/python27/patches/patch-Include_node.h b/lang/python27/patches/patch-Include_node.h new file mode 100644 index 00000000000..c92c31ed19a --- /dev/null +++ b/lang/python27/patches/patch-Include_node.h @@ -0,0 +1,15 @@ +$NetBSD: patch-Include_node.h,v 1.1 2013/04/17 13:21:05 obache Exp $ + +* _PyNode_SizeOf is used by parsermodule + +--- Include/node.h.orig 2013-04-06 14:02:25.000000000 +0000 ++++ Include/node.h +@@ -21,7 +21,7 @@ PyAPI_FUNC(int) PyNode_AddChild(node *n, + char *str, int lineno, int col_offset); + PyAPI_FUNC(void) PyNode_Free(node *n); + #ifndef Py_LIMITED_API +-Py_ssize_t _PyNode_SizeOf(node *n); ++PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n); + #endif + + /* Node access functions */ diff --git a/lang/python27/patches/patch-Include_pyerrors.h b/lang/python27/patches/patch-Include_pyerrors.h new file mode 100644 index 00000000000..7cb33a2e379 --- /dev/null +++ b/lang/python27/patches/patch-Include_pyerrors.h @@ -0,0 +1,15 @@ +$NetBSD: patch-Include_pyerrors.h,v 1.1 2013/04/17 13:21:05 obache Exp $ + +* from cygport 2.6.5-export-PySignal_SetWakeupFd.patch + +--- Include/pyerrors.h.orig 2013-04-06 14:02:25.000000000 +0000 ++++ Include/pyerrors.h +@@ -231,7 +231,7 @@ PyAPI_FUNC(int) PyErr_CheckSignals(void) + PyAPI_FUNC(void) PyErr_SetInterrupt(void); + + /* In signalmodule.c */ +-int PySignal_SetWakeupFd(int fd); ++PyAPI_FUNC(int) PySignal_SetWakeupFd(int fd); + + /* Support for adding program text to SyntaxErrors */ + PyAPI_FUNC(void) PyErr_SyntaxLocation(const char *, int); diff --git a/lang/python27/patches/patch-Lib_distutils_unixccompiler.py b/lang/python27/patches/patch-Lib_distutils_unixccompiler.py new file mode 100644 index 00000000000..1ad2d80ed43 --- /dev/null +++ b/lang/python27/patches/patch-Lib_distutils_unixccompiler.py @@ -0,0 +1,14 @@ +$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.1 2013/04/17 13:21:05 obache Exp $ + +* from cygport 2.7.3-dylib.patch + +--- Lib/distutils/unixccompiler.py.orig 2013-04-06 14:02:26.000000000 +0000 ++++ Lib/distutils/unixccompiler.py +@@ -82,6 +82,7 @@ class UnixCCompiler(CCompiler): + static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" + if sys.platform == "cygwin": + exe_extension = ".exe" ++ dylib_lib_extension = ".dll.a" + + def preprocess(self, source, + output_file=None, macros=None, include_dirs=None, diff --git a/lang/python27/patches/patch-Modules___ssl.c b/lang/python27/patches/patch-Modules___ssl.c new file mode 100644 index 00000000000..b0f92d7e34c --- /dev/null +++ b/lang/python27/patches/patch-Modules___ssl.c @@ -0,0 +1,17 @@ +$NetBSD: patch-Modules___ssl.c,v 1.1 2013/04/17 13:21:05 obache Exp $ + +* from cygport 2.6.2-ssl-threads.patch + +--- Modules/_ssl.c.orig 2013-04-06 14:02:36.000000000 +0000 ++++ Modules/_ssl.c +@@ -16,6 +16,10 @@ + + #include "Python.h" + ++#ifdef __CYGWIN__ ++#undef WITH_THREAD ++#endif ++ + #ifdef WITH_THREAD + #include "pythread.h" + #define PySSL_BEGIN_ALLOW_THREADS { \ diff --git a/lang/python27/patches/patch-Modules_getpath.c b/lang/python27/patches/patch-Modules_getpath.c new file mode 100644 index 00000000000..c74159152e4 --- /dev/null +++ b/lang/python27/patches/patch-Modules_getpath.c @@ -0,0 +1,35 @@ +$NetBSD: patch-Modules_getpath.c,v 1.1 2013/04/17 13:21:05 obache Exp $ + +* from cygport 2.7.3-getpath-exe-extension.patch + +--- Modules/getpath.c.orig 2013-04-06 14:02:37.000000000 +0000 ++++ Modules/getpath.c +@@ -436,6 +436,28 @@ calculate_path(void) + if (isxfile(progpath)) + break; + ++#ifdef __CYGWIN__ ++ /* ++ * Cygwin automatically removes the ".exe" extension from argv[0] ++ * to make programs feel like they are in a more Unix-like ++ * environment. Unfortunately, this can make it problemmatic for ++ * Cygwin to distinguish between a directory and an executable with ++ * the same name excluding the ".exe" extension. For example, the ++ * Cygwin Python build directory has a "Python" directory and a ++ * "python.exe" executable. This causes isxfile() to erroneously ++ * return false. If isdir() returns true and there is enough space ++ * to append the ".exe" extension, then we try again with the ++ * extension appended. ++ */ ++#define EXE ".exe" ++ if (isdir(progpath) && strlen(progpath) + strlen(EXE) <= MAXPATHLEN) ++ { ++ strcat(progpath, EXE); ++ if (isxfile(progpath)) ++ break; ++ } ++#endif /* __CYGWIN__ */ ++ + if (!delim) { + progpath[0] = '\0'; + break; diff --git a/lang/python27/patches/patch-am b/lang/python27/patches/patch-am index 8260dcfa420..5834b389d33 100644 --- a/lang/python27/patches/patch-am +++ b/lang/python27/patches/patch-am @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.8 2013/04/12 09:03:41 adam Exp $ +$NetBSD: patch-am,v 1.9 2013/04/17 13:21:05 obache Exp $ Disabled modules for normal build: bsddb @@ -19,6 +19,8 @@ headers and libraries from the system. Build the 1.85 compat module all the time against the BDB version of choice. +cygwin 2.7.3-no-libm.patch + --- setup.py.orig 2013-04-06 14:02:41.000000000 +0000 +++ setup.py @@ -33,7 +33,7 @@ host_platform = get_platform() @@ -49,6 +51,15 @@ Build the 1.85 compat module all the time against the BDB version of choice. self.add_multiarch_paths() # Add paths specified in the environment variables LDFLAGS and +@@ -548,7 +554,7 @@ class PyBuildExt(build_ext): + + # Check for MacOS X, which doesn't need libm.a at all + math_libs = ['m'] +- if host_platform in ['darwin', 'beos']: ++ if host_platform in ['darwin', 'beos', 'cygwin']: + math_libs = [] + + # XXX Omitted modules: gl, pure, dl, SGI-specific modules @@ -794,9 +800,7 @@ class PyBuildExt(build_ext): if krb5_h: ssl_incs += krb5_h |