diff --git a/community/zbar/APKBUILD b/community/zbar/APKBUILD
index f6d1747c461edffa281aba322710f1482439bc10..a4d05e37c97c4d1fe80c37426bb79eaa42941d68 100644
--- a/community/zbar/APKBUILD
+++ b/community/zbar/APKBUILD
@@ -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"
diff --git a/community/zbar/zbar-tp_print.patch b/community/zbar/zbar-tp_print.patch
new file mode 100644
index 0000000000000000000000000000000000000000..ac1391be3c85aa5833825f1674988a3c760acea9
--- /dev/null
+++ b/community/zbar/zbar-tp_print.patch
@@ -0,0 +1,28 @@
+--- 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,
+ };
+