Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Oct 2006 11:43:34 +0200 (CEST)
From:      Roland Smith <rsmith@xs4all.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/104431: [PATCH] unbreak PDF terminal for math/gnuplot
Message-ID:  <20061015094334.B6FEDB82E@slackbox.xs4all.nl>
Resent-Message-ID: <200610150950.k9F9oP9w084972@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         104431
>Category:       ports
>Synopsis:       [PATCH] unbreak PDF terminal for math/gnuplot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 15 09:50:24 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Roland Smith
>Release:        FreeBSD 6.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD slackbox.xs4all.nl 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat Sep 9 14:46:57 CEST 2006 rsmith@slackbox.xs4all.nl:/usr/obj/usr/src/sys/RFS amd64

>Description:

The PDF terminal in ports/gnuplot is broken; it produces empty
PDFs. Basically this is because both gnuplot and the port patch use a
deprecated function in pdflib.

Patch tested with pdflib 7, but it was already broken with pdflib 6.

The same patch has been submitted to the gnuplot-development project on
SourceForge for upstream fixing; http://sourceforge.net/tracker/index.php?func=detail&atid=302055&aid=1577564&group_id=2055

>How-To-Repeat:
cd /usr/ports/math/gnuplot; make install clean
>Fix:
Replace files/patch-term-pdf.trm with the following:
------------- new files/patch-term-pdf.trm -------------
--- term/pdf.trm.orig	Sun Oct 15 11:10:22 2006
+++ term/pdf.trm	Sun Oct 15 11:10:50 2006
@@ -332,18 +332,13 @@
 TERM_PUBLIC void
 PDF_init ()
 {
-    static TBOOLEAN PDFlib_booted = FALSE;
-    
-    if (!PDFlib_booted) {
-	PDF_boot();
-	PDFlib_booted = TRUE;
-    }
-
+    extern char *outstr;
     if (!myPDF)
 	myPDF = PDF_new();
 
-    /*open new PDF file */ 
-    if (PDF_open_fp(myPDF, gpoutfile) == -1)
+    /*open new PDF file */
+    fclose(gpoutfile);
+    if (PDF_begin_document(myPDF, outstr, 0, NULL) == -1)
 	int_error(NO_CARET, "Error:cannot open PDF file .\n");
 
 #ifdef PDF_DONT_COMPRESS
------------- new files/patch-term-pdf.trm -------------
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061015094334.B6FEDB82E>