aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2003-05-12 14:12:05 +0800
committerperky <perky@FreeBSD.org>2003-05-12 14:12:05 +0800
commit6139f685c399a83b6122b1ff5fecebb8cb6cf3b5 (patch)
tree1befd0704548dbaac597eb6d8d9a22973036d312 /devel
parent78661bb628f7a4c99045d25ebc18eebb786a05b2 (diff)
downloadfreebsd-ports-gnome-6139f685c399a83b6122b1ff5fecebb8cb6cf3b5.tar.gz
freebsd-ports-gnome-6139f685c399a83b6122b1ff5fecebb8cb6cf3b5.tar.zst
freebsd-ports-gnome-6139f685c399a83b6122b1ff5fecebb8cb6cf3b5.zip
Add a port for py-ctypes 0.6.0,
A charming python module that enables calling C library functions directly from python.
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-ctypes/Makefile44
-rw-r--r--devel/py-ctypes/distinfo2
-rw-r--r--devel/py-ctypes/pkg-descr5
-rw-r--r--devel/py-ctypes/pkg-plist5
5 files changed, 57 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 5535bdb49ba0..08d5a803f638 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -726,6 +726,7 @@
SUBDIR += py-ansistyle
SUBDIR += py-ciphon
SUBDIR += py-coro
+ SUBDIR += py-ctypes
SUBDIR += py-cxx
SUBDIR += py-dialog
SUBDIR += py-fam
diff --git a/devel/py-ctypes/Makefile b/devel/py-ctypes/Makefile
new file mode 100644
index 000000000000..dd8213c63f05
--- /dev/null
+++ b/devel/py-ctypes/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: py-ctypes
+# Date created: 12 May 2003
+# Whom: Hye-Shik Chang <perky@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ctypes
+PORTVERSION= 0.6.0
+CATEGORIES= devel python
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%/,ctypes/:pyctypes,g} \
+ ${MASTER_SITE_LOCAL:S,%SUBDIR%/,perky/:libffi,g}
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTFILES= ctypes-${PORTVERSION}.tar.gz:pyctypes \
+ libffi-${LIBFFIVERSION}.tar.gz:libffi
+
+MAINTAINER= perky@FreeBSD.org
+COMMENT= Python module allowing to create and manipulate C data types
+
+USE_PYTHON= yes
+USE_PYDISTUTILS=yes
+USE_REINPLACE= yes
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+
+# libffi on ports is incompatible with this port. so, we link the recent
+# version of it static.
+LIBFFIVERSION= 030511
+LIBFFIWRKSRC= ${WRKDIR}/libffi-${LIBFFIVERSION}
+CONFIGURE_ARGS= --enable-static --disable-shared
+CONFIGURE_WRKSRC=${LIBFFIWRKSRC}
+
+post-patch:
+ ${LN} -sf ${LIBFFIWRKSRC}/config-ml.in ${LIBFFIWRKSRC}/..
+ ${REINPLACE_CMD} -e 's|\(include_dirs = \).*|\1["${LIBFFIWRKSRC}/include"]|' \
+ -e 's|\(libraries=\["ffi"\]\)|\1,library_dirs=["${LIBFFIWRKSRC}/.libs"]|' \
+ -e 's|\(Extension(.*\)$$|\1 define_macros=[("ffi_type_schar", \
+ "ffi_type_sint8"), ("ffi_type_sshort","ffi_type_sint16")],|' \
+ ${WRKSRC}/setup.py
+
+pre-build:
+ cd ${LIBFFIWRKSRC}; ${MAKE_ENV} ${GMAKE}
+
+.include <bsd.port.mk>
diff --git a/devel/py-ctypes/distinfo b/devel/py-ctypes/distinfo
new file mode 100644
index 000000000000..24a7010fa291
--- /dev/null
+++ b/devel/py-ctypes/distinfo
@@ -0,0 +1,2 @@
+MD5 (ctypes-0.6.0.tar.gz) = a073dc783090f6ed3b0308fb4edd536c
+MD5 (libffi-030511.tar.gz) = dcce311e68911b3d16729ce8602fd946
diff --git a/devel/py-ctypes/pkg-descr b/devel/py-ctypes/pkg-descr
new file mode 100644
index 000000000000..8d5b4780e528
--- /dev/null
+++ b/devel/py-ctypes/pkg-descr
@@ -0,0 +1,5 @@
+Ctypes is a Python module allowing to create and manipulate
+C data types in Python. These can then be passed to C-functions
+loaded from dynamic link libraries.
+
+WWW: http://ctypes.sourceforge.net/
diff --git a/devel/py-ctypes/pkg-plist b/devel/py-ctypes/pkg-plist
new file mode 100644
index 000000000000..1b977a91fb14
--- /dev/null
+++ b/devel/py-ctypes/pkg-plist
@@ -0,0 +1,5 @@
+%%PYTHON_SITELIBDIR%%/_ctypes.so
+%%PYTHON_SITELIBDIR%%/ctypes/__init__.py
+%%PYTHON_SITELIBDIR%%/ctypes/__init__.pyc
+%%PYTHON_SITELIBDIR%%/ctypes/__init__.pyo
+@dirrm %%PYTHON_SITELIBDIR%%/ctypes