From nobody@FreeBSD.org  Mon Jun  4 05:23:09 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 648E516A46E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2007 05:23:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 5631B13C455
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2007 05:23:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l545N9BM029079
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 4 Jun 2007 05:23:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l545N9NO029077;
	Mon, 4 Jun 2007 05:23:09 GMT
	(envelope-from nobody)
Message-Id: <200706040523.l545N9NO029077@www.freebsd.org>
Date: Mon, 4 Jun 2007 05:23:09 GMT
From: Tetsuya Uemura<t_uemura@macome.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: math/gnuplot: Add knob not to depend on teTeX-base
X-Send-Pr-Version: www-3.0

>Number:         113313
>Category:       ports
>Synopsis:       math/gnuplot: Add knob not to depend on teTeX-base
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glewis
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 04 05:30:05 GMT 2007
>Closed-Date:    Sun Oct 28 23:22:46 UTC 2007
>Last-Modified:  Sun Oct 28 23:22:46 UTC 2007
>Originator:     Tetsuya Uemura
>Release:        6.2-STABLE
>Organization:
MACOME Corp.
>Environment:
FreeBSD s2882g3nr.macome.co.jp 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Jun  4 11:37:35 JST 2007     uemura@s2882g3nr.macome.co.jp:/usr/obj/usr/src/sys/S2882G3NR  amd64
>Description:
By default, Gnuplot doesn't require teTeX-base (kpsexpand) at all and the dependency should be controllable via WITH_XXX or WITHOUT_XXX knob.

Note that Gnuplot *may* require kpsexpand if --with-kpsexpand argument is given to configure, math/gnuplot always gives it, though it is disabled by Gnuplot default.
>How-To-Repeat:
By installing math/gnuplot via ports also installs teTeX-base and its dependency.
>Fix:
Apply the attached patch to add knob WITHOUT_KPSEXPAND which makes math/gnuplot not to depend on print/teTeX-base if defined.

Patch attached with submission follows:

diff -u3 math/gnuplot.orig/Makefile math/gnuplot/Makefile
--- math/gnuplot.orig/Makefile	Mon May 21 10:34:04 2007
+++ math/gnuplot/Makefile	Mon Jun  4 13:46:25 2007
@@ -17,16 +17,14 @@
 
 GNU_CONFIGURE=	yes
 WANT_WX=	yes
-CONFIGURE_ARGS+=--with-kpsexpand \
-		--with-lasergnu \
+CONFIGURE_ARGS+=--with-lasergnu \
 		--with-readline=gnu \
 		--without-linux-vga \
 		--without-lisp-files \
 		--without-tutorial
 
-BUILD_DEPENDS+=	latex:${PORTSDIR}/print/teTeX-base
-
-OPTIONS=	GD		"Enable GD support"		on \
+OPTIONS=	KPSEXPAND	"Use kpsexpand to find fonts"	on \
+		GD		"Enable GD support"		on \
 		PDF		"Enable PDF support"		on \
 		PLOT		"Enable plot support"		on \
 		WX		"Enable WX support"		off
@@ -35,6 +33,11 @@
 INFO=		gnuplot
 
 .include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_KPSEXPAND)
+BUILD_DEPENDS+=		latex:${PORTSDIR}/print/teTeX-base
+CONFIGURE_ARGS+=	--with-kpsexpand
+.endif
 
 .if !defined(WITHOUT_X11)
 USE_XLIB=		yes


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->glewis 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 4 05:30:11 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113313 
State-Changed-From-To: open->feedback 
State-Changed-By: glewis 
State-Changed-When: Wed Jun 6 15:55:38 UTC 2007 
State-Changed-Why:  
I have some concerns about this patch and other similar ones I've received. 
Basically those concerns centre around the file 

share/texmf-local/tex/latex/gnuplot/gnuplot.cfg 

In particular, does this file get installed if the KPSEXPAND option (I'd 
rather it was called TETEX) is set to off?  Is that behaviour affected 
by the tetex port being installed?  I think this file shouldn't get 
installed if the option is off (whether tetex is installed or not). 
If that is the case then the patch is mostly ok.  However, it would still 
need to add some conditional logic for the packing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113313 

