summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/pstotext
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/pstotext')
-rw-r--r--app-text/pstotext/Manifest1
-rw-r--r--app-text/pstotext/files/1.9-flags.patch36
-rw-r--r--app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch136
-rw-r--r--app-text/pstotext/metadata.xml5
-rw-r--r--app-text/pstotext/pstotext-1.9-r3.ebuild31
5 files changed, 209 insertions, 0 deletions
diff --git a/app-text/pstotext/Manifest b/app-text/pstotext/Manifest
new file mode 100644
index 000000000000..a279a7d9ad97
--- /dev/null
+++ b/app-text/pstotext/Manifest
@@ -0,0 +1 @@
+DIST pstotext-1.9.tar.gz 37461 SHA256 cfe0a251d0d43982a7d3bdf1d1670c854432739d00cb593c9beaca4b2cc36c27 SHA512 a8148e94d635544a7dfa8c96ff6071717388e4dc6c3db36f2c50939dce96c1f824ee423b1622af9111fffc60cb298215a6ee85d956c81873d71ceac804ee48ca WHIRLPOOL 2e2bec427d230c007687af13425ff6ac366e8b868950d8338855451c63ecc0ff401e14d5ddc6ee645e4dc209d4a5af5d772dcf1f8e2299917c1c3ce8d234017e
diff --git a/app-text/pstotext/files/1.9-flags.patch b/app-text/pstotext/files/1.9-flags.patch
new file mode 100644
index 000000000000..6f3c9b68d82c
--- /dev/null
+++ b/app-text/pstotext/files/1.9-flags.patch
@@ -0,0 +1,36 @@
+diff --git a/Makefile b/Makefile
+index 551e3b8..1d55ebe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@
+ # commenting out the includes of ptotdll.h in ptotdll.c and main.c.
+ # PMcJ 6 Sep 96
+
+-CC=gcc
++CC ?= gcc
+ #CC=cc -std
+
+ BUNDLE = ocr.h rot270.h rot90.h
+@@ -17,18 +17,18 @@ BUNDLE = ocr.h rot270.h rot90.h
+ all: pstotext
+
+ main.o: main.c ptotdll.h bundle.h ocr.h rot270.h rot90.h
+- $(CC) -c $*.c
++ $(CC) $(CFLAGS) -c $*.c
+
+ ptotdll.o: ptotdll.c ptotdll.h
+- $(CC) -c $*.c
++ $(CC) $(CFLAGS) -c $*.c
+
+ pstotext: bundle.o main.o ptotdll.o
+- $(CC) -o pstotext main.o bundle.o ptotdll.o -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -o pstotext main.o bundle.o ptotdll.o -lm
+
+ .SUFFIXES: .ps
+
+ .c.o:
+- $(CC) -c $*.c
++ $(CC) $(CFLAGS) -c $*.c
+
+ # "Bundle" an Ascii file.
+ .ps.h:
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
new file mode 100644
index 000000000000..177d3726e659
--- /dev/null
+++ b/app-text/pstotext/files/pstotext-1.9-quote-chars-fix.patch
@@ -0,0 +1,136 @@
+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;
+ pstotextExit(instance);
+- if (gs!=NULL) {
+ #ifdef VMS
++ if (gs!=NULL) {
+ gsstatus = fclose(gs);
++ }
+ #else
+- gsstatus = pclose(gs);
++ waitpid(-1, &gsstatus, 0);
+ #endif
++ if (gsstatus) {
+ if (WIFEXITED(gsstatus)) {
+ if (WEXITSTATUS(gsstatus)!=0) status = 3;
+ else if (WIFSIGNALED(gsstatus)) status = 4;
+@@ -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
++ int i;
++#endif
++ int fd[2];
++ pid_t p;
+ int status;
+ char norotate[] = "";
+ 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);
+-
+- if (gs_cmdline == NULL) {
+- fprintf(stderr, "No memory available\n");
+- cleanup();
+- exit(1);
+- }
+-
+- sprintf(
+- gs_cmdline,
+-#ifdef VMS
+- "%s -r72 \"-dNODISPLAY\" \"-dFIXEDMEDIA\" \"-dDELAYBIND\" \"-dWRITESYSTEMDICT\" %s \"-dNOPAUSE\" %s %s %s",
+-#else
+- "%s -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT %s -dNOPAUSE %s %s %s",
+-#endif
+- gs_cmd,
+- (debug ? "" : "-q"),
+- rotate_path,
+- ocr_path,
+- input
+- );
+- if (debug) fprintf(stderr, "%s\n", gs_cmdline);
++ gs_argv[gs_argc++] = NULL;
+ #ifdef VMS
+ cmdfile = tempnam("SYS$SCRATCH:","PS2TGS");
+ gsoutfile = tempnam("SYS$SCRATCH:","GSRES");
+@@ -259,8 +250,25 @@
+ exit(1);
+ }
+ #else
+- gs = popen(gs_cmdline, "r");
+- if (gs==0) {perror(cmd); exit(1);}
++ if (pipe(fd)) {
++ perror("pipe failed: "); exit(1);
++ };
++ p = fork();
++ if (p == -1) {
++ perror("fork failed: "); exit(1);
++ }
++ if (p == 0) { /* child */
++ close(fd[0]);
++ dup2(fd[1], 1); /* Redirect stdout into pipe to parent */
++ execvp("/usr/bin/gs", gs_argv);
++ perror("execvp: "); status=cleanup(); exit(1);
++ } else { /* parent */
++ close(fd[1]);
++ gs = fdopen(fd[0], "r");
++ if (gs == NULL) {
++ perror("fdopen: "); status=cleanup(); exit(1);
++ }
++ }
+ #endif
+ status = pstotextInit(&instance);
+ if (status!=0) {
diff --git a/app-text/pstotext/metadata.xml b/app-text/pstotext/metadata.xml
new file mode 100644
index 000000000000..21ff3a538481
--- /dev/null
+++ b/app-text/pstotext/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tex</herd>
+</pkgmetadata>
diff --git a/app-text/pstotext/pstotext-1.9-r3.ebuild b/app-text/pstotext/pstotext-1.9-r3.ebuild
new file mode 100644
index 000000000000..75857bb812d0
--- /dev/null
+++ b/app-text/pstotext/pstotext-1.9-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils toolchain-funcs
+
+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 hppa ppc ppc64 x86"
+IUSE=""
+
+DEPEND="app-arch/ncompress"
+RDEPEND="app-text/ghostscript-gpl"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-quote-chars-fix.patch \
+ "${FILESDIR}"/${PV}-flags.patch
+ tc-export CC
+}
+
+src_install () {
+ dobin pstotext || die
+ doman pstotext.1 || die
+}