Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/transfig/files/
Date: Wed, 28 Dec 2016 16:49:07
Message-Id: 1482943646.5764f7f859c3c2834398c4f90b4d139cf663058e.gokturk@gentoo
1 commit: 5764f7f859c3c2834398c4f90b4d139cf663058e
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Dec 28 16:00:05 2016 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 16:47:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5764f7f8
7
8 media-gfx/transfig: remove unused patch
9
10 .../transfig/files/transfig-3.2.5d-fig2mpdf.patch | 522 ---------------------
11 1 file changed, 522 deletions(-)
12
13 diff --git a/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch b/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch
14 deleted file mode 100644
15 index b04478f..00000000
16 --- a/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch
17 +++ /dev/null
18 @@ -1,522 +0,0 @@
19 -=== modified file 'doc/fig2dev.1'
20 ---- doc/fig2dev.1 2010-09-28 13:22:38 +0000
21 -+++ doc/fig2dev.1 2010-09-28 13:28:26 +0000
22 -@@ -53,8 +53,8 @@
23 - \fBbox, cgm, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg,
24 - latex, map (HTML image map), mf (MetaFont),
25 - mp (MetaPost), mmp (Multi-MetaPost),
26 --pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps,
27 --pstex, pstex_t, pstricks, ptk (Perl/tk),
28 -+pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, pictex, png, ppm, ps,
29 -+pstex, pstex_t, pstex_p, pstricks, ptk (Perl/tk),
30 - shape (LaTeX shaped paragraphs), sld (AutoCad slide format),
31 - svg (beta driver), textyl,
32 - tiff, tk (tcl/tk), tpic, xbm and
33 -@@ -1062,6 +1062,62 @@
34 - font. Option 1 sets LaTeX font size only. Option 2 issues no font
35 - commands at all.
36 -
37 -+.SH PSTEX_P and PDFTEX_P OPTIONS
38 -+The \fBpstex_p\fR language has the same intention as
39 -+the combination of \fBpstex\fR and \fBpstex_t\fR.
40 -+The only reason to use \fBpstex_p\fR is that you have partially overlayed texts.
41 -+\fBpstex_p\fR splits the Fig file concerning the depths of existing texts. Because
42 -+of it's necessary to get the resulting size of the figure for the pdf document
43 -+you have to specify the target document format
44 -+(i.e. using \fBpstex_p\fR rsp. \fBpdftex_p\fR).
45 -+.br
46 -+Two files results by using this language:
47 -+.br
48 -+.HP +.3i
49 -+1) A bash script for creating and removing the necessary graphics files.
50 -+Extension: \fB.create\fR
51 -+.HP +.3i
52 -+.HP +.3i
53 -+2) The latex code which includes all graphics files and special texts. Content is
54 -+put to stdout.
55 -+
56 -+.TP
57 -+The \fBpstex_p\fR driver has the following special options:
58 -+
59 -+.TP
60 -+.B \-p basename
61 -+specifies the basename of the files to be created (see (1) above). This option
62 -+is mandatory.
63 -+.TP
64 -+.B "\-d dmag"
65 -+Set a separate magnification for the length of line dashes to
66 -+.I dmag.
67 -+.TP
68 -+.B \-E num
69 -+Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2)
70 -+.TP
71 -+.B "\-l lwidth"
72 -+Sets the threshold between LaTeX thin and thick lines to
73 -+.I lwidth
74 -+pixels.
75 -+LaTeX supports only two different line width: \\thinlines and \\thicklines.
76 -+Lines of width greater than
77 -+.I lwidth
78 -+pixels are drawn as \\thicklines.
79 -+Also affects the size of dots in dotted line style.
80 -+The default is 1.
81 -+.TP
82 -+.B \-v
83 -+Verbose mode.
84 -+.TP
85 -+.B \-F
86 -+Don't set the font face, series, and style; only set it's size and the
87 -+baselineskip. By default, fig2dev sets all 5 font parameters when it
88 -+puts some text. The disadvantage is that you can't set the font from your
89 -+LaTeX document. With this option on, you can set the font from your LaTeX
90 -+document (like "\fB\\sfshape \\input picture.eepic\fR").
91 -+
92 -+
93 - .SH TK and PTK OPTIONS (tcl/tk and Perl/tk)
94 - .TP
95 - .B -l dummy_arg
96 -@@ -1107,6 +1163,13 @@
97 - .PP
98 - Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps)
99 - languages.
100 -+.PP
101 -+In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of
102 -+the special texts set by pdflatex afterwards. If these texts are bigger than
103 -+expected the calculated bounding box might be too small so that some texts passes
104 -+over the figure boundaries. If this happen you have to put an invisible
105 -+rectangle (line width 0) around the text or the entire figure.
106 -+
107 - .SH COPYRIGHT
108 - Copyright (c) 1991 Micah Beck
109 - .br
110 -@@ -1187,3 +1250,7 @@
111 - The GBX (Gerber) driver was written by
112 - .br
113 - Edward Grace (ej.grace@×××××××××××.uk).
114 -+.sp
115 -+The PSTEX_P and PDFTEX_P drivers (overlayed LaTeX texts) was written by
116 -+.br
117 -+Michael Pfeiffer (p3f@×××.de)
118 -
119 -=== modified file 'fig2dev/dev/genpstex.c'
120 ---- fig2dev/dev/genpstex.c 2010-09-28 13:22:38 +0000
121 -+++ fig2dev/dev/genpstex.c 2010-09-28 13:26:39 +0000
122 -@@ -70,7 +70,307 @@
123 - genps_end ();
124 -
125 - static char pstex_file[1000] = "";
126 --
127 -+static int iObjectsRead = 0;
128 -+static int iTextRead = 0;
129 -+static int iObjectsFileNumber = 0;
130 -+static int iStartDepth;
131 -+static int iLastDepth;
132 -+static FILE * ptCreateFile;
133 -+static char szFileName[1000];
134 -+static int iLength;
135 -+static int iPdfOutputs = 0;
136 -+
137 -+#ifdef never
138 -+static double unitlength;
139 -+static double dash_mag = 1.0;
140 -+
141 -+static int (*translate_coordinates)() = NULL;
142 -+static int (*translate_coordinates_d)() = NULL;
143 -+#else
144 -+extern double unitlength;
145 -+extern double dash_mag;
146 -+
147 -+extern int (*translate_coordinates)();
148 -+extern int (*translate_coordinates_d)();
149 -+#endif
150 -+
151 -+#define TOP 840
152 -+#define SWAP(x,y) {tmp=x; x=y; y=tmp;}
153 -+#define TRANS(x,y) (*translate_coordinates)(&x,&y)
154 -+#define TRANS2(x1,y1,x2,y2) (*translate_coordinates)(&x1,&y1); \
155 -+ (*translate_coordinates)(&x2,&y2)
156 -+#define TRANSD(x,y) (*translate_coordinates_d)(&x,&y)
157 -+
158 -+static void genpstex_p_finalize_objects(int depth);
159 -+
160 -+/*************************************************************************
161 -+ *************************************************************************/
162 -+static
163 -+translate2(xp, yp)
164 -+ int *xp, *yp;
165 -+{
166 -+ *xp = *xp + 1;
167 -+ *yp = (double)(TOP - *yp -1);
168 -+ }
169 -+
170 -+static
171 -+translate1_d(xp, yp)
172 -+ double *xp, *yp;
173 -+{
174 -+ *xp = *xp + 1.0;
175 -+ *yp = *yp + 1.0;
176 -+ }
177 -+
178 -+static
179 -+translate2_d(xp, yp)
180 -+ double *xp, *yp;
181 -+{
182 -+ *xp = *xp + 1.0;
183 -+ *yp = (double)TOP - *yp -1.0;
184 -+ }
185 -+
186 -+/*************************************************************************
187 -+ *************************************************************************/
188 -+void genpstex_p_option(opt, optarg)
189 -+char opt, *optarg;
190 -+{
191 -+ if (opt == 'p')
192 -+ {
193 -+ strcpy(pstex_file, optarg);
194 -+ }
195 -+ else
196 -+ genlatex_option(opt, optarg);
197 -+}
198 -+
199 -+
200 -+/*************************************************************************
201 -+ *************************************************************************/
202 -+void genpstex_p_start(objects)
203 -+ F_compound *objects;
204 -+{
205 -+ int tmp;
206 -+ struct stat tStat;
207 -+ long lUnitLength;
208 -+
209 -+ if (*pstex_file == '\0')
210 -+ {
211 -+ put_msg("Argument -p is mandatory to pstex_p.");
212 -+ exit(1);
213 -+ }
214 -+
215 -+ strncpy(szFileName, pstex_file, 900);
216 -+ iLength = strlen(szFileName);
217 -+
218 -+ sprintf(szFileName + iLength, ".create");
219 -+ ptCreateFile = fopen (szFileName, "wb");
220 -+
221 -+ if ( ! ptCreateFile)
222 -+ {
223 -+ put_msg("Couldn't open %s for writing", szFileName);
224 -+ exit(1);
225 -+ }
226 -+ fstat(fileno(ptCreateFile), & tStat);
227 -+ fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2));
228 -+ fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName);
229 -+
230 -+ fprintf(ptCreateFile, "while getopts \"r\" Option\n");
231 -+ fprintf(ptCreateFile, "do\n");
232 -+ fprintf(ptCreateFile, " case $Option in\n");
233 -+ fprintf(ptCreateFile, " r) iOptRemove=1;;\n");
234 -+ fprintf(ptCreateFile, " *) echo \"illegal option -$Option\"\n");
235 -+ fprintf(ptCreateFile, " esac\n");
236 -+ fprintf(ptCreateFile, "done\n");
237 -+ fprintf(ptCreateFile, "shift $(($OPTIND - 1))\n");
238 -+
239 -+ texfontsizes[0] = texfontsizes[1] =
240 -+ TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE);
241 -+
242 -+ unitlength = mag/ppi;
243 -+ dash_mag /= unitlength*80.0;
244 -+
245 -+ translate_coordinates = translate2;
246 -+ translate_coordinates_d = translate2_d;
247 -+
248 -+ TRANS2(llx, lly, urx, ury);
249 -+ if (llx > urx) SWAP(llx, urx)
250 -+ if (lly > ury) SWAP(lly, ury)
251 -+
252 -+ /* LaTeX start */
253 -+
254 -+ /* print any whole-figure comments prefixed with "%" */
255 -+ if (objects->comments) {
256 -+ fprintf(tfp,"%%\n");
257 -+ print_comments("% ",objects->comments, "");
258 -+ fprintf(tfp,"%%\n");
259 -+ }
260 -+
261 -+ lUnitLength = (long) (round(4736286.72*unitlength));
262 -+ fprintf(tfp, "\\setlength{\\unitlength}{%lisp}%%\n",
263 -+ lUnitLength);
264 -+ /* define the SetFigFont macro */
265 -+ define_setfigfont(tfp);
266 -+
267 -+ sprintf(szFileName + iLength, ".size");
268 -+ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
269 -+ if (iPdfOutputs)
270 -+ fprintf(ptCreateFile, " echo \"\\setlength\\pdfpagewidth{%3.2fpt}\\setlength\\pdfpageheight{%3.2fpt}\" > %s\n",
271 -+ (float) lUnitLength / 65536 * (urx - llx), (float) lUnitLength / 65536 * (ury - lly), szFileName);
272 -+ else
273 -+ fprintf(ptCreateFile, "echo -n\"\" > %s\n", szFileName);
274 -+ fprintf(ptCreateFile, "else\n rm -f %s\nfi\n", szFileName);
275 -+}
276 -+
277 -+/*************************************************************************
278 -+ *************************************************************************/
279 -+void genpdftex_p_start(objects)
280 -+ F_compound *objects;
281 -+{
282 -+ iPdfOutputs = 1;
283 -+ genpstex_p_start(objects);
284 -+}
285 -+
286 -+
287 -+/*************************************************************************
288 -+ *************************************************************************/
289 -+int genpstex_p_end()
290 -+{
291 -+ if (iTextRead)
292 -+ {
293 -+ fprintf(tfp, "\\end{picture}%%\n");
294 -+ iTextRead = 0;
295 -+ }
296 -+ if (iObjectsRead)
297 -+ {
298 -+ genpstex_p_finalize_objects(iLastDepth);
299 -+ iObjectsRead = 0;
300 -+ }
301 -+
302 -+ /* LaTeX ending */
303 -+ fprintf(tfp, "\\begin{picture}(%d,%d)\n", urx-llx, ury-lly);
304 -+ fprintf(tfp, "\\end{picture}%%\n");
305 -+
306 -+ fclose(ptCreateFile);
307 -+
308 -+ /* all ok */
309 -+ return 0;
310 -+}
311 -+
312 -+
313 -+/*************************************************************************
314 -+ *************************************************************************/
315 -+void genpstex_p_finalize_objects(depth)
316 -+int depth;
317 -+{
318 -+ char szFileName[1000];
319 -+ int iLength;
320 -+
321 -+ strncpy(szFileName, pstex_file, 900);
322 -+ iLength = strlen(szFileName);
323 -+
324 -+
325 -+ sprintf(szFileName + iLength, "%03d", iObjectsFileNumber++);
326 -+ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
327 -+ if (iPdfOutputs)
328 -+ {
329 -+ fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from, szFileName);
330 -+ fprintf(ptCreateFile, " | epstopdf -f --outfile %s.pdf\n", szFileName, szFileName);
331 -+ }
332 -+ else
333 -+ fprintf(ptCreateFile, "%s -L pstex -D +%d:%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName);
334 -+ fprintf(ptCreateFile, "else\n rm -f %s.", szFileName);
335 -+ if (iPdfOutputs)
336 -+ fprintf(ptCreateFile, "pdf");
337 -+ else
338 -+ fprintf(ptCreateFile, "eps");
339 -+ fprintf(ptCreateFile, "\nfi\n");
340 -+
341 -+ fprintf(tfp, "\\begin{picture}(0,0)%%\n");
342 -+/* newer includegraphics directive suggested by Stephen Harker 1/13/99 */
343 -+#if defined(LATEX2E_GRAPHICS)
344 -+# if defined(EPSFIG)
345 -+ fprintf(tfp, "\\epsfig{file=%s.eps}%%\n",szFileName);
346 -+# else
347 -+ fprintf(tfp, "\\includegraphics{%s}%%\n",szFileName);
348 -+# endif
349 -+#else
350 -+ fprintf(tfp, "\\special{psfile=%s.eps}%%\n",szFileName);
351 -+#endif
352 -+ fprintf(tfp, "\\end{picture}%%\n");
353 -+}
354 -+
355 -+/*************************************************************************
356 -+ *************************************************************************/
357 -+void genpstex_p_object(depth)
358 -+int depth;
359 -+{
360 -+ if (iTextRead)
361 -+ {
362 -+ fprintf(tfp, "\\end{picture}%%\n");
363 -+ iTextRead = 0;
364 -+ }
365 -+ if (iObjectsRead == 0)
366 -+ {
367 -+ iStartDepth = depth;
368 -+ iObjectsRead = 1;
369 -+ }
370 -+ iLastDepth = depth;
371 -+
372 -+}
373 -+
374 -+void genpstex_p_arc(obj)
375 -+F_arc *obj;
376 -+{
377 -+ genpstex_p_object(obj->depth);
378 -+}
379 -+
380 -+
381 -+void genpstex_p_ellipse(obj)
382 -+F_ellipse *obj;
383 -+{
384 -+ genpstex_p_object(obj->depth);
385 -+}
386 -+
387 -+void genpstex_p_line(obj)
388 -+F_line *obj;
389 -+{
390 -+ genpstex_p_object(obj->depth);
391 -+}
392 -+
393 -+void genpstex_p_spline(obj)
394 -+F_spline *obj;
395 -+{
396 -+ genpstex_p_object(obj->depth);
397 -+}
398 -+
399 -+
400 -+
401 -+/*************************************************************************
402 -+ *************************************************************************/
403 -+void genpstex_p_text(t)
404 -+F_text *t;
405 -+{
406 -+
407 -+ if (!special_text(t))
408 -+ genpstex_p_object(t->depth);
409 -+ else
410 -+ {
411 -+ if (iObjectsRead)
412 -+ {
413 -+ genpstex_p_finalize_objects(iLastDepth);
414 -+ iObjectsRead = 0;
415 -+ }
416 -+ if (iTextRead == 0)
417 -+ {
418 -+ fprintf(tfp, "\\begin{picture}(0,0)(%d,%d)\n", llx, lly);
419 -+ iTextRead = 1;
420 -+ }
421 -+ genlatex_text(t);
422 -+ }
423 -+
424 -+}
425 -+
426 -+/*************************************************************************
427 -+ *************************************************************************/
428 - void genpstex_t_option(opt, optarg)
429 - char opt, *optarg;
430 - {
431 -@@ -112,6 +412,8 @@
432 - else genlatex_text(t);
433 - }
434 -
435 -+/*************************************************************************
436 -+ *************************************************************************/
437 - void genpstex_text(t)
438 - F_text *t;
439 - {
440 -@@ -128,6 +430,32 @@
441 - genlatex_option(opt, optarg);
442 - }
443 -
444 -+struct driver dev_pstex_p = {
445 -+ genpstex_p_option,
446 -+ genpstex_p_start,
447 -+ gendev_null,
448 -+ genpstex_p_arc,
449 -+ genpstex_p_ellipse,
450 -+ genpstex_p_line,
451 -+ genpstex_p_spline,
452 -+ genpstex_p_text,
453 -+ genpstex_p_end,
454 -+ INCLUDE_TEXT
455 -+};
456 -+
457 -+struct driver dev_pdftex_p = {
458 -+ genpstex_p_option,
459 -+ genpdftex_p_start,
460 -+ gendev_null,
461 -+ genpstex_p_arc,
462 -+ genpstex_p_ellipse,
463 -+ genpstex_p_line,
464 -+ genpstex_p_spline,
465 -+ genpstex_p_text,
466 -+ genpstex_p_end,
467 -+ INCLUDE_TEXT
468 -+};
469 -+
470 - struct driver dev_pstex_t = {
471 - genpstex_t_option,
472 - genpstex_t_start,
473 -
474 -=== modified file 'fig2dev/drivers.h'
475 ---- fig2dev/drivers.h 2010-09-28 13:22:38 +0000
476 -+++ fig2dev/drivers.h 2010-09-28 13:29:46 +0000
477 -@@ -30,8 +30,10 @@
478 - extern struct driver dev_pdf;
479 - extern struct driver dev_pdftex;
480 - extern struct driver dev_pdftex_t;
481 -+extern struct driver dev_pdftex_p;
482 - extern struct driver dev_pstex;
483 - extern struct driver dev_pstex_t;
484 -+extern struct driver dev_pstex_p;
485 - extern struct driver dev_pstricks;
486 - extern struct driver dev_textyl;
487 - extern struct driver dev_tk;
488 -@@ -75,6 +77,7 @@
489 - {"pdf", &dev_pdf},
490 - {"pdftex", &dev_pdftex},
491 - {"pdftex_t", &dev_pdftex_t},
492 -+ {"pdftex_p", &dev_pdftex_p},
493 - {"pic", &dev_pic},
494 - {"pictex", &dev_pictex},
495 - {"png", &dev_bitmaps},
496 -@@ -82,6 +85,7 @@
497 - {"ps", &dev_ps},
498 - {"pstex", &dev_pstex},
499 - {"pstex_t", &dev_pstex_t},
500 -+ {"pstex_p", &dev_pstex_p},
501 - {"pstricks", &dev_pstricks},
502 - {"ptk", &dev_ptk},
503 - {"shape", &dev_shape},
504 -
505 -=== modified file 'fig2dev/fig2dev.c'
506 ---- fig2dev/fig2dev.c 2010-09-28 13:22:38 +0000
507 -+++ fig2dev/fig2dev.c 2010-09-28 13:26:39 +0000
508 -@@ -649,6 +649,18 @@
509 - #endif /* NFSS */
510 - printf(" -p name name of the PostScript file to be overlaid\n");
511 -
512 -+ printf("PSTEX_P and PDFTEX_P Options:\n");
513 -+ printf(" -p name basename of the files to be created\n");
514 -+#ifdef NFSS
515 -+ printf(" -F don't set font family/series/shape, so you can\n");
516 -+ printf(" set it from latex\n");
517 -+#endif /* NFSS */
518 -+ printf(" -d dmag set separate magnification for length of line dashes to dmag\n");
519 -+ printf(" -E num set encoding for text translation (0 no translation,\n");
520 -+ printf(" 1 ISO-8859-1, 2 ISO-8859-2)\n");
521 -+ printf(" -l lwidth set threshold between thin and thick lines to lwidth\n");
522 -+ printf(" -v verbose mode\n");
523 -+
524 - printf("SHAPE (ShapePar driver) Options:\n");
525 - printf(" -n name Set basename of the macro (e.g. \"face\" gives faceshape and facepar)\n");
526 - printf("Tcl/Tk (tk) and Perl/Tk (ptk) Options:\n");
527 -@@ -776,6 +788,12 @@
528 - int rec_comp(r1, r2)
529 - struct obj_rec *r1, *r2;
530 - {
531 -+ if (r2->depth == r1->depth)
532 -+ {
533 -+ if ((r1->gendev == dev->text) ^ (r2->gendev == dev->text))
534 -+ return ((r1->gendev == dev->text) * 2 - 1);
535 -+ return (0);
536 -+ }
537 - return (r2->depth - r1->depth);
538 - }
539 -
540 -