diff options
Diffstat (limited to 'graphics/jpeg2ps/files')
-rw-r--r-- | graphics/jpeg2ps/files/patch-Makefile | 57 | ||||
-rw-r--r-- | graphics/jpeg2ps/files/patch-asc85ec.c | 10 | ||||
-rw-r--r-- | graphics/jpeg2ps/files/patch-jpeg2ps.c | 107 |
3 files changed, 0 insertions, 174 deletions
diff --git a/graphics/jpeg2ps/files/patch-Makefile b/graphics/jpeg2ps/files/patch-Makefile deleted file mode 100644 index 563c0ec..0000000 --- a/graphics/jpeg2ps/files/patch-Makefile +++ /dev/null @@ -1,57 +0,0 @@ ---- Makefile.orig 2002-02-04 20:39:21.000000000 +0900 -+++ Makefile 2013-04-27 23:58:44.000000000 +0900 -@@ -14,15 +14,17 @@ - # The following was reported to work for emx/gcc 0.9c fix04 under OS/2: - # make -f Makefile "CFLAGS=-c -DA4 -DDOS -O2" "LDFLAGS=-Zexe -s" - --CFLAGS=-c -DA4 --LD=cc --LDFLAGS= -+PREFIX?= /usr/local -+LOCALBASE?= /usr/local -+LD= ${CC} -+LDFLAGS?= -+LDADD?= - OBJ=o - EXE= - RM=rm -f - - .c.$(OBJ) : -- $(CC) $(CFLAGS) $*.c -+ $(CC) $(CFLAGS) -c $*.c - - all: jpeg2ps$(EXE) - -@@ -30,7 +32,7 @@ - # at the end of the next two lines below. - - jpeg2ps$(EXE): jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) -- $(LD) $(LDFLAGS) -o jpeg2ps$(EXE) jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) -+ $(LD) $(LDFLAGS) -o jpeg2ps$(EXE) jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) $(LDADD) - - DISTFILES = \ - jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c \ -@@ -42,10 +44,10 @@ - - # Location where to install the binary. This is a suitable value for Linux - # (and possibly other unix-like) systems. --BINDIR = /usr/local/bin -+BINDIR?= ${PREFIX}/bin - - # Location where to install the manual page. --MANDIR = /usr/local/man/man1 -+MANDIR?= ${MAN1PREFIX}/man/man1 - - CONVFILES = \ - jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c \ -@@ -76,8 +78,8 @@ - nesrin.eps - - install: jpeg2ps$(EXE) -- cp jpeg2ps$(EXE) $(BINDIR) -- cp jpeg2ps.1 $(MANDIR) -+ ${BSD_INSTALL_PROGRAM} jpeg2ps$(EXE) $(BINDIR) -+ ${BSD_INSTALL_DATA} jpeg2ps.1 $(MANDIR) - - uninstall: - rm -f $(BINDIR)/jpeg2ps$(EXE) diff --git a/graphics/jpeg2ps/files/patch-asc85ec.c b/graphics/jpeg2ps/files/patch-asc85ec.c deleted file mode 100644 index 8ffc6e4..0000000 --- a/graphics/jpeg2ps/files/patch-asc85ec.c +++ /dev/null @@ -1,10 +0,0 @@ ---- asc85ec.c.orig 2013-04-27 23:43:09.000000000 +0900 -+++ asc85ec.c 2013-04-27 23:43:22.000000000 +0900 -@@ -2,6 +2,7 @@ - /* (C) Thomas Merz 1994-2002 */ - - #include <stdio.h> -+#include <stdlib.h> - #include <fcntl.h> - - /* try to identify Mac compilers */ diff --git a/graphics/jpeg2ps/files/patch-jpeg2ps.c b/graphics/jpeg2ps/files/patch-jpeg2ps.c deleted file mode 100644 index 99ce7c9..0000000 --- a/graphics/jpeg2ps/files/patch-jpeg2ps.c +++ /dev/null @@ -1,107 +0,0 @@ ---- jpeg2ps.c.orig 2013-04-27 23:19:06.000000000 +0900 -+++ jpeg2ps.c 2013-04-27 23:32:17.000000000 +0900 -@@ -73,6 +73,13 @@ - static char buffer[BUFFERSIZE]; - static char *ColorSpaceNames[] = {"", "Gray", "", "RGB", "CMYK" }; - -+#ifdef LIBPAPER -+#include <math.h> -+#include <paper.h> -+ -+int PageWidth = 595; /* page width A4 */ -+int PageHeight = 842; /* page height A4 */ -+#else - /* Array of known page sizes including name, width, and height */ - - typedef struct { const char *name; int width; int height; } PageSize_s; -@@ -104,6 +111,7 @@ - int PageWidth = 612; /* page width letter */ - int PageHeight = 792; /* page height letter */ - #endif -+#endif - - static void - JPEGtoPS(imagedata *JPEG, FILE *PSfile) { -@@ -294,16 +302,39 @@ - fprintf(stderr, "-b binary mode: output 8 bit data (default: 7 bit with ASCII85)\n"); - fprintf(stderr, "-h hex mode: output 7 bit data in ASCIIHex encoding\n"); - fprintf(stderr, "-o <name> output file name\n"); -+#ifdef LIBPAPER -+ fprintf(stderr, "-p <size> page size name. Known names can be displayed " -+ "by paperconf -a command.\n"); -+#else - fprintf(stderr, "-p <size> page size name. Known names are:\n"); - fprintf(stderr, " a0, a1, a2, a3, a4, a5, a6, b5, letter, legal, ledger, p11x17\n"); -+#endif - fprintf(stderr, "-q quiet mode: suppress all informational messages\n"); - fprintf(stderr, "-r <dpi> resolution value (dots per inch)\n"); - fprintf(stderr, " 0 means use value given in file, if any (disables autorotate)\n"); - exit(1); - } - -+#ifdef LIBPAPER -+const struct paper *findpaper(char *name) -+{ -+ const struct paper *pp; -+ -+ paperinit(); -+ for (pp = paperfirst(); pp; pp = papernext(pp)) { -+ if (strcmp(name, papername(pp)) == 0) -+ return (pp); -+ } -+ return (NULL); -+} -+#endif -+ - int - main(int argc, char ** argv) { -+#ifdef LIBPAPER -+ const struct paper *pp; -+ char *name = NULL; -+#endif - imagedata image; - FILE *outfile; - -@@ -346,6 +377,9 @@ - } - break; - case 'p': -+#ifdef LIBPAPER -+ name = strdup(optarg); -+#else - for(pagesizeindex=0; pagesizeindex < PAGESIZELIST; pagesizeindex++) - if (!strcmp((const char *) optarg, PageSizes[pagesizeindex].name)) { - PageHeight = PageSizes[pagesizeindex].height; -@@ -356,6 +390,7 @@ - fprintf(stderr, "Error: Unknown page size %s.\n", optarg); - exit(-3); - } -+#endif - break; - case 'q': - quiet = TRUE; -@@ -371,9 +406,24 @@ - usage(); - } - -+#ifdef LIBPAPER -+ if (name == NULL) { -+ name = (char *)systempapername(); -+ if (name == NULL) -+ name = (char *)defaultpapername(); -+ } -+ if ((pp = findpaper(name)) != NULL) { -+ PageHeight = round(paperpsheight(pp)); -+ PageWidth = round(paperpswidth(pp)); -+ } else { -+ fprintf(stderr, "Error: Unknown page size %s.\n", name); -+ exit(-3); -+ } -+#else - if (pagesizeindex != -1 && ! quiet) /* page size user option given */ - fprintf(stderr, "Note: Using %s page size.\n", - PageSizes[pagesizeindex].name); -+#endif - - if (optind == argc) /* filename missing */ - usage(); |