Skip to contentSkip to conversation

package/libdnet: bump to version 1.14, drop python2 support.

PATCH In review Adam Duskett 2 participants 2 messages Dec 31, 2021 – Jan 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libdnet: bump to version 1.14, drop python2 support.

- Change the url to the github ofalk repository.
- Remove upstream patches
- Rework python-makefile.patch to adhere to git formatting and refresh for 1.14
- Update License hash due to year changes
- Depend on python3 and host-python3-cython for python bindings

---
 package/libdnet/0001-python-gcc.patch      | 20 ----------------
 package/libdnet/0001-python-makefile.patch | 27 ++++++++++++++++++++++
 package/libdnet/0002-python-makefile.patch | 16 -------------
 package/libdnet/Config.in                  |  6 ++---
 package/libdnet/libdnet.hash               |  4 ++--
 package/libdnet/libdnet.mk                 | 12 +++++-----
 6 files changed, 38 insertions(+), 47 deletions(-)
 delete mode 100644 package/libdnet/0001-python-gcc.patch
 create mode 100644 package/libdnet/0001-python-makefile.patch
 delete mode 100644 package/libdnet/0002-python-makefile.patch
package/libdnet/0001-python-gcc.patch deleted +0 -20
deleted file mode 100644
index ea732e4358..0000000000
@@ -1,20 +0,0 @@
---- a/python/dnet.c	2006-01-19 18:08:23.000000000 +1100
-+++ b/python/dnet.c	2008-09-03 16:30:47.000000000 +1000
-@@ -2726,7 +2726,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 = (struct __pyx_obj_4dnet_addr*)Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
- 
-   /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":634 */
-   __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max);
-@@ -2738,7 +2739,7 @@
-     Py_DECREF(__pyx_2); __pyx_2 = 0;
-     if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
-     Py_DECREF(((PyObject *)__pyx_v_next));
--    ((PyObject *)__pyx_v_next) = __pyx_3;
-+    __pyx_v_next = (struct __pyx_obj_4dnet_addr*)__pyx_3;
-     __pyx_3 = 0;
- 
-     /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":636 */
package/libdnet/0001-python-makefile.patch new file +27 -0
new file mode 100644
index 0000000000..5f641302be
@@ -0,0 +1,27 @@
+From 298cd8eaa21a21eee85f9551a26ad294347b1d5a Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <[email protected]>
+Date: Thu, 30 Dec 2021 11:14:15 -0800
+Subject: [PATCH] python makefile
+
+Signed-off-by: Peter Korsgaard <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+Refresh for 1.14
+---
+ python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 1a74ef2..59fe0f3 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -11,6 +11,7 @@ $(srcdir)/dnet.c: $(srcdir)/dnet.pyx
+ 	pyrexc $(srcdir)/dnet.pyx
+ 
+ python-build: $(srcdir)/dnet.c
++	CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR)
+ 	$(PYTHON) setup.py build
+ 	touch python-build
+ 
+-- 
+2.33.1
+
package/libdnet/0002-python-makefile.patch deleted +0 -16
deleted file mode 100644
index fb41e43e35..0000000000
@@ -1,16 +0,0 @@
----
- python/Makefile.am |    1 +
- 1 file changed, 1 insertion(+)
-
-Index: libdnet-1.11/python/Makefile.am
-===================================================================
---- libdnet-1.11.orig/python/Makefile.am
-+++ libdnet-1.11/python/Makefile.am
-@@ -11,6 +11,7 @@
- 	pyrexc $(srcdir)/dnet.pyx
- 
- python-build: $(srcdir)/dnet.c
-+	CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR)
- 	$(PYTHON) setup.py build
- 	touch python-build
- 
package/libdnet/Config.in +3 -3
index e7ba3a21af..f853e4e12d 100644
@@ -10,11 +10,11 @@ if BR2_PACKAGE_LIBDNET
 
 config BR2_PACKAGE_LIBDNET_PYTHON
 	bool "libdnet python module"
-	depends on BR2_PACKAGE_PYTHON
+	depends on BR2_PACKAGE_PYTHON3
 	help
 	  dnet module for python
 
-comment "dnet module for python requires python package"
-	depends on !BR2_PACKAGE_PYTHON
+comment "dnet module for python requires python3 package"
+	depends on !BR2_PACKAGE_PYTHON3
 
 endif
