From 2486d53a55a1595ff4b09b296de00e4b320624dc Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Thu, 7 Jun 2007 17:46:53 +0000 Subject: [PATCH] add option to compile pydnet as part of libdnet SVN-Revision: 7523 --- libs/libdnet/Makefile | 21 +++++++++++++++++++++ libs/libdnet/patches/010-gcc4.patch | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 libs/libdnet/patches/010-gcc4.patch diff --git a/libs/libdnet/Makefile b/libs/libdnet/Makefile index e3d58b4c2b..bf0331ebfd 100644 --- a/libs/libdnet/Makefile +++ b/libs/libdnet/Makefile @@ -32,6 +32,17 @@ define Package/libdnet URL:=http://sourceforge.net/projects/libdnet/ endef +define Package/pydnet + SECTION:=libs + DEPENDS:=libdnet +python + CATEGORY:=Libraries + TITLE:=Low-level network library + DESCRIPTION:=\ + libdnet is a library of simplified, portable interface to several \\\ + low-level networking routines. + URL:=http://sourceforge.net/projects/libdnet/ +endef + define Build/Configure (cd $(PKG_BUILD_DIR); touch \ configure.in \ @@ -81,4 +92,14 @@ define Package/libdnet/install $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(1)/usr/sbin/ endef +define Package/pydnet/install + $(INSTALL_DIR) $(1)/usr/lib + cd $(PKG_BUILD_DIR)/python; \ + $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \ + --no-compile --prefix $(PKG_INSTALL_DIR)/usr + cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/ +endef + + $(eval $(call BuildPackage,libdnet)) +$(eval $(call BuildPackage,pydnet)) diff --git a/libs/libdnet/patches/010-gcc4.patch b/libs/libdnet/patches/010-gcc4.patch new file mode 100644 index 0000000000..ead571274d --- /dev/null +++ b/libs/libdnet/patches/010-gcc4.patch @@ -0,0 +1,21 @@ +diff --exclude='*~' --exclude='.*' -I '$Id:' -urN libdnet-1.10.orig/python/dnet.c libdnet-1.10/python/dnet.c +--- libdnet-1.10.orig/python/dnet.c 2005-05-16 14:47:35.000000000 -0400 ++++ libdnet-1.10/python/dnet.c 2005-05-16 14:52:54.000000000 -0400 +@@ -2552,7 +2552,7 @@ + PyObject *__pyx_3 = 0; + unsigned short __pyx_4; + Py_INCREF(__pyx_v_self); +- ((PyObject*)__pyx_v_next) = Py_None; Py_INCREF(((PyObject*)__pyx_v_next)); ++ __pyx_v_next = Py_None; Py_INCREF(((PyObject*)__pyx_v_next)); + + /* "/misc/projects/libdnet/python/./dnet.pyx":628 */ + __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max); +@@ -2564,7 +2564,7 @@ + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_v_next)); +- ((PyObject *)__pyx_v_next) = __pyx_3; ++ __pyx_v_next = __pyx_3; + __pyx_3 = 0; + + /* "/misc/projects/libdnet/python/./dnet.pyx":630 */ -- 2.30.2