From 3062bec4f0f5f7322bd0d09d98131a6b1294dee8 Mon Sep 17 00:00:00 2001 From: yuexiaolong Date: Fri, 15 Mar 2024 15:08:25 +0800 Subject: [PATCH] fix A compilation error caused by an excessive swig version --- graphviz-2.40.1-per5-option-fixes.patch | 41 +++++++++++++++++++++++++ graphviz.spec | 7 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 graphviz-2.40.1-per5-option-fixes.patch diff --git a/graphviz-2.40.1-per5-option-fixes.patch b/graphviz-2.40.1-per5-option-fixes.patch new file mode 100644 index 0000000..44fac7a --- /dev/null +++ b/graphviz-2.40.1-per5-option-fixes.patch @@ -0,0 +1,41 @@ +diff --git a/configure.ac b/configure.ac +index 4d8c9a0..e875295 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1023,8 +1023,13 @@ else + if test "x$use_swig" != "xYes"; then + use_perl="No (swig not available)" + else +- if test `$SWIG -help 2>&1 | $EGREP -c '\-perl *- Generate'` = 0; then +- use_perl="No (swig does not support -perl option)" ++ if test `$SWIG -perl5 2>&1 | $EGREP -c '(Unable|No target)'` -eq 1; then ++ SWIG_PERL_OPT='-perl' ++ else ++ SWIG_PERL_OPT='-perl5' ++ fi ++ if test `$SWIG -help 2>&1 | $EGREP -c "(-perl|-perl5) *- Generate"` = 0; then ++ use_perl="No (swig does not support -perl or -perl5 option)" + else + AC_CHECK_PROG(PERL,perl,perl) + if test "x$PERL" = "x"; then +@@ -1057,6 +1062,7 @@ else + AC_SUBST([PERL_INCLUDES]) + AC_SUBST([PERL_LIBS]) + AC_SUBST([PERL_INSTALL_DIR]) ++ AC_SUBST([SWIG_PERL_OPT]) + fi + fi + fi +diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am +index 0b0b1f1..afd6c97 100644 +--- a/tclpkg/gv/Makefile.am ++++ b/tclpkg/gv/Makefile.am +@@ -171,7 +171,7 @@ libgv_perl_la_LDFLAGS = -module -avoid-version $(PERL_LD) + libgv_perl_la_CPPFLAGS = $(BASECPPFLAGS) $(PERL_CC) + $(PERL_data): gv_perl.cpp + gv_perl.cpp: gv.i +- $(SWIG) -c++ -perl -o gv_perl.cpp $(srcdir)/gv.i ++ $(SWIG) -c++ $(SWIG_PERL_OPT) -o gv_perl.cpp $(srcdir)/gv.i + + pkgphpdir = $(pkglibdir)/php + PHP_data = gv.php diff --git a/graphviz.spec b/graphviz.spec index 6647ab2..c54bd8d 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %if 0%{?rhel} == 8 %bcond_with python2 @@ -77,6 +77,7 @@ Patch3: graphviz-2.40.1-dotty-menu-fix.patch Patch4: graphviz-2.40.1-coverity-scan-fixes.patch Patch5: graphviz-2.40.1-CVE-2020-18032.patch Patch6: graphviz-2.40.1-makefile-docs-fix.patch +Patch7: graphviz-2.40.1-per5-option-fixes.patch Patch1000: 1000-graphviz-anolis-support-loongarch64.patch @@ -298,6 +299,7 @@ Various tcl packages (extensions) for the graphviz tools. %patch4 -p1 -b .coverity-scan-fixes %patch5 -p1 -b .CVE-2020-18032 %patch6 -p1 -b .makefile-docs-fix +%patch6 -p1 -b .per5-option-fixes.patch %patch1000 -p1 @@ -619,6 +621,9 @@ php --no-php-ini \ %{_mandir}/man3/*.3tcl* %changelog +* Fri Mar 15 2024 Xiaoloneg Yue - 2.40.1-43.0.2 +- Added per5 option patch + * Wed Sep 15 2021 Liwei Ge - 2.40.1-43.0.1 - Support loongarch64 platform -- Gitee