Skip to content
Snippets Groups Projects
Commit 50084a21 authored by Leo's avatar Leo
Browse files

community/zbar: fix build with python3.9

parent f5c877bb
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ subpackages="
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz
zbar-tp_print.patch
"
prepare() {
......@@ -77,4 +78,5 @@ py() {
mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib
}
sha512sums="ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b zbar-0.23.1.tar.gz"
sha512sums="ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b zbar-0.23.1.tar.gz
fdb512c435ccf47aabca658d1eb1480ee94ecf0e43d649a0c7ad07d826bfe7e89aa0a47bce0527dc64beedee08842f8182718a287bd18411117020e4045d6fa3 zbar-tp_print.patch"
--- python/enum.c~ 2019-05-22 06:00:30.000000000 -0500
+++ python/enum.c 2020-07-20 12:29:37.468767649 -0500
@@ -76,6 +76,7 @@
return(self->name);
}
+#if PY_MAJOR_VERSION < 3
static int
enumitem_print (zbarEnumItem *self,
FILE *fp,
@@ -83,6 +84,7 @@
{
return(self->name->ob_type->tp_print(self->name, fp, flags));
}
+#endif
static PyObject*
enumitem_repr (zbarEnumItem *self)
@@ -115,7 +117,9 @@
.tp_new = (newfunc)enumitem_new,
.tp_dealloc = (destructor)enumitem_dealloc,
.tp_str = (reprfunc)enumitem_str,
+#if PY_MAJOR_VERSION < 3
.tp_print = (printfunc)enumitem_print,
+#endif
.tp_repr = (reprfunc)enumitem_repr,
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment