14bb74b461
Fix the following build failure raised with python >= 3.11 by backporting a patch and adding libbsd dependency as suggested by upstream in https://github.com/ofalk/libdnet/issues/74: ./dnet.c: In function '__Pyx_AddTraceback': ./dnet.c:456:62: error: invalid use of incomplete typedef 'PyFrameObject' {aka 'struct _frame'} 456 | #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) | ^~ ./dnet.c:25190:5: note: in expansion of macro '__Pyx_PyFrame_SetLineNumber' 25190 | __Pyx_PyFrame_SetLineNumber(py_frame, py_line); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/78dff4b514fb7c510f5a745ee6cbbc049ceb2794 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
41 lines
1.2 KiB
Makefile
41 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# libdnet
|
|
#
|
|
################################################################################
|
|
|
|
LIBDNET_VERSION = 1.16.1
|
|
LIBDNET_SITE = $(call github,ofalk,libdnet,libdnet-$(LIBDNET_VERSION))
|
|
LIBDNET_LICENSE = BSD-3-Clause
|
|
LIBDNET_LICENSE_FILES = LICENSE
|
|
LIBDNET_INSTALL_STAGING = YES
|
|
LIBDNET_AUTORECONF = YES
|
|
LIBDNET_CONF_OPTS = \
|
|
--with-gnu-ld \
|
|
--with-check=no
|
|
LIBDNET_CONFIG_SCRIPTS = dnet-config
|
|
LIBDNET_DEPENDENCIES = host-pkgconf
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBDNET_PYTHON),y)
|
|
LIBDNET_DEPENDENCIES += libbsd host-python-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
|
|
|
|
# Needed for autoreconf to work properly
|
|
define LIBDNET_FIXUP_ACINCLUDE_M4
|
|
ln -sf config/acinclude.m4 $(@D)
|
|
endef
|
|
|
|
LIBDNET_POST_EXTRACT_HOOKS += LIBDNET_FIXUP_ACINCLUDE_M4
|
|
|
|
define LIBDNET_REMOVE_CONFIG_SCRIPT
|
|
$(RM) -f $(TARGET_DIR)/usr/bin/dnet-config
|
|
endef
|
|
|
|
LIBDNET_POST_INSTALL_TARGET_HOOKS += LIBDNET_REMOVE_CONFIG_SCRIPT
|
|
|
|
$(eval $(autotools-package))
|