diff options
author | Markus Dittrich <markusle@gentoo.org> | 2008-11-01 15:10:31 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2008-11-01 15:10:31 +0000 |
commit | 95dd1caa188e3b44d4da7de66aa3b13ee55802b0 (patch) | |
tree | 1bf122cb333f1c87ca931378f072133b1d7c0478 /sci-misc | |
parent | Fix bug #245147. Thanks to Graham Derryberry <asterion@alum.mit.edu> for the ... (diff) | |
download | gentoo-2-95dd1caa188e3b44d4da7de66aa3b13ee55802b0.tar.gz gentoo-2-95dd1caa188e3b44d4da7de66aa3b13ee55802b0.tar.bz2 gentoo-2-95dd1caa188e3b44d4da7de66aa3b13ee55802b0.zip |
Added patch to support proper postscript output (see bug #158828).
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-SENTINEL-1 i686)
Diffstat (limited to 'sci-misc')
-rw-r--r-- | sci-misc/gri/ChangeLog | 7 | ||||
-rw-r--r-- | sci-misc/gri/files/gri-2.12.18-postscript.patch | 97 | ||||
-rw-r--r-- | sci-misc/gri/gri-2.12.18.ebuild | 8 |
3 files changed, 110 insertions, 2 deletions
diff --git a/sci-misc/gri/ChangeLog b/sci-misc/gri/ChangeLog index a904a43d1b75..7f3b5c580713 100644 --- a/sci-misc/gri/ChangeLog +++ b/sci-misc/gri/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-misc/gri # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-misc/gri/ChangeLog,v 1.23 2008/09/27 11:01:32 markusle Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-misc/gri/ChangeLog,v 1.24 2008/11/01 15:10:31 markusle Exp $ + + 01 Nov 2008; Markus Dittrich <markusle@gentoo.org> + +files/gri-2.12.18-postscript.patch, gri-2.12.18.ebuild: + Added patch to support proper postscript output (see bug #158828). + Thanks much to Sebastiaan for his patch. *gri-2.12.18 (27 Sep 2008) diff --git a/sci-misc/gri/files/gri-2.12.18-postscript.patch b/sci-misc/gri/files/gri-2.12.18-postscript.patch new file mode 100644 index 000000000000..b3f3b7301975 --- /dev/null +++ b/sci-misc/gri/files/gri-2.12.18-postscript.patch @@ -0,0 +1,97 @@ +diff -Naur gri-2.12.18/src/extern.hh gri-2.12.18.new/src/extern.hh +--- gri-2.12.18/src/extern.hh 2003-06-07 13:37:55.000000000 -0400 ++++ gri-2.12.18.new/src/extern.hh 2008-11-01 10:46:40.000000000 -0400 +@@ -137,6 +137,7 @@ + + extern int _arrow_type; + extern bool _warn_offpage; ++extern bool _export_postscript; + + extern std::vector<double> _dash; + +diff -Naur gri-2.12.18/src/gr.cc gri-2.12.18.new/src/gr.cc +--- gri-2.12.18/src/gr.cc 2008-09-04 13:32:21.000000000 -0400 ++++ gri-2.12.18.new/src/gr.cc 2008-11-01 10:52:24.000000000 -0400 +@@ -397,7 +397,16 @@ + /* + * write conforming postscript prolog + */ +- fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n"); ++ //fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n"); ++ extern bool _export_postscript; ++ if (_export_postscript) ++ { ++ fprintf(fp, "%%!PS-Adobe-2.0\n"); ++ } ++ else ++ { ++ fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n"); ++ } + if (privacy) + fprintf(fp, "%%%%Creator: %s\n", ""); + else +diff -Naur gri-2.12.18/src/gri.cc gri-2.12.18.new/src/gri.cc +--- gri-2.12.18/src/gri.cc 2006-06-16 19:18:40.000000000 -0400 ++++ gri-2.12.18.new/src/gri.cc 2008-11-01 10:46:40.000000000 -0400 +@@ -35,6 +35,7 @@ + // Globals used elsewhere (variables begin with _). + int _arrow_type; + bool _warn_offpage; ++bool _export_postscript; + std::vector<double> _dash; + std::vector<DataFile> _dataFILE; + std::vector<CmdFile> _cmdFILE; +diff -Naur gri-2.12.18/src/startup.cc gri-2.12.18.new/src/startup.cc +--- gri-2.12.18/src/startup.cc 2008-06-12 08:57:26.000000000 -0400 ++++ gri-2.12.18.new/src/startup.cc 2008-11-01 10:57:26.000000000 -0400 +@@ -188,6 +188,7 @@ + _axes_offset = 0.0; + _use_default_for_query = false; + _warn_offpage = true; ++ _export_postscript = false; + PUT_VAR("..use_default_for_query..", 0.0); + PUT_VAR("..words_in_dataline..", 0.0); // just in case tested + PUT_VAR("..batch..", 0.0); +@@ -681,6 +682,7 @@ + #define FLAG_PUBLICATION 1009 + #define FLAG_SUPERUSER 1010 + #define FLAG_WARN_OFFPAGE 1011 ++#define FLAG_POSTSCRIPT 1012 + // I use the 'FLAG_...' numbers for options that lack single-character abbreviations. + static struct poptOption optionsTable[] = { + { "batch", 'b', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, NULL, 'b' }, +@@ -703,6 +705,7 @@ + { "version", 'v', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, NULL, 'v' }, + { "warn_offpage", '\0', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, NULL, FLAG_WARN_OFFPAGE }, + { "yes", 'y', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, NULL, 'y' }, ++ { "postscript", '\0', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, NULL, FLAG_POSTSCRIPT }, + { 0, 0, 0, 0, 0 } + }; + const poptContext optCon = +@@ -872,6 +875,8 @@ + printf("Gri cannot read in '%s'\n",optArg); + } + break; ++ case FLAG_POSTSCRIPT ++ _export_postscript = true; + default: + printf("Unknown option\n"); + break; +@@ -1058,6 +1063,8 @@ + } else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "-yes")) { + _use_default_for_query = true; + PUT_VAR("..use_default_for_query..", 1.0); ++ } else if (!strcmp(argv[i], "-postscript")){ ++ _export_postscript = true; + #if 0 + } else if (!strcmp(argv[i], "-e")) { + // User wants to do cmd in argv[i+1] +@@ -1190,6 +1197,8 @@ + gr_textput(" Makes Gri print out command lines as they are executed.\n"); + gr_textput(" -true or -y\n"); + gr_textput(" Makes Gri think the answer to all `query's is RETURN.\n"); ++ gr_textput(" -postscript\n"); ++ gr_textput(" Export a PostScript file instead of an EPS file.\n"); + #if 0 + gr_textput(" -e cmd\n"); + gr_textput(" BUG: NOT IMPLEMENTED YET!\n"); diff --git a/sci-misc/gri/gri-2.12.18.ebuild b/sci-misc/gri/gri-2.12.18.ebuild index 146f5aa1d51f..79874b775ae6 100644 --- a/sci-misc/gri/gri-2.12.18.ebuild +++ b/sci-misc/gri/gri-2.12.18.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-misc/gri/gri-2.12.18.ebuild,v 1.1 2008/09/27 11:01:32 markusle Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-misc/gri/gri-2.12.18.ebuild,v 1.2 2008/11/01 15:10:31 markusle Exp $ inherit eutils elisp-common @@ -22,6 +22,12 @@ DEPEND=">=sci-libs/netcdf-3.5.0 SITEFILE="50gri-gentoo.el" +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-postscript.patch +} + src_compile() { econf || die "econf failed." emake || die "emake failed." |