Blame polymake-fedora.patch

9ce504
--- bundled/cdd/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/cdd/configure.pl	2017-03-28 20:46:01.130083651 -0600
1bc623
@@ -52,7 +52,6 @@ sub proceed {
1bc623
       my $cdd_lib=Polymake::Configure::get_libdir($cdd_path, "cddgmp");
1bc623
       if (-f "$cdd_lib/libcddgmp.$Config::Config{so}" ) {
1bc623
          $LDflags = "-L$cdd_lib";
1bc623
-         $LDflags .= " -Wl,-rpath,$cdd_lib" unless ($cdd_path eq "/usr");
1bc623
       }
1bc623
       if (!$CXXflags or !$LDflags) {
1bc623
          die "Invalid installation location of cddlib: header file cdd.h and/or library libcddgmp.$Config::Config{so} not found.\n",
1bc623
@@ -65,7 +64,6 @@ sub proceed {
1bc623
       $cdd_path .= "include: $cdd_inc ";
1bc623
    }
1bc623
    if (defined ($cdd_lib=$options->{'cdd-lib'})) {
1bc623
-      $LDflags = "-L$cdd_lib -Wl,-rpath,$cdd_lib";
1bc623
       $cdd_path .= "lib: $cdd_lib";
1bc623
    }
1bc623
 
9ce504
--- bundled/libnormaliz/apps/polytope/src/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/libnormaliz/apps/polytope/src/Makefile.inc	2017-03-28 20:58:44.103003083 -0600
Jerry James 74d8a2
@@ -1,4 +1,5 @@
78afad
-ExtraCXXFLAGS = -I$(ExtensionTop)/external/libnormaliz
78afad
+ExtraCXXFLAGS = -I/usr/include/libnormaliz
78afad
+LIBS += -lnormaliz
Jerry James 74d8a2
 
9ce504
 # Local Variables:
9ce504
 # mode: Makefile
9ce504
--- bundled/libnormaliz/apps/polytope/src/normaliz.cc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/libnormaliz/apps/polytope/src/normaliz.cc	2017-03-28 20:52:15.183466846 -0600
9ce504
@@ -95,7 +95,7 @@ namespace libnormaliz {
9ce504
 #endif
9ce504
 #endif
Jerry James 74d8a2
 
78afad
-#include "libnormaliz/libnormaliz-all.cpp"
Jerry James 74d8a2
+#include <libnormaliz cone.h="">
Jerry James 74d8a2
 
9ce504
 #if defined(__GNUC__) && !defined(__clang__)
9ce504
 #pragma GCC diagnostic pop
9ce504
--- bundled/lrs/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/lrs/configure.pl	2017-03-28 20:47:36.352644537 -0600
1bc623
@@ -42,7 +42,6 @@ sub proceed {
1bc623
       my $lrs_lib=Polymake::Configure::get_libdir($lrs_path, "lrs");
1bc623
       if (-f "$lrs_inc/lrslib.h" && -f "$lrs_lib/liblrsgmp.$Config::Config{so}" ) {
1bc623
          $CXXflags="-I$lrs_inc";
1bc623
-         $LDflags="-L$lrs_lib -Wl,-rpath,$lrs_lib";
1bc623
       } elsif (-f "$lrs_inc/lrslib.h" && -f "$lrs_lib/liblrsgmp.a" ) {
1bc623
          $CXXflags="-I$lrs_inc";
1bc623
          $LDflags="-L$lrs_lib";
9ce504
--- bundled/nauty/apps/graph/src/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/nauty/apps/graph/src/Makefile.inc	2017-03-28 20:53:17.303208302 -0600
9ce504
@@ -1,13 +1,13 @@
f85e0a
 ifeq (${ImportedIntoExtension},)
f85e0a
-  StaticLibs := nauty
f85e0a
+  # StaticLibs := nauty
f85e0a
 
9ce504
   ifeq (${NautySrc},)
9ce504
     NautySrc := ${ExtensionTop}/external/nauty
9ce504
   endif
9ce504
 
9ce504
-  GraphIso$O : ExtraCXXFLAGS = -DBIGNAUTY -I${BuildDir}/staticlib/nauty -I${NautySrc}
f85e0a
+  GraphIso$O : ExtraCXXFLAGS = -DBIGNAUTY -I/usr/include/nauty
f85e0a
 
f85e0a
-  LIBS += ${BuildDir}/staticlib/nauty/libnauty$A
f85e0a
+  LIBS += -lnauty
f85e0a
 endif
f85e0a
 
f85e0a
 # Local Variables:
9ce504
--- bundled/nauty/staticlib/nauty/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/nauty/staticlib/nauty/Makefile.inc	2017-03-28 20:55:16.583711852 -0600
0b30ad
@@ -1,10 +1,10 @@
f85e0a
-OwnLibrary := libnauty
f85e0a
-LibModules := nauty naututil nautil nautinv naugraph rng naurng schreier nausparse nautaux
0b30ad
-ifeq (${NautySrc},)
0b30ad
-  src := ${ExtensionTop}/external/nauty
0b30ad
-else
0b30ad
-  src := ${NautySrc}
0b30ad
-endif
f85e0a
+#OwnLibrary := libnauty
f85e0a
+#LibModules := nauty naututil nautil nautinv naugraph rng naurng schreier nausparse nautaux
0b30ad
+#ifeq (${NautySrc},)
0b30ad
+#  src := ${ExtensionTop}/external/nauty
0b30ad
+#else
0b30ad
+#  src := ${NautySrc}
0b30ad
+#endif
f85e0a
 vpath %.c $(src)
f85e0a
 
f85e0a
 # We need to disable avx2 for some gcc versions as it produces invalid relocations
9ce504
@@ -15,21 +15,21 @@ ifdef GCCversion
f85e0a
   endif
f85e0a
 endif
f85e0a
 
f85e0a
-ifeq "$(wildcard nauty.h)" ""
f85e0a
-  override _system := $(shell uname -s)
f85e0a
-  ifeq "$(_system)" "Darwin"
f85e0a
-    override _hide := mv Makefile Makefile.hidden;
f85e0a
-    override _restore := ;mv Makefile.hidden Makefile
f85e0a
-  endif
9ce504
-
9ce504
-  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
9ce504
-endif
f85e0a
+#ifeq "$(wildcard nauty.h)" ""
f85e0a
+#  override _system := $(shell uname -s)
f85e0a
+#  ifeq "$(_system)" "Darwin"
f85e0a
+#    override _hide := mv Makefile Makefile.hidden;
f85e0a
+#    override _restore := ;mv Makefile.hidden Makefile
f85e0a
+#  endif
9ce504
+#
f85e0a
+#  override _dummy := $(shell ${_hide} CC=${CC} CFLAGS="${Cflags}" ${src}/configure --quiet 2>/dev/null; rm makefile ${_restore})
f85e0a
+#endif
f85e0a
 
9ce504
 # force include nauty headers here on the command line to make sure that we pick
9ce504
 # up the newly generated ones instead (wrong?) ones from the original tarball
9ce504
 # (current directory of the source file is always searched first and -I- is deprecated)
9ce504
-ExtraCFLAGS := -DBIGNAUTY -I. -include $(CURDIR)/nauty.h -include $(CURDIR)/naututil.h -include $(CURDIR)/gtools.h -I${src}
f85e0a
-ExtraCLEAN := nauty.h naututil.h gtools.h config.*
f85e0a
+ExtraCFLAGS := -DBIGNAUTY -I/usr/include/nauty
f85e0a
+#ExtraCLEAN := nauty.h naututil.h gtools.h config.*
f85e0a
 
f85e0a
 # Local Variables:
f85e0a
 # mode: Makefile
9ce504
--- bundled/ppl/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/ppl/configure.pl	2017-03-28 20:46:46.977872227 -0600
1bc623
@@ -35,7 +35,6 @@ sub proceed {
1bc623
       my $ppl_lib=Polymake::Configure::get_libdir($ppl_path, "ppl");
1bc623
       if (-f "$ppl_inc/ppl.hh" && -f "$ppl_lib/libppl.$Config::Config{so}") {
1bc623
          $CXXflags.="-I$ppl_inc";
1bc623
-         $LDflags="-L$ppl_lib -Wl,-rpath,$ppl_lib";
1bc623
       } else {
1bc623
          die "Invalid installation location of libppl: header file ppl.hh and/or library libppl.$Config::Config{so} not found\n";
1bc623
       }
9ce504
--- bundled/singular/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/singular/configure.pl	2017-03-28 20:48:06.064507522 -0600
9ce504
@@ -40,7 +40,6 @@ sub singular_config_approach {
9ce504
    chomp ($singular_prefix = `$singular_config --prefix`);
9ce504
    chomp $singular_prefix;
1bc623
    $LDflags =~ s/ -l\w+//g;
1bc623
-   $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
1bc623
    my $libdir = $1;
1bc623
 
9ce504
    # newer versions of singular need -lsingular_resources while older ones needed -lresources
9ce504
@@ -63,9 +62,6 @@ sub pkg_config_approach {
9ce504
    chomp ($CXXflags=`$pkg_config --cflags Singular`);
9ce504
    die "$pkg_config failed: $!" if ($?);
9ce504
    chomp ($LDflags=`$pkg_config --libs-only-other --libs-only-L Singular`);
9ce504
-   if (defined ($options->{singular})){
9ce504
-      $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
9ce504
-   }
9ce504
    chomp ($Libs=`$pkg_config --libs-only-l Singular`);
9ce504
    return $pc_singular_prefix;
9ce504
 }
9ce504
--- bundled/sympol/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/sympol/configure.pl	2017-03-28 20:47:05.905784941 -0600
9ce504
@@ -47,7 +47,6 @@ sub proceed {
9ce504
       my $sympol_lib=Polymake::Configure::get_libdir($sympol_path, "sympol");
9ce504
       if (-f "$sympol_lib/libsympol.$Config::Config{so}" ) {
9ce504
          $LDflags = "-L$sympol_lib";
9ce504
-         $LDflags .= " -Wl,-rpath,$sympol_lib" unless ($sympol_path eq "/usr");
9ce504
       }
9ce504
       if (!$CXXflags or !$LDflags) {
9ce504
          die "Invalid installation location of sympol: header file symmetrycomputation.h and/or library libsympol.$Config::Config{so} not found.\n",
9ce504
@@ -61,7 +60,6 @@ sub proceed {
1bc623
    }
9ce504
    if (defined ($sympol_lib=$options->{'sympol-lib'})) {
9ce504
       $LDflags = " -L$sympol_lib";
9ce504
-      $LDflags .= " -Wl,-rpath,$sympol_lib" unless ($sympol_lib =~ m#^/usr/lib#);
9ce504
       $sympol_path .= "lib: $sympol_lib";
9ce504
    }
9ce504
 
9ce504
--- bundled/sympol/staticlib/sympol/Makefile.inc.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ bundled/sympol/staticlib/sympol/Makefile.inc	2017-03-28 20:50:52.455811162 -0600
9ce504
@@ -4,10 +4,10 @@ src := ${ExtensionTop}/external/sympol/s
1bc623
 
9ce504
 vpath %.cpp $(src)
9ce504
 
9ce504
-ExtraCXXFLAGS := -I${ExtensionTop}/external/sympol/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL
9ce504
+ExtraCXXFLAGS := -I/usr/include/sympol ${LrsCflags} -DGMP -DLRS_QUIET ${CddCflags} -DGMPRATIONAL
9ce504
 
9ce504
 ifneq ($(filter ${ExternalHeaders},permlib),)
9ce504
-  ExtraCXXFLAGS += -I${ProjectTop}/include/external/permlib
9ce504
+  ExtraCXXFLAGS += -I$/usr/include/permlib
9ce504
 endif
9ce504
 
9ce504
 # Local Variables:
9ce504
--- perl/polymake-config.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ perl/polymake-config	2017-03-28 20:56:20.646445222 -0600
9ce504
@@ -127,9 +127,6 @@ while (defined ($_=shift)) {
Jerry James 74d8a2
 
Jerry James 74d8a2
    } elsif ($_ eq "--ldflags") {
Jerry James 74d8a2
       my $ldflags=$conf{LDflags};
Jerry James 74d8a2
-      if ($ldflags !~ /(?:^|\s)-L$conf{InstallLib}(?:\s|$)/) {
Jerry James 74d8a2
-         $ldflags="-L$conf{InstallLib} $ldflags";
Jerry James 74d8a2
-      }
Jerry James 74d8a2
       my $add_rpath=1;
Jerry James 74d8a2
       open CF, ">$tmpfile.cc" or die "can't create temporary file $tmpfile.cc: $!\n";
Jerry James 74d8a2
       print CF "int main() { return 0; }\n";
9ce504
@@ -147,8 +144,6 @@ while (defined ($_=shift)) {
Jerry James 74d8a2
       close CC;
Jerry James 74d8a2
       if ($^O eq "darwin") {
Jerry James 74d8a2
          $ldflags="$conf{ARCHFLAGS} $ldflags -flat_namespace";
Jerry James 74d8a2
-      } elsif ($add_rpath) {
Jerry James 74d8a2
-         $ldflags.=" -Wl,-rpath,$conf{InstallLib}";
Jerry James 74d8a2
       }
Jerry James 74d8a2
       $ldflags=~s/^\s+//; $ldflags=~s/\s+$//; $ldflags=~s/\s{2,}/ /g;
Jerry James 74d8a2
       if ($debug_asked=defined($debug)) {
9ce504
--- support/configure.pl.orig	2017-03-28 03:30:14.000000000 -0600
9ce504
+++ support/configure.pl	2017-03-28 20:57:46.759165080 -0600
9ce504
@@ -442,7 +442,7 @@ if (defined($GCCversion) or defined($CLA
9ce504
 }
4ad133
 
4ad133
 $PERL     =$vars{PERL}     || $^X;
4ad133
-$CXXOPT   =$vars{CXXOPT}   || "-O3";
4ad133
+$CXXOPT   =$vars{CXXOPT}   || "-O2";
4ad133
 $CXXDEBUG =$vars{CXXDEBUG} || "";
4ad133
 $Cflags   =$vars{CFLAGS}   || "";
4ad133
 $CXXflags =$vars{CXXFLAGS} || $Cflags;
9ce504
@@ -763,10 +763,6 @@ if (defined $GMP) {
Jerry James ba7c26
    $CXXflags .= " -I$GMP/include";
Jerry James ba7c26
    my $libdir=get_libdir($GMP, "gmp");
Jerry James ba7c26
    $LDflags .= " -L$libdir";
4ad133
-   if (($^O ne "darwin" || $options{fink} eq ".none.") && exists $options{gmp}) {
Jerry James ba7c26
-      # non-standard location
Jerry James ba7c26
-      $LDflags .= " -Wl,-rpath,$libdir";
Jerry James ba7c26
-   }
Jerry James ba7c26
 }
Jerry James ba7c26
 
Jerry James ba7c26
 my $MPFR=$options{mpfr};
9ce504
@@ -775,10 +771,6 @@ if (defined($MPFR) && $MPFR ne $GMP) {
Jerry James ba7c26
    $CXXflags .= " -I$MPFR/include";
Jerry James ba7c26
    my $libdir=get_libdir($MPFR, "mpfr");
Jerry James ba7c26
    $LDflags .= " -L$libdir";
4ad133
-   if ($^O ne "darwin" || $options{fink} eq ".none.") {
Jerry James ba7c26
-      # non-standard location
Jerry James ba7c26
-      $LDflags .= " -Wl,-rpath,$libdir";
Jerry James ba7c26
-   }
Jerry James ba7c26
 }
Jerry James ba7c26
 
9ce504
 if (defined($boost_path)) {