[polymake] Update to latest "perpetual beta" for perl 5.18 compatibility (bz 992813).

Jerry James jjames at fedoraproject.org
Thu Aug 15 04:43:40 UTC 2013


commit 4ad1335db2350d209f2ff7598e8f42d2d5fc1c46
Author: Jerry James <loganjerry at gmail.com>
Date:   Wed Aug 14 22:43:21 2013 -0600

    Update to latest "perpetual beta" for perl 5.18 compatibility (bz 992813).

 .gitignore            |    2 +-
 polymake-bliss.patch  |  649 -------------------------------------------------
 polymake-fedora.patch |  140 +++++++----
 polymake-perl.patch   |  343 --------------------------
 polymake.spec         |   68 +++---
 sources               |    2 +-
 6 files changed, 128 insertions(+), 1076 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1957bce..7caebc6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/polymake-2.12-rc3.tar.bz2
+/polymake-2.12.tar.bz2
diff --git a/polymake-fedora.patch b/polymake-fedora.patch
index 8bf9eaa..3b151eb 100644
--- a/polymake-fedora.patch
+++ b/polymake-fedora.patch
@@ -1,38 +1,24 @@
---- ./apps/group/src/Makefile.inc.orig	2011-04-11 10:17:49.000000000 -0600
-+++ ./apps/group/src/Makefile.inc	2013-02-27 15:10:34.341168779 -0700
-@@ -1,4 +1,4 @@
--  ExtraCXXFLAGS = -I$(ProjectTop)/external/permlib/include
-+  ExtraCXXFLAGS = -I/usr/include/permlib
+--- ./apps/polytope/src/Makefile.inc.orig	2013-08-14 13:17:09.000000000 -0600
++++ ./apps/polytope/src/Makefile.inc	2013-08-14 14:26:36.000000000 -0600
+@@ -1,12 +1,12 @@
+ ifeq (${ExtensionTop},)
+   StaticLibs := cdd lrs
  
- # Local Variables:
- # mode: Makefile
---- ./apps/polytope/src/Makefile.inc.orig	2012-01-13 15:32:36.000000000 -0700
-+++ ./apps/polytope/src/Makefile.inc	2013-02-27 15:10:34.340168780 -0700
-@@ -1,17 +1,12 @@
- ifndef ExtensionTop
--  ExternalLibs := cdd lrs sympol
--
 -  lrs_interface$O : ExtraCXXFLAGS = -I$(ProjectTop)/external/lrs
--  cdd_interface$O : ExtraCXXFLAGS = -I$(ProjectTop)/external/cdd/lib-src-gmp $(call addinclude, $(ProjectTop)/ext_lib/cdd/globals_gmp.h)
+-  cdd_interface$O : ExtraCXXFLAGS = -I$(ProjectTop)/external/cdd/lib-src-gmp $(call addinclude, $(ProjectTop)/staticlib/cdd/globals_gmp.h)
 -  cdd_float_interface$O : ExtraCXXFLAGS = -I$(ProjectTop)/external/cdd/lib-src
--
--  ExtraCXXFLAGS += -I$(ProjectTop)/external/permlib/include
--  sympol_interface$O : ExtraCXXFLAGS += -I$(ProjectTop)/external/sympol
 +  lrs_interface$O : ExtraCXXFLAGS = -I/usr/include/lrslib
-+  cdd_interface$O : ExtraCXXFLAGS = -I/usr/include/cddlib $(call addinclude, $(ProjectTop)/ext_lib/cdd/globals_gmp.h)
++  cdd_interface$O : ExtraCXXFLAGS = -I/usr/include/cddlib $(call addinclude, $(ProjectTop)/staticlib/cdd/globals_gmp.h)
 +  cdd_float_interface$O : ExtraCXXFLAGS = -I/usr/include/cddlib
+   to_interface$O : ExtraCXXFLAGS = -I$(ProjectTop)/external/TOSimplex
  
--  LIBS += $(BuildDir)/external/lrs/liblrsgmp$A $(BuildDir)/external/cdd/libcddgmp$A $(BuildDir)/external/cdd/libcdd$A $(BuildDir)/external/sympol/libsympol$A 
-+  LIBS += -llrsgmp -lcddgmp -lcdd -lsympol
+-  LIBS += $(BuildDir)/staticlib/lrs/liblrsgmp$A $(BuildDir)/staticlib/cdd/libcddgmp$A $(BuildDir)/staticlib/cdd/libcdd$A
++  LIBS += -llrsgmp -lcddgmp -lcdd
  endif
  