package/libdnet/libdnet.hash +2 -2
index d2e820270f..d322a1cc29 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  0eb78415c8f2564c2f1e8ad36e98473348d9c94852f796a226360c716cc7ca53  libdnet-1.11.tar.gz
-sha256  1e94df12cb3701fa64e07eeb60284bb16a3544815d5a39860dacff7b86610584  LICENSE
+sha256  592599c54a57102a177270f3a2caabda2c2ac7768b977d7458feba97da923dfe  libdnet-1.14.tar.gz
+sha256  6b46ec86e290066c47b6607d322135b3c473566e7225ac23d35a7c0588a82da6  LICENSE
package/libdnet/libdnet.mk +6 -6
index 3d3fcbe605..e9a57d6ed2 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBDNET_VERSION = 1.11
-LIBDNET_SITE = http://downloads.sourceforge.net/project/libdnet/libdnet/libdnet-$(LIBDNET_VERSION)
+LIBDNET_VERSION = 1.14
+LIBDNET_SITE = $(call github,ofalk,libdnet,libdnet-$(LIBDNET_VERSION))
 LIBDNET_LICENSE = BSD-3-Clause
 LIBDNET_LICENSE_FILES = LICENSE
 LIBDNET_INSTALL_STAGING = YES
@@ -15,10 +15,10 @@ LIBDNET_CONF_OPTS = \
 	--with-check=no
 LIBDNET_CONFIG_SCRIPTS = dnet-config
 
-ifneq ($(BR2_PACKAGE_LIBDNET_PYTHON),)
-LIBDNET_DEPENDENCIES += python
-LIBDNET_CONF_OPTS += --with-python
-LIBDNET_MAKE_OPTS = PYINCDIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) PYLIBDIR=$(STAGING_DIR)/usr/lib
+ifeq ($(BR2_PACKAGE_LIBDNET_PYTHON),y)
+LIBDNET_DEPENDENCIES += host-python3-cython python3
+LIBDNET_CONF_OPTS += --with-python=$(HOST_DIR)/bin
+LIBDNET_MAKE_ENV += $(PKG_PYTHON_DISTUTILS_ENV)
 LIBDNET_INSTALL_TARGET_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(TARGET_DIR) INSTALL_STRIP_FLAG=-s install-exec
 LIBDNET_INSTALL_STAGING_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
 endif
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Adam, All,

On 2021-12-31 13:10 -0800, Adam Duskett spake thusly:

Quoted 7 lines

- Change the url to the github ofalk repository.
- Remove upstream patches
- Rework python-makefile.patch to adhere to git formatting and refresh for 1.14
- Update License hash due to year changes
- Depend on python3 and host-python3-cython for python bindings

I've added an explanation why we switch to the ofalk repo, took that opportunity to rephrase the commit log, and applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 159 lines
---
 package/libdnet/0001-python-gcc.patch      | 20 ----------------
 package/libdnet/0001-python-makefile.patch | 27 ++++++++++++++++++++++
 package/libdnet/0002-python-makefile.patch | 16 -------------
 package/libdnet/Config.in                  |  6 ++---
 package/libdnet/libdnet.hash               |  4 ++--
 package/libdnet/libdnet.mk                 | 12 +++++-----
 6 files changed, 38 insertions(+), 47 deletions(-)
 delete mode 100644 package/libdnet/0001-python-gcc.patch
 create mode 100644 package/libdnet/0001-python-makefile.patch
 delete mode 100644 package/libdnet/0002-python-makefile.patch
