diff options
author | Peter Volkov <pva@gentoo.org> | 2010-01-14 19:02:36 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2010-01-14 19:02:36 +0000 |
commit | 68a547560617ad62e99d183cdbab5b07434d083e (patch) | |
tree | c8c2cb896f4619f9c55b87c8cd598bf4954681dc /media-gfx/transfig | |
parent | Add a die call if DBUS USE flag is enable with DHCP off, this is a workaround... (diff) | |
download | historical-68a547560617ad62e99d183cdbab5b07434d083e.tar.gz historical-68a547560617ad62e99d183cdbab5b07434d083e.tar.bz2 historical-68a547560617ad62e99d183cdbab5b07434d083e.zip |
Version bump. Added workaround for printing with cups, fig2mpdf-1.1.2 patch is separated in two parts to ease applying Debian typo fixes into manual.
Package-Manager: portage-2.1.7.16/cvs/Linux x86_64
Diffstat (limited to 'media-gfx/transfig')
-rw-r--r-- | media-gfx/transfig/ChangeLog | 15 | ||||
-rw-r--r-- | media-gfx/transfig/Manifest | 9 | ||||
-rw-r--r-- | media-gfx/transfig/files/transfig-3.2.5c-avoid_warnings.patch | 55 | ||||
-rw-r--r-- | media-gfx/transfig/files/transfig-3.2.5c-cups_workaround.patch | 20 | ||||
-rw-r--r-- | media-gfx/transfig/files/transfig-3.2.5c-fig2mpdf.patch | 529 | ||||
-rw-r--r-- | media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch | 44 | ||||
-rw-r--r-- | media-gfx/transfig/transfig-3.2.5c.ebuild | 87 |
7 files changed, 756 insertions, 3 deletions
diff --git a/media-gfx/transfig/ChangeLog b/media-gfx/transfig/ChangeLog index ac4a6f5d5ae7..6954a98b9482 100644 --- a/media-gfx/transfig/ChangeLog +++ b/media-gfx/transfig/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for media-gfx/transfig -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/transfig/ChangeLog,v 1.49 2008/12/02 22:58:28 ranger Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/transfig/ChangeLog,v 1.50 2010/01/14 19:02:36 pva Exp $ + +*transfig-3.2.5c (14 Jan 2010) + + 14 Jan 2010; Peter Volkov <pva@gentoo.org> +transfig-3.2.5c.ebuild, + +files/transfig-3.2.5c-avoid_warnings.patch, + +files/transfig-3.2.5c-cups_workaround.patch, + +files/transfig-3.2.5c-fig2mpdf.patch, + +files/transfig-3.2.5c-maxfontsize.patch: + Version bump. Added workaround for printing with cups, fig2mpdf-1.1.2 + patch is separated in two parts to ease applying Debian typo fixes into + manual. 02 Dec 2008; Brent Baude <ranger@gentoo.org> transfig-3.2.5-r2.ebuild: Marking transfig-3.2.5-r2 ppc64 for bug 244957 diff --git a/media-gfx/transfig/Manifest b/media-gfx/transfig/Manifest index 9ca6a4c22003..fb50e4c4d71c 100644 --- a/media-gfx/transfig/Manifest +++ b/media-gfx/transfig/Manifest @@ -4,11 +4,18 @@ AUX transfig-3.2.5-displaywho.patch 2119 RMD160 eb4cddc691a91eb13a2edb78cba0936d AUX transfig-3.2.5-fig2ps2tex_bashisms.patch 966 RMD160 bc80f12a31aa1bb7974b18be439e334998cc5d2c SHA1 452ad3288423fd792b93b1c008e3e7bc4f39c732 SHA256 b9d0c6aae25e4bfd72759eb2ee385b1e0b61d23a0923c57e5b3de9f518049e96 AUX transfig-3.2.5-imagemap.patch 1385 RMD160 ffacdadeab88f03e38e17892acb01646f8681075 SHA1 84fdcd14fe2294532e32c81eabe6f97451a38e98 SHA256 79aef3d182eccccefa7250e2629fded6e5e4a583af49587ff7cdf850784d4583 AUX transfig-3.2.5-locale.patch 952 RMD160 3b29c06b4e963f5c905fa0ec2ea10e9e4a0b3556 SHA1 489fc7d1545e621ace35e7fa592f935c4ee24a84 SHA256 160024e4657fa4c36dc75bf22195febb4ec221b5bada81be6a3b3a4813f85b16 +AUX transfig-3.2.5c-avoid_warnings.patch 1326 RMD160 99b267415954c17931507a4bc52b3eb527f529e5 SHA1 06621d30e2fb92de4a9184f8bf559c4dc337e151 SHA256 f4d2f7b9f28818ed023dbfa40f5cda4e646406509a9bdb8d613bc247af33b641 +AUX transfig-3.2.5c-cups_workaround.patch 759 RMD160 605188ec440961d1b78a98ead2b441ae6eca85bc SHA1 952d5686aadeb8d2c7f575a3c3b752cca3c2b885 SHA256 c94ad9d36db495f95cd7ddb0c0d805f024338e6b8f9f1ff509571cb60842e538 +AUX transfig-3.2.5c-fig2mpdf.patch 14934 RMD160 f5fcccd8a4bcefccb55d72e364daa992dbb75c30 SHA1 196f9713d243c6f180e64462b11b0d34bb4f910a SHA256 4898da92e863633aca27a5394c927158f30d1994dfc51050d65858a60dc413e7 +AUX transfig-3.2.5c-maxfontsize.patch 1956 RMD160 8412b3ecb17cb6ba2709c2f88708758e588309fa SHA1 e9538ab6fecee996d752bba2ec0969bdcbcffe47 SHA256 b3f1ff76e940a7912f7617a62355d1cc0aec6cc793da1d2472fb3dcb4c2744c6 AUX transfig-ru_RU.CP1251.ps 6079 RMD160 0a1d988be40290aec8e6b8d254738b276acfb4e8 SHA1 253ae79c14c26af0c7e4fac50106694b4223b164 SHA256 8b3ce8f098776fb8ed1623903fe4af70e439d708e6b58444c72023c2b4d45a3c AUX transfig-ru_RU.KOI8-R.ps 6015 RMD160 a5aa1cbb23e5e65cee9f08f206d06120cbe45613 SHA1 4fe1c011e58753a2f6bd28dc0d9436cbf45a7701 SHA256 af71380057217460eb476e9a6800e3c7bbe22db44420d0d5d6939bd3321a4c86 AUX transfig-uk_UA.KOI8-U.ps 6023 RMD160 d0cf1242eac3122039306b06da0cc83a5fbb941a SHA1 a56f0cc4c5abaa43da454bc8ef6757e02e6b5fde SHA256 b71427fb5e938ee285aea7290af41bcfc1f6820520f5ca7a2746dd51c00b5eee +DIST fig2mpdf-1.1.2.tar.bz2 191438 RMD160 105b6d279dc1fb533eeb325104837b145b058915 SHA1 e8084c2d70570f0cbf118c73793bad44282e9a71 SHA256 35f02293592244d5ff4a7a60e00023696c05dec855495871226c67669ba4daf3 DIST transfig-3.2.5-fig2mpdf.patch.bz2 203696 RMD160 4bc99222a3570f6a0d042336741fd392ca3d2579 SHA1 03d0467501e5af2d7833abad47b5778a8b49cf38 SHA256 f29b7e5ddb7ff3209559338065f79886bb5722101948db83369d0d04946dc4d9 DIST transfig.3.2.5.tar.gz 394296 RMD160 435615bded662225127ea564fc746e9cb0058f18 SHA1 2657c104d0099dcb4565a8762a9543310e55e767 SHA256 ea5a5724c8fa1dcb52531c4d44ec8a59830b2dc2da11e561e15240e8dd16d043 +DIST transfig.3.2.5c.tar.gz 431601 RMD160 f757857945341093b03f3dce4745c1c131c933fb SHA1 20013b350e81400943cd91744173445d7bd4d98e SHA256 608c390b52524277e70cd04f0bdb5a437190b9a5bd586c67966db3f2921f2191 EBUILD transfig-3.2.5-r2.ebuild 2503 RMD160 b564a98aaf5bb60e93a55b47689ac390b6481946 SHA1 f64b725c9ee6375baaf64740ea5d17164e4c1703 SHA256 29017d8b0a165cba50b712b44114c86a474a56cddf93abcd26e10f26c164b636 -MISC ChangeLog 6976 RMD160 385b76b479b1da5647b6985d3000ff7a1f0d07bb SHA1 ded22921f5fa2ef2e8b8bf8c593a7fafcd5e9143 SHA256 d92491c00bc1ac491ab40466c3a5c16da9dc10bf05ec973961f63f0b1a80386d +EBUILD transfig-3.2.5c.ebuild 2515 RMD160 e4a7cde51197b96c8f0c53048f1b4db7103378f3 SHA1 e737d20d0e132349003962546b1867863cd3be64 SHA256 4aad1933bee494ef2de041c6f842c1c034b65739778481db6009bf01a53ecb88 +MISC ChangeLog 7412 RMD160 c14df53988624d60a3064a5713f0dcf9d6a2f3e8 SHA1 b5715f96911357bd104ccd15aab3937220cebca4 SHA256 f673115e3fde6f93a51c0129d22e46f0e3ac9c3aab726c4239df1c5c4b53c1cd MISC metadata.xml 250 RMD160 f27bc8272125f15d03c2bfc87e961842bdb303ae SHA1 c4991bbfca89085d81f56ed53f8b0c827a35a4f1 SHA256 68999dde540491efec63a8f47366dbc2d5f2c9f2c1211709d92366a56b6cd27d diff --git a/media-gfx/transfig/files/transfig-3.2.5c-avoid_warnings.patch b/media-gfx/transfig/files/transfig-3.2.5c-avoid_warnings.patch new file mode 100644 index 000000000000..1743250e43f6 --- /dev/null +++ b/media-gfx/transfig/files/transfig-3.2.5c-avoid_warnings.patch @@ -0,0 +1,55 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 07_avoid_warnings.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Some changes to avoid compiler warnings. + +@DPATCH@ +diff -urNad transfig~/fig2dev/dev/genpstex.c transfig/fig2dev/dev/genpstex.c +--- transfig~/fig2dev/dev/genpstex.c ++++ transfig/fig2dev/dev/genpstex.c +@@ -167,6 +167,10 @@ + INCLUDE_TEXT + }; + ++extern void genpdf_option(); ++extern void genpdf_start(); ++extern int genpdf_end(); ++ + struct driver dev_pdftex = { + genpdf_option, + genpdf_start, +diff -urNad transfig~/transfig/sys.c transfig/transfig/sys.c +--- transfig~/transfig/sys.c ++++ transfig/transfig/sys.c +@@ -15,6 +15,8 @@ + */ + + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include "transfig.h" + + #define MAXSYS 10000 +diff -urNad transfig~/transfig/transfig.c transfig/transfig/transfig.c +--- transfig~/transfig/transfig.c ++++ transfig/transfig/transfig.c +@@ -25,6 +25,7 @@ + */ + + #include <stdio.h> ++#include <stdlib.h> + #include "patchlevel.h" + #include "transfig.h" + +diff -urNad transfig~/transfig/txfile.c transfig/transfig/txfile.c +--- transfig~/transfig/txfile.c ++++ transfig/transfig/txfile.c +@@ -15,6 +15,7 @@ + */ + + #include <stdio.h> ++#include <stdlib.h> + #include "transfig.h" + + /* diff --git a/media-gfx/transfig/files/transfig-3.2.5c-cups_workaround.patch b/media-gfx/transfig/files/transfig-3.2.5c-cups_workaround.patch new file mode 100644 index 000000000000..d026b98d214d --- /dev/null +++ b/media-gfx/transfig/files/transfig-3.2.5c-cups_workaround.patch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 19_cups_workaround.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change PS magic string from PS-Adobe-2.0 to PS to work around +## DP: incompatibilities with CUPS (Closes: #443832). + +@DPATCH@ +diff -urNad transfig~/fig2dev/dev/genps.c transfig/fig2dev/dev/genps.c +--- transfig~/fig2dev/dev/genps.c ++++ transfig/fig2dev/dev/genps.c +@@ -619,7 +619,7 @@ + if (epsflag) + fprintf(tfp, "%%!PS-Adobe-2.0 EPSF-2.0\n"); /* Encapsulated PostScript */ + else +- fprintf(tfp, "%%!PS-Adobe-2.0\n"); /* PostScript magic strings */ ++ fprintf(tfp, "%%!PS\n"); /* PostScript magic strings */ + + #ifdef DISPLAYWHO + who = getpwuid(getuid()); diff --git a/media-gfx/transfig/files/transfig-3.2.5c-fig2mpdf.patch b/media-gfx/transfig/files/transfig-3.2.5c-fig2mpdf.patch new file mode 100644 index 000000000000..fd075cb425af --- /dev/null +++ b/media-gfx/transfig/files/transfig-3.2.5c-fig2mpdf.patch @@ -0,0 +1,529 @@ +Creating multiple PDF or EPS figures for overlaying + +http://p3f.gmxhome.de/fig2mpdf/fig2mpdf.html + +This patch includes only transfig driver part. For script itself and example +usage take a look on fig2mpdf-1.1.2.tar.bz2. + +=== modified file 'doc/fig2dev.1' +--- doc/fig2dev.1 2010-01-12 12:50:24 +0000 ++++ doc/fig2dev.1 2010-01-12 12:50:38 +0000 +@@ -53,8 +53,8 @@ + \fBbox, cgm, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg, + latex, map (HTML image map), mf (MetaFont), + mp (MetaPost), mmp (Multi-MetaPost), +-pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps, +-pstex, pstex_t, ptk (Perl/tk), ++pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, pictex, png, ppm, ps, ++pstex, pstex_t, pstex_p, ptk (Perl/tk), + shape (LaTeX shaped paragraphs), sld (AutoCad slide format), + svg (beta driver), textyl, + tiff, tk (tcl/tk), tpic, xbm and +@@ -880,6 +880,62 @@ + specifies the name of the PostScript file to be overlaid. + If not set or its value is null then no PS file will be inserted. + ++.SH PSTEX_P and PDFTEX_P OPTIONS ++The \fBpstex_p\fR language has the same intention as ++the combination of \fBpstex\fR and \fBpstex_t\fR. ++The only reason to use \fBpstex_p\fR is that you have partially overlayed texts. ++\fBpstex_p\fR splits the Fig file concerning the depths of existing texts. Because ++of it's necessary to get the resulting size of the figure for the pdf document ++you have to specify the target document format ++(i.e. using \fBpstex_p\fR rsp. \fBpdftex_p\fR). ++.br ++Two files results by using this language: ++.br ++.HP +.3i ++1) A bash script for creating and removing the necessary graphics files. ++Extension: \fB.create\fR ++.HP +.3i ++.HP +.3i ++2) The latex code which includes all graphics files and special texts. Content is ++put to stdout. ++ ++.TP ++The \fBpstex_p\fR driver has the following special options: ++ ++.TP ++.B \-p basename ++specifies the basename of the files to be created (see (1) above). This option ++is mandatory. ++.TP ++.B "\-d dmag" ++Set a separate magnification for the length of line dashes to ++.I dmag. ++.TP ++.B \-E num ++Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2) ++.TP ++.B "\-l lwidth" ++Sets the threshold between LaTeX thin and thick lines to ++.I lwidth ++pixels. ++LaTeX supports only two different line width: \\thinlines and \\thicklines. ++Lines of width greater than ++.I lwidth ++pixels are drawn as \\thicklines. ++Also affects the size of dots in dotted line style. ++The default is 1. ++.TP ++.B \-v ++Verbose mode. ++.TP ++.B \-F ++Don't set the font face, series, and style; only set it's size and the ++baselineskip. By default, fig2dev sets all 5 font parameters when it ++puts some text. The disadvantage is that you can't set the font from your ++LaTeX document. With this option on, you can set the font from your LaTeX ++document (like "\fB\\sfshape \\input picture.eepic\fR"). ++ ++ + .SH TK and PTK OPTIONS (tcl/tk and Perl/tk) + .TP + .B -l dummy_arg +@@ -925,6 +981,13 @@ + .PP + Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps) + languages. ++.PP ++In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of ++the special texts set by pdflatex afterwards. If these texts are bigger than ++expected the calculated bounding box might be too small so that some texts passes ++over the figure boundaries. If this happen you have to put an invisible ++rectangle (line width 0) around the text or the entire figure. ++ + .SH COPYRIGHT + Copyright (c) 1991 Micah Beck + .br +@@ -1005,3 +1068,7 @@ + The GBX (Gerber) driver was written by + .br + Edward Grace (ej.grace@imperial.ac.uk). ++.sp ++The PSTEX_P and PDFTEX_P drivers (overlayed LaTeX texts) was written by ++.br ++Michael Pfeiffer (p3f@gmx.de) + +=== modified file 'fig2dev/dev/genpstex.c' +--- fig2dev/dev/genpstex.c 2010-01-12 12:50:24 +0000 ++++ fig2dev/dev/genpstex.c 2010-01-12 12:50:38 +0000 +@@ -70,7 +70,307 @@ + genps_end (); + + static char pstex_file[1000] = ""; +- ++static int iObjectsRead = 0; ++static int iTextRead = 0; ++static int iObjectsFileNumber = 0; ++static int iStartDepth; ++static int iLastDepth; ++static FILE * ptCreateFile; ++static char szFileName[1000]; ++static int iLength; ++static int iPdfOutputs = 0; ++ ++#ifdef never ++static double unitlength; ++static double dash_mag = 1.0; ++ ++static int (*translate_coordinates)() = NULL; ++static int (*translate_coordinates_d)() = NULL; ++#else ++extern double unitlength; ++extern double dash_mag; ++ ++extern int (*translate_coordinates)(); ++extern int (*translate_coordinates_d)(); ++#endif ++ ++#define TOP 840 ++#define SWAP(x,y) {tmp=x; x=y; y=tmp;} ++#define TRANS(x,y) (*translate_coordinates)(&x,&y) ++#define TRANS2(x1,y1,x2,y2) (*translate_coordinates)(&x1,&y1); \ ++ (*translate_coordinates)(&x2,&y2) ++#define TRANSD(x,y) (*translate_coordinates_d)(&x,&y) ++ ++static void genpstex_p_finalize_objects(int depth); ++ ++/************************************************************************* ++ *************************************************************************/ ++static ++translate2(xp, yp) ++ int *xp, *yp; ++{ ++ *xp = *xp + 1; ++ *yp = (double)(TOP - *yp -1); ++ } ++ ++static ++translate1_d(xp, yp) ++ double *xp, *yp; ++{ ++ *xp = *xp + 1.0; ++ *yp = *yp + 1.0; ++ } ++ ++static ++translate2_d(xp, yp) ++ double *xp, *yp; ++{ ++ *xp = *xp + 1.0; ++ *yp = (double)TOP - *yp -1.0; ++ } ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpstex_p_option(opt, optarg) ++char opt, *optarg; ++{ ++ if (opt == 'p') ++ { ++ strcpy(pstex_file, optarg); ++ } ++ else ++ genlatex_option(opt, optarg); ++} ++ ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpstex_p_start(objects) ++ F_compound *objects; ++{ ++ int tmp; ++ struct stat tStat; ++ long lUnitLength; ++ ++ if (*pstex_file == '\0') ++ { ++ put_msg("Argument -p is mandatory to pstex_p."); ++ exit(1); ++ } ++ ++ strncpy(szFileName, pstex_file, 900); ++ iLength = strlen(szFileName); ++ ++ sprintf(szFileName + iLength, ".create"); ++ ptCreateFile = fopen (szFileName, "wb"); ++ ++ if ( ! ptCreateFile) ++ { ++ put_msg("Couldn't open %s for writing", szFileName); ++ exit(1); ++ } ++ fstat(fileno(ptCreateFile), & tStat); ++ fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2)); ++ fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName); ++ ++ fprintf(ptCreateFile, "while getopts \"r\" Option\n"); ++ fprintf(ptCreateFile, "do\n"); ++ fprintf(ptCreateFile, " case $Option in\n"); ++ fprintf(ptCreateFile, " r) iOptRemove=1;;\n"); ++ fprintf(ptCreateFile, " *) echo \"illegal option -$Option\"\n"); ++ fprintf(ptCreateFile, " esac\n"); ++ fprintf(ptCreateFile, "done\n"); ++ fprintf(ptCreateFile, "shift $(($OPTIND - 1))\n"); ++ ++ texfontsizes[0] = texfontsizes[1] = ++ TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE); ++ ++ unitlength = mag/ppi; ++ dash_mag /= unitlength*80.0; ++ ++ translate_coordinates = translate2; ++ translate_coordinates_d = translate2_d; ++ ++ TRANS2(llx, lly, urx, ury); ++ if (llx > urx) SWAP(llx, urx) ++ if (lly > ury) SWAP(lly, ury) ++ ++ /* LaTeX start */ ++ ++ /* print any whole-figure comments prefixed with "%" */ ++ if (objects->comments) { ++ fprintf(tfp,"%%\n"); ++ print_comments("% ",objects->comments, ""); ++ fprintf(tfp,"%%\n"); ++ } ++ ++ lUnitLength = (long) (round(4736286.72*unitlength)); ++ fprintf(tfp, "\\setlength{\\unitlength}{%lisp}%%\n", ++ lUnitLength); ++ /* define the SetFigFont macro */ ++ define_setfigfont(tfp); ++ ++ sprintf(szFileName + iLength, ".size"); ++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n"); ++ if (iPdfOutputs) ++ fprintf(ptCreateFile, " echo \"\\setlength\\pdfpagewidth{%3.2fpt}\\setlength\\pdfpageheight{%3.2fpt}\" > %s\n", ++ (float) lUnitLength / 65536 * (urx - llx), (float) lUnitLength / 65536 * (ury - lly), szFileName); ++ else ++ fprintf(ptCreateFile, "echo -n\"\" > %s\n", szFileName); ++ fprintf(ptCreateFile, "else\n rm -f %s\nfi\n", szFileName); ++} ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpdftex_p_start(objects) ++ F_compound *objects; ++{ ++ iPdfOutputs = 1; ++ genpstex_p_start(objects); ++} ++ ++ ++/************************************************************************* ++ *************************************************************************/ ++int genpstex_p_end() ++{ ++ if (iTextRead) ++ { ++ fprintf(tfp, "\\end{picture}%%\n"); ++ iTextRead = 0; ++ } ++ if (iObjectsRead) ++ { ++ genpstex_p_finalize_objects(iLastDepth); ++ iObjectsRead = 0; ++ } ++ ++ /* LaTeX ending */ ++ fprintf(tfp, "\\begin{picture}(%d,%d)\n", urx-llx, ury-lly); ++ fprintf(tfp, "\\end{picture}%%\n"); ++ ++ fclose(ptCreateFile); ++ ++ /* all ok */ ++ return 0; ++} ++ ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpstex_p_finalize_objects(depth) ++int depth; ++{ ++ char szFileName[1000]; ++ int iLength; ++ ++ strncpy(szFileName, pstex_file, 900); ++ iLength = strlen(szFileName); ++ ++ ++ sprintf(szFileName + iLength, "%03d", iObjectsFileNumber++); ++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n"); ++ if (iPdfOutputs) ++ { ++ fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from, szFileName); ++ fprintf(ptCreateFile, " | epstopdf -f --outfile %s.pdf\n", szFileName, szFileName); ++ } ++ else ++ fprintf(ptCreateFile, "%s -L pstex -D +%d:%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName); ++ fprintf(ptCreateFile, "else\n rm -f %s.", szFileName); ++ if (iPdfOutputs) ++ fprintf(ptCreateFile, "pdf"); ++ else ++ fprintf(ptCreateFile, "eps"); ++ fprintf(ptCreateFile, "\nfi\n"); ++ ++ fprintf(tfp, "\\begin{picture}(0,0)%%\n"); ++/* newer includegraphics directive suggested by Stephen Harker 1/13/99 */ ++#if defined(LATEX2E_GRAPHICS) ++# if defined(EPSFIG) ++ fprintf(tfp, "\\epsfig{file=%s.eps}%%\n",szFileName); ++# else ++ fprintf(tfp, "\\includegraphics{%s}%%\n",szFileName); ++# endif ++#else ++ fprintf(tfp, "\\special{psfile=%s.eps}%%\n",szFileName); ++#endif ++ fprintf(tfp, "\\end{picture}%%\n"); ++} ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpstex_p_object(depth) ++int depth; ++{ ++ if (iTextRead) ++ { ++ fprintf(tfp, "\\end{picture}%%\n"); ++ iTextRead = 0; ++ } ++ if (iObjectsRead == 0) ++ { ++ iStartDepth = depth; ++ iObjectsRead = 1; ++ } ++ iLastDepth = depth; ++ ++} ++ ++void genpstex_p_arc(obj) ++F_arc *obj; ++{ ++ genpstex_p_object(obj->depth); ++} ++ ++ ++void genpstex_p_ellipse(obj) ++F_ellipse *obj; ++{ ++ genpstex_p_object(obj->depth); ++} ++ ++void genpstex_p_line(obj) ++F_line *obj; ++{ ++ genpstex_p_object(obj->depth); ++} ++ ++void genpstex_p_spline(obj) ++F_spline *obj; ++{ ++ genpstex_p_object(obj->depth); ++} ++ ++ ++ ++/************************************************************************* ++ *************************************************************************/ ++void genpstex_p_text(t) ++F_text *t; ++{ ++ ++ if (!special_text(t)) ++ genpstex_p_object(t->depth); ++ else ++ { ++ if (iObjectsRead) ++ { ++ genpstex_p_finalize_objects(iLastDepth); ++ iObjectsRead = 0; ++ } ++ if (iTextRead == 0) ++ { ++ fprintf(tfp, "\\begin{picture}(0,0)(%d,%d)\n", llx, lly); ++ iTextRead = 1; ++ } ++ genlatex_text(t); ++ } ++ ++} ++ ++/************************************************************************* ++ *************************************************************************/ + void genpstex_t_option(opt, optarg) + char opt, *optarg; + { +@@ -112,6 +412,8 @@ + else genlatex_text(t); + } + ++/************************************************************************* ++ *************************************************************************/ + void genpstex_text(t) + F_text *t; + { +@@ -128,6 +430,32 @@ + genlatex_option(opt, optarg); + } + ++struct driver dev_pstex_p = { ++ genpstex_p_option, ++ genpstex_p_start, ++ gendev_null, ++ genpstex_p_arc, ++ genpstex_p_ellipse, ++ genpstex_p_line, ++ genpstex_p_spline, ++ genpstex_p_text, ++ genpstex_p_end, ++ INCLUDE_TEXT ++}; ++ ++struct driver dev_pdftex_p = { ++ genpstex_p_option, ++ genpdftex_p_start, ++ gendev_null, ++ genpstex_p_arc, ++ genpstex_p_ellipse, ++ genpstex_p_line, ++ genpstex_p_spline, ++ genpstex_p_text, ++ genpstex_p_end, ++ INCLUDE_TEXT ++}; ++ + struct driver dev_pstex_t = { + genpstex_t_option, + genpstex_t_start, + +=== modified file 'fig2dev/drivers.h' +--- fig2dev/drivers.h 2010-01-12 12:50:24 +0000 ++++ fig2dev/drivers.h 2010-01-12 12:50:38 +0000 +@@ -30,8 +30,10 @@ + extern struct driver dev_pdf; + extern struct driver dev_pdftex; + extern struct driver dev_pdftex_t; ++extern struct driver dev_pdftex_p; + extern struct driver dev_pstex; + extern struct driver dev_pstex_t; ++extern struct driver dev_pstex_p; + extern struct driver dev_textyl; + extern struct driver dev_tk; + extern struct driver dev_ptk; +@@ -74,6 +76,7 @@ + {"pdf", &dev_pdf}, + {"pdftex", &dev_pdftex}, + {"pdftex_t", &dev_pdftex_t}, ++ {"pdftex_p", &dev_pdftex_p}, + {"pic", &dev_pic}, + {"pictex", &dev_pictex}, + {"png", &dev_bitmaps}, +@@ -81,6 +84,7 @@ + {"ps", &dev_ps}, + {"pstex", &dev_pstex}, + {"pstex_t", &dev_pstex_t}, ++ {"pstex_p", &dev_pstex_p}, + {"ptk", &dev_ptk}, + {"shape", &dev_shape}, + {"sld", &dev_bitmaps}, + +=== modified file 'fig2dev/fig2dev.c' +--- fig2dev/fig2dev.c 2010-01-12 12:50:24 +0000 ++++ fig2dev/fig2dev.c 2010-01-12 12:50:38 +0000 +@@ -614,6 +614,18 @@ + #endif /* NFSS */ + printf(" -p name name of the PostScript file to be overlaid\n"); + ++ printf("PSTEX_P and PDFTEX_P Options:\n"); ++ printf(" -p name basename of the files to be created\n"); ++#ifdef NFSS ++ printf(" -F don't set font family/series/shape, so you can\n"); ++ printf(" set it from latex\n"); ++#endif /* NFSS */ ++ printf(" -d dmag set separate magnification for length of line dashes to dmag\n"); ++ printf(" -E num set encoding for text translation (0 no translation,\n"); ++ printf(" 1 ISO-8859-1, 2 ISO-8859-2)\n"); ++ printf(" -l lwidth set threshold between thin and thick lines to lwidth\n"); ++ printf(" -v verbose mode\n"); ++ + printf("SHAPE (ShapePar driver) Options:\n"); + printf(" -n name Set basename of the macro (e.g. \"face\" gives faceshape and facepar)\n"); + printf("Tcl/Tk (tk) and Perl/Tk (ptk) Options:\n"); +@@ -741,6 +753,12 @@ + int rec_comp(r1, r2) + struct obj_rec *r1, *r2; + { ++ if (r2->depth == r1->depth) ++ { ++ if ((r1->gendev == dev->text) ^ (r2->gendev == dev->text)) ++ return ((r1->gendev == dev->text) * 2 - 1); ++ return (0); ++ } + return (r2->depth - r1->depth); + } + + diff --git a/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch b/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch new file mode 100644 index 000000000000..9ce105fe9355 --- /dev/null +++ b/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch @@ -0,0 +1,44 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09_maxfontsize.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: For fonts >=42pt use the given font size in TeX instead of +## DP: restricting this to 42pt. This allows to create posters using +## DP: \usepackage{type1cm}. See +## DP: http://linuxgazette.vlsm.org/issue96/artime.html and Bug#343139 + +@DPATCH@ +diff -urNad transfig~/LATEX.AND.XFIG transfig/LATEX.AND.XFIG +--- transfig~/LATEX.AND.XFIG ++++ transfig/LATEX.AND.XFIG +@@ -55,7 +55,7 @@ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeX Preamble %%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +-\documentstyle[12pt,bezier,amstex]{article} % include bezier curves ++\documentclass[12pt,bezier,amstex]{article} % include bezier curves + \renewcommand\baselinestretch{1.0} % single space + \pagestyle{empty} % no headers and page numbers + \oddsidemargin -10 true pt % Left margin on odd-numbered pages. +@@ -72,7 +72,9 @@ + \usepackage{epsfig} + + \usepackage{graphicx} % Graphics package +- ++ ++\usepackage{type1cm} % Necessary for fonts bigger than 42pt ++ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Document Beginning %%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +diff -urNad transfig~/fig2dev/dev/texfonts.h transfig/fig2dev/dev/texfonts.h +--- transfig~/fig2dev/dev/texfonts.h ++++ transfig/fig2dev/dev/texfonts.h +@@ -86,6 +86,7 @@ + + #define TEXFONTSIZE(S) (texfontsizes[((S) <= MAXFONTSIZE) ? (int)(round(S))\ + : (MAXFONTSIZE-1)]) ++#define TEXFONTSIZE(S) (((S) <= MAXFONTSIZE) ? texfontsizes[(int)(round(S))] : (S)) + #define TEXFONTMAG(T) TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : fontmag)) + + void setfigfont( F_text *text ); /* genepic.c */ diff --git a/media-gfx/transfig/transfig-3.2.5c.ebuild b/media-gfx/transfig/transfig-3.2.5c.ebuild new file mode 100644 index 000000000000..f4d690fc99b8 --- /dev/null +++ b/media-gfx/transfig/transfig-3.2.5c.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/transfig/transfig-3.2.5c.ebuild,v 1.1 2010/01/14 19:02:36 pva Exp $ + +EAPI="2" +inherit toolchain-funcs eutils flag-o-matic + +MY_P=${PN}.${PV} + +DESCRIPTION="A set of tools for creating TeX documents with graphics" +HOMEPAGE="http://www.xfig.org/" +SRC_URI="http://xfig.org/software/xfig/${PV/[a-z]}/${MY_P}.tar.gz + mirror://gentoo/fig2mpdf-1.1.2.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +RDEPEND="x11-libs/libXpm + >=media-libs/jpeg-6 + media-libs/libpng + x11-apps/rgb" +DEPEND="${RDEPEND} + x11-misc/imake + app-text/rman" + +S=${WORKDIR}/${MY_P} + +sed_Imakefile() { + # see fig2dev/Imakefile for details + vars2subs="BINDIR=/usr/bin + MANDIR=/usr/share/man/man\$\(MANSUFFIX\) + XFIGLIBDIR=/usr/share/xfig + USEINLINE=-DUSE_INLINE + RGB=/usr/share/X11/rgb.txt + FIG2DEV_LIBDIR=/usr/share/fig2dev" + + for variable in ${vars2subs} ; do + varname=${variable%%=*} + varval=${variable##*=} + sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@" + done +} + +src_prepare() { + find . -type f -exec chmod a-x '{}' \; + find . -name Makefile -delete + epatch "${FILESDIR}"/${P}-cups_workaround.patch + epatch "${FILESDIR}"/${P}-avoid_warnings.patch + epatch "${FILESDIR}"/${P}-fig2mpdf.patch + epatch "${FILESDIR}"/${P}-maxfontsize.patch + sed -e 's:-L$(ZLIBDIR) -lz::' \ + -e 's: -lX11::' \ + -i fig2dev/Imakefile || die + sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile +} + +src_compile() { + xmkmf || die "xmkmf failed" + emake Makefiles || die "make Makefiles failed" + + emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" \ + USRLIBDIR=/usr/$(get_libdir) || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" \ + ${transfig_conf} install install.man || die + + dobin "${WORKDIR}/fig2mpdf/fig2mpdf" || die + doman "${WORKDIR}/fig2mpdf/fig2mpdf.1" || die + + insinto /usr/share/fig2dev/ + newins "${FILESDIR}/transfig-ru_RU.CP1251.ps" ru_RU.CP1251.ps || die + newins "${FILESDIR}/transfig-ru_RU.KOI8-R.ps" ru_RU.KOI8-R.ps || die + newins "${FILESDIR}/transfig-uk_UA.KOI8-U.ps" uk_UA.KOI8-U.ps || die + + dohtml "${WORKDIR}/fig2mpdf/doc/"* || die + + dodoc README CHANGES LATEX.AND.XFIG NOTES || die +} + +pkg_postinst() { + elog "Note, that defaults are changed and now if you don't want to ship" + elog "personal information into output files, use fig2dev with -a option." +} |