diff options
author | Martin Ehmsen <ehmsen@gentoo.org> | 2006-05-19 10:00:41 +0000 |
---|---|---|
committer | Martin Ehmsen <ehmsen@gentoo.org> | 2006-05-19 10:00:41 +0000 |
commit | 78a9e5b0fb43fd9c00a8d1e1b952982034d99fa2 (patch) | |
tree | 99b9f2dbc3636a62bfd1ab0a314d0ca08bcb8423 /app-text/pstotext | |
parent | Updated knowledgetree to version 3.0.2. Some new useflags added. (diff) | |
download | gentoo-2-78a9e5b0fb43fd9c00a8d1e1b952982034d99fa2.tar.gz gentoo-2-78a9e5b0fb43fd9c00a8d1e1b952982034d99fa2.tar.bz2 gentoo-2-78a9e5b0fb43fd9c00a8d1e1b952982034d99fa2.zip |
Fixed pstotext-1.9-quote-chars-fix.patch so input from stdin works.
(Portage version: 2.1_rc1-r3)
Diffstat (limited to 'app-text/pstotext')
-rw-r--r-- | app-text/pstotext/ChangeLog | 9 | ||||
-rw-r--r-- | app-text/pstotext/files/digest-pstotext-1.8g | 2 | ||||
-rw-r--r-- | app-text/pstotext/files/digest-pstotext-1.8g-r1 | 2 | ||||
-rw-r--r-- | app-text/pstotext/files/digest-pstotext-1.9-r2 | 3 | ||||
-rw-r--r-- | app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch | 85 | ||||
-rw-r--r-- | app-text/pstotext/pstotext-1.9-r2.ebuild | 35 |
6 files changed, 102 insertions, 34 deletions
diff --git a/app-text/pstotext/ChangeLog b/app-text/pstotext/ChangeLog index 53d211ec05ce..4ec7233a2800 100644 --- a/app-text/pstotext/ChangeLog +++ b/app-text/pstotext/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-text/pstotext # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/pstotext/ChangeLog,v 1.20 2006/05/08 18:42:28 fmccor Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/pstotext/ChangeLog,v 1.21 2006/05/19 10:00:41 ehmsen Exp $ + +*pstotext-1.9-r2 (19 May 2006) + + 19 May 2006; Martin Ehmsen <ehmsen@gentoo.org> + files/pstotext-1.9-quote-chars-fix.patch, -pstotext-1.9-r1.ebuild, + +pstotext-1.9-r2.ebuild: + Fixed pstotext-1.9-quote-chars-fix.patch so input from stdin works. 08 May 2006; Ferris McCormick <fmccor@gentoo.org> pstotext-1.9-r1.ebuild: Stable for sparc, Bug #132662 --- builds without incident and seems fine. diff --git a/app-text/pstotext/files/digest-pstotext-1.8g b/app-text/pstotext/files/digest-pstotext-1.8g index 606fe5da9487..1b1db2f13401 100644 --- a/app-text/pstotext/files/digest-pstotext-1.8g +++ b/app-text/pstotext/files/digest-pstotext-1.8g @@ -1 +1,3 @@ MD5 1be0be028ccc85be1bf55d7e90976b18 pstotext.tar.Z 58743 +RMD160 b8a49c5a0478b9ac8f7948ed75690327e8b98f48 pstotext.tar.Z 58743 +SHA256 139ff4819bd067cb185c5d65d97b2ce62fb8109487a44e4b5450916179363652 pstotext.tar.Z 58743 diff --git a/app-text/pstotext/files/digest-pstotext-1.8g-r1 b/app-text/pstotext/files/digest-pstotext-1.8g-r1 index 606fe5da9487..1b1db2f13401 100644 --- a/app-text/pstotext/files/digest-pstotext-1.8g-r1 +++ b/app-text/pstotext/files/digest-pstotext-1.8g-r1 @@ -1 +1,3 @@ MD5 1be0be028ccc85be1bf55d7e90976b18 pstotext.tar.Z 58743 +RMD160 b8a49c5a0478b9ac8f7948ed75690327e8b98f48 pstotext.tar.Z 58743 +SHA256 139ff4819bd067cb185c5d65d97b2ce62fb8109487a44e4b5450916179363652 pstotext.tar.Z 58743 diff --git a/app-text/pstotext/files/digest-pstotext-1.9-r2 b/app-text/pstotext/files/digest-pstotext-1.9-r2 new file mode 100644 index 000000000000..f0cae0854c98 --- /dev/null +++ b/app-text/pstotext/files/digest-pstotext-1.9-r2 @@ -0,0 +1,3 @@ +MD5 64576e8a10ff5514e285d98b3898ae78 pstotext-1.9.tar.gz 37461 +RMD160 16dc199d19df64280184d11ccbced7a32770ddad pstotext-1.9.tar.gz 37461 +SHA256 cfe0a251d0d43982a7d3bdf1d1670c854432739d00cb593c9beaca4b2cc36c27 pstotext-1.9.tar.gz 37461 diff --git a/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch b/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch index d01c0e901bc4..177d3726e659 100644 --- a/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch +++ b/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch @@ -1,6 +1,6 @@ -diff -ru ../../pstotext-1.9/main.c ./main.c ---- ../../pstotext-1.9/main.c 2005-07-24 18:56:11.000000000 +0200 -+++ ./main.c 2006-03-21 21:55:55.000000000 +0100 +diff -urN pstotext-1.9.orig/main.c pstotext-1.9/main.c +--- pstotext-1.9.orig/main.c 2004-01-09 11:17:38.000000000 +0100 ++++ pstotext-1.9/main.c 2006-05-19 11:43:52.000000000 +0200 @@ -126,12 +126,14 @@ static int cleanup(void) { int gsstatus, status = 0; @@ -18,11 +18,12 @@ diff -ru ../../pstotext-1.9/main.c ./main.c if (WIFEXITED(gsstatus)) { if (WEXITSTATUS(gsstatus)!=0) status = 3; else if (WIFSIGNALED(gsstatus)) status = 4; -@@ -166,7 +168,13 @@ +@@ -166,8 +168,13 @@ static int do_it(char *path) { /* If "path" is NULL, then "stdin" should be processed. */ - char *gs_cmdline; +- char *input; + char *gs_argv[32]; + int gs_argc=0; +#ifdef DEBUG @@ -30,17 +31,54 @@ diff -ru ../../pstotext-1.9/main.c ./main.c +#endif + int fd[2]; + pid_t p; - char *input; int status; char norotate[] = ""; -@@ -216,32 +224,29 @@ - cleanup(); - exit(1); - } -- strcpy(input, "-- '"); strcat(input, path); strcat(input, "'"); -+ strcpy(input, path); + FILE *fileout; +@@ -201,47 +208,31 @@ + exit(1); } +- if (path==NULL) { +- input = (char*)malloc(2); +- if (input == NULL) { +- fprintf(stderr,"No memory available\n"); +- cleanup(); +- exit(1); +- } +- strcpy(input, "-"); +- } else { +- input = (char*)malloc(strlen(path) + 6); +- if (input == NULL) { +- fprintf(stderr,"No memory available\n"); +- cleanup(); +- exit(1); +- } +- strcpy(input, "-- '"); strcat(input, path); strcat(input, "'"); ++ gs_argv[gs_argc++] = "gs"; ++ gs_argv[gs_argc++] = "-r72"; ++ gs_argv[gs_argc++] = "-dNODISPLAY"; ++ gs_argv[gs_argc++] = "-dFIXEDMEDIA"; ++ gs_argv[gs_argc++] = "-dDELAYBIND"; ++ gs_argv[gs_argc++] = "-dWRITESYSTEMDICT"; ++ if (!debug) { ++ gs_argv[gs_argc++] = "-q"; ++ } ++ gs_argv[gs_argc++] = "-dNOPAUSE"; ++ gs_argv[gs_argc++] = "-dSAFER"; ++ if (rotate_path && strcmp(rotate_path, "")) { ++ gs_argv[gs_argc++] = rotate_path; ++ } ++ if (ocr_path && strcmp(ocr_path, "")) { ++ gs_argv[gs_argc++] = ocr_path; ++ } ++ if (path == NULL ) { ++ gs_argv[gs_argc++] = "-"; ++ } ++ else { ++ gs_argv[gs_argc++] = "--"; ++ gs_argv[gs_argc++] = path; + } +- - gs_cmdline = (char*)malloc(strlen(gs_cmd)+strlen(rotate_path)+ - strlen(ocr_path) + strlen(input) + 128); - @@ -53,9 +91,9 @@ diff -ru ../../pstotext-1.9/main.c ./main.c - sprintf( - gs_cmdline, -#ifdef VMS -- "%s -r72 \"-dNODISPLAY\" \"-dFIXEDMEDIA\" \"-dDELAYBIND\" \"-dWRITESYSTEMDICT\" %s \"-dNOPAUSE\" \"-dSAFER\" %s %s %s", +- "%s -r72 \"-dNODISPLAY\" \"-dFIXEDMEDIA\" \"-dDELAYBIND\" \"-dWRITESYSTEMDICT\" %s \"-dNOPAUSE\" %s %s %s", -#else -- "%s -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT %s -dNOPAUSE -dSAFER %s %s %s", +- "%s -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT %s -dNOPAUSE %s %s %s", -#endif - gs_cmd, - (debug ? "" : "-q"), @@ -64,30 +102,11 @@ diff -ru ../../pstotext-1.9/main.c ./main.c - input - ); - if (debug) fprintf(stderr, "%s\n", gs_cmdline); -+ gs_argv[gs_argc++] = "gs"; -+ gs_argv[gs_argc++] = "-r72"; -+ gs_argv[gs_argc++] = "-dNODISPLAY"; -+ gs_argv[gs_argc++] = "-dFIXEDMEDIA"; -+ gs_argv[gs_argc++] = "-dDELAYBIND"; -+ gs_argv[gs_argc++] = "-dWRITESYSTEMDICT"; -+ if (!debug) { -+ gs_argv[gs_argc++] = "-q"; -+ } -+ gs_argv[gs_argc++] = "-dNOPAUSE"; -+ gs_argv[gs_argc++] = "-dSAFER"; -+ if (rotate_path && strcmp(rotate_path, "")) { -+ gs_argv[gs_argc++] = rotate_path; -+ } -+ if (ocr_path && strcmp(ocr_path, "")) { -+ gs_argv[gs_argc++] = ocr_path; -+ } -+ gs_argv[gs_argc++] = "--"; -+ gs_argv[gs_argc++] = input; + gs_argv[gs_argc++] = NULL; #ifdef VMS cmdfile = tempnam("SYS$SCRATCH:","PS2TGS"); gsoutfile = tempnam("SYS$SCRATCH:","GSRES"); -@@ -259,8 +264,25 @@ +@@ -259,8 +250,25 @@ exit(1); } #else diff --git a/app-text/pstotext/pstotext-1.9-r2.ebuild b/app-text/pstotext/pstotext-1.9-r2.ebuild new file mode 100644 index 000000000000..cbf890682798 --- /dev/null +++ b/app-text/pstotext/pstotext-1.9-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/pstotext/pstotext-1.9-r2.ebuild,v 1.1 2006/05/19 10:00:41 ehmsen Exp $ + +inherit eutils + +DESCRIPTION="extract ASCII text from a PostScript or PDF file" +HOMEPAGE="http://www.cs.wisc.edu/~ghost/doc/pstotext.htm" +SRC_URI="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/contrib/${P}.tar.gz" + +LICENSE="PSTT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 sparc ~x86" +IUSE="" + +DEPEND="app-arch/ncompress" + +RDEPEND="virtual/ghostscript" + +src_unpack() { + unpack ${A} + cd "${S}" + # fix bug #132662 + epatch "${FILESDIR}"/${P}-quote-chars-fix.patch || die +} + +src_compile() { + emake || die +} + +src_install () { + into /usr + dobin pstotext + doman pstotext.1 +} |