package/libdnet/0001-python-gcc.patch deleted +0 -20
deleted file mode 100644
index ea732e4358..0000000000
@@ -1,20 +0,0 @@
---- a/python/dnet.c	2006-01-19 18:08:23.000000000 +1100
-+++ b/python/dnet.c	2008-09-03 16:30:47.000000000 +1000
-@@ -2726,7 +2726,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 = (struct __pyx_obj_4dnet_addr*)Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
- 
-   /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":634 */
-   __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max);
-@@ -2738,7 +2739,7 @@
-     Py_DECREF(__pyx_2); __pyx_2 = 0;
-     if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
-     Py_DECREF(((PyObject *)__pyx_v_next));
--    ((PyObject *)__pyx_v_next) = __pyx_3;
-+    __pyx_v_next = (struct __pyx_obj_4dnet_addr*)__pyx_3;
-     __pyx_3 = 0;
- 
-     /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":636 */
package/libdnet/0001-python-makefile.patch new file +27 -0
new file mode 100644
index 0000000000..5f641302be
@@ -0,0 +1,27 @@
+From 298cd8eaa21a21eee85f9551a26ad294347b1d5a Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <[email protected]>
+Date: Thu, 30 Dec 2021 11:14:15 -0800
+Subject: [PATCH] python makefile
+
+Signed-off-by: Peter Korsgaard <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+Refresh for 1.14
+---
+ python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 1a74ef2..59fe0f3 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -11,6 +11,7 @@ $(srcdir)/dnet.c: $(srcdir)/dnet.pyx
+ 	pyrexc $(srcdir)/dnet.pyx
+ 
+ python-build: $(srcdir)/dnet.c
++	CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR)
+ 	$(PYTHON) setup.py build
+ 	touch python-build
+ 
+-- 
+2.33.1
+
package/libdnet/0002-python-makefile.patch deleted +0 -16
deleted file mode 100644
index fb41e43e35..0000000000
@@ -1,16 +0,0 @@
----
- python/Makefile.am |    1 +
- 1 file changed, 1 insertion(+)
-
-Index: libdnet-1.11/python/Makefile.am
-===================================================================
---- libdnet-1.11.orig/python/Makefile.am
-+++ libdnet-1.11/python/Makefile.am
-@@ -11,6 +11,7 @@
- 	pyrexc $(srcdir)/dnet.pyx
- 
- python-build: $(srcdir)/dnet.c
-+	CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR)
- 	$(PYTHON) setup.py build
- 	touch python-build
- 
package/libdnet/Config.in +3 -3
index e7ba3a21af..f853e4e12d 100644
@@ -10,11 +10,11 @@ if BR2_PACKAGE_LIBDNET
 
 config BR2_PACKAGE_LIBDNET_PYTHON
 	bool "libdnet python module"
-	depends on BR2_PACKAGE_PYTHON
+	depends on BR2_PACKAGE_PYTHON3
 	help
 	  dnet module for python
 
-comment "dnet module for python requires python package"
-	depends on !BR2_PACKAGE_PYTHON
+comment "dnet module for python requires python3 package"
+	depends on !BR2_PACKAGE_PYTHON3
 
 endif
package/libdnet/libdnet.hash +2 -2
index d2e820270f..d322a1cc29 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  0eb78415c8f2564c2f1e8ad36e98473348d9c94852f796a226360c716cc7ca53  libdnet-1.11.tar.gz
-sha256  1e94df12cb3701fa64e07eeb60284bb16a3544815d5a39860dacff7b86610584  LICENSE
+sha256  592599c54a57102a177270f3a2caabda2c2ac7768b977d7458feba97da923dfe  libdnet-1.14.tar.gz
+sha256  6b46ec86e290066c47b6607d322135b3c473566e7225ac23d35a7c0588a82da6  LICENSE
package/libdnet/libdnet.mk +6 -6
index 3d3fcbe605..e9a57d6ed2 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBDNET_VERSION = 1.11
-LIBDNET_SITE = http://downloads.sourceforge.net/project/libdnet/libdnet/libdnet-$(LIBDNET_VERSION)
+LIBDNET_VERSION = 1.14
+LIBDNET_SITE = $(call github,ofalk,libdnet,libdnet-$(LIBDNET_VERSION))
 LIBDNET_LICENSE = BSD-3-Clause
 LIBDNET_LICENSE_FILES = LICENSE
 LIBDNET_INSTALL_STAGING = YES
@@ -15,10 +15,10 @@ LIBDNET_CONF_OPTS = \
 	--with-check=no
 LIBDNET_CONFIG_SCRIPTS = dnet-config
 
-ifneq ($(BR2_PACKAGE_LIBDNET_PYTHON),)
-LIBDNET_DEPENDENCIES += python
-LIBDNET_CONF_OPTS += --with-python
-LIBDNET_MAKE_OPTS = PYINCDIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) PYLIBDIR=$(STAGING_DIR)/usr/lib
+ifeq ($(BR2_PACKAGE_LIBDNET_PYTHON),y)
+LIBDNET_DEPENDENCIES += host-python3-cython python3
+LIBDNET_CONF_OPTS += --with-python=$(HOST_DIR)/bin
+LIBDNET_MAKE_ENV += $(PKG_PYTHON_DISTUTILS_ENV)
 LIBDNET_INSTALL_TARGET_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(TARGET_DIR) INSTALL_STRIP_FLAG=-s install-exec
 LIBDNET_INSTALL_STAGING_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
 endif
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot