diff --git a/polymake-exit.patch b/polymake-exit.patch new file mode 100644 index 0000000..1aa52dc --- /dev/null +++ b/polymake-exit.patch @@ -0,0 +1,34 @@ +--- ./lib/callable/src/perl/Main.cc.orig 2014-10-13 06:14:22.000000000 -0600 ++++ ./lib/callable/src/perl/Main.cc 2015-01-19 12:30:00.000000000 -0700 +@@ -37,6 +37,7 @@ namespace { + + const char globalScope[]="Polymake::Scope"; + ++static bool need_cleanup; + GV *globalScope_gv=NULL; + + void destroy_perl(pTHXx) +@@ -54,13 +55,14 @@ PerlInterpreter *static_perl = NULL; + void emergency_cleanup() __attribute__((destructor)); + void emergency_cleanup() + { +- if (PL_curinterp) { ++ if (PL_curinterp && need_cleanup) { + #ifdef PERL_IMPLICIT_CONTEXT + dTHX; + destroy_perl(aTHX); + #else + destroy_perl(static_perl); + #endif ++ need_cleanup = false; + } + } + +@@ -158,6 +160,7 @@ Main::Main(const std::string& user_opts, + pTHXx = perl_alloc(); + PL_perl_destruct_level = 1; + perl_construct(aTHXx); ++ need_cleanup = true; + PL_exit_flags |= PERL_EXIT_DESTRUCT_END; + if (perl_parse(aTHXx, xs_init, argc, (char**)argv, *env)) { + destroy_perl(aTHXx); diff --git a/polymake.spec b/polymake.spec index 1db137d..cff9d60 100644 --- a/polymake.spec +++ b/polymake.spec @@ -11,7 +11,7 @@ Name: polymake Version: 2.13 -Release: 14%{?gitdate:.git%{gitdate}}%{?dist} +Release: 15%{?gitdate:.git%{gitdate}}%{?dist} Summary: Algorithms on convex polytopes and polyhedra License: GPLv2+ @@ -32,11 +32,13 @@ Patch0: %{name}-fedora.patch Patch1: %{name}-lrslib.patch # Avoid -Werror=format-security failures. Patch2: %{name}-format.patch -# Fedora-specific patch. Upstream code is written for Singular-3-1-6 + git, -# but we have vanilla Singular-3-1-6. This patch adapts to the older Singular. +# Fedora-specific patch. Upstream code is written for Singular-3-1-7, but we +# have Singular-3-1-6. This patch adapts to the older Singular. Patch3: %{name}-singular.patch # Fix template gaffes in the libnormaliz interface code Patch4: %{name}-libnormaliz.patch +# Fix a crash on exit +Patch5: %{name}-exit.patch BuildRequires: bliss-devel BuildRequires: boost-devel @@ -134,6 +136,7 @@ This package contains documentation for %{name}. %patch2 %patch3 %patch4 +%patch5 fixtimestamp() { touch -r $1.orig $1 @@ -257,6 +260,9 @@ sed -i 's,%{buildroot},,' %{buildroot}%{polydir}/bundled/singular/conf.make %doc doc/* %changelog +* Mon Jan 19 2015 Jerry James - 2.13-15.git20141013 +- Add -exit patch to fix crash on exit + * Thu Jan 15 2015 Jerry James - 2.13-14.git20141013 - Rebuild for eigen3 3.2.3