From: UEMURA Tetsuya <t_uemura@macome.co.jp>
To: bug-followup@FreeBSD.org, glewis@FreeBSD.org
Cc:  
Subject: Re: ports/113313: math/gnuplot: Add knob not to depend on teTeX-base
Date: Thu,  7 Jun 2007 09:38:27 +0900 (JST)

 --------_46675140295E052036E0_MULTIPART_MIXED_
 Content-Type: text/plain; charset="US-ASCII"
 Content-Transfer-Encoding: 7bit
 
 Correct. gnuplot.cfg isn't installed if --with-kpsexpand argument isn't
 set. Revised patch attached.
 
 Also I've found that the file libexec/gnuplot/4.2/gnuplot_x11 isn't
 installed if WITHOUT_X11 knob is set. The patch also fixes it.
 
 -- 
 UEMURA (fka. MAENAKA) Tetsuya <maenaka@pluto.dti.ne.jp>
 
 Posted on Wed, 6 Jun 2007 16:00:19 GMT
 by author Greg Lewis <glewis@FreeBSD.org>
 > Synopsis: math/gnuplot: Add knob not to depend on teTeX-base
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: glewis
 > State-Changed-When: Wed Jun 6 15:55:38 UTC 2007
 > State-Changed-Why: 
 > I have some concerns about this patch and other similar ones I've received.
 > Basically those concerns centre around the file
 > 
 > share/texmf-local/tex/latex/gnuplot/gnuplot.cfg
 > 
 > In particular, does this file get installed if the KPSEXPAND option (I'd
 > rather it was called TETEX) is set to off?  Is that behaviour affected
 > by the tetex port being installed?  I think this file shouldn't get
 > installed if the option is off (whether tetex is installed or not).
 > If that is the case then the patch is mostly ok.  However, it would still
 > need to add some conditional logic for the packing list.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=113313
 
 --------_46675140295E052036E0_MULTIPART_MIXED_
 Content-Type: application/octet-stream;
  name="gnuplot.patch.txt"
 Content-Disposition: attachment;
  filename="gnuplot.patch.txt"
 Content-Transfer-Encoding: base64
 
 ZGlmZiAtdTMgbWF0aC9nbnVwbG90Lm9yaWcvTWFrZWZpbGUgbWF0aC9nbnVwbG90L01ha2VmaWxl
 Ci0tLSBtYXRoL2dudXBsb3Qub3JpZy9NYWtlZmlsZQlNb24gTWF5IDIxIDEwOjM0OjA0IDIwMDcK
 KysrIG1hdGgvZ251cGxvdC9NYWtlZmlsZQlUaHUgSnVuICA3IDA5OjI1OjA1IDIwMDcKQEAgLTE3
 LDE2ICsxNywxNCBAQAogCiBHTlVfQ09ORklHVVJFPQl5ZXMKIFdBTlRfV1g9CXllcwotQ09ORklH
 VVJFX0FSR1MrPS0td2l0aC1rcHNleHBhbmQgXAotCQktLXdpdGgtbGFzZXJnbnUgXAorQ09ORklH
 VVJFX0FSR1MrPS0td2l0aC1sYXNlcmdudSBcCiAJCS0td2l0aC1yZWFkbGluZT1nbnUgXAogCQkt
 LXdpdGhvdXQtbGludXgtdmdhIFwKIAkJLS13aXRob3V0LWxpc3AtZmlsZXMgXAogCQktLXdpdGhv
 dXQtdHV0b3JpYWwKIAotQlVJTERfREVQRU5EUys9CWxhdGV4OiR7UE9SVFNESVJ9L3ByaW50L3Rl
 VGVYLWJhc2UKLQotT1BUSU9OUz0JR0QJCSJFbmFibGUgR0Qgc3VwcG9ydCIJCW9uIFwKK09QVElP
 TlM9CVRFVEVYCQkiRW5hYmxlIHRlVGVYIHN1cHBvcnQiCQlvbiBcCisJCUdECQkiRW5hYmxlIEdE
 IHN1cHBvcnQ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TJSUl
 JURPQ1NESVIlJS9nbnVwbG90LnBzCiAlJVBPUlRET0NTJSUlJURPQ1NESVIlJS9nbnVwbG90LnR4
 dApAQCAtMTU0LDggKzE1NCw4IEBACiAlJURBVEFESVIlJS80LjIvUG9zdFNjcmlwdC9rb2k4dS5w
 cwogJSVEQVRBRElSJSUvNC4yL1Bvc3RTY3JpcHQvcHJvbG9ndWUucHMKICUlREFUQURJUiUlLzQu
 Mi9nbnVwbG90LmdpaAotc2hhcmUvdGV4bWYtbG9jYWwvdGV4L2xhdGV4L2dudXBsb3QvZ251cGxv
 dC5jZmcKLUBkaXJybSBzaGFyZS90ZXhtZi1sb2NhbC90ZXgvbGF0ZXgvZ251cGxvdAorJSVURVRF
 WCUlc2hhcmUvdGV4bWYtbG9jYWwvdGV4L2xhdGV4L2dudXBsb3QvZ251cGxvdC5jZmcKK0BkaXJy
 bXRyeSBzaGFyZS90ZXhtZi1sb2NhbC90ZXgvbGF0ZXgvZ251cGxvdAogQGRpcnJtdHJ5IHNoYXJl
 L3RleG1mLWxvY2FsL3RleC9sYXRleAogQGRpcnJtdHJ5IHNoYXJlL3RleG1mLWxvY2FsL3RleAog
 QGRpcnJtdHJ5IHNoYXJlL3RleG1mLWxvY2FsCg==
 --------_46675140295E052036E0_MULTIPART_MIXED_--
 

From: Greg Lewis <glewis@eyesbeyond.com>
To: UEMURA Tetsuya <t_uemura@macome.co.jp>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/113313: math/gnuplot: Add knob not to depend on teTeX-base
Date: Wed, 6 Jun 2007 21:30:56 -0700

 On Thu, Jun 07, 2007 at 09:38:27AM +0900, UEMURA Tetsuya wrote:
 > Correct. gnuplot.cfg isn't installed if --with-kpsexpand argument isn't
 > set. Revised patch attached.
 > 
 > Also I've found that the file libexec/gnuplot/4.2/gnuplot_x11 isn't
 > installed if WITHOUT_X11 knob is set. The patch also fixes it.
 
 Thank you!  This patch is very close.
 
 The remaining problem is that if I turn the TETEX option off, but I have
 the tetex port installed, then it will install gnuplot.cfg anyway (but
 the packing list will be wrong).  We need a patch to
 share/LaTeX/Makefile.in or share/Makefile.in to make it not install the
 file in this situation (I think this can just look for WITHOUT_TETEX being
 set).
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org

From: UEMURA Tetsuya <t_uemura@macome.co.jp>
To: bug-followup@FreeBSD.org, glewis@eyesbeyond.com
Cc:  
Subject: Re: ports/113313: math/gnuplot: Add knob not to depend on teTeX-base
Date: Fri, 19 Oct 2007 14:07:14 +0900 (JST)

 --------_4718379300000000DA39_MULTIPART_MIXED_
 Content-Type: text/plain; charset="US-ASCII"
 Content-Transfer-Encoding: 7bit
 
 Hi Greg. Sorry for my long absence on this issue.
 
 Here is a patch against up-to-date math/gnuplot. The patch does the
 following.
 
 * Fix incorrect plist (no gnuplot_x11 when WITHOUT_X11 is set).
 
 * Add support for WITHOUT_TETEX knob.
 
 Note that if the WITHOUT_TETEX knob is set, the gnuplot.cfg now should
 not be installed even if the tetex is installed because share/LaTeX/Makefile.in
 is patched within the post-patch target. However, I have neither X nor
 teTeX installed so my test is insufficient.
 
 Thanks.
 
 -- 
 UEMURA Tetsuya <t_uemura@macome.co.jp>
 
 --------_4718379300000000DA39_MULTIPART_MIXED_
 Content-Type: application/octet-stream;
  name="gnuplot.patch"
 Content-Disposition: attachment;
  filename="gnuplot.patch"
 Content-Transfer-Encoding: base64
 
 LS0tIE1ha2VmaWxlLm9yaWcJMjAwNy0xMC0xNSAxMDo0MjoxNC4wMDAwMDAwMDAgKzA5MDAKKysr
 IE1ha2VmaWxlCTIwMDctMTAtMTkgMTM6MzA6NTYuMDAwMDAwMDAwICswOTAwCkBAIC0xNiwxOSAr
 MTYsMTcgQEAKIAogR05VX0NPTkZJR1VSRT0JeWVzCiBXQU5UX1dYPQl5ZXMKLUNPTkZJR1VSRV9B
 UkdTKz0tLXdpdGgta3BzZXh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w4IEBACiAlJURB
 VEFESVIlJS80LjIvUG9zdFNjcmlwdC9rb2k4dS5wcwogJSVEQVRBRElSJSUvNC4yL1Bvc3RTY3Jp
 cHQvcHJvbG9ndWUucHMKICUlREFUQURJUiUlLzQuMi9nbnVwbG90LmdpaAotc2hhcmUvdGV4bWYt
 bG9jYWwvdGV4L2xhdGV4L2dudXBsb3QvZ251cGxvdC5jZmcKLUBkaXJybSBzaGFyZS90ZXhtZi1s
 b2NhbC90ZXgvbGF0ZXgvZ251cGxvdAorJSVURVRFWCUlc2hhcmUvdGV4bWYtbG9jYWwvdGV4L2xh
 dGV4L2dudXBsb3QvZ251cGxvdC5jZmcKKyUlVEVURVglJUBkaXJybSBzaGFyZS90ZXhtZi1sb2Nh
 bC90ZXgvbGF0ZXgvZ251cGxvdAogQGRpcnJtdHJ5IHNoYXJlL3RleG1mLWxvY2FsL3RleC9sYXRl
 eAogQGRpcnJtdHJ5IHNoYXJlL3RleG1mLWxvY2FsL3RleAogQGRpcnJtdHJ5IHNoYXJlL3RleG1m
 LWxvY2FsCg==
 --------_4718379300000000DA39_MULTIPART_MIXED_--
 
State-Changed-From-To: feedback->closed 
State-Changed-By: glewis 
State-Changed-When: Sun Oct 28 23:22:10 UTC 2007 
State-Changed-Why:  
Thanks for following up on this!  I've committed your patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113313 
>Unformatted:
