Import of Python ctypes-0.9.9.6

> ctypes is an advanced ffi (Foreign Function Interface) package for
> Python 2.3 and higher.
>
> ctypes allows to call functions exposed from dlls/shared libraries and
> has extensive facilities to create, access and manipulate simple and
> complicated C data types in Python - in other words: wrap libraries in
> pure Python. It is even possible to implement C callback functions in
> pure Python.

ok alek@
This commit is contained in:
djm 2006-07-15 22:47:25 +00:00
parent 10b68b13d0
commit e6c51989a5
7 changed files with 194 additions and 0 deletions

26
devel/py-ctypes/Makefile Normal file
View File

@ -0,0 +1,26 @@
# $OpenBSD: Makefile,v 1.1.1.1 2006/07/15 22:47:25 djm Exp $
COMMENT= "Python foreign function interface library"
DISTNAME= ctypes-0.9.9.6
PKGNAME= py-${DISTNAME:L}
CATEGORIES= devel
MAINTAINER= Damien Miller <djm@openbsd.org>
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ctypes/}
HOMEPAGE= http://starship.python.net/crew/theller/ctypes/
# BSD-like
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MODULES= lang/python
SHARED_ONLY= Yes
do-regress: fake
cd ${WRKSRC} && ${SETENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG} \
${MODPY_BIN} ./ctypes/test/runtests.py
.include <bsd.port.mk>

4
devel/py-ctypes/distinfo Normal file
View File

@ -0,0 +1,4 @@
MD5 (ctypes-0.9.9.6.tar.gz) = 6c7240608d564018ef8254721fde0012
RMD160 (ctypes-0.9.9.6.tar.gz) = 71d3673c69f081d4372e7f4eac1efa63a257f869
SHA1 (ctypes-0.9.9.6.tar.gz) = 831a731eebf8950a3dd3eb4cc18dbde8c7a859f5
SIZE (ctypes-0.9.9.6.tar.gz) = 340186

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-ctypes_test_test_loading_py,v 1.1.1.1 2006/07/15 22:47:25 djm Exp $
--- ctypes/test/test_loading.py.orig Fri Jul 14 14:49:16 2006
+++ ctypes/test/test_loading.py Fri Jul 14 14:49:23 2006
@@ -17,7 +17,7 @@ else:
for line in os.popen("ldd %s" % sys.executable):
if "libc.so" in line:
if sys.platform == "openbsd3":
- libc_name = line.split()[4]
+ libc_name = line.split()[6]
else:
libc_name = line.split()[2]
break

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-source_libffi_configure,v 1.1.1.1 2006/07/15 22:47:25 djm Exp $
--- source/libffi/configure.orig Wed Apr 5 22:43:24 2006
+++ source/libffi/configure Fri Jul 14 14:49:06 2006
@@ -3483,6 +3483,13 @@ fi
TARGETDIR="unknown"
case "$host" in
+mips*-*-openbsd*) TARGET=MIPS; TARGETDIR=mips;;
+i*86-*-openbsd*) TARGET=X86; TARGETDIR=x86;;
+sparc-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
+sparc64-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
+alpha*-*-openbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
+m68k-*-openbsd*) TARGET=M68K; TARGETDIR=m68k;;
+powerpc-*-openbsd*) TARGET=POWERPC; TARGETDIR=powerpc;;
i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
i*86-*-gnu*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris2.1[0-9]*) TARGET=X86_64; TARGETDIR=x86;;

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-source_libffi_configure_ac,v 1.1.1.1 2006/07/15 22:47:25 djm Exp $
--- source/libffi/configure.ac.orig Sat Feb 4 17:33:05 2006
+++ source/libffi/configure.ac Wed Apr 12 11:41:20 2006
@@ -21,6 +21,13 @@ AC_FUNC_MMAP_BLACKLIST
TARGETDIR="unknown"
case "$host" in
+mips*-*-openbsd*) TARGET=MIPS; TARGETDIR=mips;;
+i*86-*-openbsd*) TARGET=X86; TARGETDIR=x86;;
+sparc-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
+sparc64-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
+alpha*-*-openbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
+m68k-*-openbsd*) TARGET=M68K; TARGETDIR=m68k;;
+powerpc-*-openbsd*) TARGET=POWERPC; TARGETDIR=powerpc;;
i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
i*86-*-gnu*) TARGET=X86; TARGETDIR=x86;;
i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;;

View File

@ -0,0 +1,8 @@
ctypes is an advanced ffi (Foreign Function Interface) package for
Python 2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries and
has extensive facilities to create, access and manipulate simple and
complicated C data types in Python - in other words: wrap libraries in
pure Python. It is even possible to implement C callback functions in
pure Python.

110
devel/py-ctypes/pkg/PLIST Normal file
View File

@ -0,0 +1,110 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/07/15 22:47:25 djm Exp $
lib/python${MODPY_VERSION}/site-packages/_ctypes.so
lib/python${MODPY_VERSION}/site-packages/_ctypes_test.so
lib/python${MODPY_VERSION}/site-packages/ctypes/
lib/python${MODPY_VERSION}/site-packages/ctypes/__init__.py
lib/python${MODPY_VERSION}/site-packages/ctypes/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/_endian.py
lib/python${MODPY_VERSION}/site-packages/ctypes/_endian.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/__init__.py
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/dyld.py
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/dyld.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/dylib.py
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/dylib.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/framework.py
lib/python${MODPY_VERSION}/site-packages/ctypes/macholib/framework.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/
lib/python${MODPY_VERSION}/site-packages/ctypes/test/__init__.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/runtests.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/runtests.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_array_in_pointer.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_array_in_pointer.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_arrays.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_arrays.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_bitfields.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_bitfields.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_buffers.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_buffers.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_byteswap.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_byteswap.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_callbacks.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_callbacks.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_cast.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_cast.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_cfuncs.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_cfuncs.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_checkretval.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_checkretval.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_errcheck.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_errcheck.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_find.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_find.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_funcptr.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_funcptr.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_functions.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_functions.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_incomplete.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_incomplete.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_init.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_init.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_integers.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_integers.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_internals.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_internals.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_keeprefs.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_keeprefs.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_libc.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_libc.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_loading.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_loading.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_macholib.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_macholib.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_memfunctions.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_memfunctions.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_numbers.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_numbers.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_parameters.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_parameters.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_pointers.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_pointers.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_prototypes.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_prototypes.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_python_api.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_python_api.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_random_things.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_random_things.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_refcounts.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_refcounts.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_repr.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_repr.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_returnfuncptrs.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_returnfuncptrs.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_simplesubclasses.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_simplesubclasses.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_sizes.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_sizes.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_slicing.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_slicing.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_stringptr.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_stringptr.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_strings.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_strings.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_struct_fields.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_struct_fields.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_structures.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_structures.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_unaligned_structures.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_unaligned_structures.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_unicode.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_unicode.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_values.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_values.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_win32.py
lib/python${MODPY_VERSION}/site-packages/ctypes/test/test_win32.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/util.py
lib/python${MODPY_VERSION}/site-packages/ctypes/util.pyc
lib/python${MODPY_VERSION}/site-packages/ctypes/wintypes.py
lib/python${MODPY_VERSION}/site-packages/ctypes/wintypes.pyc