Remove installation of incompatible getopt.h, closes #753, #754, #755
[openwrt.git] / package / keynote / patches / 01-build.patch
1 diff -ru keynote-2.3/configure.in keynote-2.3.new/configure.in
2 --- keynote-2.3/configure.in 2000-09-27 01:16:28.000000000 +0200
3 +++ keynote-2.3.new/configure.in 2004-01-16 11:34:03.991537404 +0100
4 @@ -21,19 +21,13 @@
5 AC_PATH_PROG(ECHO, echo, /bin/echo)
6 AC_PATH_PROG(SED, sed, /usr/bin/sed)
7
8 -dnl Checks for libraries.
9 -LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\
10 - -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib"
11 -
12 AC_CHECK_LIB(m, floor, LIBS="$LIBS -lm")
13 AC_CHECK_LIB(rsaref, RSAPrivateDecrypt, LIBS="$LIBS -lrsaref")
14 AC_CHECK_LIB(crypto, i2a_ASN1_STRING, LIBS="$LIBS -lcrypto")
15 AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue")
16
17 dnl Checks for header files.
18 -CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\
19 - -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\
20 - -I/usr/local/openssl/include -I/pkg/include"
21 +CPPFLAGS="-I/usr/include/openssl"
22
23 AC_HEADER_STDC
24 AC_HEADER_TIME
25 diff -ru keynote-2.3/keynote-keygen.c keynote-2.3.new/keynote-keygen.c
26 --- keynote-2.3/keynote-keygen.c 2000-09-27 02:09:13.000000000 +0200
27 +++ keynote-2.3.new/keynote-keygen.c 2004-01-16 11:32:06.652242269 +0100
28 @@ -161,7 +161,7 @@
29 if (strlen(algname) + 2 > prlen)
30 {
31 fprintf(stderr, "Parameter ``print-length'' should be larger "
32 - "than the length of AlgorithmName (%d)\n", strlen(algname));
33 + "than the length of AlgorithmName (%lu)\n", strlen(algname));
34 exit(-1);
35 }
36
37 diff -ru keynote-2.3/keynote.l keynote-2.3.new/keynote.l
38 --- keynote-2.3/keynote.l 2000-08-11 22:49:13.000000000 +0200
39 +++ keynote-2.3.new/keynote.l 2004-01-16 11:17:29.910430978 +0100
40 @@ -61,7 +61,8 @@ struct lex_list
41 static struct lex_list *keynote_lex_list = (struct lex_list *) NULL;
42 static int keynote_max_lex_list = 32;
43 static int keynote_lex_counter = 0;
44 -static int first_tok = 0;
45 +extern int first_tok;
46 +int first_tok = 0;
47 %}
48 digit [0-9]
49 specnumber [1-9][0-9]*
50 @@ -766,7 +767,7 @@
51 if (0)
52 {
53 yyunput(0, NULL);
54 - yy_flex_realloc(0, NULL);
55 + yy_flex_realloc(NULL, 0);
56 }
57
58 return en;
59 diff -ru keynote-2.3/keynote-ver.l keynote-2.3.new/keynote-ver.l
60 --- keynote-2.3/keynote-ver.l 2000-08-11 22:49:13.000000000 +0200
61 +++ keynote-2.3.new/keynote-ver.l 2004-01-16 11:31:14.667107044 +0100
62 @@ -267,7 +267,7 @@
63 if (0)
64 {
65 yyunput(0, NULL);
66 - yy_flex_realloc(0, NULL);
67 + yy_flex_realloc(NULL, 0);
68 }
69 }
70
71 diff -ru keynote-2.3/keynote-ver.y keynote-2.3.new/keynote-ver.y
72 --- keynote-2.3/keynote-ver.y 1999-10-12 00:34:29.000000000 +0200
73 +++ keynote-2.3.new/keynote-ver.y 2004-01-16 11:07:19.709634736 +0100
74 @@ -49,7 +49,7 @@
75 return keynote_errno;
76 free($1);
77 }
78 -
79 + ;
80 expr: VSTRING EQ STRING { int i = kn_add_action(sessid, $1, $3, 0);
81
82 if (i != 0)
83 @@ -64,6 +64,7 @@
84 free($1);
85 free($3);
86 } expr
87 + ;
88 %%
89 void
90 kverror(char *s)
91 diff -ru keynote-2.3/keynote.y keynote-2.3.new/keynote.y
92 --- keynote-2.3/keynote.y 2000-06-14 08:28:23.000000000 +0200
93 +++ keynote-2.3.new/keynote.y 2004-01-16 11:14:55.365898229 +0100
94 @@ -73,8 +73,7 @@
95 %}
96 %%
97
98 -grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; }
99 - localinit
100 +grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; } localinit
101 | ACTSTR { keynote_exceptionflag = keynote_donteval = 0; } program
102 | KEYPRE { keynote_exceptionflag = keynote_donteval = 0; }
103 keypredicate
104 @@ -91,17 +90,17 @@
105 STRING { keynote_lex_remove($3);
106 keynote_privkey = $3;
107 }
108 -
109 + ;
110 keypredicate: /* Nothing */ { keynote_returnvalue = 0;
111 return 0;
112 }
113 | notemptykeypredicate { keynote_returnvalue = $1;
114 return 0;
115 }
116 -
117 + ;
118 notemptykeypredicate: key { $$ = $1; }
119 | keyexp { $$ = $1; }
120 -
121 + ;
122 keyexp: notemptykeypredicate AND { if (($1 == 0) && !keynote_justrecord)
123 keynote_donteval = 1;
124 } notemptykeypredicate
125 @@ -138,7 +137,7 @@
126 else
127 $$ = 0;
128 } /* K-th */
129 -
130 + ;
131 keylist: key
132 { /* Don't do anything if we're just recording */
133 if (!keynote_justrecord && !keynote_donteval)
134 @@ -155,7 +154,7 @@
135
136 keylistcount++;
137 }
138 -
139 + ;
140 key: str {
141 if (keynote_donteval)
142 $$ = 0;
143 @@ -193,10 +192,10 @@
144 }
145 }
146 }
147 -
148 + ;
149 localinit: /* Nothing */
150 | localconstants
151 -
152 + ;
153 localconstants: VARIABLE EQQ STRING
154 {
155 int i;
156 @@ -265,12 +264,12 @@
157 if (i != RESULT_TRUE)
158 return -1;
159 } localconstants
160 -
161 + ;
162 program: prog {
163 keynote_returnvalue = $1;
164 return 0;
165 }
166 -
167 + ;
168 prog: /* Nada */ { $$ = 0; }
169 | notemptyprog {
170 /*
171 @@ -285,7 +284,7 @@
172 else
173 $$ = $4;
174 }
175 -
176 + ;
177 notemptyprog: expr HINT afterhint
178 {
179 if (checkexception($1))
180 @@ -300,7 +299,7 @@
181 else
182 $$ = 0;
183 }
184 -
185 + ;
186 afterhint: str { if (keynote_exceptionflag || keynote_donteval)
187 $$ = 0;
188 else
189 @@ -315,7 +314,7 @@
190 }
191 }
192 | OPENBLOCK prog CLOSEBLOCK { $$ = $2; }
193 -
194 + ;
195
196 expr: OPENPAREN expr CLOSEPAREN { $$ = $2; }
197 | expr AND { if ($1 == 0)
198 @@ -334,19 +333,19 @@
199 | stringexp { $$ = $1; }
200 | TRUE { $$ = 1; }
201 | FALSE { $$ = 0; }
202 -
203 + ;
204 numexp: numex LT numex { $$ = $1 < $3; }
205 | numex GT numex { $$ = $1 > $3; }
206 | numex EQ numex { $$ = $1 == $3; }
207 | numex LE numex { $$ = $1 <= $3; }
208 | numex GE numex { $$ = $1 >= $3; }
209 | numex NE numex { $$ = $1 != $3; }
210 -
211 + ;
212 floatexp: floatex LT floatex { $$ = $1 < $3; }
213 | floatex GT floatex { $$ = $1 > $3; }
214 | floatex LE floatex { $$ = $1 <= $3; }
215 | floatex GE floatex { $$ = $1 >= $3; }
216 -
217 + ;
218 numex: numex PLUS numex { $$ = $1 + $3; }
219 | numex MINUS numex { $$ = $1 - $3; }
220 | numex MULT numex { $$ = $1 * $3; }
221 @@ -384,7 +383,7 @@
222 free($2);
223 }
224 }
225 -
226 + ;
227 floatex: floatex PLUS floatex { $$ = ($1 + $3); }
228 | floatex MINUS floatex { $$ = ($1 - $3); }
229 | floatex MULT floatex { $$ = ($1 * $3); }
230 @@ -418,7 +417,7 @@
231 free($2);
232 }
233 }
234 -
235 + ;
236 stringexp: str EQ str {
237 if (keynote_exceptionflag || keynote_donteval)
238 $$ = 0;
239 @@ -529,9 +528,9 @@
240 if (i == 0)
241 {
242 #if !defined(HAVE_SNPRINTF)
243 - sprintf(grp, "%d", preg.re_nsub);
244 + sprintf(grp, "%d", (int)preg.re_nsub);
245 #else /* !HAVE_SNPRINTF */
246 - snprintf(grp, 3, "%d", preg.re_nsub);
247 + snprintf(grp, 3, "%d", (int)preg.re_nsub);
248 #endif /* !HAVE_SNPRINTF */
249 if (keynote_env_add("_0", grp, &keynote_temp_list,
250 1, 0) != RESULT_TRUE)
251 @@ -579,7 +578,7 @@
252 }
253 }
254 }
255 -
256 + ;
257 str: str DOTT str { if (keynote_exceptionflag || keynote_donteval)
258 $$ = (char *) NULL;
259 else
260 @@ -605,7 +604,7 @@
261 }
262 }
263 | strnotconcat { $$ = $1; }
264 -
265 + ;
266 strnotconcat: STRING { $$ = $1; }
267 | OPENPAREN str CLOSEPAREN { $$ = $2; }
268 | VARIABLE { if (keynote_exceptionflag || keynote_donteval)
269 @@ -660,6 +659,7 @@
270 return -1;
271 }
272 }
273 + ;
274 %%
275
276 /*
277 diff -ru keynote-2.3/Makefile.in keynote-2.3.new/Makefile.in
278 --- keynote-2.3/Makefile.in 2000-09-27 01:16:27.000000000 +0200
279 +++ keynote-2.3.new/Makefile.in 2004-01-16 11:35:38.841528129 +0100
280 @@ -41,7 +41,7 @@
281 YACCFLAGS = -d -p kn -b k
282 LEXFLAGS2 = -Pkv -s -i
283 LEXFLAGS = -Cr -Pkn -s -i
284 -CFLAGS = -O2 -Wall # -g
285 +CFLAGS = -O2 -Wall -fno-strict-aliasing # -g
286 RMFLAGS2 = -rf
287 RMFLAGS = -f
288 NROFFFLAGS = -mandoc
289 diff -ru keynote-2.3/signature.c keynote-2.3.new/signature.c
290 --- keynote-2.3/signature.c 1999-10-12 00:34:31.000000000 +0200
291 +++ keynote-2.3.new/signature.c 2004-01-16 11:30:48.062084986 +0100
292 @@ -515,7 +515,7 @@
293 kk = dc->dec_key;
294 if (keytype == KEYNOTE_PRIVATE_KEY)
295 {
296 - if (d2i_DSAPrivateKey((DSA **) &kk, &decoded, len) == (DSA *) NULL)
297 + if (d2i_DSAPrivateKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL)
298 {
299 if (ptr != (unsigned char *) NULL)
300 free(ptr);
301 @@ -526,7 +526,7 @@
302 }
303 else
304 {
305 - if (d2i_DSAPublicKey((DSA **) &kk, &decoded, len) == (DSA *) NULL)
306 + if (d2i_DSAPublicKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL)
307 {
308 if (ptr != (unsigned char *) NULL)
309 free(ptr);
310 @@ -556,7 +556,7 @@
311 kk = dc->dec_key;
312 if (keytype == KEYNOTE_PRIVATE_KEY)
313 {
314 - if (d2i_RSAPrivateKey((RSA **) &kk, &decoded, len) == (RSA *) NULL)
315 + if (d2i_RSAPrivateKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL)
316 {
317 if (ptr != (unsigned char *) NULL)
318 free(ptr);
319 @@ -567,7 +567,7 @@
320 }
321 else
322 {
323 - if (d2i_RSAPublicKey((RSA **) &kk, &decoded, len) == (RSA *) NULL)
324 + if (d2i_RSAPublicKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL)
325 {
326 if (ptr != (unsigned char *) NULL)
327 free(ptr);
This page took 0.0508 seconds and 5 git commands to generate.