0001-configure.ac-make-ndiff-depend-on-python3.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 562893e665a6c9e1b60c8b3242bab6fe78318b3b Mon Sep 17 00:00:00 2001
  2. From: Mingli Yu <mingli.yu@windriver.com>
  3. Date: Fri, 14 Feb 2020 08:19:54 +0000
  4. Subject: [PATCH] configure.ac: make ndiff depend on python3
  5. Python 2 ceased being maintained on the 1st January 2020.
  6. We've already removed all users of it from oe-core, so
  7. let ndiff depend on python3.
  8. Upstream-Status: Pending
  9. Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
  10. ---
  11. .../nmap/7.80-r0/nmap-7.80/configure.ac | 11 ++++++++---
  12. 1 file changed, 8 insertions(+), 3 deletions(-)
  13. diff --git a/configure.ac b/configure.ac
  14. index 9d2fff8..5ffdd55 100644
  15. --- a/configure.ac
  16. +++ b/configure.ac
  17. @@ -237,16 +237,21 @@ if test $HAVE_PYTHON && test "x${PYTHON_VERSION%%.*}" = "x2"; then
  18. HAVE_PYTHON2=true
  19. fi
  20. +HAVE_PYTHON3=false
  21. +if test $HAVE_PYTHON && test "x${PYTHON_VERSION%%.*}" = "x3"; then
  22. + HAVE_PYTHON3=true
  23. +fi
  24. +
  25. NDIFFDIR=ndiff
  26. # Do they want Ndiff?
  27. AC_ARG_WITH(ndiff, AC_HELP_STRING([--without-ndiff], [Skip installation of the Ndiff utility]), [], [with_ndiff=check])
  28. -if $HAVE_PYTHON2 ; then : ;
  29. +if $HAVE_PYTHON3 ; then : ;
  30. else
  31. if test "$with_ndiff" = "check" ; then
  32. - AC_MSG_WARN([Not building Ndiff because Python 2.x with x>=4 was not found])
  33. + AC_MSG_WARN([Not building Ndiff because Python3 was not found])
  34. elif test "$with_ndiff" = "yes"; then
  35. - AC_MSG_FAILURE([--with-ndiff requires Python 2.x with x>=4])
  36. + AC_MSG_FAILURE([--with-ndiff requires Python3])
  37. fi
  38. with_ndiff=no
  39. fi
  40. --
  41. 2.24.1