Ticket #57763: patch-cgx-build.diff
File patch-cgx-build.diff, 4.9 KB (added by mbrethen, 6 years ago) |
---|
-
cgx_2.14.1/src
diff -ur cgx_2.14.1/src.orig/Makefile cgx_2.14.1/src/Makefile
old new 3 3 -I/usr/include \ 4 4 -I/usr/include/GL \ 5 5 -I../../libSNL/src \ 6 6 -I../../glut-3.5/src \ 7 -I/ usr/X11/include7 -I/opt/X11/include 8 8 9 9 LFLAGS = \ 10 - L/usr/lib64 -lGL -lGLU\11 - L/usr/X11R6/lib64 -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \12 -lm -lpthread -lrt10 -framework OpenGL -framework GLUT \ 11 -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \ 12 -lm -lpthread 13 13 14 14 15 15 # on 32bit systems change lib64 to lib … … 22 21 userFunction.c 23 22 24 23 SUTIL = \ 25 ../../glut-3.5/src/layerutil.c \26 ../../glut-3.5/src/glut_dials.c \27 ../../glut-3.5/src/glut_ext.c \28 ../../glut-3.5/src/glut_mesa.c \29 ../../glut-3.5/src/glut_menu.c \30 ../../glut-3.5/src/glut_modifier.c \31 ../../glut-3.5/src/glut_space.c \32 ../../glut-3.5/src/glut_shapes.c \33 ../../glut-3.5/src/glut_tablet.c \34 ../../glut-3.5/src/glut_warp.c \35 ../../glut-3.5/src/glut_8x13.c \36 ../../glut-3.5/src/glut_9x15.c \37 ../../glut-3.5/src/glut_hel10.c \38 ../../glut-3.5/src/glut_hel18.c \39 ../../glut-3.5/src/glut_hel12.c \40 ../../glut-3.5/src/glut_tr10.c \41 ../../glut-3.5/src/glut_tr24.c \42 ../../glut-3.5/src/glut_bitmap.c \43 ../../glut-3.5/src/glut_cursor.c \44 ../../glut-3.5/src/glut_event.c \45 ../../glut-3.5/src/glut_get.c \46 ../../glut-3.5/src/glut_overlay.c \47 ../../glut-3.5/src/glut_input.c \48 ../../glut-3.5/src/glut_stroke.c \49 ../../glut-3.5/src/glut_teapot.c \50 ../../glut-3.5/src/glut_winmisc.c \51 ../../glut-3.5/src/glut_fullscrn.c \52 ../../glut-3.5/src/glut_cindex.c \53 ../../glut-3.5/src/glut_roman.c \54 ../../glut-3.5/src/glut_mroman.c \55 ../../glut-3.5/src/glut_swidth.c \56 ../../glut-3.5/src/glut_bwidth.c \57 ../../glut-3.5/src/glut_win.c \58 ../../glut-3.5/src/glut_init.c \59 ../../glut-3.5/src/glut_util.c \60 24 uselibSNL.cpp \ 61 25 generateTet.cpp \ 62 26 ../../libSNL/src/*.cpp … … 66 30 OUTIL = $(SUTIL:.c=.o) 67 31 68 32 cgx: $(OLIB) $(OUTIL) $(OULIB) 69 g++$(OULIB) $(OLIB) $(OUTIL) $(CFLAGS) $(LFLAGS) -o $@33 $(CXX) $(OULIB) $(OLIB) $(OUTIL) $(CFLAGS) $(LFLAGS) -o $@ 70 34 71 35 72 36 -
cgx_2.14.1/src
diff -ur cgx_2.14.1/src.orig/cgx.h cgx_2.14.1/src/cgx.h
old new 89 89 "/usr/local/CalculiX/ccx_2.14/doc/ccx/ccx.html",\ 90 90 "/usr/local/CalculiX/cgx_2.8/doc/aflib/aflib.pdf"} 91 91 #else 92 #define HELPFILE {" /usr/local/CalculiX/cgx_2.14.1/doc/cgx/cgx.html",\93 " /usr/local/CalculiX/ccx_2.14/doc/ccx/ccx.html"}92 #define HELPFILE {"@@PREFIX@@/share/doc/CalculiX/cgx_2.14.1/cgx/cgx.html",\ 93 "@@PREFIX@@/share/doc/CalculiX/ccx_2.14/ccx/ccx.html"} 94 94 #endif 95 95 96 96 #define INITFILE {".cgx"} … … 103 103 #else 104 104 /* #define BROWSER {"netscape"} */ 105 105 /* #define BROWSER {"mozilla"} */ 106 #define BROWSER {" firefox"}106 #define BROWSER {"openbrowser"} 107 107 /* #define PSVIEWER {"ghostview"} */ 108 #define PSVIEWER {" gv"}108 #define PSVIEWER {"open"} 109 109 #endif 110 110 111 111 /* more parameters, better do not change them! */ -
cgx_2.14.1/src
diff -ur cgx_2.14.1/src.orig/extUtil.h cgx_2.14.1/src/extUtil.h
old new 7 7 #else 8 8 #define DEV_NULL " >/dev/null" 9 9 #define DEV_NULL2 " 2>/dev/null" 10 #include <sys/param.h> 10 11 #include <unistd.h> 11 12 #endif 12 13 … … 52 53 #undef min 53 54 #define abs(x) ((x) >= 0 ? (x) : -(x)) 54 55 #define dabs(x) (double)abs(x) 55 #define min(a,b) ((a) <= (b) ? (a) : (b)) 56 #define max(a,b) ((a) >= (b) ? (a) : (b)) 57 #define smin(a,b) (float)min(a,b) 58 #define smax(a,b) (float)max(a,b) 59 #define dmin(a,b) (double)min(a,b) 60 #define dmax(a,b) (double)max(a,b) 56 #define smin(a,b) (float)MIN(a,b) 57 #define smax(a,b) (float)MAX(a,b) 58 #define dmin(a,b) (double)MIN(a,b) 59 #define dmax(a,b) (double)MAX(a,b) 61 60 62 61 63 62 typedef struct { -
uselibSNL.cpp
diff -ur cgx_2.14.1/src.orig/uselibSNL.cpp cgx_2.14.1/src/uselibSNL.cpp
old new 934 934 // (5) create the cgx nurbs 935 935 // printf(" create blended nurbs\n"); 936 936 buffer[0]='S'; 937 buffer[1]= (char)NULL;937 buffer[1]='\0'; 938 938 getNewName( name, buffer ); 939 939 for (i=0; i<MAX_LINE_LENGTH; i++) sname[i]=name[i]; 940 940 if(printFlag) printf ("store NURS Nr:%d Name:%s\n", anzGeo->nurs+1, name); … … 1012 1012 for (j=0; j<nurbs[nr].v_npnt; j++) 1013 1013 { 1014 1014 buffer[0]='p'; 1015 buffer[1]= (char)NULL;1015 buffer[1]='\0'; 1016 1016 getNewName( name, buffer ); 1017 1017 nurbs[nr].ctlpnt[i][j] = pnt( name, surface->controlPoints()[ index ].x(), surface->controlPoints()[ index ].y(), surface->controlPoints()[ index ].z(), 0); 1018 1018 point=*pntpntr; /* update pointer */