diff --git a/net/py-enet/Makefile b/net/py-enet/Makefile new file mode 100644 index 00000000000..029fc4c0d98 --- /dev/null +++ b/net/py-enet/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2011/06/29 10:40:26 jasper Exp $ + +COMMENT = python wrapper for the ENet library + +MODPY_EGG_VERSION = 1.0 +DISTNAME = py-enet-${MODPY_EGG_VERSION} +CATEGORIES = net + +MAINTAINER = James Turner + +HOMEPAGE = http://code.google.com/p/pyenet/ +MASTER_SITES = http://bsdgroup.org/distfiles/ + +# BSD-like +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM =Yes +PERMIT_DISTFILES_FTP = Yes + +MODULES = lang/python + +WANTLIB += enet ${MODPY_WANTLIB} + +LIB_DEPENDS = net/enet + +BUILD_DEPENDS = lang/cython + +NO_REGRESS = Yes + +pre-configure: + ${SUBST_CMD} ${WRKSRC}/setup.py + +.include diff --git a/net/py-enet/distinfo b/net/py-enet/distinfo new file mode 100644 index 00000000000..65cd8bd4c8a --- /dev/null +++ b/net/py-enet/distinfo @@ -0,0 +1,5 @@ +MD5 (py-enet-1.0.tar.gz) = 9hJ3xQMLNWgLYRUt1iaBkA== +RMD160 (py-enet-1.0.tar.gz) = V2Ubt6xgxiHFA3upXnGiBYlIMs4= +SHA1 (py-enet-1.0.tar.gz) = rn5+X12G+KvraWwYbf29Zn/VYA4= +SHA256 (py-enet-1.0.tar.gz) = srIs06bUKCcqU4amjS0//CufFYT8g4mMfIGTl5Fg2pE= +SIZE (py-enet-1.0.tar.gz) = 9312 diff --git a/net/py-enet/patches/patch-setup_py b/net/py-enet/patches/patch-setup_py new file mode 100644 index 00000000000..4e8dba60ff9 --- /dev/null +++ b/net/py-enet/patches/patch-setup_py @@ -0,0 +1,43 @@ +$OpenBSD: patch-setup_py,v 1.1.1.1 2011/06/29 10:40:26 jasper Exp $ +--- setup.py.orig Tue Jun 28 16:29:47 2011 ++++ setup.py Tue Jun 28 17:24:47 2011 +@@ -7,36 +7,24 @@ import sys + + source_files = ["enet.pyx"] + +-_enet_files = glob.glob("enet/*.c") +- +-if not _enet_files: +- print("You need to download and extract the enet 1.3 source to enet/") +- print("Download the source from: http://enet.bespin.org/SourceDistro.html") +- print("See the README for more instructions") +- sys.exit(1) +- +-source_files.extend(_enet_files) +- + define_macros = [('HAS_POLL', None), + ('HAS_FCNTL', None), + ('HAS_MSGHDR_FLAGS', None), + ('HAS_SOCKLEN_T', None) ] + +-libraries = [] ++libraries = ['enet'] + + if sys.platform == 'win32': + define_macros.extend([('WIN32', None)]) + libraries.extend(['ws2_32', 'Winmm']) + +-if sys.platform != 'darwin': +- define_macros.extend([('HAS_GETHOSTBYNAME_R', None), ('HAS_GETHOSTBYADDR_R', None)]) +- + ext_modules = [ + Extension( + "enet", + extra_compile_args=["-O3"], + sources=source_files, +- include_dirs=["enet/include/"], ++ include_dirs=["${LOCALBASE}/include"], ++ library_dirs=["${LOCALBASE}/lib"], + define_macros=define_macros, + libraries=libraries)] + diff --git a/net/py-enet/pkg/DESCR b/net/py-enet/pkg/DESCR new file mode 100644 index 00000000000..c9850f4d274 --- /dev/null +++ b/net/py-enet/pkg/DESCR @@ -0,0 +1 @@ +py-enet is a python wrapper for the ENet library. diff --git a/net/py-enet/pkg/PLIST b/net/py-enet/pkg/PLIST new file mode 100644 index 00000000000..7920a951787 --- /dev/null +++ b/net/py-enet/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2011/06/29 10:40:26 jasper Exp $ +lib/python${MODPY_VERSION}/site-packages/enet-0.0.0-py${MODPY_VERSION}.egg-info +lib/python${MODPY_VERSION}/site-packages/enet.so