Package: evolver / 2.70+ds-8

debianization-build.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Description: debianization: build
 Attempt to adapt the upstream building scheme to the Debian build
 machinery. Also meant to fix annoying warnings, to address Debian
 specific stuff in general.
Origin: Debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2018-12-31

--- a/src/evalmore.c
+++ b/src/evalmore.c
@@ -22,7 +22,7 @@
 #define S_IFIFO 0x100
 #elif !defined(MAC_CW)
 #include <sys/stat.h>
-/* #include <sys/wait.h> */
+#include <sys/wait.h>
 #ifndef S_IFIFO
 #ifdef __S_IFIFO
 #define S_IFIFO __S_IFIFO
--- a/src/Makefile
+++ b/src/Makefile
@@ -44,16 +44,17 @@
 CC= gcc
 
 CFLAGS?=
-CFLAGS+= -O3
-#CFLAGS+= -DLONGDOUBLE
+##CFLAGS+= -O3
+CFLAGS+=-Wno-unused-result
+#>>LONGDOUBLE<<#CFLAGS+= -DLONGDOUBLE
 
 #---------------------Start of system choices---------------------------------
 
 # Remove #'s from following 3 lines for generic Unix without builtin graphics.
 # Add -DOOGL to CFLAGS if you are using geomview.
 #CFLAGS+= -DGENERIC
-#GRAPH= nulgraph.o 
-#GRAPHLIB= 
+#GRAPH= nulgraph.o
+#GRAPHLIB=
 
 #---- Generic Unix -----------------------------------------------------------
 
@@ -67,14 +68,20 @@
 #GRAPHLIB= -lX11 
 #some places might have -lX11-mit
 
+#----- Linux with no X-windows -----------------------------------------------
+
+#>NOX<#CFLAGS+= -DLINUX -DOOGL -DPTHREADS
+#>NOX<#GRAPH= nulgraph.o
+#>NOX<#GRAPHLIB= -lpthread
+
 #----- Linux OpenGL ----------------------------------------------------------
 
 # Remove #'s from following 3 lines for LINUX with OpenGL GLUT graphics.
 # The graphics are on a second thread, so pthreads are needed.
 # NOTE: -DPTRHEADS is necessary with glutgraph.o.
-#CFLAGS+= -DLINUX -DOOGL -DPTHREADS
-#GRAPH= glutgraph.o
-#GRAPHLIB= -lGL -lGLU -lglut -lpthread
+#>GLUT<#CFLAGS+= -DLINUX -DOOGL -DPTHREADS
+#>GLUT<#GRAPH= glutgraph.o
+#>GLUT<#GRAPHLIB= -lGL -lGLU -lglut -lpthread
 # NOTE: It has been reported to me that RedHat 9 needs the following line
 # for GRAPHLIB, but earlier and later versions do okay with the GRAPHLIB
 # line just above.
@@ -85,8 +92,8 @@
 # It's up to you to install the quadmath library.
 # Remove #'s from previous 3 lines for LINUX with OpenGL GLUT graphics and from
 # the following 2 lines for LINUX with 128-bit floating point computation.
-#CFLAGS+= -DFLOAT128
-#GRAPHLIB+= -lquadmath
+#>>FLOAT128<<#CFLAGS+= -DFLOAT128
+#>>FLOAT128<<#GRAPHLIB+= -lquadmath
 
 #------ Linux Xwindows ------------------------------------------------------
 
@@ -219,6 +226,24 @@
 #GRAPH= nulgraph.o 
 #GRAPHLIB= 
 
+#-----------------------------------------------------------------------------
+
+### Read Compiling section (2.3.1) on how to allow commans based on
+### the METIS partitioning software.
+##CFLAGS+= -DMETIS
+##GRAPHLIB+= -lmetis
+
+# Read the NOTE related to readline support in header.
+CFLAGS+= -DUSE_READLINE
+GRAPHLIB+= -lreadline
+
+# Read the NOTE on how to append a default builtin path.
+CFLAGS+= -DENVEVOLVERPATHBUILTIN=\"/usr/share/doc/evolver/html:/usr/share/doc/evolver/examples\"
+
+# Debian package version.
+CFLAGS+= -DDEB_PKG_VERSION=\"$(DEB_PKG_VERSION)\"
+
+
 #-------------------End of system-specific options----------------------------
 
 OBJ= calcforc.o  variable.o trirevis.o  stringl.o stringq.o model.o\
@@ -238,14 +263,14 @@
 	 method4.o method5.o eval_sec.o sqcurve3.o metis.o lagrange.o
 
 
-evolver: makemark  $(OBJ)  $(GRAPH)
-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(GRAPH) $(GRAPHLIB) -o evolver -lm
+evolver$(EXEC_SUFFIX): makemark  $(OBJ)  $(GRAPH)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(GRAPH) $(GRAPHLIB) -o $@ -lm
 
 # This is to get global dependencies on the main header files.
 makemark: skeleton.h storage.h model.h web.h
-	if [[ -z "$(GRAPH)" ]] ; then (echo "ERROR: You need to uncomment your system's lines in Makefile.") ; fi
-	rm *.o || true
-	touch makemark
+	@if [[ -z "$(GRAPH)" ]] ; then (echo "ERROR: You need to uncomment your system's lines in Makefile.") ; fi
+	@rm -f *.o || true
+	@touch makemark
 
 .c.o:
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
--- a/src/variable.c
+++ b/src/variable.c
@@ -36,7 +36,11 @@
    char *VERSION = "Version 2.70a, August 27, 2013; Windows OpenGL";
 #endif
 #else
-char *VERSION = "Version 2.70a, August 27, 2013";
+#ifdef DEB_PKG_VERSION
+	char *VERSION = "Version 2.70a (Debian " DEB_PKG_VERSION "), August 27, 2013";
+#else
+	char *VERSION = "Version 2.70a, August 27, 2013";
+#endif
 #endif
 #endif
 #endif
--- a/src/tmain.c
+++ b/src/tmain.c
@@ -169,6 +169,9 @@
 				case 'V' :
 						sprintf(msg,
 								"%s - Surface Evolver %s"
+#ifdef DEB_PKG_VERSION
+								" (Debian " DEB_PKG_VERSION ")"
+#endif
 								"\n",
 							evolver_invocation_short_name,
 							evolver_version