From owner-dev-commits-ports-all@freebsd.org Tue May 11 21:54:08 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02D7F646CF7; Tue, 11 May 2021 21:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FfsBl5Cxbz4rvf; Tue, 11 May 2021 21:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CD5E1FBD6; Tue, 11 May 2021 21:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14BLs7aC001197; Tue, 11 May 2021 21:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14BLs7eY001196; Tue, 11 May 2021 21:54:07 GMT (envelope-from git) Date: Tue, 11 May 2021 21:54:07 GMT Message-Id: <202105112154.14BLs7eY001196@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 00d92d8c3d06 - main - lang/python37: Use libmpdec from ports MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00d92d8c3d0640d1c1850e508c38f907bd1a3b92 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 21:54:08 -0000 The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=00d92d8c3d0640d1c1850e508c38f907bd1a3b92 commit 00d92d8c3d0640d1c1850e508c38f907bd1a3b92 Author: Stefan Krah AuthorDate: 2021-05-11 21:40:44 +0000 Commit: Po-Chuan Hsieh CommitDate: 2021-05-11 21:47:33 +0000 lang/python37: Use libmpdec from ports - Bump PORTREVISION for dependency and package change PR: 253601 --- lang/python37/Makefile | 7 +++-- .../files/patch-Modules___decimal___decimal.c | 32 ++++++++++++++++++++++ lang/python37/files/patch-setup.py | 11 ++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/lang/python37/Makefile b/lang/python37/Makefile index ffec753c7ff0..6f4225651176 100644 --- a/lang/python37/Makefile +++ b/lang/python37/Makefile @@ -2,6 +2,7 @@ PORTNAME= python PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -13,7 +14,8 @@ COMMENT= Interpreted object-oriented programming language LICENSE= PSFL -LIB_DEPENDS= libffi.so:devel/libffi +LIB_DEPENDS= libffi.so:devel/libffi \ + libmpdec.so:math/mpdecimal USES= cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in @@ -28,8 +30,7 @@ PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm -CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ - --with-system-ffi +CONFIGURE_ARGS+= --enable-shared --with-system-ffi --with-system-libmpdec --without-ensurepip CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files diff --git a/lang/python37/files/patch-Modules___decimal___decimal.c b/lang/python37/files/patch-Modules___decimal___decimal.c new file mode 100644 index 000000000000..b93340cc3f40 --- /dev/null +++ b/lang/python37/files/patch-Modules___decimal___decimal.c @@ -0,0 +1,32 @@ +--- Modules/_decimal/_decimal.c.orig 2021-02-17 21:21:24 UTC ++++ Modules/_decimal/_decimal.c +@@ -58,6 +58,11 @@ + + #define BOUNDS_CHECK(x, MIN, MAX) x = (x < MIN || MAX < x) ? MAX : x + ++#if defined(__GNUC__) && !defined(__INTEL_COMPILER) ++ #define UNUSED __attribute__((unused)) ++#else ++ #define UNUSED ++#endif + + /* _Py_DEC_MINALLOC >= MPD_MINALLOC */ + #define _Py_DEC_MINALLOC 4 +@@ -3277,7 +3282,7 @@ dec_format(PyObject *dec, PyObject *args) + } + else { + size_t n = strlen(spec.dot); +- if (n > 1 || (n == 1 && !isascii((uchar)spec.dot[0]))) { ++ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.dot[0]))) { + /* fix locale dependent non-ascii characters */ + dot = dotsep_as_utf8(spec.dot); + if (dot == NULL) { +@@ -3286,7 +3291,7 @@ dec_format(PyObject *dec, PyObject *args) + spec.dot = PyBytes_AS_STRING(dot); + } + n = strlen(spec.sep); +- if (n > 1 || (n == 1 && !isascii((uchar)spec.sep[0]))) { ++ if (n > 1 || (n == 1 && !isascii((unsigned char)spec.sep[0]))) { + /* fix locale dependent non-ascii characters */ + sep = dotsep_as_utf8(spec.sep); + if (sep == NULL) { diff --git a/lang/python37/files/patch-setup.py b/lang/python37/files/patch-setup.py new file mode 100644 index 000000000000..1121e27d82e3 --- /dev/null +++ b/lang/python37/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2021-02-17 21:21:03 UTC ++++ setup.py +@@ -2057,7 +2057,7 @@ class PyBuildExt(build_ext): + undef_macros = [] + if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"): + include_dirs = [] +- libraries = [':libmpdec.so.2'] ++ libraries = ['mpdec'] + sources = ['_decimal/_decimal.c'] + depends = ['_decimal/docstrings.h'] + else: