From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Oct 15 09:50:26 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 190F716A407 for ; Sun, 15 Oct 2006 09:50:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1AE343D53 for ; Sun, 15 Oct 2006 09:50:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9F9oPFj084973 for ; Sun, 15 Oct 2006 09:50:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9F9oP9w084972; Sun, 15 Oct 2006 09:50:25 GMT (envelope-from gnats) Resent-Date: Sun, 15 Oct 2006 09:50:25 GMT Resent-Message-Id: <200610150950.k9F9oP9w084972@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roland Smith Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C11EC16A580 for ; Sun, 15 Oct 2006 09:43:37 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCC4E43D46 for ; Sun, 15 Oct 2006 09:43:36 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id k9F9hYmx095479 for ; Sun, 15 Oct 2006 11:43:35 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id B6FEDB82E; Sun, 15 Oct 2006 11:43:34 +0200 (CEST) Message-Id: <20061015094334.B6FEDB82E@slackbox.xs4all.nl> Date: Sun, 15 Oct 2006 11:43:34 +0200 (CEST) From: Roland Smith To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/104431: [PATCH] unbreak PDF terminal for math/gnuplot X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Roland Smith List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2006 09:50:26 -0000 >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: