Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37765729
en ru br
ALT Linux repositórios
S:3.23.8-alt1
5.0: 2.8.10-alt3
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1

Group :: Edição
RPM: hplip

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: hplip-configure-python.patch
Download


diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in
--- hplip-3.20.9/configure.in.configure-python	2020-09-23 07:24:27.000000000 +0200
+++ hplip-3.20.9/configure.in	2020-10-02 07:27:09.082331431 +0200
@@ -604,17 +604,29 @@ if test "$class_driver" = "no" && test "
    fi
 fi
 
-SAVE_CPPFLAGS="$CPPFLAGS"
-CFLAGS=`python-config --includes`
-if [ $? -eq 0 ] 
-then
-   echo $FLAGS
-else
-CFLAGS=`python3-config --includes`
-   if [ $? -eq 0 ]
-   then
-   echo $FLAGS
-   fi
+AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)])
+
+PYTHON_INCLUDES=`$python3_config_path --includes`
+if test "X$PYTHON_INCLUDES" = "X" ; then
+  AC_MSG_ERROR([Cannot get Python includes via python3-config], 6)
+fi
+
+PYTHON_LIBS=`$python3_config_path --libs`
+if test "X$PYTHON_LIBS" = "X" ; then
+  AC_MSG_ERROR([Cannot get Python libs via python3-config], 6)
+fi
+
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+
+CFLAGS="$CFLAGS $PYTHON_INCLUDES"
+LIBS="$LIBS $PYTHON_LIBS"
+
+AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6))
+
+if test "X$python_includes" != "Xok" ; then
+  CFLAGS="$SAVE_CFLAGS"
+  LIBS="$SAVE_LIBS"
 fi
 
 #CFLAGS=`(python-config --includes)`
@@ -631,7 +643,6 @@ if test "$class_driver" = "no" && test "
    AS_IF([test "x$FOUND_HEADER" != "xyes"],
           [AC_MSG_ERROR([cannot find python-devel support], 6)])
 fi
-CFLAGS="$save_CFLAGS"
 
 if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
    AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009