[gfan] Update URLs.

Jerry James jjames at fedoraproject.org
Wed Mar 11 14:22:03 UTC 2015


commit 5a776c13fd5e3f135040783d8c86a5d9870ede9c
Author: Jerry James <loganjerry at gmail.com>
Date:   Wed Mar 11 08:21:40 2015 -0600

    Update URLs.
    
    Also:
    - Link with $RPM_LD_FLAGS.
    - Reenable tests.

 gfan-warning.patch | 209 +++++++++++++++++++++++++++++++----------------------
 gfan.spec          |  21 ++++--
 2 files changed, 139 insertions(+), 91 deletions(-)
---
diff --git a/gfan-warning.patch b/gfan-warning.patch
index 066ab65..7b5970b 100644
--- a/gfan-warning.patch
+++ b/gfan-warning.patch
@@ -1,3 +1,47 @@
+--- ./app_fancoarsening.cpp.orig	2011-01-25 08:33:15.000000000 -0700
++++ ./app_fancoarsening.cpp	2012-01-09 11:27:29.299438352 -0700
+@@ -33,12 +33,14 @@ public:
+     return false;
+   }
+ 
++#if 0
+   IntegerVectorList inequalitiesForCone(IntegerVector const &codim1interior, IntegerVector const &newDirection)
+   {
+ 
+     int i=0;
+ 
+   }
++#endif
+ 
+   const char *helpText()
+   {
+--- ./application.cpp.orig	2011-01-25 08:33:16.000000000 -0700
++++ ./application.cpp	2012-01-09 11:27:29.312437096 -0700
+@@ -3,6 +3,8 @@
+ #include <assert.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <limits.h>
++#include <unistd.h>
+ #include <string>
+ #include <list>
+ 
+@@ -546,10 +548,11 @@ void Application::makeSymbolicLinks(cons
+       if(all || p->includeInDefaultInstallation())
+ 	if(strlen(p->name())>0)
+ 	  {
+-	    char c[1024];
+-	    sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name());
+-	    fprintf(stderr,"%s",c);
+-	    system(c);
++	    char c[PATH_MAX], d[PATH_MAX];
++	    snprintf(c,PATH_MAX,"%s%s",path,name);
++	    snprintf(d,PATH_MAX,"%s%s%s",path,name,p->name());
++	    fprintf(stderr,"ln -s %s %s\n",c,d);
++	    symlink(c,d);
+ 	  }
+       p=p->next;
+     }
 --- ./app_minkowski.cpp.orig	2011-01-25 08:33:15.000000000 -0700
 +++ ./app_minkowski.cpp	2012-01-09 11:28:20.926240318 -0700
 @@ -160,7 +160,7 @@ public:
@@ -9,8 +53,8 @@
  	    //log0 fprintf(Stderr,"inserted:%i\n",++i);
  	  }
  	log1 fprintf(Stderr,"Resolving symmetries.\n");
---- ./app_test.cpp.orig	2011-01-25 08:33:15.000000000 -0700
-+++ ./app_test.cpp	2012-01-09 11:27:29.305437764 -0700
+--- ./app_test.cpp.orig	2011-04-27 13:49:04.826968542 -0600
++++ ./app_test.cpp	2015-03-10 16:40:15.157574168 -0600
 @@ -1,5 +1,7 @@
  #include <iostream>
  #include <stdlib.h>
@@ -62,16 +106,6 @@
  	  return ret;
    }
  
---- ./gfanlib_vector.h.orig	2011-01-25 08:33:18.000000000 -0700
-+++ ./gfanlib_vector.h	2012-01-09 11:27:29.307437580 -0700
-@@ -288,6 +288,7 @@ public:
-           f<<*i;
-         }
-         f<<")";
-+        return f;
-       }
-   typ gcd()const
-   {
 --- ./app_tropicalintersection.cpp.orig	2011-01-25 08:33:15.000000000 -0700
 +++ ./app_tropicalintersection.cpp	2012-01-09 11:27:29.304437850 -0700
 @@ -42,6 +42,7 @@ public:
@@ -82,33 +116,25 @@
  	}
  };
  
---- ./application.cpp.orig	2011-01-25 08:33:16.000000000 -0700
-+++ ./application.cpp	2012-01-09 11:27:29.312437096 -0700
-@@ -3,6 +3,8 @@
- #include <assert.h>
- #include <stdlib.h>
- #include <stdio.h>
-+#include <limits.h>
-+#include <unistd.h>
- #include <string>
- #include <list>
+--- ./enumeration.h.orig	2011-01-25 08:33:17.000000000 -0700
++++ ./enumeration.h	2015-03-10 16:48:12.249941222 -0600
+@@ -36,7 +36,7 @@ class EnumerationFilePrinter: public Enu
+   FILE *file;
+  public:
+   EnumerationFilePrinter();
+-  ~EnumerationFilePrinter();
++  virtual ~EnumerationFilePrinter();
  
