breezy: cython 3.1 compat
This commit is contained in:
parent
3b1c76c63d
commit
9a683ebbe5
71
breezy/0004-remove-PyInt_AsUnsignedLongMask.patch
Normal file
71
breezy/0004-remove-PyInt_AsUnsignedLongMask.patch
Normal file
@ -0,0 +1,71 @@
|
||||
diff -Nur breezy-brz-3.2.2.orig/breezy/bzr/_chk_map_pyx.pyx breezy-brz-3.2.2/breezy/bzr/_chk_map_pyx.pyx
|
||||
--- breezy-brz-3.2.2.orig/breezy/bzr/_chk_map_pyx.pyx 2022-03-20 02:51:38.000000000 +0100
|
||||
+++ breezy-brz-3.2.2/breezy/bzr/_chk_map_pyx.pyx 2025-05-11 09:57:40.526320800 +0200
|
||||
@@ -40,8 +40,8 @@
|
||||
from cpython.dict cimport (
|
||||
PyDict_SetItem,
|
||||
)
|
||||
-from cpython.int cimport (
|
||||
- PyInt_AsUnsignedLongMask,
|
||||
+from cpython.long cimport (
|
||||
+ PyLong_AsUnsignedLongMask,
|
||||
)
|
||||
from cpython.object cimport (
|
||||
PyObject,
|
||||
@@ -102,7 +102,7 @@
|
||||
if i > 0:
|
||||
c_out[0] = c'\x00'
|
||||
c_out = c_out + 1
|
||||
- crc_val = PyInt_AsUnsignedLongMask(crc32(key[i])) & 0xFFFFFFFFUL
|
||||
+ crc_val = PyLong_AsUnsignedLongMask(crc32(key[i])) & 0xFFFFFFFFUL
|
||||
# Hex(val) order
|
||||
sprintf(c_out, '%08lX', crc_val)
|
||||
c_out = c_out + 8
|
||||
@@ -127,7 +127,7 @@
|
||||
if i > 0:
|
||||
c_out[0] = c'\x00'
|
||||
c_out = c_out + 1
|
||||
- crc_val = PyInt_AsUnsignedLongMask(crc32(key[i]))
|
||||
+ crc_val = PyLong_AsUnsignedLongMask(crc32(key[i]))
|
||||
# MSB order
|
||||
c_out[0] = (crc_val >> 24) & 0xFF
|
||||
c_out[1] = (crc_val >> 16) & 0xFF
|
||||
diff -Nur breezy-brz-3.2.2.orig/breezy/bzr/_dirstate_helpers_pyx.pyx breezy-brz-3.2.2/breezy/bzr/_dirstate_helpers_pyx.pyx
|
||||
--- breezy-brz-3.2.2.orig/breezy/bzr/_dirstate_helpers_pyx.pyx 2022-03-20 02:51:38.000000000 +0100
|
||||
+++ breezy-brz-3.2.2/breezy/bzr/_dirstate_helpers_pyx.pyx 2025-05-11 09:57:33.137587800 +0200
|
||||
@@ -98,7 +98,7 @@
|
||||
object PyTuple_GetItem_void_object "PyTuple_GET_ITEM" (void* tpl, int index)
|
||||
object PyTuple_GET_ITEM(object tpl, Py_ssize_t index)
|
||||
|
||||
- unsigned long PyInt_AsUnsignedLongMask(object number) except? -1
|
||||
+ unsigned long PyLong_AsUnsignedLongMask(object number) except? -1
|
||||
|
||||
char *PyBytes_AsString(object p)
|
||||
char *PyBytes_AsString_obj "PyBytes_AsString" (PyObject *string)
|
||||
@@ -800,7 +800,7 @@
|
||||
cdef unsigned long _time_to_unsigned(object t): # cannot_raise
|
||||
if PyFloat_Check(t):
|
||||
t = t.__int__()
|
||||
- return PyInt_AsUnsignedLongMask(t)
|
||||
+ return PyLong_AsUnsignedLongMask(t)
|
||||
|
||||
|
||||
cdef _pack_stat(stat_value):
|
||||
@@ -812,13 +812,13 @@
|
||||
cdef char result[6*4] # 6 long ints
|
||||
cdef int *aliased
|
||||
aliased = <int *>result
|
||||
- aliased[0] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_size))
|
||||
+ aliased[0] = htonl(PyLong_AsUnsignedLongMask(stat_value.st_size))
|
||||
# mtime and ctime will often be floats but get converted to PyInt within
|
||||
aliased[1] = htonl(_time_to_unsigned(stat_value.st_mtime))
|
||||
aliased[2] = htonl(_time_to_unsigned(stat_value.st_ctime))
|
||||
- aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))
|
||||
- aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))
|
||||
- aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))
|
||||
+ aliased[3] = htonl(PyLong_AsUnsignedLongMask(stat_value.st_dev))
|
||||
+ aliased[4] = htonl(PyLong_AsUnsignedLongMask(stat_value.st_ino))
|
||||
+ aliased[5] = htonl(PyLong_AsUnsignedLongMask(stat_value.st_mode))
|
||||
packed = PyBytes_FromStringAndSize(result, 6*4)
|
||||
return _encode(packed)[:-1]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
pkgname=breezy
|
||||
pkgver=3.2.2
|
||||
pkgrel=8
|
||||
pkgrel=9
|
||||
pkgdesc='A decentralized revision control system with support for Bazaar and Git file formats'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.breezy-vcs.org/'
|
||||
@ -30,16 +30,20 @@ conflicts=(bzr)
|
||||
replaces=(bzr)
|
||||
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/breezy-team/breezy/archive/brz-${pkgver}.tar.gz
|
||||
'0002-add-msys2-certs-location.patch'
|
||||
'0003-remove-unused-broken-import.patch')
|
||||
'0003-remove-unused-broken-import.patch'
|
||||
'0004-remove-PyInt_AsUnsignedLongMask.patch')
|
||||
sha256sums=('5661f2e2348a60db4af9c4c8f417a3da3f0bbc02f7a41ce988baba5e1100f3f1'
|
||||
'8f3a1c151c9ceb8b2ace12dc1c80bd123810e2e77a2c784385d5ad039f0bd3bb'
|
||||
'a8b9707a9077b3c29e65ee5f89741dc2db92837d10a3041aca3d28032bfe7482')
|
||||
'a8b9707a9077b3c29e65ee5f89741dc2db92837d10a3041aca3d28032bfe7482'
|
||||
'cd0062e8e6eece87af16c847ff85a919d349bb24b1110e8ff629284171774b19')
|
||||
|
||||
prepare(){
|
||||
cd "${srcdir}/${pkgname}-brz-${pkgver}"
|
||||
|
||||
patch -p1 -i ${srcdir}/0002-add-msys2-certs-location.patch
|
||||
patch -p1 -i ${srcdir}/0003-remove-unused-broken-import.patch
|
||||
# cython 3.1 compatibility
|
||||
patch -p1 -i ${srcdir}/0004-remove-PyInt_AsUnsignedLongMask.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user