add option to compile pydnet as part of libdnet
authorTim Yardley <lst@openwrt.org>
Thu, 7 Jun 2007 17:46:53 +0000 (17:46 +0000)
committerTim Yardley <lst@openwrt.org>
Thu, 7 Jun 2007 17:46:53 +0000 (17:46 +0000)
SVN-Revision: 7523

libs/libdnet/Makefile
libs/libdnet/patches/010-gcc4.patch [new file with mode: 0644]

index e3d58b4c2bb462d0f963d81dfeb6dd0411a74034..bf0331ebfdca77f4aeea3c482ede7299a589e082 100644 (file)
@@ -32,6 +32,17 @@ define Package/libdnet
   URL:=http://sourceforge.net/projects/libdnet/
 endef
 
   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 \
 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
 
        $(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,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 (file)
index 0000000..ead5712
--- /dev/null
@@ -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 */