aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2003-05-10 08:48:45 +0800
committermaho <maho@FreeBSD.org>2003-05-10 08:48:45 +0800
commit37672934eceedd9f7557ba20863e3344f50d1703 (patch)
tree17c6c6f11755a29f1679fae988c1bbd281285e28
parentc238e6733e899865079b9bbcf8a7634f0c0655f4 (diff)
downloadfreebsd-ports-gnome-37672934eceedd9f7557ba20863e3344f50d1703.tar.gz
freebsd-ports-gnome-37672934eceedd9f7557ba20863e3344f50d1703.tar.zst
freebsd-ports-gnome-37672934eceedd9f7557ba20863e3344f50d1703.zip
Fix broken for 4-STABLE:
1. ports/math/spooles uses threading, so add pthread explicitly for 5.1-BETA we don't ever need it. 2. _toupper should be a macro version of subset of toupper. See the difference between ctype.h of 5.1-BETA and 4-STABLE. However, I don't see the reason why it cgx uses _toupper (thread safety?). Pointed out by: kris
-rw-r--r--cad/calculix/files/patch-ccx_1.0+src+Makefile9
-rw-r--r--cad/calculix/files/patch-cgx_1.0+src+readcxx.c127
2 files changed, 131 insertions, 5 deletions
diff --git a/cad/calculix/files/patch-ccx_1.0+src+Makefile b/cad/calculix/files/patch-ccx_1.0+src+Makefile
index 9e7fd378b593..a64af58a4d01 100644
--- a/cad/calculix/files/patch-ccx_1.0+src+Makefile
+++ b/cad/calculix/files/patch-ccx_1.0+src+Makefile
@@ -1,15 +1,14 @@
--- ccx_1.0/src/Makefile.orig Mon Mar 3 00:35:58 2003
-+++ ccx_1.0/src/Makefile Mon May 5 20:56:43 2003
++++ ccx_1.0/src/Makefile Sat May 10 08:52:54 2003
@@ -1,8 +1,8 @@
-CFLAGS = -Wall -O -I ../../../SPOOLES.2.2 -DARCH="Linux"
-FFLAGS = -Wall -O
+CFLAGS += -Wall -I%%LOCALBASE%%/include/spooles -DARCH="FreeBSD"
+FFLAGS += -Wall
--CC=cc
+ CC=cc
-FC=g77
-+CC=%%CC%%
-+FC=%%FC%%
++FC=f77
.c.o :
$(CC) $(CFLAGS) -c $<
@@ -27,7 +26,7 @@
ccx_1.0: $(OCCXMAIN) ccx_1.0.a $(LIBS)
- g77 -Wall -O -o $@ $(OCCXMAIN) ccx_1.0.a $(LIBS)
-+ $(FC) -o $@ $(OCCXMAIN) ccx_1.0.a $(LIBS) -L%%LOCALBASE%%/lib
++ $(FC) -o $@ $(OCCXMAIN) ccx_1.0.a -pthread $(LIBS) -L%%LOCALBASE%%/lib
ccx_1.0.a: $(OCCXF) $(OCCXC)
ar vr $@ $?
diff --git a/cad/calculix/files/patch-cgx_1.0+src+readcxx.c b/cad/calculix/files/patch-cgx_1.0+src+readcxx.c
new file mode 100644
index 000000000000..1a9dd94d3117
--- /dev/null
+++ b/cad/calculix/files/patch-cgx_1.0+src+readcxx.c
@@ -0,0 +1,127 @@
+--- cgx_1.0/src/readccx.c.orig Wed Apr 9 00:32:46 2003
++++ cgx_1.0/src/readccx.c Sat May 10 09:17:36 2003
+@@ -357,7 +357,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"NAME=",5)==5) { strcpy(set,&buffer[5]); }
+ }
+ if(printFlag) printf("*SURFACE DEFINITION: %s\n",set);
+@@ -479,7 +479,7 @@
+
+
+ /* check if it is a node section */
+- for(j=0;j<strlen(rec_str); j++) { if(rec_str[j]==',') break; rec_str[j]=_toupper(rec_str[j]);}
++ for(j=0;j<strlen(rec_str); j++) { if(rec_str[j]==',') break; rec_str[j]=toupper(rec_str[j]);}
+ if((compare(rec_str,"*NODE PRINT",11)==11)||
+ (compare(rec_str,"*NODE FILE",10)==10))
+ {
+@@ -500,7 +500,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"NSET=",5)==5) { setFlag=1; strcpy(set,&buffer[5]); }
+ }
+ if(printFlag) printf("*NODE: NSET=%s\n", set);
+@@ -815,7 +815,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"TYPE=",5)==5) strcpy(elemtyp,&buffer[5]);
+ if(compare(dat[i],"ELSET=",6)==6) { strcpy(set,&buffer[6]); setFlag=1; }
+ }
+@@ -977,7 +977,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"NAME=",5)==5) strcpy(mname,&buffer[5]);
+ }
+ if(printFlag) printf("*MATERIAL:%s\n", mname);
+@@ -1021,7 +1021,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"TYPE=",5)==5) strcpy(type,&buffer[5]);
+ }
+ if(printFlag) printf("*ELASTIC: TYPE:%s\n", type);
+@@ -1073,7 +1073,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"TYPE=",5)==5) strcpy(type,&buffer[5]);
+ }
+ if(printFlag) printf("*EXPANSION:TYPE:%s\n", type);
+@@ -1480,7 +1480,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"ELSET=",6)==6) strcpy(set,&buffer[6]);
+ if(compare(dat[i],"GENERATE",5)==5) generate=1;
+ }
+@@ -1537,7 +1537,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"NSET=",5)==5) strcpy(set,&buffer[5]);
+ if(compare(dat[i],"GENERATE",5)==5) generate=1;
+ }
+@@ -1605,7 +1605,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"ELSET=",6)==6) strcpy(elset,&buffer[6]);
+ if(compare(dat[i],"MATERIAL=",9)==9) strcpy(material,&buffer[9]);
+ if((compare(buffer,"NODAL",5)==5)||
+@@ -1672,7 +1672,7 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"ELSET=",6)==6) strcpy(elset,&buffer[6]);
+ if(compare(dat[i],"MATERIAL=",9)==9) strcpy(material,&buffer[9]);
+ if((compare(buffer,"COMPOS",5)==5)||
+@@ -1726,14 +1726,14 @@
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"TYPE=",5)==5)
+ {
+ strcpy(dat[i],&buffer[5]);
+ /* delete blanks */
+ n=0; for(j=0;j<strlen(dat[i]); j++) if(dat[i][j]!=' ') { buffer[n]=dat[i][j]; n++; }
+ buffer[n]=(unsigned char)NULL;
+- for(j=0;j<strlen(buffer); j++) dat[i][j]=_toupper(buffer[j]);
++ for(j=0;j<strlen(buffer); j++) dat[i][j]=toupper(buffer[j]);
+ if(compare(dat[i],"TEMPERATURE",6)==6)
+ {
+ if(printFlag) printf("*INITIAL CONDITIONS: TYPE:%s \n", buffer);
+@@ -1914,7 +1914,7 @@
+ args=crecord(rec_str, dat);
+
+ /* get the arguments of the string */
+- i=0; while(dat[0][i]!=(unsigned char)NULL) { dat[0][i]=_toupper(dat[0][i]); i++; }
++ i=0; while(dat[0][i]!=(unsigned char)NULL) { dat[0][i]=toupper(dat[0][i]); i++; }
+
+ /* get the nodes */
+ if (compare(dat[0], "*NODE",5)==5) { length=getNodes(rec_str); goto checknextstr; }