From 442aa53108560d6e65bed6993e8c380b34707906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 3 Jun 2019 22:48:04 +0200 Subject: [PATCH] Fixed FTBFS with python-3.8 --- graphviz-2.40.1-python3.patch | 12 +++++------- graphviz.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/graphviz-2.40.1-python3.patch b/graphviz-2.40.1-python3.patch index 6e6c172..0c3e315 100644 --- a/graphviz-2.40.1-python3.patch +++ b/graphviz-2.40.1-python3.patch @@ -22,7 +22,7 @@ index b747045..2b1ac8d 100644 - + print(sysconfig.get_python_lib(0,0)) diff --git a/configure.ac b/configure.ac -index 51166c3..4d8c9a0 100644 +index 51166c3..0f18965 100644 --- a/configure.ac +++ b/configure.ac @@ -1142,7 +1142,7 @@ else @@ -34,20 +34,18 @@ index 51166c3..4d8c9a0 100644 if test "x$PYTHON" = "x"; then use_python="No (python not available)" else -@@ -1167,8 +1167,11 @@ else +@@ -1167,8 +1167,8 @@ else if test "x$PYTHON" = "x"; then use_python="No (python is too old)" else - PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` +- PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION_SHORT + PYTHON_PREFIX=`$PYTHON -c "import sys; print(sys.prefix)"` - PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION_SHORT -+ if test $PYTHON_VERSION_MAJOR -gt 2; then -+ PYTHON_INCLUDES="${PYTHON_INCLUDES}m" -+ fi ++ PYTHON_INCLUDES=`$PYTHON-config --includes` # PYTHON_LIBS="-lpython$PYTHON_VERSION_SHORT" PYTHON_LIBS="-undefined dynamic_lookup" PYTHON_INSTALL_DIR="`$PYTHON $srcdir/config/config_python.py archsitelib`" -@@ -1548,7 +1551,7 @@ else +@@ -1548,7 +1548,7 @@ else if test "x$PYTHON34" = "x"; then use_python34="No (python34 is too old)" else diff --git a/graphviz.spec b/graphviz.spec index b5de4a0..888ec0e 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -61,7 +61,7 @@ Name: graphviz Summary: Graph Visualization Tools Version: 2.40.1 -Release: 49%{?dist} +Release: 50%{?dist} License: EPL-1.0 URL: http://www.graphviz.org/ # A bit hacking needed due to: https://gitlab.com/graphviz/graphviz/issues/1371 @@ -346,7 +346,7 @@ cp -a tclpkg/gv tclpkg/gv.python2 make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \ CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \ - PYTHON_INCLUDES=-I/usr/include/python%{python3_version}m PYTHON_LIBS="-lpython%{python3_version}m" \ + PYTHON_INCLUDES=`python3-config --includes` PYTHON_LIBS=`python3-config --libs` \ PYTHON_INSTALL_DIR=%{python3_sitearch} PYTHON=%{__python3} %if %{with python2} @@ -363,7 +363,7 @@ rm -rf %{buildroot} make DESTDIR=%{buildroot} \ docdir=%{buildroot}%{_docdir}/%{name} \ pkgconfigdir=%{_libdir}/pkgconfig \ - PYTHON_LIBS="-lpython%{python3_version}m" \ + PYTHON_LIBS=`python3-config --libs` \ PYTHON_INSTALL_DIR=%{python3_sitearch} \ install find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' @@ -611,6 +611,9 @@ php --no-php-ini \ %{_mandir}/man3/*.3tcl* %changelog +* Mon Jun 3 2019 Jaroslav Škarvada - 2.40.1-50 +- Fixed FTBFS with python-3.8 + * Sat Jun 01 2019 Jitka Plesnikova - 2.40.1-49 - Perl 5.30 rebuild