diff options
author | 2022-10-04 05:44:09 +0100 | |
---|---|---|
committer | 2022-10-04 06:06:49 +0100 | |
commit | c68f538f24f98e5d2dc496d32f5e0bb5aa0be313 (patch) | |
tree | 05ec638c6c435d9186368205f3d080c0ac6ff106 /sci-astronomy | |
parent | sys-fs/zfs: add 2.1.6 (diff) | |
download | gentoo-c68f538f24f98e5d2dc496d32f5e0bb5aa0be313.tar.gz gentoo-c68f538f24f98e5d2dc496d32f5e0bb5aa0be313.tar.bz2 gentoo-c68f538f24f98e5d2dc496d32f5e0bb5aa0be313.zip |
sci-astronomy/pyephem: fix build w/ Clang 15
Closes: https://bugs.gentoo.org/874543
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-astronomy')
-rw-r--r-- | sci-astronomy/pyephem/files/pyephem-4.1.3-clang-15.patch | 36 | ||||
-rw-r--r-- | sci-astronomy/pyephem/pyephem-4.1.3.ebuild | 4 |
2 files changed, 40 insertions, 0 deletions
diff --git a/sci-astronomy/pyephem/files/pyephem-4.1.3-clang-15.patch b/sci-astronomy/pyephem/files/pyephem-4.1.3-clang-15.patch new file mode 100644 index 000000000000..0e780dac1ed3 --- /dev/null +++ b/sci-astronomy/pyephem/files/pyephem-4.1.3-clang-15.patch @@ -0,0 +1,36 @@ +https://github.com/brandon-rhodes/pyephem/commit/df7bba8e27208fbe335b0ac2f79ae77818f52dd3 +https://bugs.gentoo.org/874543 + +From df7bba8e27208fbe335b0ac2f79ae77818f52dd3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 31 Aug 2022 02:58:26 -0700 +Subject: [PATCH] Don't set tp_print on Python 3 (#245) + +In 3.8 it produces a compilation warning; in earlier versions it is ignored. +--- a/extensions/_libastro.c ++++ b/extensions/_libastro.c +@@ -372,7 +372,11 @@ static PyTypeObject AngleType = { + sizeof(AngleObject), + 0, + 0, /* tp_dealloc */ ++#if PY_MAJOR_VERSION < 3 + Angle_print, /* tp_print */ ++#else ++ 0, /* reserved in 3.x */ ++#endif + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ +@@ -669,7 +673,11 @@ static PyTypeObject DateType = { + sizeof(PyFloatObject), + 0, + 0, /* tp_dealloc */ ++#if PY_MAJOR_VERSION < 3 + Date_print, /* tp_print */ ++#else ++ 0, /* tp_print slot is reserved and unused in Python 3 */ ++#endif + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + diff --git a/sci-astronomy/pyephem/pyephem-4.1.3.ebuild b/sci-astronomy/pyephem/pyephem-4.1.3.ebuild index 423ccb34c62e..1cece963befb 100644 --- a/sci-astronomy/pyephem/pyephem-4.1.3.ebuild +++ b/sci-astronomy/pyephem/pyephem-4.1.3.ebuild @@ -19,6 +19,10 @@ IUSE="doc" BDEPEND="doc? ( dev-python/sphinx )" +PATCHES=( + "${FILESDIR}"/${P}-clang-15.patch +) + EPYTEST_DESELECT=( # Can't find its test files (class not loaded properly in test env?) # bug #855461 |