--ifneq ($(filter 4.4% 4.5%,${GCCversion}),)
-+ifneq ($(filter 4.4% 4.5% 4.6% 4.7% 4.8%,${GCCversion}),)
-   core_point_algo$O rel_int_point$O pointed_part$O : ExtraCXXFLAGS += -fno-strict-aliasing
- endif
- 
---- ./perl/polymake-config.orig	2011-05-30 16:51:45.000000000 -0600
-+++ ./perl/polymake-config	2013-02-27 15:14:32.177979991 -0700
+ ifneq ($(filter 4.4% 4.5%,${GCCversion}),)
+--- ./perl/polymake-config.orig	2013-08-14 13:17:08.000000000 -0600
++++ ./perl/polymake-config	2013-08-14 14:26:36.000000000 -0600
 @@ -126,9 +126,6 @@ while (defined ($_=shift)) {
  
     } elsif ($_ eq "--ldflags") {
@@ -46,46 +32,106 @@
 @@ -146,8 +143,6 @@ while (defined ($_=shift)) {
        close CC;
        if ($^O eq "darwin") {
-          $ldflags="$conf{ARCHFLAGS} $ldflags";
+          $ldflags="$conf{ARCHFLAGS} $ldflags -flat_namespace";
 -      } elsif ($add_rpath) {
 -         $ldflags.=" -Wl,-rpath,$conf{InstallLib}";
        }
        $ldflags=~s/^\s+//; $ldflags=~s/\s+$//; $ldflags=~s/\s{2,}/ /g;
        if ($debug_asked=defined($debug)) {
---- ./support/corelib.make.orig	2012-03-02 15:37:49.000000000 -0700
-+++ ./support/corelib.make	2013-02-27 15:10:34.340168780 -0700
-@@ -90,7 +90,9 @@ ${CoreLib} : ${SharedObjects} ${Standalo
- ifneq (${LDcallableFlags},none)
-   # no explicit dependence on XSObjects here because they are built in compile-xs using the Makefile generated by xsubpp
-   ${CallableLib} : ${SharedObjects} ${CallableSharedObjects} ${GlueObjects} ${CallableGlueObjects} ${XXSObjects} $(patsubst %,${SourceDir}/perl/%.xs,${XSModules})
--	${CXX} ${LDcallableFlags} -o $@ ${SharedObjects} ${CallableSharedObjects} ${GlueObjects} ${CallableGlueObjects} ${XXSObjects} ${XSObjects} ${LDFLAGS} ${PERLccdlflags} -lmpfr -lgmp ${LIBXML2_LIBS} ${LIBS} -L${PERLarchlib}/CORE -lperl
-+	${CXX} ${LDcallableFlags} -o ${PerlExtDir}/libpolymake.so. at VERSION@ ${SharedObjects} ${CallableSharedObjects} ${GlueObjects} ${CallableGlueObjects} ${XXSObjects} ${XSObjects} ${LDFLAGS} ${PERLccdlflags} -Wl,-h,libpolymake.so. at MAJVER@ -lmpfr -lgmp ${LIBXML2_LIBS} ${LIBS} -L${PERLarchlib}/CORE -lperl
-+	ln -s libpolymake.so. at VERSION@ ${PerlExtDir}/libpolymake.so. at MAJVER@
-+	ln -s libpolymake.so. at MAJVER@ $@
- else
-   ${CallableLib} : ${GlueObjects} ${XXSObjects} $(patsubst %,${SourceDir}/perl/%.xs,${XSModules})
+--- ./bundled/group/apps/polytope/src/Makefile.inc.orig	2013-08-14 13:17:11.000000000 -0600
++++ ./bundled/group/apps/polytope/src/Makefile.inc	2013-08-14 14:26:36.000000000 -0600
+@@ -1,10 +1,10 @@
+ ifeq (${ImportedIntoExtension},)
+   StaticLibs := sympol
+ 
+-  sympol_interface$O : ExtraCXXFLAGS += -I${ExtensionTop}/external/sympol
+-  sympol_raycomputation_beneathbeyond$O : ExtraCXXFLAGS += -I${ExtensionTop}/external/sympol
++  sympol_interface$O : ExtraCXXFLAGS += -I/usr/include/sympol
++  sympol_raycomputation_beneathbeyond$O : ExtraCXXFLAGS += -I/usr/include/sympol
+ 
+-  LIBS += ${BuildDir}/staticlib/sympol/libsympol$A ${BuildDir}/../../staticlib/cdd/libcddgmp$A
++  LIBS += -lsympol -lcddgmp
  endif
---- ./support/configure.pl.orig	2012-03-02 02:26:14.000000000 -0700
-+++ ./support/configure.pl	2013-02-27 15:10:34.340168780 -0700
-@@ -488,10 +488,6 @@ if (defined $GMP) {
+ 
+ # Local Variables:
+--- ./bundled/group/configure.pl.orig	2013-08-14 13:17:11.000000000 -0600
++++ ./bundled/group/configure.pl	2013-08-14 14:26:36.000000000 -0600
+@@ -29,7 +29,7 @@ sub proceed {
+    my ($options)=@_;
+    my $boost_path;
+    # everything can include permlib headers
+-   $CXXflags='-I${ExtensionTop}/external/permlib/include';
++   $CXXflags='-I/usr/include/permlib';
+ 
+    if (defined ($boost_path=$options->{boost})) {
+       $boost_path .= '/include' if (-d "$boost_path/include/boost");
+--- ./bundled/group/staticlib/sympol/Makefile.inc.orig	2013-08-14 13:17:11.000000000 -0600
++++ ./bundled/group/staticlib/sympol/Makefile.inc	2013-08-14 14:26:36.000000000 -0600
+@@ -4,7 +4,7 @@ src := $(ExtensionTop)/external/sympol/s
+ 
+ vpath %.cpp $(src)
+ 
+-libsympol : ExtraCXXFLAGS := -I$(ExtensionTop)/external/permlib/include -I$(ExtensionTop)/external/sympol/sympol -I$(ProjectTop)/external/lrs -DGMP -DLRS_QUIET -DGMPRATIONAL -I$(ProjectTop)/external/cdd/lib-src-gmp $(call addinclude, $(ProjectTop)/staticlib/cdd/globals_gmp.h)
++libsympol : ExtraCXXFLAGS := -I/usr/include/permlib -I/usr/include/sympol -I/usr/include/lrslib -DGMP -DLRS_QUIET -DGMPRATIONAL -I/usr/include/cddlib $(call addinclude, $(ProjectTop)/staticlib/cdd/globals_gmp.h)
+ 
+ # Local Variables:
+ # mode: Makefile
+--- ./support/configure.pl.orig	2013-08-14 13:17:10.000000000 -0600
++++ ./support/configure.pl	2013-08-14 14:26:59.000000000 -0600
+@@ -372,7 +372,7 @@ if (defined $CC) {
+ print "ok ($CXX is ", defined($GCCversion) ? "GCC $GCCversion" : defined($CLANGversion) ? "CLANG $CLANGversion" : "ICC $ICCversion", ")\n";
+ 
+ $PERL     =$vars{PERL}     || $^X;
+-$CXXOPT   =$vars{CXXOPT}   || "-O3";
++$CXXOPT   =$vars{CXXOPT}   || "-O2";
+ $CXXDEBUG =$vars{CXXDEBUG} || "";
+ $Cflags   =$vars{CFLAGS}   || "";
+ $CXXflags =$vars{CXXFLAGS} || $Cflags;
+@@ -557,10 +557,6 @@ if (defined $GMP) {
     $CXXflags .= " -I$GMP/include";
     my $libdir=get_libdir($GMP, "gmp");
     $LDflags .= " -L$libdir";
--   if ( !$WithFink && exists $options{gmp}) {  # this does not work for Mac OS 10.4
+-   if (($^O ne "darwin" || $options{fink} eq ".none.") && exists $options{gmp}) {
 -      # non-standard location
 -      $LDflags .= " -Wl,-rpath,$libdir";
 -   }
  }
  
  my $MPFR=$options{mpfr};
-@@ -500,10 +496,6 @@ if (defined($MPFR) && $MPFR ne $GMP) {
+@@ -569,10 +565,6 @@ if (defined($MPFR) && $MPFR ne $GMP) {
     $CXXflags .= " -I$MPFR/include";
     my $libdir=get_libdir($MPFR, "mpfr");
     $LDflags .= " -L$libdir";
--   if ( !$WithFink ) {  # this does not work for Mac OS 10.4
+-   if ($^O ne "darwin" || $options{fink} eq ".none.") {
 -      # non-standard location
 -      $LDflags .= " -Wl,-rpath,$libdir";
 -   }
  }
  
- my $BOOST=$options{boost};
+ if ($check_prereq) {
+--- ./staticlib/cdd/Makefile.inc.orig	2013-08-14 13:17:11.000000000 -0600
++++ ./staticlib/cdd/Makefile.inc	2013-08-14 16:09:08.000000000 -0600
+@@ -1,6 +1,3 @@
+-OwnLibraries := libcdd libcddgmp
+-LibModules := cddio cddmp cddlib cddcore cddlp cddproj setoper
+-
+ ExtraCFLAGS := -fvisibility=hidden 
+ 
+ ifeq "$(MAKECMDGOALS)" "libcdd"
+@@ -8,8 +5,6 @@ ifeq "$(MAKECMDGOALS)" "libcdd"
+ else
+   src := $(ProjectTop)/external/cdd/lib-src-gmp
+ 
+-  LibModules := $(LibModules) $(patsubst cdd%,cdd%_f,$(LibModules))
+-
+   $(addsuffix $(LO), $(LibModules)) : $(SourceDir)/globals_gmp.h
+ 
+   libcddgmp : ExtraCFLAGS += -DGMPRATIONAL $(call addinclude, $(SourceDir)/globals_gmp.h)
+--- ./staticlib/lrs/Makefile.inc.orig	2013-08-14 13:17:11.000000000 -0600
++++ ./staticlib/lrs/Makefile.inc	2013-08-14 16:09:21.000000000 -0600
+@@ -1,5 +1,3 @@
+-OwnLibraries := liblrsgmp
+-LibModules := lrslib lrsgmp
+ src := $(ProjectTop)/external/lrs
+ vpath %.c $(src)
+ 
diff --git a/polymake.spec b/polymake.spec
index 0d5b199..9e5d9cc 100644
--- a/polymake.spec
+++ b/polymake.spec
@@ -1,20 +1,30 @@
+# FIXME: polymake supposedly has Singular support, but it needs an older
+# version of Singular than we have in Fedora.  See if it can be ported to the
+# newer version with moderate effort.
+
 # TESTING NOTE: "make test" does not work, because the test drivers are not
 # distributed with the released sources.  A Subversion repository containing
 # all of the sources, including the test drivers, was made available recently.
 # Once the next release of polymake occurs, we will extract the necessary test
 # drivers from subversion and produce a check script.
 
-# Release candidates are sometimes promoted to release without removing the tag
-%global rctag -rc3
+# Date of the "perpetual beta" subversion snapshot
+%global svndate 20130813
 
 Name:           polymake
 Version:        2.12
-Release:        9%{?dist}
+Release:        10.svn%{svndate}%{?dist}
 Summary:        Algorithms on convex polytopes and polyhedra
 
 License:        GPLv2+
 URL:            http://polymake.org/
-Source0:        http://polymake.org/lib/exe/fetch.php/download/%{name}-%{version}%{rctag}.tar.bz2
+#Source0:        http://polymake.org/lib/exe/fetch.php/download/%%{name}-%%{version}%%{rctag}.tar.bz2
+# Sources taken from the polymake "perpetual beta".  Create the tarball thusly:
+#   svn checkout --username "guest" --password "" http://polymake.mathematik.tu-darmstadt.de/svn/polymake/snapshots/%{svndate} polymake-%{version}
+#   rm -fr polymake-%{version}/.svn polymake-%{version}/external/{cdd,lrs}
+#   rm -fr polymake-%{version}/bundled/jreality/external/jreality/.svn
+#   tar cjf polymake-%{version}.tar.bz2 polymake-%{version}
+Source0:        %{name}-%{version}.tar.bz2
 # Man page written by Jerry James from text found in the sources.  Therefore,
 # the copyright and license are the same as for the sources.
 Source1:        %{name}.1
@@ -22,17 +32,14 @@ Source1:        %{name}.1
 # against existing system libraries instead of building them from source,
 # and do not use -rpath.
 Patch0:         %{name}-fedora.patch
-# This patch was sent upstream 1 Mar 2012.  Polymake uses nauty, which has a
-# non-free license.  This patch converts polymake to bliss, which is free.
-Patch1:         %{name}-bliss.patch
-# Patch from upstream: adapt the sources to perl >= 5.15.
-Patch2:         %{name}-perl.patch
 # This patch was sent upstream 20 Mar 2013.  Fix a call to an lrslib function
 # that segfaults when given a NULL argument.
-Patch3:         %{name}-lrslib.patch
+Patch1:         %{name}-lrslib.patch
 
 BuildRequires:  bliss-devel
+BuildRequires:  boost-devel
 BuildRequires:  cddlib-devel
+BuildRequires:  cmake
 BuildRequires:  libxml2-devel
 BuildRequires:  lrslib-devel
 BuildRequires:  mpfr-devel
@@ -105,37 +112,28 @@ This package contains documentation for %{name}.
 %setup -q
 %patch0
 %patch1
-%patch2
-%patch3
 
 # Make sure we don't build against the bundled libraries.
-# Don't delete the jreality directory, though, or the installer crashes.
-rm -fr external/{cdd,lrs,nauty,permlib,sympol}
-
-# Don't force -O3
-sed -i "s/-O3//" support/configure.pl
-
-# Give the main library an soname (markers added by the -libs patch)
-sed -i "s/@VERSION@/%{sover}/;s/@MAJVER@/%{major}/" support/corelib.make
+rm -fr external/{cdd,lrs}
 
 # Adapt to a newer version of sympol
 sed -i "s|yal/||;s|symmetrygroupconstruction/||" \
-    apps/polytope/src/sympol_interface.cc
+    bundled/group/apps/polytope/src/sympol_interface.cc
 
 %build
-export CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/eigen3"
-export CXXFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/eigen3"
+export CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/eigen3 -Wno-unused-local-typedefs"
+export CXXFLAGS="$CFLAGS"
 export LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed"
 export Arch=%{_arch}
 # NOT an autoconf-generated configure script; do not use %%configure.
 ./configure --build=%{_arch} --prefix=%{_prefix} --libdir=%{_libdir} \
-  --libexecdir=%{polydir} --without-java
+  --libexecdir=%{polydir} --without-java --without-javaview
 make %{?_smp_mflags} all
 
 # Help the debuginfo generator find generated files
 cd build.%{_arch}
-cp -p perlx-*linux-*/CPlusPlus.xxs lib/CPlusPlus.xxs
-cp -p perlx-*linux-*/CPlusPlus.cc lib/CPlusPlus.xxs.c
+cp -p perlx-*linux-*/CPlusPlus.xxs lib/core/CPlusPlus.xxs
+cp -p perlx-*linux-*/CPlusPlus.cc lib/core/CPlusPlus.cc
 
 %install
 # Don't recompile the main library with DESTDIR compiled in
@@ -158,12 +156,6 @@ make %{?_smp_mflags} all
 chmod 0755 %{buildroot}%{polydir}/lib/*.so
 cp -p build.%{_arch}/lib/*.so %{buildroot}%{polydir}/lib
 
-# Fix up the shared library links
-mv %{buildroot}%{_libdir}/lib%{name}.so \
-   %{buildroot}%{_libdir}/lib%{name}.so.%{version}
-ln -s lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so.%{major}
-ln -s lib%{name}.so.%{major} %{buildroot}%{_libdir}/lib%{name}.so
-
 # Install the man page
 mkdir -p %{buildroot}%{_mandir}/man1
 sed "s/@VERSION@/%{version}/" %{SOURCE1} > %{buildroot}%{_mandir}/man1/%{name}.1
@@ -183,15 +175,18 @@ chmod 0755 %{buildroot}%{_bindir}/*
 chmod 0755 %{buildroot}%{_libdir}/lib*
 find %{buildroot}%{polydir} -name \*.so | xargs chmod 0755
 
+# Remove the buildroot from configuration files
+sed -i 's,%{buildroot},,' %{buildroot}%{polydir}/bundled/bliss/conf.make
+sed -i 's,%{buildroot},,' %{buildroot}%{polydir}/bundled/group/conf.make
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
-%doc COPYING
 %{_bindir}/%{name}
 %{_mandir}/man1/%{name}.1*
-%{_libdir}/lib%{name}.so.*
+%{_libdir}/lib%{name}*.so.*
 %{polydir}/
 %{_datadir}/%{name}/
 %exclude %{_datadir}/%{name}/lib/
@@ -200,12 +195,15 @@ find %{buildroot}%{polydir} -name \*.so | xargs chmod 0755
 %{_bindir}/%{name}-config
 %{_includedir}/%{name}/
 %{_datadir}/%{name}/lib/
-%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{name}*.so
 
 %files doc
 %doc doc/*
 
 %changelog
+* Wed Aug 14 2013 Jerry James <loganjerry at gmail.com> - 2.12-10.svn20130813
+- Update to latest "perpetual beta" for perl 5.18 compatibility (bz 992813)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.12-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index d6b3ca6..96e63bc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f07ecafc7a946001c38cdd20e6434b09  polymake-2.12-rc3.tar.bz2
+d7bd05a247d2991aef7a2d4e0ed0cdd0  polymake-2.12.tar.bz2


More information about the scm-commits mailing list