[packages/cracklib] fix python detection and build flags; rel 4

atler atler at pld-linux.org
Fri Mar 14 23:24:18 CET 2025


commit e12ef9ef38ffb30bb116bdd2d4bc5daeefd6da98
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Mar 14 23:23:39 2025 +0100

    fix python detection and build flags; rel 4

 cracklib.spec      |  4 +++-
 python-flags.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)
---
diff --git a/cracklib.spec b/cracklib.spec
index 73b10a4..15ab79d 100644
--- a/cracklib.spec
+++ b/cracklib.spec
@@ -14,12 +14,13 @@ Summary(tr.UTF-8):	Parola denetim kitaplığı
 Summary(uk.UTF-8):	Бібліотека перевірки паролів
 Name:		cracklib
 Version:	2.10.2
-Release:	3
+Release:	4
 License:	LGPL v2.1+
 Group:		Libraries
 #Source0Download: https://github.com/cracklib/cracklib/releases
 Source0:	https://github.com/cracklib/cracklib/releases/download/v%{version}/%{name}-%{version}.tar.xz
 # Source0-md5:	a99e0aef4c677df7063624690b634988
+Patch0:		python-flags.patch
 URL:		https://github.com/cracklib/cracklib
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -181,6 +182,7 @@ Wiązanie Pythona do crackliba.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %{__libtoolize}
diff --git a/python-flags.patch b/python-flags.patch
new file mode 100644
index 0000000..7ad1b08
--- /dev/null
+++ b/python-flags.patch
@@ -0,0 +1,46 @@
+--- cracklib-2.10.2/configure.ac.orig	2024-07-27 16:01:33.000000000 +0200
++++ cracklib-2.10.2/configure.ac	2025-03-14 23:19:05.715368741 +0100
+@@ -76,19 +76,23 @@
+                       AC_MSG_ERROR([python was required but not found])
+                    fi])
+    if test "$build_python" != no ; then
+-      AC_CHECK_HEADERS(python${PYTHON_VERSION}/Python.h,,
+-		       [if test "$build_python" != yes ; then
+-		           AC_MSG_WARN([python headers not found, continuing])
+-			   build_python=no
+-			else
+-		           AC_MSG_ERROR([python headers not found])
+-			fi])
++       if command -v $PYTHON-config > /dev/null; then
++           PYTHON_CFLAGS=`$PYTHON-config --cflags`
++       else
++           if test "$build_python" != yes ; then
++               AC_MSG_WARN([$PYTHON-config not found, continuing])
++               build_python=no
++	   else
++               AC_MSG_ERROR([$PYTHON-config not found])
++           fi
++       fi
+    fi
+    if test "$build_python" != no ; then
+       build_python=yes
+    fi
+ fi
+ AM_CONDITIONAL(BUILD_PYTHON,[test "$build_python" = "yes"])
++AC_SUBST(PYTHON_CFLAGS)
+ 
+ dnl Handle local dict compiling properly
+ AC_SUBST(CROSS_COMPILING, $cross_compiling)
+--- cracklib-2.10.2/python/Makefile.am.orig	2023-03-16 14:38:03.000000000 +0100
++++ cracklib-2.10.2/python/Makefile.am	2025-03-14 23:18:25.303271452 +0100
+@@ -2,9 +2,8 @@
+ python_PYTHON = cracklib.py test_cracklib.py
+ pyexec_LTLIBRARIES = _cracklib.la
+ AM_CFLAGS = -I$(top_srcdir)/lib -Wall
+-AM_CPPFLAGS = '-DLOCALEDIR="$(localedir)"'
++AM_CPPFLAGS = '-DLOCALEDIR="$(localedir)"' $(PYTHON_CFLAGS)
+ _cracklib_la_LDFLAGS = -module -avoid-version $(top_builddir)/lib/libcrack.la
+ DEFS += '-DDEFAULT_CRACKLIB_DICT="$(DEFAULT_CRACKLIB_DICT)"'
+-DEFS += '-DPYTHON_H="python at PYTHON_VERSION@/Python.h"'
+ endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cracklib.git/commitdiff/e12ef9ef38ffb30bb116bdd2d4bc5daeefd6da98



More information about the pld-cvs-commit mailing list