summaryrefslogtreecommitdiff
path: root/graphics/tgif
diff options
context:
space:
mode:
authorfrueauf <frueauf>1998-08-26 21:18:57 +0000
committerfrueauf <frueauf>1998-08-26 21:18:57 +0000
commit57451208a7be7f47728734c624006eb39958f4b5 (patch)
tree6104be0a999ba1e9ce80376f3fcc7f32deb78c1b /graphics/tgif
parent4e24a8cade03b29b808e0f912701f5813ac84e4e (diff)
downloadpkgsrc-57451208a7be7f47728734c624006eb39958f4b5.tar.gz
Update tgif to 3.0p17x, submitted in pr 6044 by Dan McMahill with some
minor cleanup by me.
Diffstat (limited to 'graphics/tgif')
-rw-r--r--graphics/tgif/Makefile22
-rw-r--r--graphics/tgif/files/md54
-rw-r--r--graphics/tgif/patches/patch-aa55
-rw-r--r--graphics/tgif/patches/patch-ab13
-rw-r--r--graphics/tgif/patches/patch-ac118
-rw-r--r--graphics/tgif/patches/patch-ad11
-rw-r--r--graphics/tgif/patches/patch-ae13
7 files changed, 188 insertions, 48 deletions
diff --git a/graphics/tgif/Makefile b/graphics/tgif/Makefile
index d84f39bccfd..f52d86e09f0 100644
--- a/graphics/tgif/Makefile
+++ b/graphics/tgif/Makefile
@@ -1,14 +1,20 @@
-# $NetBSD: Makefile,v 1.6 1998/08/20 15:17:02 tsarna Exp $
+# $NetBSD: Makefile,v 1.7 1998/08/26 21:18:57 frueauf Exp $
-DISTNAME= tgif-3.0-p16
-PKGNAME= tgif-3.0p16
-CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_XCONTRIB}
+DISTNAME= tgif-3.0-p17
+PKGNAME= tgif-3.0p17x
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= applications/tgif
-MAINTAINER= mcmahill@alum.mit.edu
-HOMEPAGE= http://bourbon.cs.ucla.edu:8001/tgif/current.html
+MAINTAINER= mcmahill@alum.mit.edu
+HOMEPAGE= http://bourbon.cs.ucla.edu:8001/tgif/current.html
-USE_IMAKE= yes
+CONFLICTS= tgif-3.0p16
+
+USE_IMAKE= yes
+
+# patch tgif-3.0-patch17x is supplied in the package as
+# patches/patch-ac. It fixes a bug that causes imported EPS files
+# to print with an offset.
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/tgif/files/md5 b/graphics/tgif/files/md5
index b734bcf4fe3..b1a806eaa47 100644
--- a/graphics/tgif/files/md5
+++ b/graphics/tgif/files/md5
@@ -1,3 +1,3 @@
-$NetBSD: md5,v 1.2 1998/08/07 13:21:37 agc Exp $
+$NetBSD: md5,v 1.3 1998/08/26 21:18:58 frueauf Exp $
-MD5 (tgif-3.0-p16.tar.gz) = 83a0d822ff10ca1c6abfedd44102cb54
+MD5 (tgif-3.0-p17.tar.gz) = 150d3ccc7ea87e483f63ca769eb2b836
diff --git a/graphics/tgif/patches/patch-aa b/graphics/tgif/patches/patch-aa
index cfd21a9849b..b59f4fd6bc9 100644
--- a/graphics/tgif/patches/patch-aa
+++ b/graphics/tgif/patches/patch-aa
@@ -1,39 +1,18 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 10:40:53 agc Exp $
+$NetBSD: patch-aa,v 1.3 1998/08/26 21:18:58 frueauf Exp $
-*** Imakefile.orig Sun Dec 7 12:25:26 1997
---- Imakefile Sun Dec 7 12:26:52 1997
-***************
-*** 60,64 ****
- -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \@@\
- -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \@@\
-! -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT
-
- XCOMM Things to try to add to the DEFINES line above:
---- 60,65 ----
- -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \@@\
- -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \@@\
-! -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT \@@\
-! -D_NO_EXTERN
-
- XCOMM Things to try to add to the DEFINES line above:
-***************
-*** 72,75 ****
---- 73,77 ----
- XCOMM Linux:
- XCOMM FreeBSD:
-+ XCOMM NetBSD: -D_NO_EXTERN
- XCOMM SCO: -D_NO_EXTERN -DPRINT_CMD=\""lp -o raw -o nobanner"\"
-
-*** cutpaste.c.orig Sun Dec 7 12:25:42 1997
---- cutpaste.c Wed Nov 26 07:35:15 1997
-***************
-*** 31,34 ****
---- 31,38 ----
- */
-
-+ /* DAN added the following 2 lines for NetBSD-1.3 */
-+ #include <unistd.h>
-+ #include <stdlib.h>
-+
- #include <stdio.h>
- #include <string.h>
+--- Imakefile.orig Wed Aug 19 09:38:26 1998
++++ Imakefile Wed Aug 19 10:59:03 1998
+@@ -60,5 +60,6 @@
+ -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \@@\
+ -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" \@@\
+- -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT
++ -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT \@@\
++ -D_NO_EXTERN
+
+ XCOMM Things to try to add to the DEFINES line above:
+@@ -72,4 +73,5 @@
+ XCOMM Linux:
+ XCOMM FreeBSD:
++XCOMM NetBSD: -D_NO_EXTERN
+ XCOMM SCO: -D_NO_EXTERN -DPRINT_CMD=\""lp -o raw -o nobanner"\"
+
diff --git a/graphics/tgif/patches/patch-ab b/graphics/tgif/patches/patch-ab
new file mode 100644
index 00000000000..08d373eee72
--- /dev/null
+++ b/graphics/tgif/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1 1998/08/26 21:18:58 frueauf Exp $
+
+--- cutpaste.c.orig Wed Aug 19 10:08:28 1998
++++ cutpaste.c Wed Aug 19 10:09:33 1998
+@@ -31,4 +31,8 @@
+ */
+
++/* DAN added the following 2 lines for NetBSD-1.3 */
++#include <unistd.h>
++#include <stdlib.h>
++
+ #include <stdio.h>
+ #include <string.h>
diff --git a/graphics/tgif/patches/patch-ac b/graphics/tgif/patches/patch-ac
new file mode 100644
index 00000000000..4b8acd1ac25
--- /dev/null
+++ b/graphics/tgif/patches/patch-ac
@@ -0,0 +1,118 @@
+$NetBSD: patch-ac,v 1.1 1998/08/26 21:18:58 frueauf Exp $
+
+*** eps.c.orig Thu Feb 19 13:51:02 1998
+--- eps.c Thu Feb 19 13:47:35 1998
+***************
+*** 671,674 ****
+--- 671,675 ----
+ int boundingbox_found=FALSE, preview_found=FALSE, found;
+ int boundingbox_atend=FALSE, tiff_preview_ok=FALSE;
++ int boundingbox_image_w=0, boundingbox_image_h=0;
+ FILE *fp=NULL;
+ struct stat stat_buf;
+***************
+*** 762,765 ****
+--- 763,768 ----
+ if (sscanf(&(line[14]), "%f %f %f %f", &llx, &lly, &urx, &ury) == 4) {
+ boundingbox_found = TRUE;
++ boundingbox_image_w = abs(round(urx-llx));
++ boundingbox_image_h = abs(round(ury-lly));
+ } else if (!boundingbox_found) {
+ c_ptr = FindChar((int)'(', &(line[14]));
+***************
+*** 790,793 ****
+--- 793,822 ----
+ return BitmapFileInvalid;
+ }
++ if (boundingbox_found) {
++ /*
++ * If the width and height information in the boundingbox and
++ * the preview bitmap are differ only by one, we consider
++ * this a round-off error and adjust the boundingbox so
++ * that they become identical!
++ */
++ int diff=0;
++
++ diff = image_w - boundingbox_image_w;
++ if (diff == 1 || diff == (-1)) {
++ if (urx >= llx) {
++ urx += (float)diff;
++ } else {
++ urx -= (float)diff;
++ }
++ }
++ diff = image_h - boundingbox_image_h;
++ if (diff == 1 || diff == (-1)) {
++ if (ury >= lly) {
++ ury += (float)diff;
++ } else {
++ ury -= (float)diff;
++ }
++ }
++ }
+ preview_found = TRUE;
+ if (!ReadPreviewBitmap(fp, image_w, image_h, bps, &bitmap, &image)) {
+*** exec.c.orig Thu Feb 19 13:51:02 1998
+--- exec.c Thu Feb 19 13:26:16 1998
+***************
+*** 1344,1349 ****
+ rc = FALSE;
+ } else {
+! unlink(file_name);
+! ReplaceAttrFirstValue(attr_owner_obj, attr_ptr, file_name);
+ }
+ return rc;
+--- 1344,1368 ----
+ rc = FALSE;
+ } else {
+! char *psz=UtilStrRChr(file_name, '/');
+! int changed=FALSE;
+!
+! if (psz != NULL) {
+! for (psz++; *psz != '\0'; psz++) {
+! if ((*psz >= '0' && *psz <= '9') || (*psz >= 'a' && *psz <= 'z') ||
+! (*psz >= 'A' && *psz <= 'Z')) {
+! } else {
+! *psz = 'Q';
+! changed = TRUE;
+! }
+! }
+! }
+! if (changed && mktemp(file_name) == NULL) {
+! MsgBox ("Fail to mktemp(). Command execution aborted.",
+! TOOL_NAME, INFO_MB);
+! rc = FALSE;
+! } else {
+! unlink(file_name);
+! ReplaceAttrFirstValue(attr_owner_obj, attr_ptr, file_name);
+! }
+ }
+ return rc;
+*** xbitmap.c.orig Thu Feb 19 13:51:02 1998
+--- xbitmap.c Thu Feb 19 12:56:15 1998
+***************
+*** 3932,3935 ****
+--- 3932,3939 ----
+
+ memset(&ctm, 0, sizeof(struct XfrmMtrxRec));
++ (*ObjPtr)->orig_obbox.ltx = ltx;
++ (*ObjPtr)->orig_obbox.lty = lty;
++ (*ObjPtr)->orig_obbox.rbx = rbx;
++ (*ObjPtr)->orig_obbox.rby = rby;
+ fval = ((float)(rbx-ltx))/((float)image_w)*((float)1000.0);
+ ctm.m[CTM_SX] = round(fval);
+*** http.c.orig Tue Dec 2 15:23:15 1997
+--- http.c Tue Dec 2 15:24:12 1997
+***************
+*** 962,966 ****
+ }
+ if (content_type != NULL) free(content_type);
+! if (text_type) {
+ int buf_len=strlen(line_ptr);
+ char *return_buf;
+--- 962,966 ----
+ }
+ if (content_type != NULL) free(content_type);
+! if (text_type || content_length == (-1)) {
+ int buf_len=strlen(line_ptr);
+ char *return_buf;
diff --git a/graphics/tgif/patches/patch-ad b/graphics/tgif/patches/patch-ad
new file mode 100644
index 00000000000..c769b77bb55
--- /dev/null
+++ b/graphics/tgif/patches/patch-ad
@@ -0,0 +1,11 @@
+$NetBSD: patch-ad,v 1.1 1998/08/26 21:18:58 frueauf Exp $
+
+--- version.c.orig Wed Aug 19 20:52:00 1998
++++ version.c Wed Aug 19 20:53:00 1998
+@@ -46,5 +46,5 @@
+ char fullVersionString[MAXSTRING];
+ char fullToolName[MAXSTRING];
+-char *specialBuild="";
++char *specialBuild="Patch 17x (eps fix) + dvips fix";
+
+ void SetFullVersionString()
diff --git a/graphics/tgif/patches/patch-ae b/graphics/tgif/patches/patch-ae
new file mode 100644
index 00000000000..ef458640c97
--- /dev/null
+++ b/graphics/tgif/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 1998/08/26 21:18:58 frueauf Exp $
+
+--- eps.c.orig Tue Aug 25 12:32:15 1998
++++ eps.c Fri Aug 21 08:59:25 1998
+@@ -1314,4 +1314,8 @@
+ fprintf(FP, "/setpagedevice {} def\n");
+ fprintf(FP, "/a4 {} def\n");
++ fprintf(FP, "/bop-hook {} def\n");
++ fprintf(FP, "/eop-hook {} def\n");
++ fprintf(FP, "/start-hook {} def\n");
++ fprintf(FP, "/end-hook {} def\n");
+ fprintf(FP, "0 setgray 0 setlinecap 1 setlinewidth\n");
+ fprintf(FP, "0 setlinejoin 10 setmiterlimit [] 0 setdash newpath\n");