import py-enet 1.0

py-enet is a python wrapper for the ENet library.

from james turner (MAINTAINER) with tweaks by me
ok landry@
This commit is contained in:
jasper 2011-06-29 10:40:26 +00:00
parent 6ac4c07c5b
commit 4d949d7ce2
5 changed files with 85 additions and 0 deletions

33
net/py-enet/Makefile Normal file
View File

@ -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 <james@calminferno.net>
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 <bsd.port.mk>

5
net/py-enet/distinfo Normal file
View File

@ -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

View File

@ -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)]

1
net/py-enet/pkg/DESCR Normal file
View File

@ -0,0 +1 @@
py-enet is a python wrapper for the ENet library.

3
net/py-enet/pkg/PLIST Normal file
View File

@ -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