kumquat-buildroot/package/libpwquality/libpwquality.mk
Fabrice Fontaine b1662a165c package/libpwquality: fix build with python 3.12
Switch from distutils to setuptools to avoid the following build failure
raised since bump of python to version 3.12.1 in commit
36e635d2d5:

Traceback (most recent call last):
  File "/home/fabrice/buildroot/output/build/libpwquality-1.4.5/python/setup.py", line 9, in <module>
    from distutils.core import setup, Extension
ModuleNotFoundError: No module named 'distutils'

Fixes: 36e635d2d5
No autobuilder failures (yet)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 22:34:19 +01:00

47 lines
1.4 KiB
Makefile

################################################################################
#
# libpwquality
#
################################################################################
LIBPWQUALITY_VERSION = 1.4.5
LIBPWQUALITY_SOURCE = libpwquality-$(LIBPWQUALITY_VERSION).tar.bz2
LIBPWQUALITY_SITE = https://github.com/libpwquality/libpwquality/releases/download/libpwquality-$(LIBPWQUALITY_VERSION)
LIBPWQUALITY_LICENSE = BSD-3-Clause or GPL-2.0+
LIBPWQUALITY_INSTALL_STAGING = YES
LIBPWQUALITY_DEPENDENCIES = cracklib
LIBPWQUALITY_LICENSE_FILES = COPYING
# We're patching python/Makefile.am
LIBPWQUALITY_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIBPWQUALITY_CONF_OPTS += --enable-python-bindings
LIBPWQUALITY_DEPENDENCIES += python3 host-python-setuptools
LIBPWQUALITY_MAKE_ENV += $(PKG_PYTHON_SETUPTOOLS_ENV)
else
LIBPWQUALITY_CONF_OPTS += --disable-python-bindings
endif
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
LIBPWQUALITY_CONF_OPTS += --enable-pam
LIBPWQUALITY_DEPENDENCIES += linux-pam
else
LIBPWQUALITY_CONF_OPTS += --disable-pam
endif
# Static link with cracklib requires -lz if zlib is enabled
ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_ZLIB),yy)
LIBPWQUALITY_CONF_ENV += LIBS="-lz"
endif
ifeq ($(BR2_PACKAGE_LIBPWQUALITY_TOOLS),)
define LIBPWQUALITY_REMOVE_TOOLS
rm -f $(TARGET_DIR)/usr/bin/pwmake
rm -f $(TARGET_DIR)/usr/bin/pwscore
endef
LIBPWQUALITY_POST_INSTALL_TARGET_HOOKS += LIBPWQUALITY_REMOVE_TOOLS
endif
$(eval $(autotools-package))