New URLs; thanks to Patrice Dumas for the report.
Also: - Small changes to the -overflow patch to accept longer commadn line args - Add -int-inbool-context patch to reduce compiler noise - BR ghostscript-core instead of ghostscript
This commit is contained in:
parent
67d85e00b6
commit
fbb99a7256
4 changed files with 56 additions and 16 deletions
20
DSDP-int-in-bool-context.patch
Normal file
20
DSDP-int-in-bool-context.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- src/solver/dsdpvec.h.orig 2005-10-21 13:31:14.000000000 -0600
|
||||
+++ src/solver/dsdpvec.h 2019-12-09 11:50:57.152412502 -0700
|
||||
@@ -27,14 +27,14 @@ typedef struct DSDPVec_C DSDPVec;
|
||||
#define DSDPVecGetArray(a,b) 0;{ *(b)=((a).val); }
|
||||
#define DSDPVecRestoreArray(a,b) 0;{ *(b)=0; }
|
||||
#define DSDPVecGetSize(a,b) 0;{ *(b)=((a).dim); }
|
||||
-#define DSDPVecAddElement(a,b,c) 0;{ if (c){((a).val[b])+=(c);} }
|
||||
+#define DSDPVecAddElement(a,b,c) 0;{ if ((c)!=0){((a).val[b])+=(c);} }
|
||||
#define DSDPVecSetElement(a,b,c) 0;{ {((a).val[b])=(c); } }
|
||||
#define DSDPVecGetElement(a,b,c) 0;{ *(c)=((a).val[b]); }
|
||||
#define DSDPVecSetR(a,b) 0;{ {((a).val[(a).dim-1])=(b); } }
|
||||
-#define DSDPVecAddR(a,b) 0;{ if(b){((a).val[(a).dim-1])+=(b); } }
|
||||
+#define DSDPVecAddR(a,b) 0;{ if((b)!=0){((a).val[(a).dim-1])+=(b); } }
|
||||
#define DSDPVecGetR(a,b) 0;{ *(b)=((a).val[(a).dim-1]); }
|
||||
#define DSDPVecSetC(a,b) 0;{ {((a).val[0])=(b); } }
|
||||
-#define DSDPVecAddC(a,b) 0;{ if(b){((a).val[0])+=(b); } }
|
||||
+#define DSDPVecAddC(a,b) 0;{ if((b)!=0){((a).val[0])+=(b); } }
|
||||
#define DSDPVecGetC(a,b) 0;{ *(b)=((a).val[0]); }
|
||||
#define DSDPVecCreateWArray(a,b,c) 0;{ (*(a)).val=(b); (*(a)).dim=(c);}
|
||||
/*
|
||||
|
|
@ -1,11 +1,27 @@
|
|||
--- examples/readsdpa.c.orig 2005-10-21 13:31:14.000000000 -0600
|
||||
+++ examples/readsdpa.c 2011-05-21 13:26:38.967119006 -0600
|
||||
@@ -107,7 +107,7 @@ int ReadSDPAFile(int argc,char *argv[]){
|
||||
+++ examples/readsdpa.c 2019-12-09 11:47:34.346905327 -0700
|
||||
@@ -87,7 +87,7 @@ int ReadSDPAFile(int argc,char *argv[]){
|
||||
double ddobj,ppobj,scl,dpot;
|
||||
char problemname[100],thisline[100], filename[300],savefile[100];
|
||||
char directory[100]="/home/benson/sdpexamples/sdplib/";
|
||||
- char outputfile[50]="",suffix[20]=".dat-s", tablename[20]="results-dsdp-5.8";
|
||||
+ char outputfile[50]="",suffix[20]=".dat-s", tablename[90]="results-dsdp-5.8";
|
||||
char success='s',sformat;
|
||||
FILE *fp1=0,*fp2=0,*fout;
|
||||
DSDPData dddd;
|
||||
@@ -106,12 +106,12 @@ int ReadSDPAFile(int argc,char *argv[]){
|
||||
if (strncmp(argv[i],"-benchmark",8)==0){
|
||||
strncpy(thisline,argv[i+1],90); fp1=fopen(thisline,"r");runbenchmark=1; justone=0;
|
||||
};
|
||||
if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],90);}
|
||||
- if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],90);};
|
||||
+ if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],20);};
|
||||
- if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],90);}
|
||||
+ if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],100);}
|
||||
if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],90);};
|
||||
if (strncmp(argv[i],"-suffix",4)==0){strncpy(suffix,argv[i+1],20);};
|
||||
if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],40);saveit=1;};
|
||||
- if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],40);saveit=1;};
|
||||
+ if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],100);saveit=1;};
|
||||
if (strncmp(argv[i],"-dlogsummary",8)==0){printsummary=atoi(argv[i+1]);}
|
||||
- if (rank==0&&strncmp(argv[i],"-fout",5)==0){ strncpy(outputfile,argv[i+1],45);fileout=1;};
|
||||
+ if (rank==0&&strncmp(argv[i],"-fout",5)==0){ strncpy(outputfile,argv[i+1],50);fileout=1;};
|
||||
}
|
||||
|
||||
if (runbenchmark || argc>2){
|
||||
|
|
|
|||
5
DSDP.rpmlintrc
Normal file
5
DSDP.rpmlintrc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
|
||||
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
|
||||
|
||||
# The dictionary is missing some technical terms
|
||||
addFilter(r'W: spelling-error .* (combinatorial|infeasib(ility|le)|semidefinite)')
|
||||
19
DSDP.spec
19
DSDP.spec
|
|
@ -4,21 +4,21 @@ Release: 22%{?dist}
|
|||
Summary: Software for semidefinite programming
|
||||
|
||||
License: DSDP
|
||||
URL: http://www.mcs.anl.gov/software/applied-mathematics-software
|
||||
# Upstream no longer offers a download or supports this software.
|
||||
Source0: DSDP%{version}.tar.gz
|
||||
URL: https://www.mcs.anl.gov/hs/software/DSDP/
|
||||
Source0: https://www.mcs.anl.gov/hs/software/DSDP/%{name}%{version}.tar.gz
|
||||
# Man pages written by Jerry James using text from the sources.
|
||||
# Therefore, the man pages have the same copyright and license as the source.
|
||||
Source1: DSDP-man.tar.xz
|
||||
# A substitute makefile to fix the brokenness of the distributed Makefiles
|
||||
Source2: DSDP.Makefile
|
||||
# This patch fixes a buffer overflow in one of the examples. There is no
|
||||
# longer an upstream to which it can be sent.
|
||||
Patch0: DSDP-overflow.patch
|
||||
# Fix a buffer overflow in one of the examples.
|
||||
Patch0: %{name}-overflow.patch
|
||||
# Fix -Wint-in-bool-context warnings.
|
||||
Patch1: %{name}-int-in-bool-context.patch
|
||||
|
||||
BuildRequires: doxygen-latex
|
||||
BuildRequires: gcc
|
||||
BuildRequires: ghostscript
|
||||
BuildRequires: ghostscript-core
|
||||
BuildRequires: openblas-devel
|
||||
|
||||
%description
|
||||
|
|
@ -54,9 +54,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||
Examples programs that use the DSDP library.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}%{version}
|
||||
%autosetup -p0 -n %{name}%{version}
|
||||
%setup -q -n %{name}%{version} -T -D -a 1
|
||||
%patch0
|
||||
|
||||
sed -e "s|@RPM_OPT_FLAGS@|${RPM_OPT_FLAGS}|" \
|
||||
-e "s|@RPM_LD_FLAGS@|${RPM_LD_FLAGS}|" \
|
||||
|
|
@ -65,7 +64,7 @@ sed -e "s|@RPM_OPT_FLAGS@|${RPM_OPT_FLAGS}|" \
|
|||
%{SOURCE2} > Makefile
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
cd docs
|
||||
unzip DSDP5-api-html.zip
|
||||
cd dox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue