pyevent for use with libevent
git-svn-id: svn://svn.openwrt.org/openwrt/packages@7046 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
29d3d3913d
commit
10d38b8980
41
libs/pyevent/Makefile
Normal file
41
libs/pyevent/Makefile
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=pyevent
|
||||||
|
PKG_VERSION:=0.3
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://pyevent.googlecode.com/files/
|
||||||
|
PKG_MD5SUM:=584912c92d08bf005283fb29a47a6e4d
|
||||||
|
PKG_CAT:=zcat
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/pyevent
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
DEPENDS:=+libevent
|
||||||
|
TITLE:=Pyevent
|
||||||
|
MAINTAINER:=jjones@pavlovmedia.com
|
||||||
|
DESCRIPTION:=\
|
||||||
|
Python extension module for libevent
|
||||||
|
URL=http://code.google.com/p/pyevent/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
cd $(PKG_BUILD_DIR); \
|
||||||
|
LIBEVENT_HOME='$(STAGING_DIR)/usr/lib' \
|
||||||
|
CFLAGS='-I$(STAGING_DIR)/usr/include' \
|
||||||
|
LDFLAGS='$(TARGET_LDFLAGS)' \
|
||||||
|
$(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
|
||||||
|
--prefix=$(PKG_INSTALL_DIR)/usr
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/pyevent/install
|
||||||
|
$(CP) -R $(PKG_INSTALL_DIR)/* $(1)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,pyevent))
|
20
libs/pyevent/patches/000-libenevt_path_from_env.patch
Normal file
20
libs/pyevent/patches/000-libenevt_path_from_env.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -ruN pyevent-0.3.pris/setup.py pyevent-0.3/setup.py
|
||||||
|
--- pyevent-0.3.pris/setup.py 2005-09-11 22:44:04.000000000 -0500
|
||||||
|
+++ pyevent-0.3/setup.py 2007-04-23 11:17:14.500323500 -0500
|
||||||
|
@@ -5,9 +5,13 @@
|
||||||
|
from distutils.core import setup, Extension
|
||||||
|
import glob, os, sys
|
||||||
|
|
||||||
|
-if glob.glob('/usr/lib/libevent.*'):
|
||||||
|
- print 'found system libevent for', sys.platform
|
||||||
|
- event = Extension(name='event',
|
||||||
|
+# Where to find libevent
|
||||||
|
+libevent_location = os.environ.get('LIBEVENT_HOME')
|
||||||
|
+
|
||||||
|
+if libevent_location != None:
|
||||||
|
+ if glob.glob('%s/libevent.*' % (libevent_location,)):
|
||||||
|
+ print 'found system libevent for', sys.platform
|
||||||
|
+ event = Extension(name='event',
|
||||||
|
sources=[ 'event.c' ],
|
||||||
|
libraries=[ 'event' ])
|
||||||
|
elif glob.glob('%s/lib/libevent.*' % sys.prefix):
|
Loading…
x
Reference in New Issue
Block a user