-@@ -546,10 +548,11 @@ void Application::makeSymbolicLinks(cons
-       if(all || p->includeInDefaultInstallation())
- 	if(strlen(p->name())>0)
- 	  {
--	    char c[1024];
--	    sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name());
--	    fprintf(stderr,"%s",c);
--	    system(c);
-+	    char c[PATH_MAX], d[PATH_MAX];
-+	    snprintf(c,PATH_MAX,"%s%s",path,name);
-+	    snprintf(d,PATH_MAX,"%s%s%s",path,name,p->name());
-+	    fprintf(stderr,"ln -s %s %s\n",c,d);
-+	    symlink(c,d);
- 	  }
-       p=p->next;
-     }
+   void open(std::string filename);
+   void open(FILE *file);
+@@ -61,6 +61,7 @@ class EnumerationAlgorithm
+   bool targetBasis(const PolynomialSet &groebnerBasis){bool ret=true;if(target)ret=target->basis(groebnerBasis);printProgress();return ret;}
+  public:
+   EnumerationAlgorithm(){target=0;progressCounter=0;}
++  virtual ~EnumerationAlgorithm(){}
+   void setEnumerationTarget(EnumerationTarget *target){this->target=target;}
+   virtual void enumerate(const PolynomialSet &groebnerBasis){}
+ };
 --- ./field_rationals.cpp.orig	2011-01-25 08:33:16.000000000 -0700
 +++ ./field_rationals.cpp	2012-01-09 11:27:29.300438251 -0700
 @@ -326,17 +326,17 @@ const char *FieldRationalsImplementation
@@ -132,17 +158,37 @@
  				//FieldRationals Q;
  Field Q(new FieldRationalsImplementation());
  
