I don't have a good way to test it without also converting cvs2gitdump
(which is beyond my pythons skills) but leaving this here before it rots
in my local tree ;)
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-rcsparse/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile 12 Jul 2019 20:45:52 -0000 1.20
+++ Makefile 26 Apr 2020 16:13:12 -0000
@@ -8,15 +8,22 @@ GH_COMMIT= 206bca0b90f5780815c0b6c6cbcc
DISTNAME= rcsparse-20151027
PKGNAME= py-${DISTNAME}
+REVISION= 0
-CATEGORIES= devel
+CATEGORIES= devel
# AGPLv3+
PERMIT_PACKAGE= Yes
WANTLIB += ${MODPY_WANTLIB} pthread
+FLAVORS= python3
+FLAVOR?=
+
MODULES= lang/python
-NO_TEST= Yes
+TEST_DEPENDS= ${BUILD_PKGPATH}
+
+do-test:
+ cd ${WRKSRC}; ${MODPY_BIN} testmodule.py
.include <bsd.port.mk>
Index: patches/patch-py-rcsparse_c
===================================================================
RCS file: patches/patch-py-rcsparse_c
diff -N patches/patch-py-rcsparse_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-py-rcsparse_c 26 Apr 2020 16:13:12 -0000
@@ -0,0 +1,138 @@
+$OpenBSD$
+
+Index: py-rcsparse.c
+--- py-rcsparse.c.orig
++++ py-rcsparse.c
+@@ -25,6 +25,13 @@
+ #include "rcsparse.h"
+
+
++#if PY_MAJOR_VERSION >= 3
++#define PyString_AsStringAndSize(a,b,c) PyUnicode_AsUTF8AndSize(a,c)
++#define PyString_CheckExact PyUnicode_CheckExact
++#define PyString_FromString PyUnicode_FromString
++#define PyString_FromStringAndSize PyUnicode_FromStringAndSize
++
No comments:
Post a Comment