summaryrefslogtreecommitdiff
path: root/dev-python/gmpy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/gmpy
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/gmpy')
-rw-r--r--dev-python/gmpy/Manifest4
-rw-r--r--dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch17
-rw-r--r--dev-python/gmpy/gmpy-2.0.8.ebuild72
-rw-r--r--dev-python/gmpy/metadata.xml21
4 files changed, 114 insertions, 0 deletions
diff --git a/dev-python/gmpy/Manifest b/dev-python/gmpy/Manifest
new file mode 100644
index 000000000000..d0822b231f93
--- /dev/null
+++ b/dev-python/gmpy/Manifest
@@ -0,0 +1,4 @@
+AUX gmpy-2.0.8-fix-mpir-types.patch 636 BLAKE2B 3f9a73390cab39ac02c9cdbf6c78381a14e861b15c4e0194e9727b3e801817111b6ece399a2479c0880f84d542816b2e388ad15e8f9786e2ab63b5e893f31cc1 SHA512 701e985b1d8f1d3ed0efa48a9ee225bfb9a06f5a19f53a8a1ec6c525e74fb2b6fd006f1bba28188926f77faec6cbc456985b810b7c774aef1699a0ab2c07896d
+DIST gmpy2-2.0.8.zip 280551 BLAKE2B b73c48b739ae6972231672ad28598c09e00db6348cd281d190c6dfcf49b0e977563baabe84825658d78bf1e2ac4927ad1882787b6d4efd19f28a4f7fd6a061b4 SHA512 090f449641f378c73eb166831b1d956c6cee3da83e42fde8741f18aa0fa687e37927fc3b045d4b35e3a3b75570e6b1074150d8bc29d16119ab5c717bcfcf9fb4
+EBUILD gmpy-2.0.8.ebuild 1548 BLAKE2B c7ac28100b86e7cd287126ea563b4f426c98e2e946391c0eb74765c682ba77ff219ed7dd8a8e16190ec6bd9bc009bdf4de6b80560e2d94accc87fd25510e6453 SHA512 381a3aab2acbf50f260a8ddf6eff4f4ce46e5480d6a30d29a000f788a51a4579f86a65d38437ebe6c69f18ad479673284fe0356427ef39e99862130aeb91b9e8
+MISC metadata.xml 795 BLAKE2B df987c466b2666db915c405dea507c17f90181c2e2948885292a6de44ba0c4bec640fe25bea3b8b8105d035c3ff999750b747cfd7f4caaab561f459056823eb5 SHA512 e7f8324cdacceed22f28e27a224668f59955fb5a639d26376da037b0d21437ef57708c7c325e00c771df9e11050be8dc423a3d4b631599da2cc1ef3f97cf3795
diff --git a/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch b/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch
new file mode 100644
index 000000000000..d21e5a55510d
--- /dev/null
+++ b/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch
@@ -0,0 +1,17 @@
+diff -ur gmpy2-2.0.8.orig/src/gmpy.h gmpy2-2.0.8/src/gmpy.h
+--- gmpy2-2.0.8.orig/src/gmpy.h 2018-04-03 22:44:35.494621951 -0700
++++ gmpy2-2.0.8/src/gmpy.h 2018-04-03 22:45:33.580835296 -0700
+@@ -129,8 +129,13 @@
+ #ifndef BITS_PER_UI
+ /* Assume we are NOT using MPIR > 2.5. */
+ #define BITS_PER_UI BITS_PER_ULONG
++#if defined(__mips__) && (_MIPS_SIM == _ABIN32)
++typedef unsigned long long mpir_ui;
++typedef long long mpir_si;
++#else
+ typedef unsigned long mpir_ui;
+ typedef long mpir_si;
++#endif
+ #define mpz_fits_si_p mpz_fits_slong_p
+ #define mpz_fits_ui_p mpz_fits_ulong_p
+ #endif
diff --git a/dev-python/gmpy/gmpy-2.0.8.ebuild b/dev-python/gmpy/gmpy-2.0.8.ebuild
new file mode 100644
index 000000000000..348e2845c10e
--- /dev/null
+++ b/dev-python/gmpy/gmpy-2.0.8.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python bindings for GMP, MPC, MPFR and MPIR libraries"
+HOMEPAGE="https://github.com/aleaxit/gmpy"
+SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc mpir"
+
+RDEPEND="
+ >=dev-libs/mpc-1.0.2
+ >=dev-libs/mpfr-3.1.2
+ !mpir? ( dev-libs/gmp:0= )
+ mpir? ( sci-libs/mpir )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-mpir-types.patch
+)
+
+python_prepare_all() {
+ # rm non std test file
+ rm test*/gmpy_test_thr.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ mydistutilsargs=(
+ $(usex mpir --mpir --gmp)
+ )
+}
+
+python_compile() {
+ python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ cd test || die
+ "${PYTHON}" runtests.py || die "tests failed under ${EPYTHON}"
+ if python_is_python3; then
+ cd ../test3 || die
+ else
+ cd ../test2 || die
+ fi
+ "${PYTHON}" gmpy_test.py || die "tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/gmpy/metadata.xml b/dev-python/gmpy/metadata.xml
new file mode 100644
index 000000000000..1c3638694bff
--- /dev/null
+++ b/dev-python/gmpy/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ gmpy2 is a C-coded Python extension module that supports
+ multiple-precision arithmetic. gmpy2 supports the GMP multi-precision
+ library, the MPFR (correctly rounded real floating-point arithmetic) and MPC
+ (correctly rounded complex floating-point arithmetic) libraries.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">gmpy2</remote-id>
+ <remote-id type="github">aleaxit/gmpy</remote-id>
+ </upstream>
+ <use>
+ <flag name="mpir">Use <pkg>sci-libs/mpir</pkg> as gmp implementation</flag>
+ </use>
+</pkgmetadata>