---- ./vektor.cpp.orig	2011-01-25 08:33:17.000000000 -0700
-+++ ./vektor.cpp	2012-01-09 11:27:29.303437946 -0700
-@@ -96,7 +96,7 @@ int gcdGFAN(int r, int s)
- int gcdOfVector(IntegerVector const &v)
+--- ./gfanapplication.cpp.orig	2011-01-25 08:33:16.000000000 -0700
++++ ./gfanapplication.cpp	2015-03-10 16:41:48.563450249 -0600
+@@ -51,7 +51,7 @@ GFanApplication::StdinFileOption::StdinF
+ 
+ void GFanApplication::StdinFileOption::onOptionsParsed()
  {
-   int ret=0;
--  for(int i=0;i<v.size();i++)if(ret=v[i])break;
-+  for(int i=0;i<v.size();i++)if((ret=v[i]))break;
-   if(ret<0)ret=-ret;
-   assert(ret!=0);
-   for(int i=0;i<v.size();i++)ret=gcdGFAN(ret,v[i]);
+-	if(strlen(getValue())>0)freopen(getValue(),"r",stdin);
++	if(strlen(getValue())>0)stdin=freopen(getValue(),"r",stdin);
+ }
+ 
+ GFanApplication::StdoutFileOption::StdoutFileOption():
+@@ -62,7 +62,7 @@ GFanApplication::StdoutFileOption::Stdou
+ 
+ void GFanApplication::StdoutFileOption::onOptionsParsed()
+ {
+-	if(strlen(getValue())>0)freopen(getValue(),"w",stdout);
++	if(strlen(getValue())>0)stdout=freopen(getValue(),"w",stdout);
+ }
+ 
+ 
+--- ./gfanlib_polymakefile.cpp.orig	2011-01-25 08:33:16.000000000 -0700
++++ ./gfanlib_polymakefile.cpp	2012-01-09 11:27:29.306437673 -0700
+@@ -51,7 +51,7 @@ static list<int> readIntList(istream &s)
+ {
+   list<int> ret;
+   int c=s.peek();
+-  while((c>='0') && (c<='9')|| (c==' '))
++  while((c>='0' && c<='9')|| c==' ')
+     {
+       //      fprintf(Stderr,"?\n");
+       int r;
 --- ./gfanlib_symmetriccomplex.cpp.orig	2011-01-25 08:33:16.000000000 -0700
 +++ ./gfanlib_symmetriccomplex.cpp	2012-01-09 11:27:29.311437193 -0700
 @@ -215,13 +215,12 @@ bool SymmetricComplex::isMaximal(Cone co
@@ -169,6 +215,26 @@
  
  void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist/*, ZMatrix *multiplicities*/)const
  {
+--- ./gfanlib_vector.h.orig	2011-01-25 08:33:18.000000000 -0700
++++ ./gfanlib_vector.h	2012-01-09 11:27:29.307437580 -0700
+@@ -288,6 +288,7 @@ public:
+           f<<*i;
+         }
+         f<<")";
++        return f;
+       }
+   typ gcd()const
+   {
+--- ./gfanlib_zcone.cpp.orig	2011-01-25 08:33:16.000000000 -0700
++++ ./gfanlib_zcone.cpp	2012-01-09 11:27:29.309437387 -0700
+@@ -726,6 +726,7 @@ std::ostream &operator<<(std::ostream &f
+   f<<c.inequalities<<std::endl;
+   f<<"Equations:"<<std::endl;
+   f<<c.equations<<std::endl;
++  return f;
+ }
+ 
+ 
 --- ./polymakefile.cpp.orig	2011-01-25 08:33:17.000000000 -0700
 +++ ./polymakefile.cpp	2012-01-09 11:27:29.310437290 -0700
 @@ -371,7 +371,7 @@ static list<int> readIntList(istream &s)
@@ -180,44 +246,17 @@
      {
        //      fprintf(Stderr,"?\n");
        int r;
---- ./app_fancoarsening.cpp.orig	2011-01-25 08:33:15.000000000 -0700
-+++ ./app_fancoarsening.cpp	2012-01-09 11:27:29.299438352 -0700
-@@ -33,12 +33,14 @@ public:
-     return false;
-   }
- 
-+#if 0
-   IntegerVectorList inequalitiesForCone(IntegerVector const &codim1interior, IntegerVector const &newDirection)
-   {
- 
-     int i=0;
- 
-   }
-+#endif
- 
-   const char *helpText()
-   {
---- ./gfanlib_polymakefile.cpp.orig	2011-01-25 08:33:16.000000000 -0700
-+++ ./gfanlib_polymakefile.cpp	2012-01-09 11:27:29.306437673 -0700
-@@ -51,7 +51,7 @@ static list<int> readIntList(istream &s)
+--- ./vektor.cpp.orig	2011-01-25 08:33:17.000000000 -0700
++++ ./vektor.cpp	2012-01-09 11:27:29.303437946 -0700
+@@ -96,7 +96,7 @@ int gcdGFAN(int r, int s)
+ int gcdOfVector(IntegerVector const &v)
  {
-   list<int> ret;
-   int c=s.peek();
--  while((c>='0') && (c<='9')|| (c==' '))
-+  while((c>='0' && c<='9')|| c==' ')
-     {
-       //      fprintf(Stderr,"?\n");
-       int r;
---- ./gfanlib_zcone.cpp.orig	2011-01-25 08:33:16.000000000 -0700
-+++ ./gfanlib_zcone.cpp	2012-01-09 11:27:29.309437387 -0700
-@@ -726,6 +726,7 @@ std::ostream &operator<<(std::ostream &f
-   f<<c.inequalities<<std::endl;
-   f<<"Equations:"<<std::endl;
-   f<<c.equations<<std::endl;
-+  return f;
- }
- 
- 
+   int ret=0;
+-  for(int i=0;i<v.size();i++)if(ret=v[i])break;
++  for(int i=0;i<v.size();i++)if((ret=v[i]))break;
+   if(ret<0)ret=-ret;
+   assert(ret!=0);
+   for(int i=0;i<v.size();i++)ret=gcdGFAN(ret,v[i]);
 --- ./wallideal.cpp.orig	2011-01-25 08:33:17.000000000 -0700
 +++ ./wallideal.cpp	2012-01-09 11:27:29.301438150 -0700
 @@ -928,7 +928,7 @@ bool fastIsFacet(IntegerVectorList const
diff --git a/gfan.spec b/gfan.spec
index e3c3326..8dd17b4 100644
--- a/gfan.spec
+++ b/gfan.spec
@@ -1,10 +1,10 @@
 Name:           gfan
 Version:        0.5
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        Software for Computing Gröbner Fans and Tropical Varieties
 License:        GPL+
-URL:            http://home.imf.au.dk/jensen/software/gfan/gfan.html
-Source0:        http://home.imf.au.dk/jensen/software/%{name}/%{name}%{version}.tar.gz
+URL:            http://home.math.au.dk/jensen/software/gfan/gfan.html
+Source0:        http://home.math.au.dk/jensen/software/%{name}/%{name}%{version}.tar.gz
 # Sent upstream 2011 Apr 27.  Respect DESTDIR
 Patch0:         %{name}-respect-destdir.patch
 # Sent upstream 2011 Apr 27.  Fix 64-bit issues in printf statements by
@@ -77,7 +77,8 @@ rm -f homepage/Makefile
 %build
 make %{?_smp_mflags} \
   OPTFLAGS="%{optflags} -DGMPRATIONAL -I/usr/include/cddlib" \
-  PREFIX=%{_prefix}
+  PREFIX=%{_prefix} \
+  SOPLEX_LINKOPTIONS="$RPM_LD_FLAGS"
 
 
 %install
@@ -86,8 +87,11 @@ pushd $RPM_BUILD_ROOT%{_bindir}
     ./%{name} installlinks
 popd
 
-#%#check
-#./gfan _test
+%check
+# The xfig test output varies slightly by architecture, and is non-critical,
+# so we skip that test.
+rm -fr testsuite/0009RenderStairCase
+./gfan _test
 
 
 %files
@@ -99,6 +103,11 @@ popd
 %doc homepage
 
 %changelog
+* Tue Mar 10 2015 Jerry James <loganjerry at gmail.com> - 0.5-12
+- Update URLs
+- Link with RPM_LD_FLAGS
+- Reenable tests
+
 * Tue Feb 17 2015 Jerry James <loganjerry at gmail.com> - 0.5-11
 - Use license macro
 


More information about the scm-commits mailing list