aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/py-ctypes/Makefile2
-rw-r--r--devel/py-ctypes/files/patch-source_callproc.c16
2 files changed, 18 insertions, 0 deletions
diff --git a/devel/py-ctypes/Makefile b/devel/py-ctypes/Makefile
index 861c0656fae1..f348b21cb855 100644
--- a/devel/py-ctypes/Makefile
+++ b/devel/py-ctypes/Makefile
@@ -43,6 +43,8 @@ post-patch:
-e 's|\(Extension(.*\)$$|\1 define_macros=[("ffi_type_schar", \
"ffi_type_sint8"), ("ffi_type_sshort","ffi_type_sint16")],|' \
${WRKSRC}/setup.py
+ ${REINPLACE_CMD} -e 's,\(alpha\*-.*-osf.*\)),\1 | alpha*-*-freebsd*),' \
+ ${LIBFFIWRKSRC}/configure
.if ${ARCH} == "ia64"
${LN} -sf ${LIBFFIWRKSRC}/${ARCH}/${ARCH}_flags.h ${LIBFFIWRKSRC}/
${REINPLACE_CMD} -e 's|defined(IA64)|defined(__ia64__)|' \
diff --git a/devel/py-ctypes/files/patch-source_callproc.c b/devel/py-ctypes/files/patch-source_callproc.c
new file mode 100644
index 000000000000..1eaf1f11afd4
--- /dev/null
+++ b/devel/py-ctypes/files/patch-source_callproc.c
@@ -0,0 +1,16 @@
+--- source/callproc.c.orig Mon Jun 9 13:22:12 2003
++++ source/callproc.c Mon Jun 9 13:22:58 2003
+@@ -505,6 +505,13 @@
+ #undef ffi_type_slong
+ #define ffi_type_slong ffi_type_sint32
+ #define ffi_type_slonglong ffi_type_sint64
++#elif (SIZEOF_LONG_LONG == 8 && SIZEOF_LONG == 8)
++#undef ffi_type_ulong
++#define ffi_type_ulong ffi_type_uint64
++#define ffi_type_ulonglong ffi_type_uint64
++#undef ffi_type_slong
++#define ffi_type_slong ffi_type_sint64
++#define ffi_type_slonglong ffi_type_sint64
+ #endif
+
+ atypes = (ffi_type **)alloca(argcount * sizeof(ffi_type *));