From fbda87924e6faa7a1919f1a2b4182490bde5ec5c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 3 Sep 2021 20:56:28 +0100 Subject: gentoo resync : 03.09.2021 --- dev-python/cython/Manifest | 3 +- dev-python/cython/cython-0.29.24-r1.ebuild | 76 ++++++++++++++++++++++ dev-python/cython/cython-0.29.24.ebuild | 75 --------------------- .../files/cython-0.29.24-unaligned-format.patch | 33 ++++++++++ 4 files changed, 111 insertions(+), 76 deletions(-) create mode 100644 dev-python/cython/cython-0.29.24-r1.ebuild delete mode 100644 dev-python/cython/cython-0.29.24.ebuild create mode 100644 dev-python/cython/files/cython-0.29.24-unaligned-format.patch (limited to 'dev-python/cython') diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest index 2ac2416b2fbb..787d34b3b715 100644 --- a/dev-python/cython/Manifest +++ b/dev-python/cython/Manifest @@ -4,10 +4,11 @@ AUX cython-0.29.21-spawn-multiprocessing.patch 1096 BLAKE2B f31e9e8bdc86ab1098bf AUX cython-0.29.22-spawn-multiprocessing.patch 963 BLAKE2B ebbc3f6f4fa88e7e082326bccbad328724a4ff5645f0b2aa28f21419044b17bed8495618bb980b23a99310c2b6ef275331e1b9aa6d734017eb33646c92a07a73 SHA512 3f5c6b4108b87cf3014416386095c07ac91762152bbd87e8bd589177d40b933c11e19610bea06720c5c70f76b5b9b70d27e5c3cfa20eed30deaaf7d122910bd3 AUX cython-0.29.23-test_exceptions-py310.patch 656 BLAKE2B 6c650c85d01b8bf367528d144cd967fa9def94634e35763e2e7a1c3e5afa2b01d0c84694024dde6e45577eee223f6464b5f88ab971d207d35892edf347a0c08f SHA512 d8f7f770a0b3303552deec0e7d3f9258de1edcd384f4b2c3881634fd21ce847a3d974e9142d1ed2fbe3a549e65292c6690be3a36ab4de52d0593d9831dc2f7ce AUX cython-0.29.23-tracing-py310.patch 13401 BLAKE2B e2359644ef2dd2c2f9eadc41eac6634d8bcde77edc4f7c11b8c6c3ae2f037965291c3cf9907ac5e07f3f97505adf9c2040f30e7830c9216bd7d51aeca68b5286 SHA512 e0fbd24224da1e848fc37dc8652738086c43297432627599ec8d43cf75c6f7a9cd1ff360d156f778e13749f339767608e631336f988f6f17d6f3f40b654275f8 +AUX cython-0.29.24-unaligned-format.patch 1632 BLAKE2B 04b95419636cffd58e4a932227287ca1e3fdc1f7c1f2874233567c01c7cb18aa691281284e917afa24f14ffcee185828ca52022a4ab3092f72569283bfae0e19 SHA512 82665de428d8c043d9ab67bf66a427de61110cd9aae18c7a100ea6d1e8c6b42050d4bfde096b774600bc63c68d81433dca68f2e987ba1b2ea82163f76401eabd DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679 DIST cython-0.29.23.gh.tar.gz 2093463 BLAKE2B c710b9bc9e05e0030dff3098857b349564fd167f7d9c47e2ef4e8897e072f67497b8ed3994f45135c21f8b2bf3a2cff016fec9a808b2bbe9712174dd0a6b1a3e SHA512 093b7a1d5c68f6e2d2b9b8adb9ac99e8967ddd0a66c0513a78e88bd55d96533dd8352b2478554fb53bf32a72d730967fb08ccb2eaa462da68f86891dceb4925a DIST cython-0.29.24.gh.tar.gz 2097245 BLAKE2B 9f5f2da0aed61d7fda2e14ea0669a2dd187cd053f3b82621342c7be29e26ff581b673a32e43bacd5c0df3e515f250eb23a64b1dae8911132fdca48175910a3dc SHA512 387a827f3cb7428248019744e3ed606a133d98ac882b83624d24ae0fdf8a8f2334978555d7d84e5cc4adaf715c541fef64e45bcbdda85ca33473c21f99360be8 EBUILD cython-0.29.21.ebuild 1987 BLAKE2B 1df83b6ef7f839622cd73c07384ccf0a6e722fe5ae9f42374ff9df2995e5b624e78a534c078534c341d034f984f73fc5c3abe954166ba8ef0f3fcc6aff2fbf06 SHA512 aa85e5d5ea9a1413686d8903af4c2c310f504ba0fc1ca469253010dae7a2abbb434b5d2e59f18b1a22f1149cfaade4b942466973e9559b913146abdf3b191155 EBUILD cython-0.29.23.ebuild 1952 BLAKE2B e8d88577efb70db3f75a7c0068bc1b9659132bde1927c3a50a92822020d6d575761ccacd66f2efea021570439c5c052cb352834071d8ef505247ba427d045da9 SHA512 cc6643d4a19a075e0e54184775596251060bcc9b73c6b9d6a26564c5588ab81734d30127c42b723d3c1e62d9afdc5f268dddf1a26df5c138634b9cabc5caca44 -EBUILD cython-0.29.24.ebuild 1832 BLAKE2B 8c16b823cd4559572787a1b135050bd7cda1301e902b393b537363b4657764aa8386810b9d57fd25b66231fc47d9502be265b1bd4822170ee3020af709e95d1a SHA512 68bcd199642518860b62784d718138510cb3e0036803e856642dbbd53ef50126c2d9df17fefb16d82929f8547973cbf20a4fd73897e6adb17fe6fa90d95d3b2f +EBUILD cython-0.29.24-r1.ebuild 1884 BLAKE2B 2fdae7edc2f56302c6ea8c2f41092b08d462eb5952122dd836ef39d2e15d0ebf66aeadf94bce1141a9327b3705bd109899f01ee93a156fb5eb6ad1defe3ae8c6 SHA512 e0190bfe452aac2675eb8dc8666be45af18343199e6362ced99e6e7a36a5435e90c085d4bf56230947a1574d5190927e28dc7dd47ecf1daac21f427f3c5cdcd9 MISC metadata.xml 605 BLAKE2B 900f2ffaa501d7ce5bef46115f7fdbda0966bf4ae048b4c27ac4be06e1b23de17c674e27f97627aed8d1d65b52bea01532d8a698bdbcd20b7c9fab4bad278b16 SHA512 66176bb6e00f70b610a41bfbc973bae2b4b8b9aeeeb6bdc9e14c2832d513d5452aec6509f8225daffb7e169d93311a4ccb026c935ead80ffeb35d91f1ae558fe diff --git a/dev-python/cython/cython-0.29.24-r1.ebuild b/dev-python/cython/cython-0.29.24-r1.ebuild new file mode 100644 index 000000000000..dced69747324 --- /dev/null +++ b/dev-python/cython/cython-0.29.24-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{7..10} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 toolchain-funcs elisp-common + +DESCRIPTION="A Python to C compiler" +HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ + https://github.com/cython/cython" +SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +IUSE="emacs test" +RESTRICT="!test? ( test )" + +RDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" +BDEPEND="${RDEPEND} + test? ( + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ + 'python3*') + )" + +PATCHES=( + "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" + "${FILESDIR}/${PN}-0.29.24-unaligned-format.patch" +) + +SITEFILE=50cython-gentoo.el + +distutils_enable_sphinx docs + +python_compile() { + # Python gets confused when it is in sys.path before build. + local -x PYTHONPATH= + + distutils-r1_python_compile +} + +python_compile_all() { + use emacs && elisp-compile Tools/cython-mode.el +} + +python_test() { + tc-export CC + # https://github.com/cython/cython/issues/1911 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow" + "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests || + die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) + distutils-r1_python_install_all + + if use emacs; then + elisp-install ${PN} Tools/cython-mode.* + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-python/cython/cython-0.29.24.ebuild b/dev-python/cython/cython-0.29.24.ebuild deleted file mode 100644 index 0c107a31d2b0..000000000000 --- a/dev-python/cython/cython-0.29.24.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{7..10} pypy3 ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 toolchain-funcs elisp-common - -DESCRIPTION="A Python to C compiler" -HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ - https://github.com/cython/cython" -SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" -IUSE="emacs test" -RESTRICT="!test? ( test )" - -RDEPEND=" - emacs? ( >=app-editors/emacs-23.1:* ) -" -BDEPEND="${RDEPEND} - test? ( - $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ - 'python3*') - )" - -PATCHES=( - "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" - "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" -) - -SITEFILE=50cython-gentoo.el - -distutils_enable_sphinx docs - -python_compile() { - # Python gets confused when it is in sys.path before build. - local -x PYTHONPATH= - - distutils-r1_python_compile -} - -python_compile_all() { - use emacs && elisp-compile Tools/cython-mode.el -} - -python_test() { - tc-export CC - # https://github.com/cython/cython/issues/1911 - local -x CFLAGS="${CFLAGS} -fno-strict-overflow" - "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests || - die "Tests fail with ${EPYTHON}" -} - -python_install_all() { - local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) - distutils-r1_python_install_all - - if use emacs; then - elisp-install ${PN} Tools/cython-mode.* - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-python/cython/files/cython-0.29.24-unaligned-format.patch b/dev-python/cython/files/cython-0.29.24-unaligned-format.patch new file mode 100644 index 000000000000..955c32debb49 --- /dev/null +++ b/dev-python/cython/files/cython-0.29.24-unaligned-format.patch @@ -0,0 +1,33 @@ +From 2c08fd50d62e4255602ee3c0d41157df7608e773 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Wed, 1 Sep 2021 00:09:02 +0200 +Subject: [PATCH] Avoid copying unaligned 16-bit values since some platforms + require them to be aligned. Use memcpy() instead to let the C compiler decide + how to do it. + +Closes https://github.com/cython/cython/issues/4343 +--- + Cython/Utility/TypeConversion.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c +index 751d12b62a..3669bc9ec1 100644 +--- a/Cython/Utility/TypeConversion.c ++++ b/Cython/Utility/TypeConversion.c +@@ -829,14 +829,14 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid + digit_pos = abs((int)(remaining % (8*8))); + remaining = ({{TYPE}}) (remaining / (8*8)); + dpos -= 2; +- *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */ ++ memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = ({{TYPE}}) (remaining / (10*10)); + dpos -= 2; +- *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */ ++ memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ + last_one_off = (digit_pos < 10); + break; + case 'x': -- cgit v1.2.3