summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2023-02-24 21:35:05 +0100
committerSven Wegener <swegener@gentoo.org>2023-02-24 21:39:27 +0100
commit57260d87ba0d71318130f516a1b2c702d3df0dc0 (patch)
tree7a14dc7420386b545f3e07de4f219803b646e44b /dev-python/hiredis
parentdev-python/hiredis: update EAPI 7 -> 8 (diff)
downloadgentoo-57260d87ba0d71318130f516a1b2c702d3df0dc0.tar.gz
gentoo-57260d87ba0d71318130f516a1b2c702d3df0dc0.tar.bz2
gentoo-57260d87ba0d71318130f516a1b2c702d3df0dc0.zip
dev-python/hiredis: add 2.2.2
Bug: https://bugs.gentoo.org/890385 Signed-off-by: Sven Wegener <swegener@gentoo.org>
Diffstat (limited to 'dev-python/hiredis')
-rw-r--r--dev-python/hiredis/Manifest1
-rw-r--r--dev-python/hiredis/files/hiredis-2.2.2-system-libs.patch53
-rw-r--r--dev-python/hiredis/hiredis-2.2.2.ebuild26
3 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest
index d7d0946290e8..66bc6690b936 100644
--- a/dev-python/hiredis/Manifest
+++ b/dev-python/hiredis/Manifest
@@ -1 +1,2 @@
DIST hiredis-2.0.0.tar.gz 75807 BLAKE2B dc7535f117c8ecfb2c924fe44a1cba2f02271c544588249de6794ce3aec27f66038ecb9f6364ca87b71f66ba13870a3be192eb79c1f360d2eb6dcb6dcae41caa SHA512 b9a313acdd00676dc046713a81bbf4336959f49f09bd2828997c23ca41259935047c657a4b6f81913715141a75fb6bbe7fc4429c7a5b0f4bc3d5de66b9cfa909
+DIST hiredis-2.2.2.tar.gz 84086 BLAKE2B f8a3b3baceb1b68d87202fe1fdd954d1e2a3320dab93acbe2d6f86a462ca18814c41416f84b8ba306a7c9af18560375e6523025c3b81f3c92e89620c68ed6a7e SHA512 abb6883af0d186f0ada10ebb2128cc31c8e84273b75de762097489b25a28ed4442bf33a9c088152843aadfcb4daaae6ff65a21cf0e5d8a07a60a7e3fac1ab855
diff --git a/dev-python/hiredis/files/hiredis-2.2.2-system-libs.patch b/dev-python/hiredis/files/hiredis-2.2.2-system-libs.patch
new file mode 100644
index 000000000000..67f6a5650f66
--- /dev/null
+++ b/dev-python/hiredis/files/hiredis-2.2.2-system-libs.patch
@@ -0,0 +1,53 @@
+--- hiredis-2.2.2.orig/setup.py
++++ hiredis-2.2.2/setup.py
+@@ -18,8 +18,7 @@
+
+
+ def get_sources():
+- hiredis_sources = ("alloc", "async", "hiredis", "net", "read", "sds", "sockcompat")
+- return sorted(glob.glob("src/*.c") + ["vendor/hiredis/%s.c" % src for src in hiredis_sources])
++ return sorted(glob.glob("src/*.c"))
+
+
+ def get_linker_args():
+@@ -38,17 +37,16 @@
+
+ def get_libraries():
+ if 'win32' in sys.platform:
+- return ["ws2_32", ]
++ return ["ws2_32", "hiredis"]
+ else:
+- return []
++ return ["hiredis"]
+
+
+ ext = Extension("hiredis.hiredis",
+ sources=get_sources(),
+ extra_compile_args=get_compiler_args(),
+ extra_link_args=get_linker_args(),
+- libraries=get_libraries(),
+- include_dirs=["vendor"])
++ libraries=get_libraries())
+
+ setup(
+ name="hiredis",
+--- hiredis-2.2.2.orig/src/pack.c
++++ hiredis-2.2.2/src/pack.c
+@@ -16,7 +16,7 @@
+ extern sds sdsnewlen(const void *init, size_t initlen);
+ #endif
+
+-#include <hiredis/sdsalloc.h>
++#include <hiredis/sds.h>
+
+ PyObject *
+ pack_command(PyObject *cmd)
+@@ -32,7 +32,7 @@
+ }
+
+ Py_ssize_t tokens_number = PyTuple_Size(cmd);
+- sds *tokens = s_malloc(sizeof(sds) * tokens_number);
++ sds *tokens = sds_malloc(sizeof(sds) * tokens_number);
+ if (tokens == NULL)
+ {
+ return PyErr_NoMemory();
diff --git a/dev-python/hiredis/hiredis-2.2.2.ebuild b/dev-python/hiredis/hiredis-2.2.2.ebuild
new file mode 100644
index 000000000000..c92b75861004
--- /dev/null
+++ b/dev-python/hiredis/hiredis-2.2.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} pypy3 )
+inherit distutils-r1
+
+DESCRIPTION="Python extension that wraps hiredis"
+HOMEPAGE="https://github.com/redis/hiredis-py/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="system-libs"
+
+DEPEND="system-libs? ( >=dev-libs/hiredis-1.0.0:= )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ use system-libs && PATCHES+=(
+ "${FILESDIR}"/${P}-system-libs.patch
+ )
+ default
+}