View | Details | Raw Unified | Return to bug 253601
Collapse All | Expand All

(-)python37/Makefile (-2 / +2 lines)
Lines 15-21 Link Here
15
15
16
LICENSE=	PSFL
16
LICENSE=	PSFL
17
17
18
LIB_DEPENDS=	libffi.so:devel/libffi
18
LIB_DEPENDS=	libffi.so:devel/libffi libmpdec.so:math/mpdecimal
19
19
20
USES=		cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz
20
USES=		cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz
21
PATHFIX_MAKEFILEIN=	Makefile.pre.in
21
PATHFIX_MAKEFILEIN=	Makefile.pre.in
Lines 31-37 Link Here
31
31
32
DISABLED_EXTENSIONS=	_sqlite3 _tkinter _gdbm
32
DISABLED_EXTENSIONS=	_sqlite3 _tkinter _gdbm
33
CONFIGURE_ARGS+=	--enable-shared --without-ensurepip \
33
CONFIGURE_ARGS+=	--enable-shared --without-ensurepip \
34
			--with-system-ffi
34
			--with-system-ffi --with-system-libmpdec
35
CONFIGURE_ENV+=		OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}"	# Null out OPT to respect user CFLAGS and remove optimizations
35
CONFIGURE_ENV+=		OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}"	# Null out OPT to respect user CFLAGS and remove optimizations
36
36
37
INSTALL_TARGET=		altinstall						# Don't want cloberring of unprefixed files
37
INSTALL_TARGET=		altinstall						# Don't want cloberring of unprefixed files
(-)python37/files/patch-Modules___decimal___decimal.c (+32 lines)
Line 0 Link Here
1
--- Modules/_decimal/_decimal.c.orig	2021-02-17 21:21:24 UTC
2
+++ Modules/_decimal/_decimal.c
3
@@ -58,6 +58,11 @@
4
 
5
 #define BOUNDS_CHECK(x, MIN, MAX) x = (x < MIN || MAX < x) ? MAX : x
6
 
7
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
8
+  #define UNUSED __attribute__((unused))
9
+#else
10
+  #define UNUSED
11
+#endif
12
 
13
 /* _Py_DEC_MINALLOC >= MPD_MINALLOC */
14
 #define _Py_DEC_MINALLOC 4
15
@@ -3277,7 +3282,7 @@ dec_format(PyObject *dec, PyObject *args)
16
     }
17
     else {
18
         size_t n = strlen(spec.dot);
19
-        if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) {
20
+        if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) {
21
             /* fix locale dependent non-ascii characters */
22
             dot = dotsep_as_utf8(spec.dot);
23
             if (dot == NULL) {
24
@@ -3286,7 +3291,7 @@ dec_format(PyObject *dec, PyObject *args)
25
             spec.dot = PyBytes_AS_STRING(dot);
26
         }
27
         n = strlen(spec.sep);
28
-        if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) {
29
+        if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) {
30
             /* fix locale dependent non-ascii characters */
31
             sep = dotsep_as_utf8(spec.sep);
32
             if (sep == NULL) {
(-)python37/files/patch-setup.py (+11 lines)
Line 0 Link Here
1
--- setup.py.orig	2021-02-17 21:21:03 UTC
2
+++ setup.py
3
@@ -2057,7 +2057,7 @@ class PyBuildExt(build_ext):
4
         undef_macros = []
5
         if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
6
             include_dirs = []
7
-            libraries = [':libmpdec.so.2']
8
+            libraries = ['mpdec']
9
             sources = ['_decimal/_decimal.c']
10
             depends = ['_decimal/docstrings.h']
11
         else:

Return to bug 253601