kumquat-buildroot/package/libdnet/libdnet.mk
Fabrice Fontaine 9dfaa179db package/libdnet: replace PKG_PYTHON_DISTUTILS_ENV
Replace PKG_PYTHON_DISTUTILS_ENV by PKG_PYTHON_SETUPTOOLS_ENV as libdnet
uses setuptools instead of distutils since version 1.16.2 and
4e4fc68795

This will avoid the following build failure raised since commit
09de823cbc:

In file included from /home/fabrice/buildroot/output/per-package/libdnet/host/include/python3.12/Python.h:38,
                 from ./dnet.c:40:
/home/fabrice/buildroot/output/per-package/libdnet/host/include/python3.12/pyport.h:586:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  586 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
      |  ^~~~~

Fixes: 09de823cbc
(No autobuilder failure (yet))

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-02-11 18:02:25 +01:00

41 lines
1.2 KiB
Makefile

################################################################################
#
# libdnet
#
################################################################################
LIBDNET_VERSION = 1.16.4
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_SETUPTOOLS_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))